diff options
author | Ulrich Drepper <drepper@gmail.com> | 2012-01-07 23:57:22 -0500 |
---|---|---|
committer | Ulrich Drepper <drepper@gmail.com> | 2012-01-07 23:57:22 -0500 |
commit | a784e502472fb3a1afa4d01a47c66b52d23e00f6 (patch) | |
tree | 5ebaa084119dcffe41671a62e2e799b172c57d24 /string/argz.h | |
parent | 33808bf1164be2e7c8535bdd5ac398c75c33ed49 (diff) | |
download | glibc-a784e502472fb3a1afa4d01a47c66b52d23e00f6.tar glibc-a784e502472fb3a1afa4d01a47c66b52d23e00f6.tar.gz glibc-a784e502472fb3a1afa4d01a47c66b52d23e00f6.tar.bz2 glibc-a784e502472fb3a1afa4d01a47c66b52d23e00f6.zip |
Remove pre-ISO C support
No more __const.
Diffstat (limited to 'string/argz.h')
-rw-r--r-- | string/argz.h | 62 |
1 files changed, 29 insertions, 33 deletions
diff --git a/string/argz.h b/string/argz.h index 4141d998f9..96bf85b913 100644 --- a/string/argz.h +++ b/string/argz.h @@ -1,5 +1,5 @@ /* Routines for dealing with '\0' separated arg vectors. - Copyright (C) 1995,96,97,98,99,2000,2004,2007 Free Software Foundation, Inc. + Copyright (C) 1995-2000,2004,2007,2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -26,10 +26,6 @@ #include <errno.h> #include <string.h> /* Need size_t, and strchr is called below. */ -#ifndef __const -# define __const const -#endif - #ifndef __error_t_defined typedef int error_t; #endif @@ -40,33 +36,33 @@ __BEGIN_DECLS /* Make a '\0' separated arg vector from a unix argv vector, returning it in ARGZ, and the total length in LEN. If a memory allocation error occurs, ENOMEM is returned, otherwise 0. The result can be destroyed using free. */ -extern error_t __argz_create (char *__const __argv[], char **__restrict __argz, +extern error_t __argz_create (char *const __argv[], char **__restrict __argz, size_t *__restrict __len) __THROW; -extern error_t argz_create (char *__const __argv[], char **__restrict __argz, +extern error_t argz_create (char *const __argv[], char **__restrict __argz, size_t *__restrict __len) __THROW; /* Make a '\0' separated arg vector from a SEP separated list in STRING, returning it in ARGZ, and the total length in LEN. If a memory allocation error occurs, ENOMEM is returned, otherwise 0. The result can be destroyed using free. */ -extern error_t __argz_create_sep (__const char *__restrict __string, +extern error_t __argz_create_sep (const char *__restrict __string, int __sep, char **__restrict __argz, size_t *__restrict __len) __THROW; -extern error_t argz_create_sep (__const char *__restrict __string, +extern error_t argz_create_sep (const char *__restrict __string, int __sep, char **__restrict __argz, size_t *__restrict __len) __THROW; /* Returns the number of strings in ARGZ. */ -extern size_t __argz_count (__const char *__argz, size_t __len) +extern size_t __argz_count (const char *__argz, size_t __len) __THROW __attribute_pure__; -extern size_t argz_count (__const char *__argz, size_t __len) +extern size_t argz_count (const char *__argz, size_t __len) __THROW __attribute_pure__; /* Puts pointers to each string in ARGZ into ARGV, which must be large enough to hold them all. */ -extern void __argz_extract (__const char *__restrict __argz, size_t __len, +extern void __argz_extract (const char *__restrict __argz, size_t __len, char **__restrict __argv) __THROW; -extern void argz_extract (__const char *__restrict __argz, size_t __len, +extern void argz_extract (const char *__restrict __argz, size_t __len, char **__restrict __argv) __THROW; /* Make '\0' separated arg vector ARGZ printable by converting all the '\0's @@ -77,30 +73,30 @@ extern void argz_stringify (char *__argz, size_t __len, int __sep) __THROW; /* Append BUF, of length BUF_LEN to the argz vector in ARGZ & ARGZ_LEN. */ extern error_t __argz_append (char **__restrict __argz, size_t *__restrict __argz_len, - __const char *__restrict __buf, size_t _buf_len) + const char *__restrict __buf, size_t __buf_len) __THROW; extern error_t argz_append (char **__restrict __argz, size_t *__restrict __argz_len, - __const char *__restrict __buf, size_t __buf_len) + const char *__restrict __buf, size_t __buf_len) __THROW; /* Append STR to the argz vector in ARGZ & ARGZ_LEN. */ extern error_t __argz_add (char **__restrict __argz, size_t *__restrict __argz_len, - __const char *__restrict __str) __THROW; + const char *__restrict __str) __THROW; extern error_t argz_add (char **__restrict __argz, size_t *__restrict __argz_len, - __const char *__restrict __str) __THROW; + const char *__restrict __str) __THROW; /* Append SEP separated list in STRING to the argz vector in ARGZ & ARGZ_LEN. */ extern error_t __argz_add_sep (char **__restrict __argz, size_t *__restrict __argz_len, - __const char *__restrict __string, int __delim) + const char *__restrict __string, int __delim) __THROW; extern error_t argz_add_sep (char **__restrict __argz, size_t *__restrict __argz_len, - __const char *__restrict __string, int __delim) + const char *__restrict __string, int __delim) __THROW; /* Delete ENTRY from ARGZ & ARGZ_LEN, if it appears there. */ @@ -120,24 +116,24 @@ extern void argz_delete (char **__restrict __argz, extern error_t __argz_insert (char **__restrict __argz, size_t *__restrict __argz_len, char *__restrict __before, - __const char *__restrict __entry) __THROW; + const char *__restrict __entry) __THROW; extern error_t argz_insert (char **__restrict __argz, size_t *__restrict __argz_len, char *__restrict __before, - __const char *__restrict __entry) __THROW; + const char *__restrict __entry) __THROW; /* Replace any occurrences of the string STR in ARGZ with WITH, reallocating ARGZ as necessary. If REPLACE_COUNT is non-zero, *REPLACE_COUNT will be incremented by number of replacements performed. */ extern error_t __argz_replace (char **__restrict __argz, size_t *__restrict __argz_len, - __const char *__restrict __str, - __const char *__restrict __with, + const char *__restrict __str, + const char *__restrict __with, unsigned int *__restrict __replace_count); extern error_t argz_replace (char **__restrict __argz, size_t *__restrict __argz_len, - __const char *__restrict __str, - __const char *__restrict __with, + const char *__restrict __str, + const char *__restrict __with, unsigned int *__restrict __replace_count); /* Returns the next entry in ARGZ & ARGZ_LEN after ENTRY, or NULL if there @@ -154,15 +150,15 @@ extern error_t argz_replace (char **__restrict __argz, for (entry = argz; entry; entry = argz_next (argz, argz_len, entry)) ...; */ -extern char *__argz_next (__const char *__restrict __argz, size_t __argz_len, - __const char *__restrict __entry) __THROW; -extern char *argz_next (__const char *__restrict __argz, size_t __argz_len, - __const char *__restrict __entry) __THROW; +extern char *__argz_next (const char *__restrict __argz, size_t __argz_len, + const char *__restrict __entry) __THROW; +extern char *argz_next (const char *__restrict __argz, size_t __argz_len, + const char *__restrict __entry) __THROW; #ifdef __USE_EXTERN_INLINES __extern_inline char * -__NTH (__argz_next (__const char *__argz, size_t __argz_len, - __const char *__entry)) +__NTH (__argz_next (const char *__argz, size_t __argz_len, + const char *__entry)) { if (__entry) { @@ -175,8 +171,8 @@ __NTH (__argz_next (__const char *__argz, size_t __argz_len, return __argz_len > 0 ? (char *) __argz : 0; } __extern_inline char * -__NTH (argz_next (__const char *__argz, size_t __argz_len, - __const char *__entry)) +__NTH (argz_next (const char *__argz, size_t __argz_len, + const char *__entry)) { return __argz_next (__argz, __argz_len, __entry); } |