2003-06-06 Jeff Johnston <jjohnstn@redhat.com>
* libc/argz/argz_add.c: Change to use _DEFUN macro for function
        definition.
        * libc/argz/argz_add_sep.c: Ditto.
        * libc/argz/argz_append.c libc/argz/argz_count.c: Ditto.
        * libc/argz/argz_create.c libc/argz/argz_create_sep.c: Ditto.
        * libc/argz/argz_delete.c libc/argz/argz_extract.c: Ditto.
        * libc/argz/argz_insert.c libc/argz/argz_next.c: Ditto.
        * libc/argz/argz_replace.c libc/argz/argz_stringify.c: Ditto.
        * libc/argz/envz_add.c libc/argz/envz_entry.c: Ditto.
        * libc/argz/envz_get.c libc/argz/envz_merge.c: Ditto.
        * libc/argz/envz_remove.c libc/argz/envz_strip.c: Ditto.
        * libc/locale/nl_langinfo.c libc/misc/ffs.c: Ditto.
        * libc/posix/closedir.c libc/posix/creat.c: Ditto.
        * libc/posix/execl.c libc/posix/execle.c: Ditto.
        * libc/posix/execlp.c libc/posix/execve.c: Ditto.
        * libc/posix/isatty.c libc/posix/opendir.c: Ditto.
        * libc/posix/popen.c libc/posix/readdir.c: Ditto.
        * libc/posix/readdir_r.c libc/posix/rewinddir.c: Ditto.
        * libc/posix/scandir.c libc/posix/seekdir.c: Ditto.
        * libc/posix/telldir.c libc/search/hcreate.c: Ditto.
        * libc/search/tdelete.c libc/search/tdestroy.c: Ditto.
        * libc/search/tfind.c libc/search/tsearch.c: Ditto.
        * libc/search/twalk.c libc/signal/signal.c: Ditto.
			
			
This commit is contained in:
		| @@ -1,3 +1,29 @@ | |||||||
|  | 2003-06-06  Jeff Johnston  <jjohnstn@redhat.com> | ||||||
|  |  | ||||||
|  |         * libc/argz/argz_add.c: Change to use _DEFUN macro for function | ||||||
|  |         definition. | ||||||
|  |         * libc/argz/argz_add_sep.c: Ditto. | ||||||
|  |         * libc/argz/argz_append.c libc/argz/argz_count.c: Ditto. | ||||||
|  |         * libc/argz/argz_create.c libc/argz/argz_create_sep.c: Ditto. | ||||||
|  |         * libc/argz/argz_delete.c libc/argz/argz_extract.c: Ditto. | ||||||
|  |         * libc/argz/argz_insert.c libc/argz/argz_next.c: Ditto. | ||||||
|  |         * libc/argz/argz_replace.c libc/argz/argz_stringify.c: Ditto. | ||||||
|  |         * libc/argz/envz_add.c libc/argz/envz_entry.c: Ditto. | ||||||
|  |         * libc/argz/envz_get.c libc/argz/envz_merge.c: Ditto. | ||||||
|  |         * libc/argz/envz_remove.c libc/argz/envz_strip.c: Ditto. | ||||||
|  |         * libc/locale/nl_langinfo.c libc/misc/ffs.c: Ditto. | ||||||
|  |         * libc/posix/closedir.c libc/posix/creat.c: Ditto. | ||||||
|  |         * libc/posix/execl.c libc/posix/execle.c: Ditto. | ||||||
|  |         * libc/posix/execlp.c libc/posix/execve.c: Ditto. | ||||||
|  |         * libc/posix/isatty.c libc/posix/opendir.c: Ditto. | ||||||
|  |         * libc/posix/popen.c libc/posix/readdir.c: Ditto. | ||||||
|  |         * libc/posix/readdir_r.c libc/posix/rewinddir.c: Ditto. | ||||||
|  |         * libc/posix/scandir.c libc/posix/seekdir.c: Ditto. | ||||||
|  |         * libc/posix/telldir.c libc/search/hcreate.c: Ditto. | ||||||
|  |         * libc/search/tdelete.c libc/search/tdestroy.c: Ditto. | ||||||
|  |         * libc/search/tfind.c libc/search/tsearch.c: Ditto. | ||||||
|  |         * libc/search/twalk.c libc/signal/signal.c: Ditto. | ||||||
|  |  | ||||||
| 2003-06-05  Nick Clifton  <nickc@redhat.com> | 2003-06-05  Nick Clifton  <nickc@redhat.com> | ||||||
| 	 | 	 | ||||||
| 	* libc/include/sys/reent.h (struct _on_exit_args): New | 	* libc/include/sys/reent.h (struct _on_exit_args): New | ||||||
|   | |||||||
| @@ -10,7 +10,10 @@ | |||||||
| #include <stdlib.h> | #include <stdlib.h> | ||||||
|  |  | ||||||
| error_t | error_t | ||||||
| argz_add (char **argz, size_t *argz_len, const char *str) | _DEFUN (argz_add, (argz, argz_len, str), | ||||||
|  |        char **argz _AND | ||||||
|  |        size_t *argz_len _AND | ||||||
|  |        const char *str) | ||||||
| { | { | ||||||
|   int len_to_add = 0; |   int len_to_add = 0; | ||||||
|   size_t last = *argz_len; |   size_t last = *argz_len; | ||||||
|   | |||||||
| @@ -11,7 +11,11 @@ | |||||||
| #include <argz.h> | #include <argz.h> | ||||||
|  |  | ||||||
| error_t | error_t | ||||||
| argz_add_sep (char **argz, size_t *argz_len, const char *str, int sep) | _DEFUN (argz_add_sep, (argz, argz_len, str, sep), | ||||||
|  |        char **argz _AND | ||||||
|  |        size_t *argz_len _AND | ||||||
|  |        const char *str _AND | ||||||
|  |        int sep) | ||||||
| { | { | ||||||
|   char *str_argz = 0; |   char *str_argz = 0; | ||||||
|   size_t str_argz_len = 0; |   size_t str_argz_len = 0; | ||||||
|   | |||||||
| @@ -10,7 +10,11 @@ | |||||||
| #include <stdlib.h> | #include <stdlib.h> | ||||||
|  |  | ||||||
| error_t | error_t | ||||||
| argz_append (char **argz, size_t *argz_len, const char *buf, size_t buf_len) | _DEFUN (argz_append, (argz, argz_len, buf, buf_len), | ||||||
|  |        char **argz _AND | ||||||
|  |        size_t *argz_len _AND | ||||||
|  |        const char *buf _AND | ||||||
|  |        size_t buf_len) | ||||||
| { | { | ||||||
|   size_t last = *argz_len; |   size_t last = *argz_len; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -4,10 +4,13 @@ | |||||||
|  * is freely granted, provided that this notice is preserved. |  * is freely granted, provided that this notice is preserved. | ||||||
|  */ |  */ | ||||||
|  |  | ||||||
|  | #include <_ansi.h> | ||||||
| #include <sys/types.h> | #include <sys/types.h> | ||||||
|  |  | ||||||
| size_t | size_t | ||||||
| argz_count (const char *argz, size_t argz_len) | _DEFUN (argz_count, (argz, argz_len),  | ||||||
|  |        const char *argz _AND | ||||||
|  |        size_t argz_len) | ||||||
| { | { | ||||||
|   int i; |   int i; | ||||||
|   size_t count = 0; |   size_t count = 0; | ||||||
|   | |||||||
| @@ -10,7 +10,10 @@ | |||||||
| #include <stdlib.h> | #include <stdlib.h> | ||||||
|  |  | ||||||
| error_t | error_t | ||||||
| argz_create (char *const argv[], char **argz, size_t *argz_len) | _DEFUN (argz_create, (argv, argz, argz_len), | ||||||
|  |        char *const argv[] _AND | ||||||
|  |        char **argz _AND | ||||||
|  |        size_t *argz_len) | ||||||
| { | { | ||||||
|   int argc = 0; |   int argc = 0; | ||||||
|   int i = 0; |   int i = 0; | ||||||
|   | |||||||
| @@ -10,7 +10,11 @@ | |||||||
| #include <stdlib.h> | #include <stdlib.h> | ||||||
|  |  | ||||||
| error_t | error_t | ||||||
| argz_create_sep (const char *string, int sep, char **argz, size_t *argz_len) | _DEFUN (argz_create_sep, (string, sep, argz, argz_len), | ||||||
|  |        const char *string _AND | ||||||
|  |        int sep _AND | ||||||
|  |        char **argz _AND | ||||||
|  |        size_t *argz_len) | ||||||
| { | { | ||||||
|   int len = 0; |   int len = 0; | ||||||
|   int i = 0; |   int i = 0; | ||||||
|   | |||||||
| @@ -10,7 +10,10 @@ | |||||||
| #include <stdlib.h> | #include <stdlib.h> | ||||||
|  |  | ||||||
| error_t | error_t | ||||||
| argz_delete (char **argz, size_t *argz_len, char *entry) | _DEFUN (argz_delete, (argz, argz_len, entry), | ||||||
|  |        char **argz _AND | ||||||
|  |        size_t *argz_len _AND | ||||||
|  |        char *entry) | ||||||
| { | { | ||||||
|   int len = 0; |   int len = 0; | ||||||
|   char *moveto = entry; |   char *moveto = entry; | ||||||
|   | |||||||
| @@ -8,7 +8,10 @@ | |||||||
| #include <sys/types.h> | #include <sys/types.h> | ||||||
|  |  | ||||||
| void | void | ||||||
| argz_extract (char *argz, size_t argz_len, char **argv) | _DEFUN (argz_extract, (argz, argz_len, argv), | ||||||
|  |        char *argz _AND | ||||||
|  |        size_t argz_len _AND | ||||||
|  |        char **argv) | ||||||
| { | { | ||||||
|   size_t i = 0; |   size_t i = 0; | ||||||
|   int j = 0; |   int j = 0; | ||||||
|   | |||||||
| @@ -11,7 +11,11 @@ | |||||||
| #include <argz.h> | #include <argz.h> | ||||||
|  |  | ||||||
| error_t | error_t | ||||||
| argz_insert (char **argz, size_t *argz_len, char *before, const char *entry) | _DEFUN (argz_insert, (argz, argz_len, before, entry), | ||||||
|  |        char **argz _AND | ||||||
|  |        size_t *argz_len _AND | ||||||
|  |        char *before _AND | ||||||
|  |        const char *entry) | ||||||
| { | { | ||||||
|   int len = 0; |   int len = 0; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -10,7 +10,10 @@ | |||||||
| #include <stdlib.h> | #include <stdlib.h> | ||||||
|  |  | ||||||
| char * | char * | ||||||
| argz_next (char *argz, size_t argz_len, const char *entry) | _DEFUN (argz_next, (argz, argz_len, entry), | ||||||
|  |        char *argz _AND | ||||||
|  |        size_t argz_len _AND | ||||||
|  |        const char *entry) | ||||||
| { | { | ||||||
|   if (entry) |   if (entry) | ||||||
|     { |     { | ||||||
|   | |||||||
| @@ -13,7 +13,12 @@ | |||||||
| #include "buf_findstr.h" | #include "buf_findstr.h" | ||||||
|  |  | ||||||
| error_t | error_t | ||||||
| argz_replace (char **argz, size_t *argz_len, const char *str, const char *with, unsigned *replace_count) | _DEFUN (argz_replace, (argz, argz_len, str, with, replace_count), | ||||||
|  |        char **argz _AND | ||||||
|  |        size_t *argz_len _AND | ||||||
|  |        const char *str _AND | ||||||
|  |        const char *with _AND | ||||||
|  |        unsigned *replace_count) | ||||||
| { | { | ||||||
|   const int str_len = strlen(str); |   const int str_len = strlen(str); | ||||||
|   const int with_len = strlen(with); |   const int with_len = strlen(with); | ||||||
|   | |||||||
| @@ -4,10 +4,14 @@ | |||||||
|  * is freely granted, provided that this notice is preserved. |  * is freely granted, provided that this notice is preserved. | ||||||
|  */ |  */ | ||||||
|  |  | ||||||
|  | #include <_ansi.h> | ||||||
| #include <sys/types.h> | #include <sys/types.h> | ||||||
|  |  | ||||||
| void | void | ||||||
| argz_stringify (char *argz, size_t argz_len, int sep) | _DEFUN (argz_stringify, (argz, argz_len, sep), | ||||||
|  |        char *argz _AND | ||||||
|  |        size_t argz_len _AND | ||||||
|  |        int sep) | ||||||
| { | { | ||||||
|   size_t i; |   size_t i; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -12,7 +12,11 @@ | |||||||
| #include <envz.h> | #include <envz.h> | ||||||
|  |  | ||||||
| error_t | error_t | ||||||
| envz_add (char **envz, size_t *envz_len, const char *name, const char *value) | _DEFUN (envz_add, (envz, envz_len, name, value), | ||||||
|  |        char **envz _AND  | ||||||
|  |        size_t *envz_len _AND  | ||||||
|  |        const char *name _AND | ||||||
|  |        const char *value) | ||||||
| { | { | ||||||
|   char *concat = NULL; |   char *concat = NULL; | ||||||
|   int name_len = 0; |   int name_len = 0; | ||||||
|   | |||||||
| @@ -13,7 +13,10 @@ | |||||||
| #include "buf_findstr.h" | #include "buf_findstr.h" | ||||||
|  |  | ||||||
| char * | char * | ||||||
| envz_entry (const char *envz, size_t envz_len, const char *name) | _DEFUN (envz_entry, (envz, envz_len, name), | ||||||
|  |        const char *envz _AND | ||||||
|  |        size_t envz_len _AND | ||||||
|  |        const char *name) | ||||||
| { | { | ||||||
|   char *buf_ptr = (char *)envz; |   char *buf_ptr = (char *)envz; | ||||||
|   size_t buf_len = envz_len; |   size_t buf_len = envz_len; | ||||||
|   | |||||||
| @@ -13,7 +13,10 @@ | |||||||
| #include "buf_findstr.h" | #include "buf_findstr.h" | ||||||
|  |  | ||||||
| char * | char * | ||||||
| envz_get (const char *envz, size_t envz_len, const char *name) | _DEFUN (envz_get, (envz, envz_len, name), | ||||||
|  |        const char *envz _AND  | ||||||
|  |        size_t envz_len _AND | ||||||
|  |        const char *name) | ||||||
| { | { | ||||||
|   char *buf_ptr = (char *)envz; |   char *buf_ptr = (char *)envz; | ||||||
|   size_t buf_len = envz_len; |   size_t buf_len = envz_len; | ||||||
|   | |||||||
| @@ -12,7 +12,12 @@ | |||||||
| #include <envz.h> | #include <envz.h> | ||||||
|  |  | ||||||
| error_t | error_t | ||||||
| envz_merge (char **envz, size_t *envz_len, const char *envz2, size_t envz2_len, int override) | _DEFUN (envz_merge, (envz, envz_len, envz2, envz2_len, override), | ||||||
|  |        char **envz _AND | ||||||
|  |        size_t *envz_len _AND | ||||||
|  |        const char *envz2 _AND | ||||||
|  |        size_t envz2_len _AND | ||||||
|  |        int override) | ||||||
| { | { | ||||||
|   char *entry = NULL; |   char *entry = NULL; | ||||||
|   char *name_str = NULL; |   char *name_str = NULL; | ||||||
|   | |||||||
| @@ -12,7 +12,10 @@ | |||||||
| #include <envz.h> | #include <envz.h> | ||||||
|  |  | ||||||
| void | void | ||||||
| envz_remove(char **envz, size_t *envz_len, const char *name) | _DEFUN (envz_remove, (envz, envz_len, name), | ||||||
|  |        char **envz _AND | ||||||
|  |        size_t *envz_len _AND | ||||||
|  |        const char *name) | ||||||
| { | { | ||||||
|   char *entry = NULL; |   char *entry = NULL; | ||||||
|   int len = 0; |   int len = 0; | ||||||
|   | |||||||
| @@ -12,7 +12,9 @@ | |||||||
| #include <envz.h> | #include <envz.h> | ||||||
|  |  | ||||||
| void | void | ||||||
| envz_strip (char **envz, size_t *envz_len) | _DEFUN (envz_strip, (envz, envz_len), | ||||||
|  |        char **envz _AND | ||||||
|  |        size_t *envz_len) | ||||||
| { | { | ||||||
|   char *entry = 0; |   char *entry = 0; | ||||||
|   int len = 0; |   int len = 0; | ||||||
|   | |||||||
| @@ -42,7 +42,8 @@ | |||||||
| #define _REL(BASE) ((int)item-BASE) | #define _REL(BASE) ((int)item-BASE) | ||||||
|  |  | ||||||
| char * | char * | ||||||
| nl_langinfo(nl_item item) { | _DEFUN(nl_langinfo, (item),  | ||||||
|  |        nl_item item) { | ||||||
|  |  | ||||||
|    char *ret, *s, *cs; |    char *ret, *s, *cs; | ||||||
|    static char *csym = NULL; |    static char *csym = NULL; | ||||||
|   | |||||||
| @@ -24,9 +24,11 @@ PORTABILITY | |||||||
|  |  | ||||||
| No supporting OS subroutines are required.  */ | No supporting OS subroutines are required.  */ | ||||||
|  |  | ||||||
|  | #include <_ansi.h> | ||||||
|  |  | ||||||
| int | int | ||||||
| ffs (word) | _DEFUN(ffs, (word), | ||||||
|      int word; |        int word) | ||||||
| { | { | ||||||
|   int i; |   int i; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -49,8 +49,8 @@ extern void _cleanupdir (DIR *dirp); | |||||||
|  * close a directory. |  * close a directory. | ||||||
|  */ |  */ | ||||||
| int | int | ||||||
| closedir(dirp) | _DEFUN(closedir, (dirp), | ||||||
| 	register DIR *dirp; |        register DIR *dirp) | ||||||
| { | { | ||||||
| 	int fd, rc; | 	int fd, rc; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -5,7 +5,9 @@ | |||||||
| #include <fcntl.h> | #include <fcntl.h> | ||||||
|  |  | ||||||
| int | int | ||||||
| creat (const char *path, mode_t mode) | _DEFUN(creat, (path, mode),  | ||||||
|  |        const char *path _AND  | ||||||
|  |        mode_t mode) | ||||||
| { | { | ||||||
|   return open (path, O_WRONLY | O_CREAT | O_TRUNC, mode); |   return open (path, O_WRONLY | O_CREAT | O_TRUNC, mode); | ||||||
| } | } | ||||||
|   | |||||||
| @@ -16,17 +16,19 @@ static char ***p_environ = &environ; | |||||||
| #include <stdarg.h> | #include <stdarg.h> | ||||||
|  |  | ||||||
| int | int | ||||||
| execl (_CONST char *path, _CONST char *arg0, ...) | _DEFUN(execl, (path, arg0, ...),  | ||||||
|  |       _CONST char *path _AND | ||||||
|  |       _CONST char *arg0 _DOTS) | ||||||
|  |  | ||||||
| #else | #else | ||||||
|  |  | ||||||
| #include <varargs.h> | #include <varargs.h> | ||||||
|  |  | ||||||
| int | int | ||||||
| execl (path, arg0, va_alist) | _DEFUN(execl, (path, arg0, va_alist), | ||||||
|      _CONST char *path; |      _CONST char *path _AND | ||||||
|      _CONST char *arg0; |      _CONST char *arg0 _AND | ||||||
|      va_dcl |      va_dcl) | ||||||
|  |  | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
|   | |||||||
| @@ -11,17 +11,19 @@ | |||||||
| #include <stdarg.h> | #include <stdarg.h> | ||||||
|  |  | ||||||
| int | int | ||||||
| execle (_CONST char *path, _CONST char *arg0, ...) | _DEFUN(execle, (path, arg0, ...), | ||||||
|  |       _CONST char *path _AND | ||||||
|  |       _CONST char *arg0 _DOTS) | ||||||
|  |  | ||||||
| #else | #else | ||||||
|  |  | ||||||
| #include <varargs.h> | #include <varargs.h> | ||||||
|  |  | ||||||
| int | int | ||||||
| execle (path, arg0, va_alist) | _DEFUN(execle, (path, arg0, va_alist), | ||||||
|      _CONST char *path; |      _CONST char *path _AND | ||||||
|      _CONST char *arg0; |      _CONST char *arg0 _AND | ||||||
|      va_dcl |      va_dcl) | ||||||
|  |  | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
|   | |||||||
| @@ -11,17 +11,19 @@ | |||||||
| #include <stdarg.h> | #include <stdarg.h> | ||||||
|  |  | ||||||
| int | int | ||||||
| execlp (_CONST char *path, _CONST char *arg0, ...) | _DEFUN(execlp, (path, arg0, ...), | ||||||
|  |       _CONST char *path _AND | ||||||
|  |       _CONST char *arg0 _DOTS) | ||||||
|  |  | ||||||
| #else | #else | ||||||
|  |  | ||||||
| #include <varargs.h> | #include <varargs.h> | ||||||
|  |  | ||||||
| int | int | ||||||
| execlp (path, arg0, va_alist) | _DEFUN(execlp, (path, arg0, va_alist), | ||||||
|      _CONST char *path; |      _CONST char *path _AND | ||||||
|      _CONST char *arg0; |      _CONST char *arg0 _AND | ||||||
|      va_dcl |      va_dcl) | ||||||
|  |  | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
|   | |||||||
| @@ -8,7 +8,10 @@ | |||||||
|  |  | ||||||
|  |  | ||||||
| int | int | ||||||
| execve (const char *path, char * const argv[], char * const envp[]) | _DEFUN(execve, (path, argv, envp), | ||||||
|  |       const char *path _AND | ||||||
|  |       char * const argv[] _AND | ||||||
|  |       char * const envp[]) | ||||||
| { | { | ||||||
|   return _execve (path, argv, envp); |   return _execve (path, argv, envp); | ||||||
| } | } | ||||||
|   | |||||||
| @@ -5,7 +5,7 @@ | |||||||
| #include <sys/stat.h> | #include <sys/stat.h> | ||||||
|  |  | ||||||
| int | int | ||||||
| isatty (int fd) | _DEFUN(isatty, (fd), int fd) | ||||||
| { | { | ||||||
|   struct stat buf; |   struct stat buf; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -47,8 +47,8 @@ static char sccsid[] = "@(#)opendir.c	5.11 (Berkeley) 2/23/91"; | |||||||
|  * open a directory. |  * open a directory. | ||||||
|  */ |  */ | ||||||
| DIR * | DIR * | ||||||
| opendir(name) | _DEFUN(opendir, (name), | ||||||
| 	const char *name; | 	const char *name) | ||||||
| { | { | ||||||
| 	register DIR *dirp; | 	register DIR *dirp; | ||||||
| 	register int fd; | 	register int fd; | ||||||
|   | |||||||
| @@ -63,9 +63,9 @@ static struct pid { | |||||||
| } *pidlist;  | } *pidlist;  | ||||||
| 	 | 	 | ||||||
| FILE * | FILE * | ||||||
| popen(program, type) | _DEFUN(popen, (program, type), | ||||||
| 	const char *program; | 	const char *program _AND | ||||||
| 	const char *type; | 	const char *type) | ||||||
| { | { | ||||||
| 	struct pid *cur; | 	struct pid *cur; | ||||||
| 	FILE *iop; | 	FILE *iop; | ||||||
| @@ -144,8 +144,8 @@ popen(program, type) | |||||||
|  *	if already `pclosed', or waitpid returns an error. |  *	if already `pclosed', or waitpid returns an error. | ||||||
|  */ |  */ | ||||||
| int | int | ||||||
| pclose(iop) | _DEFUN(pclose, (iop), | ||||||
| 	FILE *iop; | 	FILE *iop) | ||||||
| { | { | ||||||
| 	register struct pid *cur, *last; | 	register struct pid *cur, *last; | ||||||
| 	int pstat; | 	int pstat; | ||||||
|   | |||||||
| @@ -45,8 +45,9 @@ extern int getdents (int fd, void *dp, int count); | |||||||
|  * get next entry in a directory. |  * get next entry in a directory. | ||||||
|  */ |  */ | ||||||
| struct dirent * | struct dirent * | ||||||
| readdir(dirp) | _DEFUN(readdir, (dirp), | ||||||
| register DIR *dirp; { |        register DIR *dirp) | ||||||
|  | { | ||||||
|   register struct dirent *dp; |   register struct dirent *dp; | ||||||
|   |   | ||||||
| #ifdef HAVE_DD_LOCK | #ifdef HAVE_DD_LOCK | ||||||
|   | |||||||
| @@ -49,10 +49,10 @@ extern int getdents (int fd, void *dp, int count); | |||||||
|  * get next entry in a directory using supplied dirent structure. |  * get next entry in a directory using supplied dirent structure. | ||||||
|  */ |  */ | ||||||
| int | int | ||||||
| readdir_r(dirp, dp, dpp) | _DEFUN(readdir_r, (dirp, dp, dpp), | ||||||
| 	register DIR *dirp; | 	register DIR *dirp _AND | ||||||
| 	struct dirent *dp; | 	struct dirent *dp _AND | ||||||
| 	struct dirent **dpp; { | 	struct dirent **dpp) { | ||||||
|  |  | ||||||
| struct dirent *tmpdp; | struct dirent *tmpdp; | ||||||
|   |   | ||||||
|   | |||||||
| @@ -42,8 +42,8 @@ static char sccsid[] = "@(#)rewinddir.c	5.1 (Berkeley) 5/25/90"; | |||||||
| #include <sys/lock.h> | #include <sys/lock.h> | ||||||
|  |  | ||||||
| void | void | ||||||
| rewinddir(dirp) | _DEFUN(rewinddir, (dirp), | ||||||
| 	DIR *dirp; | 	DIR *dirp) | ||||||
| { | { | ||||||
| #ifdef HAVE_DD_LOCK | #ifdef HAVE_DD_LOCK | ||||||
| 	__lock_acquire_recursive(dirp->dd_lock); | 	__lock_acquire_recursive(dirp->dd_lock); | ||||||
|   | |||||||
| @@ -71,11 +71,11 @@ static char sccsid[] = "@(#)scandir.c	5.10 (Berkeley) 2/23/91"; | |||||||
| #endif | #endif | ||||||
|  |  | ||||||
| int | int | ||||||
| scandir(dirname, namelist, select, dcomp) | _DEFUN(scandir, (dirname, namelist, select, dcomp), | ||||||
| 	const char *dirname; | 	const char *dirname _AND | ||||||
| 	struct dirent ***namelist; | 	struct dirent ***namelist _AND | ||||||
| 	int (*select) __P((struct dirent *)); | 	int (*select) __P((struct dirent *)) _AND | ||||||
| 	int (*dcomp) __P((const void *, const void *)); | 	int (*dcomp) __P((const void *, const void *))) | ||||||
| { | { | ||||||
| 	register struct dirent *d, *p, **names; | 	register struct dirent *d, *p, **names; | ||||||
| 	register size_t nitems; | 	register size_t nitems; | ||||||
| @@ -167,9 +167,9 @@ scandir(dirname, namelist, select, dcomp) | |||||||
|  * Alphabetic order comparison routine for those who want it. |  * Alphabetic order comparison routine for those who want it. | ||||||
|  */ |  */ | ||||||
| int | int | ||||||
| alphasort(d1, d2) | _DEFUN(alphasort, (d1, d2), | ||||||
|        const struct dirent **d1; |        const struct dirent **d1 _AND | ||||||
|        const struct dirent **d2; |        const struct dirent **d2) | ||||||
| { | { | ||||||
|        return(strcmp((*d1)->d_name, (*d2)->d_name)); |        return(strcmp((*d1)->d_name, (*d2)->d_name)); | ||||||
| } | } | ||||||
|   | |||||||
| @@ -46,9 +46,9 @@ static char sccsid[] = "@(#)seekdir.c	5.7 (Berkeley) 6/1/90"; | |||||||
|  * _seekdir is in telldir.c so that it can share opaque data structures. |  * _seekdir is in telldir.c so that it can share opaque data structures. | ||||||
|  */ |  */ | ||||||
| void | void | ||||||
| seekdir(dirp, loc) | _DEFUN(seekdir, (dirp, loc), | ||||||
| 	DIR *dirp; | 	DIR *dirp _AND | ||||||
| 	long loc; | 	long loc) | ||||||
| { | { | ||||||
| #ifdef HAVE_DD_LOCK | #ifdef HAVE_DD_LOCK | ||||||
| 	__lock_acquire_recursive(dirp->dd_lock); | 	__lock_acquire_recursive(dirp->dd_lock); | ||||||
|   | |||||||
| @@ -78,8 +78,8 @@ __LOCK_INIT(static, dd_hash_lock); | |||||||
| #ifndef _ELIX_LEVEL || _ELIX_LEVEL >= 2 | #ifndef _ELIX_LEVEL || _ELIX_LEVEL >= 2 | ||||||
|  |  | ||||||
| long | long | ||||||
| telldir(dirp) | _DEFUN(telldir, (dirp), | ||||||
|        DIR *dirp; |        DIR *dirp) | ||||||
| { | { | ||||||
| 	register int index; | 	register int index; | ||||||
| 	register struct ddloc *lp; | 	register struct ddloc *lp; | ||||||
| @@ -112,9 +112,9 @@ telldir(dirp) | |||||||
|  * Only values returned by "telldir" should be passed to seekdir. |  * Only values returned by "telldir" should be passed to seekdir. | ||||||
|  */ |  */ | ||||||
| void | void | ||||||
| _seekdir(dirp, loc) | _DEFUN(_seekdir, (dirp, loc), | ||||||
| 	register DIR *dirp; | 	register DIR *dirp _AND | ||||||
| 	long loc; | 	long loc) | ||||||
| { | { | ||||||
| 	register struct ddloc *lp; | 	register struct ddloc *lp; | ||||||
| 	register struct ddloc **prevlp; | 	register struct ddloc **prevlp; | ||||||
| @@ -160,8 +160,8 @@ found: | |||||||
|  |  | ||||||
| /* clean out any hash entries from a closed directory */ | /* clean out any hash entries from a closed directory */ | ||||||
| void | void | ||||||
| _cleanupdir (dirp) | _DEFUN(_cleanupdir, (dirp), | ||||||
| 	register DIR *dirp; | 	register DIR *dirp) | ||||||
| { | { | ||||||
| 	int i; | 	int i; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -58,19 +58,21 @@ __RCSID("$NetBSD: hcreate.c,v 1.2 2001/02/19 21:26:04 ross Exp $"); | |||||||
| static struct hsearch_data htab; | static struct hsearch_data htab; | ||||||
|  |  | ||||||
| int | int | ||||||
| hcreate(size_t nel) | _DEFUN(hcreate, (nel), size_t nel) | ||||||
| { | { | ||||||
|   return hcreate_r (nel, &htab); |   return hcreate_r (nel, &htab); | ||||||
| } | } | ||||||
|  |  | ||||||
| void | void | ||||||
| hdestroy(void) | _DEFUN_VOID (hdestroy) | ||||||
| { | { | ||||||
|   hdestroy_r (&htab); |   hdestroy_r (&htab); | ||||||
| } | } | ||||||
|  |  | ||||||
| ENTRY * | ENTRY * | ||||||
| hsearch(ENTRY item, ACTION action) | _DEFUN(hsearch, (item, action),  | ||||||
|  |        ENTRY item _AND | ||||||
|  |        ACTION action) | ||||||
| { | { | ||||||
|   ENTRY *retval; |   ENTRY *retval; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -26,10 +26,10 @@ __RCSID("$NetBSD: tdelete.c,v 1.2 1999/09/16 11:45:37 lukem Exp $"); | |||||||
|  |  | ||||||
| /* delete node with given key */ | /* delete node with given key */ | ||||||
| void * | void * | ||||||
| tdelete(vkey, vrootp, compar) | _DEFUN(tdelete, (vkey, vrootp, compar), | ||||||
| 	const void *vkey;	/* key to be deleted */ | 	const void *vkey _AND	/* key to be deleted */ | ||||||
| 	void      **vrootp;	/* address of the root of tree */ | 	void      **vrootp _AND	/* address of the root of tree */ | ||||||
| 	int       (*compar)(const void *, const void *); | 	int       (*compar)(const void *, const void *)) | ||||||
| { | { | ||||||
| 	node_t **rootp = (node_t **)vrootp; | 	node_t **rootp = (node_t **)vrootp; | ||||||
| 	node_t *p, *q, *r; | 	node_t *p, *q, *r; | ||||||
|   | |||||||
| @@ -40,7 +40,9 @@ trecurse(root, free_action) | |||||||
| } | } | ||||||
|  |  | ||||||
| void | void | ||||||
| tdestroy (void *vrootp, void (*freefct)(void *)) | _DEFUN(tdestroy, (vrootp, freefct), | ||||||
|  |        void *vrootp _AND | ||||||
|  |        void (*freefct)(void *)) | ||||||
| { | { | ||||||
|   node_t *root = (node_t *) vrootp; |   node_t *root = (node_t *) vrootp; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -25,10 +25,10 @@ __RCSID("$NetBSD: tfind.c,v 1.2 1999/09/16 11:45:37 lukem Exp $"); | |||||||
|  |  | ||||||
| /* find a node, or return 0 */ | /* find a node, or return 0 */ | ||||||
| void * | void * | ||||||
| tfind(vkey, vrootp, compar) | _DEFUN(tfind, (vkey, vrootp, compar), | ||||||
| 	const void *vkey;		/* key to be found */ | 	const void *vkey _AND		/* key to be found */ | ||||||
| 	void **vrootp;			/* address of the tree root */ | 	void **vrootp _AND		/* address of the tree root */ | ||||||
| 	int (*compar)(const void *, const void *); | 	int (*compar)(const void *, const void *)) | ||||||
| { | { | ||||||
| 	node_t **rootp = (node_t **)vrootp; | 	node_t **rootp = (node_t **)vrootp; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -25,10 +25,10 @@ __RCSID("$NetBSD: tsearch.c,v 1.3 1999/09/16 11:45:37 lukem Exp $"); | |||||||
|  |  | ||||||
| /* find or insert datum into search tree */ | /* find or insert datum into search tree */ | ||||||
| void * | void * | ||||||
| tsearch(vkey, vrootp, compar) | _DEFUN(tsearch, (vkey, vrootp, compar), | ||||||
| 	const void *vkey;		/* key to be located */ | 	const void *vkey _AND		/* key to be located */ | ||||||
| 	void **vrootp;			/* address of tree root */ | 	void **vrootp _AND		/* address of tree root */ | ||||||
| 	int (*compar)(const void *, const void *); | 	int (*compar)(const void *, const void *)) | ||||||
| { | { | ||||||
| 	node_t *q; | 	node_t *q; | ||||||
| 	node_t **rootp = (node_t **)vrootp; | 	node_t **rootp = (node_t **)vrootp; | ||||||
|   | |||||||
| @@ -49,9 +49,9 @@ trecurse(root, action, level) | |||||||
|  |  | ||||||
| /* Walk the nodes of a tree */ | /* Walk the nodes of a tree */ | ||||||
| void | void | ||||||
| twalk(vroot, action) | _DEFUN(twalk, (vroot, action), | ||||||
| 	const void *vroot;	/* Root of the tree to be walked */ | 	const void *vroot _AND	/* Root of the tree to be walked */ | ||||||
| 	void (*action)(const void *, VISIT, int); | 	void (*action)(const void *, VISIT, int)) | ||||||
| { | { | ||||||
| 	if (vroot != NULL && action != NULL) | 	if (vroot != NULL && action != NULL) | ||||||
| 		trecurse(vroot, action, 0); | 		trecurse(vroot, action, 0); | ||||||
|   | |||||||
| @@ -162,9 +162,9 @@ _DEFUN (_signal_r, (ptr, sig, func), | |||||||
| } | } | ||||||
|  |  | ||||||
| int  | int  | ||||||
| _raise_r (ptr, sig) | _DEFUN (_raise_r, (ptr, sig), | ||||||
|      struct _reent *ptr; |      struct _reent *ptr _AND | ||||||
|      int sig; |      int sig) | ||||||
| { | { | ||||||
|   _sig_func_ptr func; |   _sig_func_ptr func; | ||||||
|  |  | ||||||
| @@ -196,9 +196,9 @@ _raise_r (ptr, sig) | |||||||
| } | } | ||||||
|  |  | ||||||
| int | int | ||||||
| __sigtramp_r (ptr, sig) | _DEFUN (__sigtramp_r, (ptr, sig), | ||||||
|      struct _reent *ptr; |      struct _reent *ptr _AND | ||||||
|      int sig; |      int sig) | ||||||
| { | { | ||||||
|   _sig_func_ptr func; |   _sig_func_ptr func; | ||||||
|  |  | ||||||
| @@ -228,8 +228,8 @@ __sigtramp_r (ptr, sig) | |||||||
| #ifndef _REENT_ONLY | #ifndef _REENT_ONLY | ||||||
|  |  | ||||||
| int  | int  | ||||||
| raise (sig) | _DEFUN (raise, (sig), | ||||||
|      int sig; |      int sig) | ||||||
| { | { | ||||||
|   return _raise_r (_REENT, sig); |   return _raise_r (_REENT, sig); | ||||||
| } | } | ||||||
| @@ -243,13 +243,13 @@ _DEFUN (signal, (sig, func), | |||||||
| } | } | ||||||
|  |  | ||||||
| int  | int  | ||||||
| _init_signal () | _DEFUN_VOID (_init_signal) | ||||||
| { | { | ||||||
|   return _init_signal_r (_REENT); |   return _init_signal_r (_REENT); | ||||||
| } | } | ||||||
|  |  | ||||||
| int | int | ||||||
| __sigtramp (int sig) | _DEFUN (__sigtramp, (sig), int sig) | ||||||
| { | { | ||||||
|   return __sigtramp_r (_REENT, sig); |   return __sigtramp_r (_REENT, sig); | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user