diff options
author | Ulrich Drepper <drepper@redhat.com> | 1998-12-04 20:58:15 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1998-12-04 20:58:15 +0000 |
commit | a6ff34d7b0b59a1ad501dca25558ba21f6e539bb (patch) | |
tree | eabe576c69bb878112d903d1e08836bab8c8aed1 /string | |
parent | fcb7e0a5f7722609d78739d8ef590fcfd2ed2109 (diff) | |
download | glibc-a6ff34d7b0b59a1ad501dca25558ba21f6e539bb.zip glibc-a6ff34d7b0b59a1ad501dca25558ba21f6e539bb.tar.gz glibc-a6ff34d7b0b59a1ad501dca25558ba21f6e539bb.tar.bz2 |
Update.
1998-12-04 Ulrich Drepper <drepper@cygnus.com>
* argp/argp.h: Add __retrict.
* dirent/dirent.h: Likewise.
* elf/dlfcn.h: Likewise.
* grp/grp.h: Likewise.
* iconv/iconv.h: Likewise.
* inet/aliases.h: Likewise.
* libio/libio.h: Likewise.
* libio/stdio.h: Likewise.
* locale/locale.h: Likewise.
* misc/mntent.h: Likewise.
* posix/wordexp.h: Likewise.
* pwd/pwd.h: Likewise.
* resolv/netdb.h: Likewise.
* rt/aio.h: Likewise.
* stdio-common/printf.h: Likewise.
* stdlib/monetary.h: Likewise.
* stdlib/stdlib.h: Likewise.
* string/argz.h: Likewise.
* string/envz.h: Likewise.
* string/string.h: Likewise.
* time/time.h: Likewise.
1998-12-04 Zack Weinberg <zack@rabi.phys.columbia.edu>
* misc/sys/cdefs.h: Only include features.h if _FEATURES_H isn't
defined. gcc's redundant include optimizer isn't clever enough to
prevent a reinclusion here.
Define __restrict to the empty string only if not GCC or
GCC version less than 2.92.
1998-12-03 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
* sysdeps/unix/sysv/linux/configure.in: Fix last change.
1998-12-03 Mark Kettenis <kettenis@phys.uva.nl>
* time/strptime.c (strptime_internal): Make use of `%C' format
specifier if it is seen together with the `%y' specifier.
1998-12-04 Ulrich Drepper <drepper@cygnus.com>
* po/sk.po: New file.
1998-12-03 Scott Bambrough <scottb@corelcomputer.com>
* sysdeps/arm/dl-machine.h (dl_start_user): Incorrect address
for _dl_main_searchlist passed to _dl_init_next.
1998-12-02 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
* math/libm-test.c: Expand literal tabs in strings. Normalize
whitespace.
1998-12-02 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
* sysdeps/unix/sysv/linux/sys/fsuid.h: Fix spelling.
Diffstat (limited to 'string')
-rw-r--r-- | string/argz.h | 110 | ||||
-rw-r--r-- | string/envz.h | 30 | ||||
-rw-r--r-- | string/string.h | 25 |
3 files changed, 102 insertions, 63 deletions
diff --git a/string/argz.h b/string/argz.h index 437dba4..4b25cc0 100644 --- a/string/argz.h +++ b/string/argz.h @@ -40,19 +40,23 @@ __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 __P ((char *__const __argv[], char **__argz, - size_t *__len)); -extern error_t argz_create __P ((char *__const __argv[], char **__argz, - size_t *__len)); +extern error_t __argz_create __P ((char *__const __argv[], + char **__restrict __argz, + size_t *__restrict __len)); +extern error_t argz_create __P ((char *__const __argv[], + char **__restrict __argz, + size_t *__restrict __len)); /* 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 __P ((__const char *__string, int __sep, - char **__argz, size_t *__len)); -extern error_t argz_create_sep __P ((__const char *__string, int __sep, - char **__argz, size_t *__len)); +extern error_t __argz_create_sep __P ((__const char *__restrict __string, + int __sep, char **__restrict __argz, + size_t *__restrict __len)); +extern error_t argz_create_sep __P ((__const char *__restrict __string, + int __sep, char **__restrict __argz, + size_t *__restrict __len)); /* Returns the number of strings in ARGZ. */ extern size_t __argz_count __P ((__const char *__argz, size_t __len)); @@ -60,10 +64,10 @@ extern size_t argz_count __P ((__const char *__argz, size_t __len)); /* Puts pointers to each string in ARGZ into ARGV, which must be large enough to hold them all. */ -extern void __argz_extract __P ((__const char *__argz, size_t __len, - char **__argv)); -extern void argz_extract __P ((__const char *__argz, size_t __len, - char **__argv)); +extern void __argz_extract __P ((__const char *__restrict __argz, size_t __len, + char **__restrict __argv)); +extern void argz_extract __P ((__const char *__restrict __argz, size_t __len, + char **__restrict __argv)); /* Make '\0' separated arg vector ARGZ printable by converting all the '\0's except the last into the character SEP. */ @@ -71,29 +75,41 @@ extern void __argz_stringify __P ((char *__argz, size_t __len, int __sep)); extern void argz_stringify __P ((char *__argz, size_t __len, int __sep)); /* Append BUF, of length BUF_LEN to the argz vector in ARGZ & ARGZ_LEN. */ -extern error_t __argz_append __P ((char **__argz, size_t *__argz_len, - __const char *__buf, size_t _buf_len)); -extern error_t argz_append __P ((char **__argz, size_t *__argz_len, - __const char *__buf, size_t __buf_len)); +extern error_t __argz_append __P ((char **__restrict __argz, + size_t *__restrict __argz_len, + __const char *__restrict __buf, + size_t _buf_len)); +extern error_t argz_append __P ((char **__restrict __argz, + size_t *__restrict __argz_len, + __const char *__restrict __buf, + size_t __buf_len)); /* Append STR to the argz vector in ARGZ & ARGZ_LEN. */ -extern error_t __argz_add __P ((char **__argz, size_t *__argz_len, - __const char *__str)); -extern error_t argz_add __P ((char **__argz, size_t *__argz_len, - __const char *__str)); +extern error_t __argz_add __P ((char **__restrict __argz, + size_t *__restrict __argz_len, + __const char *__restrict __str)); +extern error_t argz_add __P ((char **__restrict __argz, + size_t *__restrict __argz_len, + __const char *__restrict __str)); /* Append SEP separated list in STRING to the argz vector in ARGZ & ARGZ_LEN. */ -extern error_t __argz_add_sep __P ((char **__argz, size_t *__argz_len, - __const char *__string, int __delim)); -extern error_t argz_add_sep __P ((char **__argz, size_t *__argz_len, - __const char *__string, int __delim)); +extern error_t __argz_add_sep __P ((char **__restrict __argz, + size_t *__restrict __argz_len, + __const char *__restrict __string, + int __delim)); +extern error_t argz_add_sep __P ((char **__restrict __argz, + size_t *__restrict __argz_len, + __const char *__restrict __string, + int __delim)); /* Delete ENTRY from ARGZ & ARGZ_LEN, if it appears there. */ -extern void __argz_delete __P ((char **__argz, size_t *__argz_len, - char *__entry)); -extern void argz_delete __P ((char **__argz, size_t *__argz_len, - char *__entry)); +extern void __argz_delete __P ((char **__restrict __argz, + size_t *__restrict __argz_len, + char *__restrict __entry)); +extern void argz_delete __P ((char **__restrict __argz, + size_t *__restrict __argz_len, + char *__restrict __entry)); /* Insert ENTRY into ARGZ & ARGZ_LEN before BEFORE, which should be an existing entry in ARGZ; if BEFORE is NULL, ENTRY is appended to the end. @@ -101,20 +117,28 @@ extern void argz_delete __P ((char **__argz, size_t *__argz_len, ARGZ, ENTRY) will insert ENTRY at the beginning of ARGZ. If BEFORE is not in ARGZ, EINVAL is returned, else if memory can't be allocated for the new ARGZ, ENOMEM is returned, else 0. */ -extern error_t __argz_insert __P ((char **__argz, size_t *__argz_len, - char *__before, __const char *__entry)); -extern error_t argz_insert __P ((char **__argz, size_t *__argz_len, - char *__before, __const char *__entry)); +extern error_t __argz_insert __P ((char **__restrict __argz, + size_t *__restrict __argz_len, + char *__restrict __before, + __const char *__restrict __entry)); +extern error_t argz_insert __P ((char **__restrict __argz, + size_t *__restrict __argz_len, + char *__restrict __before, + __const char *__restrict __entry)); /* Replace any occurances 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 **__argz, size_t *__argz_len, - __const char *__str, __const char *__with, - unsigned *__replace_count); -extern error_t argz_replace (char **__argz, size_t *__argz_len, - __const char *__str, __const char *__with, - unsigned *__replace_count); +extern error_t __argz_replace (char **__restrict __argz, + size_t *__restrict __argz_len, + __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, + unsigned int *__restrict __replace_count); /* Returns the next entry in ARGZ & ARGZ_LEN after ENTRY, or NULL if there are no more. If entry is NULL, then the first entry is returned. This @@ -130,10 +154,12 @@ extern error_t argz_replace (char **__argz, size_t *__argz_len, for (entry = argz; entry; entry = argz_next (argz, argz_len, entry)) ...; */ -extern char *__argz_next __P ((__const char *argz, size_t __argz_len, - __const char *entry)); -extern char *argz_next __P ((__const char *argz, size_t __argz_len, - __const char *entry)); +extern char *__argz_next __P ((__const char *__restrict __argz, + size_t __argz_len, + __const char *__restrict __entry)); +extern char *argz_next __P ((__const char *__restrict __argz, + size_t __argz_len, + __const char *__restrict __entry)); #ifdef __USE_EXTERN_INLINES extern inline char * diff --git a/string/envz.h b/string/envz.h index adb8c0a..f9a8e69 100644 --- a/string/envz.h +++ b/string/envz.h @@ -31,13 +31,14 @@ __BEGIN_DECLS /* Returns a pointer to the entry in ENVZ for NAME, or 0 if there is none. */ -extern char *envz_entry __P ((__const char *__envz, size_t __envz_len, - __const char *__name)); +extern char *envz_entry __P ((__const char *__restrict __envz, + size_t __envz_len, + __const char *__restrict __name)); /* Returns a pointer to the value portion of the entry in ENVZ for NAME, or 0 if there is none. */ -extern char *envz_get __P ((__const char *__envz, size_t __envz_len, - __const char *__name)); +extern char *envz_get __P ((__const char *__restrict __envz, size_t __envz_len, + __const char *__restrict __name)); /* Adds an entry for NAME with value VALUE to ENVZ & ENVZ_LEN. If an entry with the same name already exists in ENVZ, it is removed. If VALUE is @@ -45,22 +46,27 @@ extern char *envz_get __P ((__const char *__envz, size_t __envz_len, return NULL, although envz_entry will still return an entry; this is handy because when merging with another envz, the null entry can override an entry in the other one. Null entries can be removed with envz_strip (). */ -extern error_t envz_add __P ((char **__envz, size_t *__envz_len, - __const char *__name, __const char *__value)); +extern error_t envz_add __P ((char **__restrict __envz, + size_t *__restrict __envz_len, + __const char *__restrict __name, + __const char *__restrict __value)); /* Adds each entry in ENVZ2 to ENVZ & ENVZ_LEN, as if with envz_add(). If OVERRIDE is true, then values in ENVZ2 will supersede those with the same name in ENV, otherwise not. */ -extern error_t envz_merge __P ((char **__envz, size_t *__envz_len, - __const char *__envz2, size_t __envz2_len, - int __override)); +extern error_t envz_merge __P ((char **__restrict __envz, + size_t *__restrict __envz_len, + __const char *__restrict __envz2, + size_t __envz2_len, int __override)); /* Remove the entry for NAME from ENVZ & ENVZ_LEN, if any. */ -extern void envz_remove __P ((char **__envz, size_t *__envz_len, - __const char *__name)); +extern void envz_remove __P ((char **__restrict __envz, + size_t *__restrict __envz_len, + __const char *__restrict __name)); /* Remove null entries. */ -extern void envz_strip __P ((char **__envz, size_t *__envz_len)); +extern void envz_strip __P ((char **__restrict __envz, + size_t *__restrict __envz_len)); __END_DECLS diff --git a/string/string.h b/string/string.h index 5ded08f..201cff5 100644 --- a/string/string.h +++ b/string/string.h @@ -167,11 +167,13 @@ extern char *strtok __P ((char *__restrict __s, /* Divide S into tokens separated by characters in DELIM. Information passed between calls are stored in SAVE_PTR. */ -extern char *__strtok_r __P ((char *__s, __const char *__delim, - char **__save_ptr)); +extern char *__strtok_r __P ((char *__restrict __s, + __const char *__restrict __delim, + char **__restrict __save_ptr)); #if defined __USE_POSIX || defined __USE_MISC -extern char *strtok_r __P ((char *__s, __const char *__delim, - char **__save_ptr)); +extern char *strtok_r __P ((char *__restrict __s, + __const char *__restrict __delim, + char **__restrict __save_ptr)); #endif #ifdef __USE_GNU @@ -268,7 +270,8 @@ extern int __strncasecmp_l __P ((__const char *__s1, __const char *__s2, #ifdef __USE_BSD /* Return the next DELIM-delimited token from *STRINGP, terminating it with a '\0', and update *STRINGP to point past it. */ -extern char *strsep __P ((char **__stringp, __const char *__delim)); +extern char *strsep __P ((char **__restrict __stringp, + __const char *__restrict __delim)); #endif #ifdef __USE_GNU @@ -279,13 +282,17 @@ extern int strverscmp __P ((__const char *__s1, __const char *__s2)); extern char *strsignal __P ((int __sig)); /* Copy SRC to DEST, returning the address of the terminating '\0' in DEST. */ -extern char *__stpcpy __P ((char *__dest, __const char *__src)); -extern char *stpcpy __P ((char *__dest, __const char *__src)); +extern char *__stpcpy __P ((char *__restrict __dest, + __const char *__restrict __src)); +extern char *stpcpy __P ((char *__restrict __dest, + __const char *__restrict __src)); /* Copy no more than N characters of SRC to DEST, returning the address of the last character written into DEST. */ -extern char *__stpncpy __P ((char *__dest, __const char *__src, size_t __n)); -extern char *stpncpy __P ((char *__dest, __const char *__src, size_t __n)); +extern char *__stpncpy __P ((char *__restrict __dest, + __const char *__restrict __src, size_t __n)); +extern char *stpncpy __P ((char *__restrict __dest, + __const char *__restrict __src, size_t __n)); /* Sautee STRING briskly. */ extern char *strfry __P ((char *__string)); |