From 1f020b178664857b0e107778d04fb971a58e6230 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Wed, 23 Jul 2008 11:23:36 +0000 Subject: - trim any trailing whitespace --- libc/inet/getaddrinfo.c | 6 +- libc/inet/getproto.c | 2 +- libc/inet/if_index.c | 2 +- libc/inet/ntop.c | 2 +- libc/inet/rpc/clnt_perror.c | 2 +- libc/inet/rpc/rcmd.c | 22 +-- libc/misc/ctype/ctype.c | 6 +- libc/misc/dirent/dirstream.h | 2 +- libc/misc/dirent/scandir.c | 2 +- libc/misc/dirent/scandir64.c | 4 +- libc/misc/glob/glob-susv3.c | 6 +- libc/misc/glob/glob64-susv3.c | 2 +- libc/misc/gnu/obstack.c | 10 +- libc/misc/internals/tempname.h | 4 +- libc/misc/locale/locale.c | 114 ++++++------ libc/misc/mntent/mntent.c | 6 +- libc/misc/regex/regcomp.c | 22 +-- libc/misc/regex/regex_internal.c | 6 +- libc/misc/regex/regex_internal.h | 2 +- libc/misc/regex/regex_old.c | 44 ++--- libc/misc/regex/regexec.c | 10 +- libc/misc/search/_lsearch.c | 4 +- libc/misc/search/_tsearch.c | 2 +- libc/misc/ttyent/getttyent.c | 2 +- libc/misc/wchar/wchar.c | 206 +++++++++++----------- libc/misc/wordexp/wordexp.c | 4 +- libc/signal/allocrtsig.c | 2 +- libc/signal/sigaction.c | 2 +- libc/signal/sigjmp.c | 2 +- libc/stdio/_fpmaxtostr.c | 8 +- libc/stdio/_uintmaxtostr.c | 2 +- libc/stdio/_vfprintf.c | 26 +-- libc/stdio/fdopen.c | 2 +- libc/stdio/fmemopen.c | 2 +- libc/stdio/fread.c | 2 +- libc/stdio/fseeko.c | 2 +- libc/stdio/old_vfprintf.c | 12 +- libc/stdio/open_memstream.c | 2 +- libc/stdio/remove.c | 2 +- libc/stdlib/erand48_r.c | 2 +- libc/stdlib/getenv.c | 2 +- libc/stdlib/grantpt.c | 2 +- libc/stdlib/jrand48_r.c | 2 +- libc/stdlib/malloc-simple/calloc.c | 2 +- libc/stdlib/malloc-simple/free.c | 2 +- libc/stdlib/malloc-simple/malloc.c | 2 +- libc/stdlib/malloc-simple/memalign.c | 2 +- libc/stdlib/malloc-simple/realloc.c | 2 +- libc/stdlib/malloc-standard/malloc.h | 2 +- libc/stdlib/malloc/heap_alloc.c | 2 +- libc/stdlib/malloc/heap_alloc_at.c | 2 +- libc/stdlib/malloc/heap_free.c | 2 +- libc/stdlib/nrand48_r.c | 2 +- libc/stdlib/ptsname.c | 2 +- libc/stdlib/random_r.c | 2 +- libc/stdlib/stdlib.c | 4 +- libc/stdlib/system.c | 2 +- libc/string/__xpg_strerror_r.c | 2 +- libc/string/cris/memcopy.h | 2 +- libc/string/cris/memcpy.c | 8 +- libc/string/cris/memmove.c | 2 +- libc/string/cris/memset.c | 8 +- libc/string/ffs.c | 2 +- libc/string/i386/strncat.c | 2 +- libc/string/ia64/softpipe.h | 2 +- libc/string/memrchr.c | 2 +- libc/string/powerpc/memcpy.c | 2 +- libc/string/powerpc/memmove.c | 2 +- libc/string/powerpc/memset.c | 4 +- libc/string/strcmp.c | 2 +- libc/string/strncpy.c | 2 +- libc/sysdeps/linux/alpha/bits/atomic.h | 2 +- libc/sysdeps/linux/alpha/bits/kernel_stat.h | 4 +- libc/sysdeps/linux/alpha/bits/kernel_types.h | 4 +- libc/sysdeps/linux/alpha/bits/syscalls.h | 2 +- libc/sysdeps/linux/arm/bits/endian.h | 2 +- libc/sysdeps/linux/arm/bits/kernel_stat.h | 4 +- libc/sysdeps/linux/arm/bits/kernel_types.h | 4 +- libc/sysdeps/linux/arm/bits/syscalls.h | 4 +- libc/sysdeps/linux/arm/ioperm.c | 2 +- libc/sysdeps/linux/arm/iopl.c | 2 +- libc/sysdeps/linux/bfin/bits/elf-fdpic.h | 2 +- libc/sysdeps/linux/bfin/bits/kernel_stat.h | 4 +- libc/sysdeps/linux/bfin/crtreloc.c | 2 +- libc/sysdeps/linux/common/bits/kernel_sigaction.h | 2 +- libc/sysdeps/linux/common/bits/kernel_types.h | 2 +- libc/sysdeps/linux/common/bits/stdio_lim.h | 4 +- libc/sysdeps/linux/common/bits/syscalls.h | 4 +- libc/sysdeps/linux/common/bits/uClibc_ctype.h | 2 +- libc/sysdeps/linux/common/bits/uClibc_locale.h | 2 +- libc/sysdeps/linux/common/dl-osinfo.h | 2 +- libc/sysdeps/linux/common/ftruncate64.c | 2 +- libc/sysdeps/linux/common/getdents.c | 4 +- libc/sysdeps/linux/common/getdents64.c | 6 +- libc/sysdeps/linux/common/llseek.c | 2 +- libc/sysdeps/linux/common/sendfile64.c | 2 +- libc/sysdeps/linux/common/sync.c | 2 +- libc/sysdeps/linux/common/truncate64.c | 2 +- libc/sysdeps/linux/common/xattr.c | 2 +- libc/sysdeps/linux/cris/bits/syscalls.h | 2 +- libc/sysdeps/linux/e1/bits/fenv.h | 2 +- libc/sysdeps/linux/e1/bits/fenvinline.h | 22 +-- libc/sysdeps/linux/e1/bits/kernel_stat.h | 4 +- libc/sysdeps/linux/e1/bits/kernel_types.h | 4 +- libc/sysdeps/linux/e1/longjmp.c | 6 +- libc/sysdeps/linux/e1/setjmp.c | 20 +-- libc/sysdeps/linux/frv/bits/elf-fdpic.h | 2 +- libc/sysdeps/linux/frv/bits/kernel_stat.h | 4 +- libc/sysdeps/linux/frv/bits/kernel_types.h | 4 +- libc/sysdeps/linux/frv/crtreloc.c | 2 +- libc/sysdeps/linux/h8300/bits/kernel_stat.h | 4 +- libc/sysdeps/linux/h8300/bits/syscalls.h | 4 +- libc/sysdeps/linux/hppa/bits/kernel_stat.h | 2 +- libc/sysdeps/linux/hppa/bits/kernel_types.h | 4 +- libc/sysdeps/linux/hppa/syscall.c | 6 +- libc/sysdeps/linux/i386/bits/kernel_stat.h | 4 +- libc/sysdeps/linux/i386/bits/kernel_types.h | 4 +- libc/sysdeps/linux/i386/sigaction.c | 2 +- libc/sysdeps/linux/ia64/bits/kernel_types.h | 4 +- libc/sysdeps/linux/m68k/bits/kernel_stat.h | 4 +- libc/sysdeps/linux/m68k/bits/kernel_types.h | 4 +- libc/sysdeps/linux/microblaze/bits/endian.h | 2 +- libc/sysdeps/linux/microblaze/bits/setjmp.h | 2 +- libc/sysdeps/linux/microblaze/clinkage.h | 2 +- libc/sysdeps/linux/microblaze/clone.c | 4 +- libc/sysdeps/linux/microblaze/syscall.c | 6 +- libc/sysdeps/linux/mips/bits/atomic.h | 2 +- libc/sysdeps/linux/mips/bits/kernel_stat.h | 4 +- libc/sysdeps/linux/mips/bits/kernel_types.h | 4 +- libc/sysdeps/linux/mips/bits/syscalls.h | 2 +- libc/sysdeps/linux/mips/sigaction.c | 2 +- libc/sysdeps/linux/nios/bits/kernel_types.h | 4 +- libc/sysdeps/linux/nios/crtbegin.c | 2 +- libc/sysdeps/linux/nios/crtend.c | 2 +- libc/sysdeps/linux/nios2/bits/kernel_stat.h | 4 +- libc/sysdeps/linux/nios2/bits/kernel_types.h | 4 +- libc/sysdeps/linux/nios2/bits/setjmp.h | 2 +- libc/sysdeps/linux/nios2/syscall.c | 4 +- libc/sysdeps/linux/powerpc/bits/kernel_stat.h | 4 +- libc/sysdeps/linux/powerpc/bits/kernel_types.h | 4 +- libc/sysdeps/linux/powerpc/bits/sem.h | 2 +- libc/sysdeps/linux/powerpc/pread_write.c | 40 ++--- libc/sysdeps/linux/powerpc/sys/procfs.h | 6 +- libc/sysdeps/linux/powerpc/sys/ucontext.h | 40 ++--- libc/sysdeps/linux/sh/bits/kernel_stat.h | 4 +- libc/sysdeps/linux/sh/bits/kernel_types.h | 4 +- libc/sysdeps/linux/sh64/bits/kernel_types.h | 6 +- libc/sysdeps/linux/sh64/sys/ucontext.h | 2 +- libc/sysdeps/linux/sparc/bits/kernel_stat.h | 4 +- libc/sysdeps/linux/sparc/bits/kernel_types.h | 4 +- libc/sysdeps/linux/sparc/bits/syscalls.h | 2 +- libc/sysdeps/linux/v850/bits/endian.h | 2 +- libc/sysdeps/linux/v850/bits/setjmp.h | 2 +- libc/sysdeps/linux/v850/clinkage.h | 2 +- libc/sysdeps/linux/v850/syscall.c | 2 +- libc/sysdeps/linux/x86_64/bits/kernel_stat.h | 2 +- libc/sysdeps/linux/x86_64/bits/kernel_types.h | 4 +- libc/sysdeps/linux/x86_64/bits/syscalls.h | 4 +- libc/sysdeps/linux/xtensa/bits/kernel_stat.h | 4 +- libc/sysdeps/linux/xtensa/bits/kernel_types.h | 4 +- libc/sysdeps/linux/xtensa/bits/syscalls.h | 4 +- libc/sysdeps/linux/xtensa/fork.c | 2 +- libc/sysdeps/linux/xtensa/sigaction.c | 6 +- libc/termios/tcgetattr.c | 4 +- libc/unistd/daemon.c | 4 +- libc/unistd/fpathconf.c | 6 +- libc/unistd/getopt-susv3.c | 2 +- libc/unistd/getopt.c | 8 +- libc/unistd/getopt_int.h | 2 +- libc/unistd/usershell.c | 2 +- 170 files changed, 536 insertions(+), 536 deletions(-) (limited to 'libc') diff --git a/libc/inet/getaddrinfo.c b/libc/inet/getaddrinfo.c index 8baa6815e..d35d33fe0 100644 --- a/libc/inet/getaddrinfo.c +++ b/libc/inet/getaddrinfo.c @@ -1,5 +1,5 @@ /* - * Copyright 1996 by Craig Metz + * Copyright 1996 by Craig Metz * Copyright (C) 2000-2006 Erik Andersen * Portions from the GNU C library, * Copyright (C) 2003, 2006 Free Software Foundation, Inc. @@ -535,7 +535,7 @@ gaih_inet (const char *name, const struct gaih_service *service, } else { - /* + /* * Neither socket type nor protocol is set. Return all socket types * we know about. */ @@ -810,7 +810,7 @@ gaih_inet (const char *name, const struct gaih_service *service, sin6p->sin6_addr.s6_addr32[0] = 0; sin6p->sin6_addr.s6_addr32[1] = 0; sin6p->sin6_addr.s6_addr32[2] = htonl(0x0000ffff); - memcpy(&sin6p->sin6_addr.s6_addr32[3], + memcpy(&sin6p->sin6_addr.s6_addr32[3], at2->addr, sizeof (sin6p->sin6_addr.s6_addr32[3])); } sin6p->sin6_port = st2->port; diff --git a/libc/inet/getproto.c b/libc/inet/getproto.c index 1e3e843f5..a079f6487 100644 --- a/libc/inet/getproto.c +++ b/libc/inet/getproto.c @@ -12,7 +12,7 @@ ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ** Library General Public License for more details. -** +** ** You should have received a copy of the GNU Library General Public ** License along with the NYS Library; see the file COPYING.LIB. If ** not, write to the Free Software Foundation, Inc., 675 Mass Ave, diff --git a/libc/inet/if_index.c b/libc/inet/if_index.c index 005d9d09e..36c6be45c 100644 --- a/libc/inet/if_index.c +++ b/libc/inet/if_index.c @@ -47,7 +47,7 @@ extern int __opensock(void) attribute_hidden; libc_hidden_proto(if_nametoindex) unsigned int -if_nametoindex(const char* ifname) +if_nametoindex(const char* ifname) { #ifndef SIOCGIFINDEX __set_errno (ENOSYS); diff --git a/libc/inet/ntop.c b/libc/inet/ntop.c index c1f3fc83c..f19556dcd 100644 --- a/libc/inet/ntop.c +++ b/libc/inet/ntop.c @@ -254,7 +254,7 @@ inet_pton4(const char *src, u_char *dst) #ifdef __UCLIBC_HAS_IPV6__ /* We cannot use the macro version of tolower() or very bad - * things happen when '*src++' gets evaluated multiple times. + * things happen when '*src++' gets evaluated multiple times. * So undef it here so we get the function version of tolower * instead. */ diff --git a/libc/inet/rpc/clnt_perror.c b/libc/inet/rpc/clnt_perror.c index 89a31a2d6..7e6c907ce 100644 --- a/libc/inet/rpc/clnt_perror.c +++ b/libc/inet/rpc/clnt_perror.c @@ -258,7 +258,7 @@ clnt_sperror (CLIENT * rpch, const char *msg) case RPC_CANTSEND: case RPC_CANTRECV: __glibc_strerror_r (e.re_errno, chrbuf, sizeof chrbuf); - len = sprintf (str, "; errno = %s", chrbuf); + len = sprintf (str, "; errno = %s", chrbuf); str += len; break; diff --git a/libc/inet/rpc/rcmd.c b/libc/inet/rpc/rcmd.c index fe00d6a78..cd8d620c0 100644 --- a/libc/inet/rpc/rcmd.c +++ b/libc/inet/rpc/rcmd.c @@ -53,7 +53,7 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - */ + */ #if 0 static char sccsid[] = "@(#)rcmd.c 8.3 (Berkeley) 3/26/94"; @@ -144,7 +144,7 @@ libc_hidden_proto(rresvport) /* some forward declarations */ static int __ivaliduser2(FILE *hostf, u_int32_t raddr, const char *luser, const char *ruser, const char *rhost); -static int iruserok2 (u_int32_t raddr, int superuser, const char *ruser, +static int iruserok2 (u_int32_t raddr, int superuser, const char *ruser, const char *luser, const char *rhost); @@ -178,7 +178,7 @@ int rcmd(ahost, rport, locuser, remuser, cmd, fd2p) tmphstbuf = malloc (hstbuflen); #endif - while (gethostbyname_r (*ahost, &hostbuf, tmphstbuf, + while (gethostbyname_r (*ahost, &hostbuf, tmphstbuf, hstbuflen, &hp, &herr) != 0 || hp == NULL) { if (herr != NETDB_INTERNAL || errno != ERANGE) @@ -212,7 +212,7 @@ int rcmd(ahost, rport, locuser, remuser, cmd, fd2p) #endif pfd[0].events = POLLIN; pfd[1].events = POLLIN; - + *ahost = hp->h_name; oldmask = sigblock(sigmask(SIGURG)); /* __sigblock */ for (timo = 1, lport = IPPORT_RESERVED - 1;;) { @@ -361,7 +361,7 @@ int rresvport(int *alport) return -1; } } - + return -1; } libc_hidden_def(rresvport) @@ -394,8 +394,8 @@ int ruserok(rhost, superuser, ruser, luser) buffer = malloc (buflen); #endif - while (gethostbyname_r (rhost, &hostbuf, buffer, - buflen, &hp, &herr) != 0 || hp == NULL) + while (gethostbyname_r (rhost, &hostbuf, buffer, + buflen, &hp, &herr) != 0 || hp == NULL) { if (herr != NETDB_INTERNAL || errno != ERANGE) { #ifndef __ARCH_USE_MMU__ @@ -493,7 +493,7 @@ iruserok2 (raddr, superuser, ruser, luser, rhost) if (!superuser) hostf = iruserfopen (_PATH_HEQUIV, 0); - + if (hostf) { isbad = __ivaliduser2 (hostf, raddr, luser, ruser, rhost); fclose (hostf); @@ -517,7 +517,7 @@ iruserok2 (raddr, superuser, ruser, luser, rhost) char *buffer = malloc (buflen); #endif - if (getpwnam_r (luser, &pwdbuf, buffer, + if (getpwnam_r (luser, &pwdbuf, buffer, buflen, &pwd) != 0 || pwd == NULL) { #ifndef __ARCH_USE_MMU__ @@ -545,12 +545,12 @@ iruserok2 (raddr, superuser, ruser, luser, rhost) seteuid (pwd->pw_uid); hostf = iruserfopen (pbuf, pwd->pw_uid); free(pbuf); - + if (hostf != NULL) { isbad = __ivaliduser2 (hostf, raddr, luser, ruser, rhost); fclose (hostf); } - + seteuid (uid); return isbad; } diff --git a/libc/misc/ctype/ctype.c b/libc/misc/ctype/ctype.c index 7c25a39fb..abb76ebdc 100644 --- a/libc/misc/ctype/ctype.c +++ b/libc/misc/ctype/ctype.c @@ -599,7 +599,7 @@ const __ctype_mask_t __C_ctype_b_data[] = { /* -4 M-| */ 0, /* -3 M-} */ 0, /* -2 M-~ */ 0, -#endif /* __UCLIBC_HAS_CTYPE_SIGNED__*/ +#endif /* __UCLIBC_HAS_CTYPE_SIGNED__*/ /* -1 M-^? */ 0, /* 0 ^@ */ _IScntrl, /* 1 ^A */ _IScntrl, @@ -911,7 +911,7 @@ const __ctype_touplow_t __C_ctype_tolower_data[] = { -12, -11, -10, -9, -8, -7, -6, -5, -4, -3, -2, -1, -#endif /* __UCLIBC_HAS_CTYPE_SIGNED__*/ +#endif /* __UCLIBC_HAS_CTYPE_SIGNED__*/ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, @@ -1033,7 +1033,7 @@ const __ctype_touplow_t __C_ctype_toupper_data[] = { -12, -11, -10, -9, -8, -7, -6, -5, -4, -3, -2, -1, -#endif /* __UCLIBC_HAS_CTYPE_SIGNED__*/ +#endif /* __UCLIBC_HAS_CTYPE_SIGNED__*/ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, diff --git a/libc/misc/dirent/dirstream.h b/libc/misc/dirent/dirstream.h index 761111b9e..370886aa7 100644 --- a/libc/misc/dirent/dirstream.h +++ b/libc/misc/dirent/dirstream.h @@ -60,7 +60,7 @@ struct __dirstream { /* total size of buffer */ size_t dd_max; - + /* lock */ __UCLIBC_MUTEX(dd_lock); }; /* stream data from opendir() */ diff --git a/libc/misc/dirent/scandir.c b/libc/misc/dirent/scandir.c index 0e823ad98..aba63f20b 100644 --- a/libc/misc/dirent/scandir.c +++ b/libc/misc/dirent/scandir.c @@ -18,7 +18,7 @@ libc_hidden_proto(opendir) libc_hidden_proto(closedir) libc_hidden_proto(qsort) -int scandir(const char *dir, struct dirent ***namelist, +int scandir(const char *dir, struct dirent ***namelist, int (*selector) (const struct dirent *), int (*compar) (const void *, const void *)) { diff --git a/libc/misc/dirent/scandir64.c b/libc/misc/dirent/scandir64.c index 98433f46d..083d2de18 100644 --- a/libc/misc/dirent/scandir64.c +++ b/libc/misc/dirent/scandir64.c @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. + 02111-1307 USA. */ /* Modified for uClibc by Erik Andersen @@ -36,7 +36,7 @@ libc_hidden_proto(closedir) libc_hidden_proto(qsort) libc_hidden_proto(readdir64) -int scandir64(const char *dir, struct dirent64 ***namelist, +int scandir64(const char *dir, struct dirent64 ***namelist, int (*selector) (const struct dirent64 *), int (*compar) (const void *, const void *)) { diff --git a/libc/misc/glob/glob-susv3.c b/libc/misc/glob/glob-susv3.c index 8f441ac68..00963c36e 100644 --- a/libc/misc/glob/glob-susv3.c +++ b/libc/misc/glob/glob-susv3.c @@ -235,7 +235,7 @@ int glob(const char *pat, int flags, int (*errfunc)(const char *path, int err), size_t cnt, i; size_t offs = (flags & GLOB_DOOFFS) ? g->gl_offs : 0; int error = 0; - + if (*p == '/') { for (; *p == '/'; p++); d = "/"; @@ -256,7 +256,7 @@ int glob(const char *pat, int flags, int (*errfunc)(const char *path, int err), __glob_freelist(&head); return error; } - + for (cnt=0, tail=head.next; tail; tail=tail->next, cnt++); if (!cnt) { if (flags & GLOB_NOCHECK) { @@ -292,7 +292,7 @@ int glob(const char *pat, int flags, int (*errfunc)(const char *path, int err), if (!(flags & GLOB_NOSORT)) qsort(g->gl_pathv+offs, cnt, sizeof(char *), __glob_sort); - + return error; } #ifdef __GLOB64 diff --git a/libc/misc/glob/glob64-susv3.c b/libc/misc/glob/glob64-susv3.c index cc633cd88..f73e2c3a7 100644 --- a/libc/misc/glob/glob64-susv3.c +++ b/libc/misc/glob/glob64-susv3.c @@ -16,5 +16,5 @@ #define globfree(pglob) globfree64 (pglob) #define __GLOB64 1 - + #include "glob-susv3.c" diff --git a/libc/misc/gnu/obstack.c b/libc/misc/gnu/obstack.c index a2e0de63b..246d164cd 100644 --- a/libc/misc/gnu/obstack.c +++ b/libc/misc/gnu/obstack.c @@ -154,7 +154,7 @@ struct obstack *_obstack; } while (0) # endif - + /* Initialize an obstack H for use. Specify chunk size SIZE (0 means default). Objects start on multiples of ALIGNMENT (0 means use default). CHUNKFUN is the function to use to allocate chunks, @@ -383,7 +383,7 @@ _obstack_allocated_p ( } return lp != 0; } - + /* Free objects in obstack H, including OBJ and everything allocate more recently than OBJ. If OBJ is zero, free everything in H. */ @@ -457,7 +457,7 @@ obstack_free ( /* obj is not in any of the chunks! */ abort (); } - + int _obstack_memory_used ( struct obstack *h) @@ -471,7 +471,7 @@ _obstack_memory_used ( } return nbytes; } - + /* Define the error handler. */ # ifndef _ /* # if (HAVE_LIBINTL_H && ENABLE_NLS) || defined _LIBC */ @@ -506,7 +506,7 @@ print_and_abort (void) fprintf (stderr, "%s\n", _("memory exhausted")); exit (obstack_exit_failure); } - + # if 0 /* These are now turned off because the applications do not use it and it uses bcopy via obstack_grow, which causes trouble on sysV. */ diff --git a/libc/misc/internals/tempname.h b/libc/misc/internals/tempname.h index 80a6cf7c1..ac40bef6e 100644 --- a/libc/misc/internals/tempname.h +++ b/libc/misc/internals/tempname.h @@ -1,11 +1,11 @@ -#ifndef __TEMPNAME_H__ +#ifndef __TEMPNAME_H__ #define __TEMPNAME_H__ #define __need_size_t #include /* Disable support for $TMPDIR */ -extern int ___path_search (char *tmpl, size_t tmpl_len, const char *dir, +extern int ___path_search (char *tmpl, size_t tmpl_len, const char *dir, const char *pfx /*, int try_tmpdir */) attribute_hidden; #define __path_search(tmpl, tmpl_len, dir, pfx, try_tmpdir) ___path_search(tmpl, tmpl_len, dir, pfx) diff --git a/libc/misc/locale/locale.c b/libc/misc/locale/locale.c index 9825798ed..858a02c33 100644 --- a/libc/misc/locale/locale.c +++ b/libc/misc/locale/locale.c @@ -188,7 +188,7 @@ static const char utf8[] = "UTF-8"; #ifdef __UCLIBC_MJN3_ONLY__ #warning TODO: Fix dimensions of hr_locale. #endif -/* Individual category strings start at hr_locale + category * MAX_LOCALE_CATEGORY. +/* Individual category strings start at hr_locale + category * MAX_LOCALE_CATEGORY. * This holds for LC_ALL as well. */ static char hr_locale[(MAX_LOCALE_CATEGORY_STR * LC_ALL) + MAX_LOCALE_STR]; @@ -638,7 +638,7 @@ int attribute_hidden _locale_set_l(const unsigned char *p, __locale_t base) x = (const char **)(((char *) base) + base->category_offsets[i]); - + stp = __locale_mmap->lc_common_tbl_offsets + 4*i; r = (const unsigned char *)( ((char *)__locale_mmap) + *stp ); io = (const uint16_t *)( ((char *)__locale_mmap) + *++stp ); @@ -750,7 +750,7 @@ int attribute_hidden _locale_set_l(const unsigned char *p, __locale_t base) [ ((int)(c8b->idx8uplow [u >> __LOCALE_DATA_Cuplow_IDX_SHIFT]) << __LOCALE_DATA_Cuplow_IDX_SHIFT) - + ((128 + u) + + ((128 + u) & ((1 << __LOCALE_DATA_Cuplow_IDX_SHIFT) - 1)) ]; if (m & _ISlower) { @@ -835,7 +835,7 @@ int attribute_hidden _locale_set_l(const unsigned char *p, __locale_t base) assert(base->thousands_sep_len > 0); assert(base->thousands_sep[base->thousands_sep_len] == 0); #endif - } + } /* } else if (i == LC_COLLATE) { */ /* init_cur_collate(__locale_mmap->locales[ __LOCALE_DATA_WIDTH_LOCALES */ @@ -967,63 +967,63 @@ void _locale_init(void) static const unsigned char nl_data[C_LC_ALL + 1 + 90 + 320] = { /* static const char cat_start[LC_ALL + 1] = { */ - '\x00', '\x0b', '\x0e', '\x24', '\x56', '\x56', '\x5a', + '\x00', '\x0b', '\x0e', '\x24', '\x56', '\x56', '\x5a', /* }; */ /* static const char item_offset[90] = { */ - '\x00', '\x02', '\x04', '\x06', '\x08', '\x0a', '\x0c', '\x0e', - '\x10', '\x12', '\x14', '\x1a', '\x1b', '\x1b', '\x1b', '\x1b', - '\x1b', '\x1b', '\x1b', '\x1b', '\x1b', '\x1c', '\x1c', '\x1c', - '\x1c', '\x1c', '\x1c', '\x1c', '\x1c', '\x1c', '\x1c', '\x1c', - '\x1c', '\x1c', '\x1c', '\x1e', '\x20', '\x24', '\x28', '\x2c', - '\x30', '\x34', '\x38', '\x3c', '\x43', '\x4a', '\x52', '\x5c', - '\x65', '\x6c', '\x75', '\x79', '\x7d', '\x81', '\x85', '\x89', - '\x8d', '\x91', '\x95', '\x99', '\x9d', '\xa1', '\xa5', '\xad', - '\x36', '\x3c', '\x42', '\x46', '\x4b', '\x50', '\x57', '\x61', - '\x69', '\x72', '\x7b', '\x7e', '\x81', '\x96', '\x9f', '\xa8', - '\xb3', '\xb3', '\xb3', '\xb3', '\xb3', '\xb3', '\xb4', '\xba', - '\xbf', '\xbf', + '\x00', '\x02', '\x04', '\x06', '\x08', '\x0a', '\x0c', '\x0e', + '\x10', '\x12', '\x14', '\x1a', '\x1b', '\x1b', '\x1b', '\x1b', + '\x1b', '\x1b', '\x1b', '\x1b', '\x1b', '\x1c', '\x1c', '\x1c', + '\x1c', '\x1c', '\x1c', '\x1c', '\x1c', '\x1c', '\x1c', '\x1c', + '\x1c', '\x1c', '\x1c', '\x1e', '\x20', '\x24', '\x28', '\x2c', + '\x30', '\x34', '\x38', '\x3c', '\x43', '\x4a', '\x52', '\x5c', + '\x65', '\x6c', '\x75', '\x79', '\x7d', '\x81', '\x85', '\x89', + '\x8d', '\x91', '\x95', '\x99', '\x9d', '\xa1', '\xa5', '\xad', + '\x36', '\x3c', '\x42', '\x46', '\x4b', '\x50', '\x57', '\x61', + '\x69', '\x72', '\x7b', '\x7e', '\x81', '\x96', '\x9f', '\xa8', + '\xb3', '\xb3', '\xb3', '\xb3', '\xb3', '\xb3', '\xb4', '\xba', + '\xbf', '\xbf', /* }; */ /* static const char C_locale_data[320] = { */ - '0', '\x00', '1', '\x00', '2', '\x00', '3', '\x00', - '4', '\x00', '5', '\x00', '6', '\x00', '7', '\x00', - '8', '\x00', '9', '\x00', 'A', 'S', 'C', 'I', - 'I', '\x00', '.', '\x00', '\x7f', '\x00', '-', '\x00', - 'S', 'u', 'n', '\x00', 'M', 'o', 'n', '\x00', - 'T', 'u', 'e', '\x00', 'W', 'e', 'd', '\x00', - 'T', 'h', 'u', '\x00', 'F', 'r', 'i', '\x00', - 'S', 'a', 't', '\x00', 'S', 'u', 'n', 'd', - 'a', 'y', '\x00', 'M', 'o', 'n', 'd', 'a', - 'y', '\x00', 'T', 'u', 'e', 's', 'd', 'a', - 'y', '\x00', 'W', 'e', 'd', 'n', 'e', 's', - 'd', 'a', 'y', '\x00', 'T', 'h', 'u', 'r', - 's', 'd', 'a', 'y', '\x00', 'F', 'r', 'i', - 'd', 'a', 'y', '\x00', 'S', 'a', 't', 'u', - 'r', 'd', 'a', 'y', '\x00', 'J', 'a', 'n', - '\x00', 'F', 'e', 'b', '\x00', 'M', 'a', 'r', - '\x00', 'A', 'p', 'r', '\x00', 'M', 'a', 'y', - '\x00', 'J', 'u', 'n', '\x00', 'J', 'u', 'l', - '\x00', 'A', 'u', 'g', '\x00', 'S', 'e', 'p', - '\x00', 'O', 'c', 't', '\x00', 'N', 'o', 'v', - '\x00', 'D', 'e', 'c', '\x00', 'J', 'a', 'n', - 'u', 'a', 'r', 'y', '\x00', 'F', 'e', 'b', - 'r', 'u', 'a', 'r', 'y', '\x00', 'M', 'a', - 'r', 'c', 'h', '\x00', 'A', 'p', 'r', 'i', - 'l', '\x00', 'M', 'a', 'y', '\x00', 'J', 'u', - 'n', 'e', '\x00', 'J', 'u', 'l', 'y', '\x00', - 'A', 'u', 'g', 'u', 's', 't', '\x00', 'S', - 'e', 'p', 't', 'e', 'm', 'b', 'e', 'r', - '\x00', 'O', 'c', 't', 'o', 'b', 'e', 'r', - '\x00', 'N', 'o', 'v', 'e', 'm', 'b', 'e', - 'r', '\x00', 'D', 'e', 'c', 'e', 'm', 'b', - 'e', 'r', '\x00', 'A', 'M', '\x00', 'P', 'M', - '\x00', '%', 'a', ' ', '%', 'b', ' ', '%', - 'e', ' ', '%', 'H', ':', '%', 'M', ':', - '%', 'S', ' ', '%', 'Y', '\x00', '%', 'm', - '/', '%', 'd', '/', '%', 'y', '\x00', '%', - 'H', ':', '%', 'M', ':', '%', 'S', '\x00', - '%', 'I', ':', '%', 'M', ':', '%', 'S', - ' ', '%', 'p', '\x00', '^', '[', 'y', 'Y', - ']', '\x00', '^', '[', 'n', 'N', ']', '\x00', + '0', '\x00', '1', '\x00', '2', '\x00', '3', '\x00', + '4', '\x00', '5', '\x00', '6', '\x00', '7', '\x00', + '8', '\x00', '9', '\x00', 'A', 'S', 'C', 'I', + 'I', '\x00', '.', '\x00', '\x7f', '\x00', '-', '\x00', + 'S', 'u', 'n', '\x00', 'M', 'o', 'n', '\x00', + 'T', 'u', 'e', '\x00', 'W', 'e', 'd', '\x00', + 'T', 'h', 'u', '\x00', 'F', 'r', 'i', '\x00', + 'S', 'a', 't', '\x00', 'S', 'u', 'n', 'd', + 'a', 'y', '\x00', 'M', 'o', 'n', 'd', 'a', + 'y', '\x00', 'T', 'u', 'e', 's', 'd', 'a', + 'y', '\x00', 'W', 'e', 'd', 'n', 'e', 's', + 'd', 'a', 'y', '\x00', 'T', 'h', 'u', 'r', + 's', 'd', 'a', 'y', '\x00', 'F', 'r', 'i', + 'd', 'a', 'y', '\x00', 'S', 'a', 't', 'u', + 'r', 'd', 'a', 'y', '\x00', 'J', 'a', 'n', + '\x00', 'F', 'e', 'b', '\x00', 'M', 'a', 'r', + '\x00', 'A', 'p', 'r', '\x00', 'M', 'a', 'y', + '\x00', 'J', 'u', 'n', '\x00', 'J', 'u', 'l', + '\x00', 'A', 'u', 'g', '\x00', 'S', 'e', 'p', + '\x00', 'O', 'c', 't', '\x00', 'N', 'o', 'v', + '\x00', 'D', 'e', 'c', '\x00', 'J', 'a', 'n', + 'u', 'a', 'r', 'y', '\x00', 'F', 'e', 'b', + 'r', 'u', 'a', 'r', 'y', '\x00', 'M', 'a', + 'r', 'c', 'h', '\x00', 'A', 'p', 'r', 'i', + 'l', '\x00', 'M', 'a', 'y', '\x00', 'J', 'u', + 'n', 'e', '\x00', 'J', 'u', 'l', 'y', '\x00', + 'A', 'u', 'g', 'u', 's', 't', '\x00', 'S', + 'e', 'p', 't', 'e', 'm', 'b', 'e', 'r', + '\x00', 'O', 'c', 't', 'o', 'b', 'e', 'r', + '\x00', 'N', 'o', 'v', 'e', 'm', 'b', 'e', + 'r', '\x00', 'D', 'e', 'c', 'e', 'm', 'b', + 'e', 'r', '\x00', 'A', 'M', '\x00', 'P', 'M', + '\x00', '%', 'a', ' ', '%', 'b', ' ', '%', + 'e', ' ', '%', 'H', ':', '%', 'M', ':', + '%', 'S', ' ', '%', 'Y', '\x00', '%', 'm', + '/', '%', 'd', '/', '%', 'y', '\x00', '%', + 'H', ':', '%', 'M', ':', '%', 'S', '\x00', + '%', 'I', ':', '%', 'M', ':', '%', 'S', + ' ', '%', 'p', '\x00', '^', '[', 'y', 'Y', + ']', '\x00', '^', '[', 'n', 'N', ']', '\x00', }; libc_hidden_proto(nl_langinfo) diff --git a/libc/misc/mntent/mntent.c b/libc/misc/mntent/mntent.c index c3367955c..f4220784a 100644 --- a/libc/misc/mntent/mntent.c +++ b/libc/misc/mntent/mntent.c @@ -27,7 +27,7 @@ libc_hidden_proto(abort) libc_hidden_proto(fprintf) /* Reentrant version of getmntent. */ -struct mntent *getmntent_r (FILE *filep, +struct mntent *getmntent_r (FILE *filep, struct mntent *mnt, char *buff, int bufsize) { char *cp, *ptrptr; @@ -82,13 +82,13 @@ struct mntent *getmntent(FILE * filep) static char *buff = NULL; static struct mntent mnt; __UCLIBC_MUTEX_LOCK(mylock); - + if (!buff) { buff = malloc(BUFSIZ); if (!buff) abort(); } - + tmp = getmntent_r(filep, &mnt, buff, BUFSIZ); __UCLIBC_MUTEX_UNLOCK(mylock); return(tmp); diff --git a/libc/misc/regex/regcomp.c b/libc/misc/regex/regcomp.c index ab6bdd876..210ae05ee 100644 --- a/libc/misc/regex/regcomp.c +++ b/libc/misc/regex/regcomp.c @@ -120,7 +120,7 @@ static bin_tree_t *duplicate_tree (const bin_tree_t *src, re_dfa_t *dfa); static void free_token (re_token_t *node); static reg_errcode_t free_tree (void *extra, bin_tree_t *node); static reg_errcode_t mark_opt_subexp (void *extra, bin_tree_t *node); - + /* This table gives an error message for each of the error codes listed in regex.h. Obviously the order here has to be same as there. POSIX doesn't require that we do anything for REG_NOERROR, @@ -200,7 +200,7 @@ const size_t __re_error_msgid_idx[] attribute_hidden = REG_ESIZE_IDX, REG_ERPAREN_IDX }; - + /* Entry points for GNU code. */ /* re_compile_pattern is the GNU regular expression compiler: it @@ -406,7 +406,7 @@ re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state, } } } - + /* Entry point for POSIX code. */ /* regcomp takes a regular expression as a string and compiles it. @@ -632,7 +632,7 @@ regfree (preg) #if defined _LIBC || defined __UCLIBC__ strong_alias(__regfree, regfree) #endif - + /* Entry points compatible with 4.2 BSD regex library. We don't define them unless specifically requested. */ @@ -701,7 +701,7 @@ libc_freeres_fn (free_mem) #endif #endif /* _REGEX_RE_COMP */ - + /* Internal entry point. Compile the regular expression PATTERN, whose length is LENGTH. SYNTAX indicate regular expression's syntax. */ @@ -1019,7 +1019,7 @@ create_initial_state (re_dfa_t *dfa) re_node_set_free (&init_nodes); return REG_NOERROR; } - + #ifdef RE_ENABLE_I18N /* If it is possible to do searching in single byte encoding instead of UTF-8 to speed things up, set dfa->mb_cur_max to 1, clear is_utf8 and change @@ -1089,7 +1089,7 @@ optimize_utf8 (re_dfa_t *dfa) dfa->has_mb_node = dfa->nbackref > 0 || has_period; } #endif - + /* Analyze the structure tree, and calculate "first", "next", "edest", "eclosure", and "inveclosure". */ @@ -1700,7 +1700,7 @@ calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, int node, int root) *new_set = eclosure; return REG_NOERROR; } - + /* Functions for token which are used in the parser. */ /* Fetch a token from INPUT. @@ -2037,7 +2037,7 @@ peek_token_bracket (re_token_t *token, re_string_t *input, reg_syntax_t syntax) } return 1; } - + /* Functions for parser. */ /* Entry point of the parser. @@ -3660,7 +3660,7 @@ fetch_number (re_string_t *input, re_token_t *token, reg_syntax_t syntax) } return num; } - + #ifdef RE_ENABLE_I18N static void free_charset (re_charset_t *cset) @@ -3676,7 +3676,7 @@ free_charset (re_charset_t *cset) re_free (cset); } #endif /* RE_ENABLE_I18N */ - + /* Functions for binary tree operation. */ /* Create a tree node. */ diff --git a/libc/misc/regex/regex_internal.c b/libc/misc/regex/regex_internal.c index 7bf59ef20..11b1be7c2 100644 --- a/libc/misc/regex/regex_internal.c +++ b/libc/misc/regex/regex_internal.c @@ -29,7 +29,7 @@ static re_dfastate_t *create_cd_newstate (const re_dfa_t *dfa, const re_node_set *nodes, unsigned int context, unsigned int hash) internal_function; - + /* Functions for string operation. */ /* This function allocate the buffers. It is necessary to call @@ -873,7 +873,7 @@ re_string_context_at (const re_string_t *input, int idx, int eflags) return IS_NEWLINE (c) && input->newline_anchor ? CONTEXT_NEWLINE : 0; } } - + /* Functions for set operation. */ static reg_errcode_t @@ -1314,7 +1314,7 @@ re_node_set_remove_at (re_node_set *set, int idx) for (; idx < set->nelem; idx++) set->elems[idx] = set->elems[idx + 1]; } - + /* Add the token TOKEN to dfa->nodes, and return the index of the token. Or return -1, if an error will be occured. */ diff --git a/libc/misc/regex/regex_internal.h b/libc/misc/regex/regex_internal.h index 17fdb9b3c..725e33a5a 100644 --- a/libc/misc/regex/regex_internal.h +++ b/libc/misc/regex/regex_internal.h @@ -656,7 +656,7 @@ struct re_dfa_t (re_node_set_remove_at (set, re_node_set_contains (set, id) - 1)) #define re_node_set_empty(p) ((p)->nelem = 0) #define re_node_set_free(set) re_free ((set)->elems) - + typedef enum { diff --git a/libc/misc/regex/regex_old.c b/libc/misc/regex/regex_old.c index dc5781967..f56c56bf9 100644 --- a/libc/misc/regex/regex_old.c +++ b/libc/misc/regex/regex_old.c @@ -223,7 +223,7 @@ char *realloc (); # ifndef MB_LEN_MAX # define MB_LEN_MAX 1 # endif - + /* Get the interface, including the syntax bits. */ # ifdef __UCLIBC__ # include "_regex.h" @@ -296,7 +296,7 @@ char *realloc (); /* As in Harbison and Steele. */ # define SIGN_EXTEND_CHAR(c) ((((unsigned char) (c)) ^ 128) - 128) # endif - + # ifndef emacs /* How many characters in the character set. */ # define CHAR_SET_SIZE 256 @@ -335,7 +335,7 @@ init_syntax_once () # define SYNTAX(c) re_syntax_table[(unsigned char) (c)] # endif /* emacs */ - + /* Integer type for pointers. */ # if !defined _LIBC && !defined __intptr_t_defined typedef unsigned long int uintptr_t; @@ -482,7 +482,7 @@ static int wcs_re_search_2 PARAMS ((struct re_pattern_buffer *bufp, struct re_registers *regs, int stop)); static int wcs_re_compile_fastmap PARAMS ((struct re_pattern_buffer *bufp)); #endif - + /* These are the command codes that appear in compiled regular expressions. Some opcodes are followed by argument bytes. A command code can specify any interpretation whatsoever for its @@ -641,7 +641,7 @@ typedef enum # endif /* emacs */ } re_opcode_t; #endif /* not INSIDE_RECURSION */ - + #ifdef BYTE # define CHAR_T char @@ -777,7 +777,7 @@ PREFIX(extract_number_and_incr) (destination, source) # endif /* DEBUG */ - + /* If DEBUG is defined, Regex prints many voluminous messages about what it is doing (if the variable `debug' is nonzero). If linked with the @@ -1277,7 +1277,7 @@ printchar (c) # endif /* not DEBUG */ - + # ifdef WCHAR /* This convert a multibyte string to a wide character string. @@ -1394,7 +1394,7 @@ re_set_syntax (syntax) # if defined _LIBC || defined __UCLIBC__ strong_alias(__re_set_syntax, re_set_syntax) # endif - + /* This table gives an error message for each of the error codes listed in regex.h. Obviously the order here has to be same as there. POSIX doesn't require that we do anything for REG_NOERROR, @@ -1474,7 +1474,7 @@ static const size_t re_error_msgid_idx[] = REG_ESIZE_IDX, REG_ERPAREN_IDX }; - + #endif /* INSIDE_RECURSION */ #ifndef DEFINED_ONCE @@ -1515,7 +1515,7 @@ static const size_t re_error_msgid_idx[] = # undef MATCH_MAY_ALLOCATE # endif #endif /* not DEFINED_ONCE */ - + #ifdef INSIDE_RECURSION /* Failure stack declarations and macros; both re_compile_fastmap and re_match_2 use a failure stack. These have to be macros because of @@ -1887,7 +1887,7 @@ typedef struct set_regs_matched_done = 0; \ DEBUG_STATEMENT (nfailure_points_popped++); \ } /* POP_FAILURE_POINT */ - + /* Structure for per-register (a.k.a. per-group) information. Other register information, such as the starting and ending positions (which are addresses), and the list of @@ -2306,7 +2306,7 @@ typedef struct || STREQ (string, "cntrl") || STREQ (string, "blank")) # endif # endif /* DEFINED_ONCE */ - + # ifndef MATCH_MAY_ALLOCATE /* If we cannot allocate large objects within re_match_2_internal, @@ -2357,7 +2357,7 @@ PREFIX(regex_grow_registers) (num_regs) } # endif /* not MATCH_MAY_ALLOCATE */ - + # ifndef DEFINED_ONCE static boolean group_in_compile_stack _RE_ARGS ((compile_stack_type compile_stack, @@ -4648,7 +4648,7 @@ byte_compile_range (range_start_char, p_ptr, pend, translate, syntax, b) return ret; } #endif /* WCHAR */ - + /* re_compile_fastmap computes a ``fastmap'' for the compiled pattern in BUFP. A fastmap records which of the (1 << BYTEWIDTH) possible characters can start a string that matches the pattern. This fastmap @@ -5018,7 +5018,7 @@ re_compile_fastmap (bufp) #if defined _LIBC || defined __UCLIBC__ strong_alias(__re_compile_fastmap, re_compile_fastmap) #endif - + /* Set REGS to hold NUM_REGS registers, storing them in STARTS and ENDS. Subsequent matches using PATTERN_BUFFER and REGS will use @@ -5057,7 +5057,7 @@ re_set_registers (bufp, regs, num_regs, starts, ends) #if defined _LIBC || defined __UCLIBC__ strong_alias(__re_set_registers, re_set_registers) #endif - + /* Searching routines. */ /* Like re_search_2, below, but only one string is specified, and @@ -5546,7 +5546,7 @@ PREFIX(re_search_2) (bufp, string1, size1, string2, size2, startpos, range, to actually save any registers when none are active. */ #define NO_HIGHEST_ACTIVE_REG (1 << BYTEWIDTH) #define NO_LOWEST_ACTIVE_REG (NO_HIGHEST_ACTIVE_REG + 1) - + #else /* not INSIDE_RECURSION */ /* Matching routines. */ @@ -7659,7 +7659,7 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos, return -1; /* Failure to match. */ } /* re_match_2 */ - + /* Subroutine definitions for re_match_2. */ @@ -7931,7 +7931,7 @@ PREFIX(bcmp_translate) (s1, s2, len, translate) } return 0; } - + #else /* not INSIDE_RECURSION */ @@ -7980,7 +7980,7 @@ re_compile_pattern (pattern, length, bufp) #if defined _LIBC || defined __UCLIBC__ strong_alias(__re_compile_pattern, re_compile_pattern) #endif - + /* Entry points compatible with 4.2 BSD regex library. We don't define them unless specifically requested. */ @@ -8056,7 +8056,7 @@ re_exec (s) } #endif /* _REGEX_RE_COMP */ - + /* POSIX.2 functions. Don't define these for Emacs. */ #ifndef emacs @@ -8331,7 +8331,7 @@ strong_alias(__regfree, regfree) #endif /* not INSIDE_RECURSION */ - + #undef STORE_NUMBER #undef STORE_NUMBER_AND_INCR #undef EXTRACT_NUMBER diff --git a/libc/misc/regex/regexec.c b/libc/misc/regex/regexec.c index 5ab7ab7cb..587e6af30 100644 --- a/libc/misc/regex/regexec.c +++ b/libc/misc/regex/regexec.c @@ -200,7 +200,7 @@ static int check_node_accept (const re_match_context_t *mctx, internal_function; static reg_errcode_t extend_buffers (re_match_context_t *mctx) internal_function; - + /* Entry point for POSIX code. */ /* regexec searches for a given pattern, specified by PREG, in the @@ -595,7 +595,7 @@ re_set_registers (bufp, regs, num_regs, starts, ends) #if defined _LIBC || defined __UCLIBC__ strong_alias(__re_set_registers, re_set_registers) #endif - + /* Entry points compatible with 4.2 BSD regex library. We don't define them unless specifically requested. */ @@ -610,7 +610,7 @@ re_exec (s) return 0 == regexec (&re_comp_buf, s, 0, NULL, 0); } #endif /* _REGEX_RE_COMP */ - + /* Internal entry point. */ /* Searches for a compiled pattern PREG in the string STRING, whose @@ -2236,7 +2236,7 @@ sift_states_iter_mb (const re_match_context_t *mctx, re_sift_context_t *sctx, } #endif /* RE_ENABLE_I18N */ - + /* Functions for state transition. */ /* Return the next state to which the current state STATE will transit by @@ -4117,7 +4117,7 @@ extend_buffers (re_match_context_t *mctx) return REG_NOERROR; } - + /* Functions for matching context. */ /* Initialize MCTX. */ diff --git a/libc/misc/search/_lsearch.c b/libc/misc/search/_lsearch.c index 6c3afcba1..e91ea9441 100644 --- a/libc/misc/search/_lsearch.c +++ b/libc/misc/search/_lsearch.c @@ -1,7 +1,7 @@ /* * This file lifted in toto from 'Dlibs' on the atari ST (RdeBath) * - * + * * Dale Schumacher 399 Beacon Ave. * (alias: Dalnefre') St. Paul, MN 55104 * dal@syntel.UUCP United States of America @@ -36,7 +36,7 @@ libc_hidden_def(lfind) /* Experimentally off - libc_hidden_proto(memcpy) */ -void *lsearch(const void *key, void *base, size_t *nmemb, +void *lsearch(const void *key, void *base, size_t *nmemb, size_t size, int (*compar)(const void *, const void *)) { register char *p; diff --git a/libc/misc/search/_tsearch.c b/libc/misc/search/_tsearch.c index 989710e08..3d43aa543 100644 --- a/libc/misc/search/_tsearch.c +++ b/libc/misc/search/_tsearch.c @@ -177,7 +177,7 @@ static void trecurse(__const void *vroot, __action_fn_t action, int level) } } -/* void twalk(root, action) Walk the nodes of a tree +/* void twalk(root, action) Walk the nodes of a tree node *root; Root of the tree to be walked void (*action)(); Function to be called at each node PTR diff --git a/libc/misc/ttyent/getttyent.c b/libc/misc/ttyent/getttyent.c index b43422ddc..b55cdb267 100644 --- a/libc/misc/ttyent/getttyent.c +++ b/libc/misc/ttyent/getttyent.c @@ -60,7 +60,7 @@ static FILE *tf; static struct ttyent tty; -/* Skip over the current field, removing quotes, and return +/* Skip over the current field, removing quotes, and return * a pointer to the next field. */ #define QUOTED 1 diff --git a/libc/misc/wchar/wchar.c b/libc/misc/wchar/wchar.c index bfe41af83..48f072125 100644 --- a/libc/misc/wchar/wchar.c +++ b/libc/misc/wchar/wchar.c @@ -234,7 +234,7 @@ int wctob(wint_t c) /* If we don't have 8-bit locale support, then this is trivial since * anything outside of 0-0x7f is illegal in C/POSIX and UTF-8 locales. */ - + /* TODO: need unsigned version of wint_t... */ /* return (((unsigned int)c) < 0x80) ? c : WEOF; */ return ((c >= 0) && (c < 0x80)) ? c : EOF; @@ -928,109 +928,109 @@ libc_hidden_proto(wcswidth) ( defined(__CTYPE_HAS_8_BIT_LOCALES) || defined(__CTYPE_HAS_UTF_8_LOCALES) ) static const unsigned char new_idx[] = { - 0, 5, 5, 6, 10, 15, 28, 39, - 48, 48, 71, 94, 113, 128, 139, 154, - 175, 186, 188, 188, 188, 188, 188, 188, - 203, 208, 208, 208, 208, 208, 208, 208, - 208, 219, 219, 219, 222, 222, 222, 222, - 222, 222, 222, 222, 222, 222, 222, 224, - 224, 231, 231, 231, 231, 231, 231, 231, - 231, 231, 231, 231, 231, 231, 231, 231, - 231, 231, 231, 231, 231, 231, 231, 231, - 231, 231, 231, 231, 231, 231, 231, 231, - 231, 231, 231, 231, 231, 231, 231, 231, - 231, 231, 231, 231, 231, 231, 231, 231, - 231, 231, 231, 231, 231, 231, 231, 231, - 231, 231, 231, 231, 231, 231, 231, 231, - 231, 231, 231, 231, 231, 231, 231, 231, - 231, 231, 231, 231, 231, 231, 231, 231, - 231, 231, 231, 231, 231, 231, 231, 231, - 231, 231, 231, 231, 231, 231, 231, 231, - 231, 231, 231, 231, 231, 231, 231, 231, - 231, 231, 231, 231, 231, 231, 231, 231, - 231, 231, 231, 231, 231, 233, 233, 233, - 233, 233, 233, 233, 234, 234, 234, 234, - 234, 234, 234, 234, 234, 234, 234, 234, - 234, 234, 234, 234, 234, 234, 234, 234, - 234, 234, 234, 234, 234, 234, 234, 234, - 234, 234, 234, 234, 234, 234, 234, 234, - 234, 234, 234, 234, 234, 234, 234, 234, - 236, 236, 236, 236, 236, 236, 236, 236, - 236, 236, 236, 236, 236, 236, 236, 236, - 236, 236, 236, 236, 236, 236, 236, 236, - 236, 236, 236, 236, 236, 236, 236, 236, - 236, 237, 237, 238, 241, 241, 242, 249, - 255, + 0, 5, 5, 6, 10, 15, 28, 39, + 48, 48, 71, 94, 113, 128, 139, 154, + 175, 186, 188, 188, 188, 188, 188, 188, + 203, 208, 208, 208, 208, 208, 208, 208, + 208, 219, 219, 219, 222, 222, 222, 222, + 222, 222, 222, 222, 222, 222, 222, 224, + 224, 231, 231, 231, 231, 231, 231, 231, + 231, 231, 231, 231, 231, 231, 231, 231, + 231, 231, 231, 231, 231, 231, 231, 231, + 231, 231, 231, 231, 231, 231, 231, 231, + 231, 231, 231, 231, 231, 231, 231, 231, + 231, 231, 231, 231, 231, 231, 231, 231, + 231, 231, 231, 231, 231, 231, 231, 231, + 231, 231, 231, 231, 231, 231, 231, 231, + 231, 231, 231, 231, 231, 231, 231, 231, + 231, 231, 231, 231, 231, 231, 231, 231, + 231, 231, 231, 231, 231, 231, 231, 231, + 231, 231, 231, 231, 231, 231, 231, 231, + 231, 231, 231, 231, 231, 231, 231, 231, + 231, 231, 231, 231, 231, 231, 231, 231, + 231, 231, 231, 231, 231, 233, 233, 233, + 233, 233, 233, 233, 234, 234, 234, 234, + 234, 234, 234, 234, 234, 234, 234, 234, + 234, 234, 234, 234, 234, 234, 234, 234, + 234, 234, 234, 234, 234, 234, 234, 234, + 234, 234, 234, 234, 234, 234, 234, 234, + 234, 234, 234, 234, 234, 234, 234, 234, + 236, 236, 236, 236, 236, 236, 236, 236, + 236, 236, 236, 236, 236, 236, 236, 236, + 236, 236, 236, 236, 236, 236, 236, 236, + 236, 236, 236, 236, 236, 236, 236, 236, + 236, 237, 237, 238, 241, 241, 242, 249, + 255, }; static const unsigned char new_tbl[] = { - 0x00, 0x01, 0x20, 0x7f, 0xa0, 0x00, 0x00, 0x50, - 0x60, 0x70, 0x00, 0x83, 0x87, 0x88, 0x8a, 0x00, - 0x91, 0xa2, 0xa3, 0xba, 0xbb, 0xbe, 0xbf, 0xc0, - 0xc1, 0xc3, 0xc4, 0xc5, 0x00, 0x4b, 0x56, 0x70, - 0x71, 0xd6, 0xe5, 0xe7, 0xe9, 0xea, 0xee, 0x00, - 0x0f, 0x10, 0x11, 0x12, 0x30, 0x4b, 0xa6, 0xb1, - 0x00, 0x01, 0x03, 0x3c, 0x3d, 0x41, 0x49, 0x4d, - 0x4e, 0x51, 0x55, 0x62, 0x64, 0x81, 0x82, 0xbc, - 0xbd, 0xc1, 0xc5, 0xcd, 0xce, 0xe2, 0xe4, 0x00, - 0x02, 0x03, 0x3c, 0x3d, 0x41, 0x43, 0x47, 0x49, - 0x4b, 0x4e, 0x70, 0x72, 0x81, 0x83, 0xbc, 0xbd, - 0xc1, 0xc6, 0xc7, 0xc9, 0xcd, 0xce, 0x00, 0x01, - 0x02, 0x3c, 0x3d, 0x3f, 0x40, 0x41, 0x44, 0x4d, - 0x4e, 0x56, 0x57, 0x82, 0x83, 0xc0, 0xc1, 0xcd, - 0xce, 0x00, 0x3e, 0x41, 0x46, 0x49, 0x4a, 0x4e, - 0x55, 0x57, 0xbf, 0xc0, 0xc6, 0xc7, 0xcc, 0xce, - 0x00, 0x41, 0x44, 0x4d, 0x4e, 0xca, 0xcb, 0xd2, - 0xd5, 0xd6, 0xd7, 0x00, 0x31, 0x32, 0x34, 0x3b, - 0x47, 0x4f, 0xb1, 0xb2, 0xb4, 0xba, 0xbb, 0xbd, - 0xc8, 0xce, 0x00, 0x18, 0x1a, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x3a, 0x71, 0x7f, 0x80, 0x85, 0x86, - 0x88, 0x90, 0x98, 0x99, 0xbd, 0xc6, 0xc7, 0x00, - 0x2d, 0x31, 0x32, 0x33, 0x36, 0x38, 0x39, 0x3a, - 0x58, 0x5a, 0x00, 0x60, 0x00, 0x12, 0x15, 0x32, - 0x35, 0x52, 0x54, 0x72, 0x74, 0xb7, 0xbe, 0xc6, - 0xc7, 0xc9, 0xd4, 0x00, 0x0b, 0x0f, 0xa9, 0xaa, - 0x00, 0x0b, 0x10, 0x2a, 0x2f, 0x60, 0x64, 0x6a, - 0x70, 0xd0, 0xeb, 0x00, 0x29, 0x2b, 0x00, 0x80, - 0x00, 0x2a, 0x30, 0x3f, 0x40, 0x99, 0x9b, 0x00, - 0xd0, 0x00, 0x00, 0xa4, 0x00, 0x00, 0x00, 0x1e, - 0x1f, 0x00, 0x00, 0x10, 0x20, 0x24, 0x30, 0x70, - 0xff, 0x00, 0x61, 0xe0, 0xe7, 0xf9, 0xfc, + 0x00, 0x01, 0x20, 0x7f, 0xa0, 0x00, 0x00, 0x50, + 0x60, 0x70, 0x00, 0x83, 0x87, 0x88, 0x8a, 0x00, + 0x91, 0xa2, 0xa3, 0xba, 0xbb, 0xbe, 0xbf, 0xc0, + 0xc1, 0xc3, 0xc4, 0xc5, 0x00, 0x4b, 0x56, 0x70, + 0x71, 0xd6, 0xe5, 0xe7, 0xe9, 0xea, 0xee, 0x00, + 0x0f, 0x10, 0x11, 0x12, 0x30, 0x4b, 0xa6, 0xb1, + 0x00, 0x01, 0x03, 0x3c, 0x3d, 0x41, 0x49, 0x4d, + 0x4e, 0x51, 0x55, 0x62, 0x64, 0x81, 0x82, 0xbc, + 0xbd, 0xc1, 0xc5, 0xcd, 0xce, 0xe2, 0xe4, 0x00, + 0x02, 0x03, 0x3c, 0x3d, 0x41, 0x43, 0x47, 0x49, + 0x4b, 0x4e, 0x70, 0x72, 0x81, 0x83, 0xbc, 0xbd, + 0xc1, 0xc6, 0xc7, 0xc9, 0xcd, 0xce, 0x00, 0x01, + 0x02, 0x3c, 0x3d, 0x3f, 0x40, 0x41, 0x44, 0x4d, + 0x4e, 0x56, 0x57, 0x82, 0x83, 0xc0, 0xc1, 0xcd, + 0xce, 0x00, 0x3e, 0x41, 0x46, 0x49, 0x4a, 0x4e, + 0x55, 0x57, 0xbf, 0xc0, 0xc6, 0xc7, 0xcc, 0xce, + 0x00, 0x41, 0x44, 0x4d, 0x4e, 0xca, 0xcb, 0xd2, + 0xd5, 0xd6, 0xd7, 0x00, 0x31, 0x32, 0x34, 0x3b, + 0x47, 0x4f, 0xb1, 0xb2, 0xb4, 0xba, 0xbb, 0xbd, + 0xc8, 0xce, 0x00, 0x18, 0x1a, 0x35, 0x36, 0x37, + 0x38, 0x39, 0x3a, 0x71, 0x7f, 0x80, 0x85, 0x86, + 0x88, 0x90, 0x98, 0x99, 0xbd, 0xc6, 0xc7, 0x00, + 0x2d, 0x31, 0x32, 0x33, 0x36, 0x38, 0x39, 0x3a, + 0x58, 0x5a, 0x00, 0x60, 0x00, 0x12, 0x15, 0x32, + 0x35, 0x52, 0x54, 0x72, 0x74, 0xb7, 0xbe, 0xc6, + 0xc7, 0xc9, 0xd4, 0x00, 0x0b, 0x0f, 0xa9, 0xaa, + 0x00, 0x0b, 0x10, 0x2a, 0x2f, 0x60, 0x64, 0x6a, + 0x70, 0xd0, 0xeb, 0x00, 0x29, 0x2b, 0x00, 0x80, + 0x00, 0x2a, 0x30, 0x3f, 0x40, 0x99, 0x9b, 0x00, + 0xd0, 0x00, 0x00, 0xa4, 0x00, 0x00, 0x00, 0x1e, + 0x1f, 0x00, 0x00, 0x10, 0x20, 0x24, 0x30, 0x70, + 0xff, 0x00, 0x61, 0xe0, 0xe7, 0xf9, 0xfc, }; static const signed char new_wtbl[] = { - 0, -1, 1, -1, 1, 1, 0, 1, - 0, 1, 1, 0, 1, 0, 1, 1, - 0, 1, 0, 1, 0, 1, 0, 1, - 0, 1, 0, 1, 1, 0, 1, 0, - 1, 0, 1, 0, 1, 0, 1, 1, - 0, 1, 0, 1, 0, 1, 0, 1, - 1, 0, 1, 0, 1, 0, 1, 0, - 1, 0, 1, 0, 1, 0, 1, 0, - 1, 0, 1, 0, 1, 0, 1, 1, - 0, 1, 0, 1, 0, 1, 0, 1, - 0, 1, 0, 1, 0, 1, 0, 1, - 0, 1, 0, 1, 0, 1, 1, 0, - 1, 0, 1, 0, 1, 0, 1, 0, - 1, 0, 1, 0, 1, 0, 1, 0, - 1, 1, 0, 1, 0, 1, 0, 1, - 0, 1, 0, 1, 0, 1, 0, 1, - 1, 0, 1, 0, 1, 0, 1, 0, - 1, 0, 1, 1, 0, 1, 0, 1, - 0, 1, 0, 1, 0, 1, 0, 1, - 0, 1, 1, 0, 1, 0, 1, 0, - 1, 0, 1, 0, 1, 0, 1, 0, - 1, 0, 1, 0, 1, 0, 1, 1, - 0, 1, 0, 1, 0, 1, 0, 1, - 0, 1, 2, 0, 1, 0, 1, 0, - 1, 0, 1, 0, 1, 0, 1, 0, - 1, 0, 1, 1, 0, 1, 0, 1, - 1, 0, 1, 0, 1, 0, 1, 0, - 1, 0, 1, 1, 2, 1, 1, 2, - 2, 0, 2, 1, 2, 0, 2, 2, - 1, 1, 2, 1, 1, 2, 1, 0, - 1, 1, 0, 1, 0, 1, 2, 1, - 0, 2, 1, 2, 1, 0, 1, + 0, -1, 1, -1, 1, 1, 0, 1, + 0, 1, 1, 0, 1, 0, 1, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 1, + 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 2, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 1, 0, 1, 0, 1, + 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 1, 2, 1, 1, 2, + 2, 0, 2, 1, 2, 0, 2, 2, + 1, 1, 2, 1, 1, 2, 1, 0, + 1, 1, 0, 1, 0, 1, 2, 1, + 0, 2, 1, 2, 1, 0, 1, }; libc_hidden_proto(wcsnrtombs) @@ -1043,7 +1043,7 @@ int wcswidth(const wchar_t *pwcs, size_t n) if (ENCODING == __ctype_encoding_7_bit) { size_t i; - + for (i = 0 ; (i < n) && pwcs[i] ; i++) { if (pwcs[i] != ((unsigned char)(pwcs[i]))) { return -1; @@ -1064,7 +1064,7 @@ int wcswidth(const wchar_t *pwcs, size_t n) /* For stricter handling of allowed unicode values... see comments above. */ else if (ENCODING == __ctype_encoding_utf8) { size_t i; - + for (i = 0 ; (i < n) && pwcs[i] ; i++) { if ( (((__uwchar_t)((pwcs[i]) - 0xfffeU)) < 2) || (((__uwchar_t)((pwcs[i]) - 0xd800U)) < (0xe000U - 0xd800U)) @@ -1501,7 +1501,7 @@ size_t weak_function iconv(iconv_t cd, char **__restrict inbuf, } wc += (wc2 << 16); } else if (px->tocodeset & 1) wc = bswap_16(wc); - } + } (*outbuf)[0] = (char)((unsigned char)(wc)); (*outbuf)[1] = (char)((unsigned char)(wc >> 8)); if (inco == 4) { @@ -1580,10 +1580,10 @@ extern const unsigned char __iconv_codesets[]; char *progname; int hide_errors; -static void error_msg(const char *fmt, ...) +static void error_msg(const char *fmt, ...) __attribute__ ((noreturn, format (printf, 1, 2))); -static void error_msg(const char *fmt, ...) +static void error_msg(const char *fmt, ...) { va_list arg; diff --git a/libc/misc/wordexp/wordexp.c b/libc/misc/wordexp/wordexp.c index 34c86aec5..145c24c79 100644 --- a/libc/misc/wordexp/wordexp.c +++ b/libc/misc/wordexp/wordexp.c @@ -325,8 +325,8 @@ parse_tilde(char **word, size_t * word_length, size_t * max_length, uid = getuid(); buffer = alloca(buflen); - while ((result = getpwuid_r(uid, &pwd, buffer, buflen, &tpwd)) - != 0 && errno == ERANGE) + while ((result = getpwuid_r(uid, &pwd, buffer, buflen, &tpwd)) + != 0 && errno == ERANGE) { buflen += 1000; buffer = alloca(buflen); diff --git a/libc/signal/allocrtsig.c b/libc/signal/allocrtsig.c index 87fd9a641..3c7d6211b 100644 --- a/libc/signal/allocrtsig.c +++ b/libc/signal/allocrtsig.c @@ -22,7 +22,7 @@ #include #include #include - + /* Only enable rt signals when it is supported at compile time */ #ifndef __NR_rt_sigaction /* In these variables we keep track of the used variables. If the diff --git a/libc/signal/sigaction.c b/libc/signal/sigaction.c index 50ab640d5..88fb6b7a4 100644 --- a/libc/signal/sigaction.c +++ b/libc/signal/sigaction.c @@ -52,7 +52,7 @@ __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact) kact.sa_restorer = act->sa_restorer; # endif } - + /* XXX The size argument hopefully will have to be changed to the real size of the user-level sigset_t. */ result = __syscall_rt_sigaction(sig, diff --git a/libc/signal/sigjmp.c b/libc/signal/sigjmp.c index 38892e050..d143e9376 100644 --- a/libc/signal/sigjmp.c +++ b/libc/signal/sigjmp.c @@ -30,7 +30,7 @@ libc_hidden_proto(sigprocmask) int __sigjmp_save (sigjmp_buf env, int savemask) attribute_hidden; int __sigjmp_save (sigjmp_buf env, int savemask) { - env[0].__mask_was_saved = (savemask && + env[0].__mask_was_saved = (savemask && sigprocmask (SIG_BLOCK, (sigset_t *) NULL, &env[0].__saved_mask) == 0); return 0; diff --git a/libc/stdio/_fpmaxtostr.c b/libc/stdio/_fpmaxtostr.c index 2a63fda9d..b8d93a091 100644 --- a/libc/stdio/_fpmaxtostr.c +++ b/libc/stdio/_fpmaxtostr.c @@ -19,7 +19,7 @@ typedef size_t (__fp_outfunc_t)(FILE *fp, intptr_t type, intptr_t len, /* Copyright (C) 2000, 2001, 2003 Manuel Novoa III * - * Function: + * Function: * * ssize_t _fpmaxtostr(FILE * fp, __fpmax_t x, struct printf_info *info, * __fp_outfunc_t fp_outfunc); @@ -185,7 +185,7 @@ static const __fpmax_t exp16_table[] = { #if FPMAX_MAX_EXP >= 16384 0x1.0p16384L #endif -#if FPMAX_MAX_EXP >= 32768 +#if FPMAX_MAX_EXP >= 32768 #error unsupported FPMAX_MAX_EXP. please increase table #endif }; @@ -410,7 +410,7 @@ ssize_t _fpmaxtostr(FILE * fp, __fpmax_t x, struct printf_info *info, if (mode < 'a') { *exp_buf -= ('a' - 'A'); /* e->E and p->P */ mode += ('a' - 'A'); - } + } o_mode = mode; if ((mode == 'g') && (preci > 0)){ @@ -450,7 +450,7 @@ ssize_t _fpmaxtostr(FILE * fp, __fpmax_t x, struct printf_info *info, #ifdef __UCLIBC_HAS_HEXADECIMAL_FLOATS__ if ((mode|0x20) == 'a') { char *q; - + for (q = e ; *q ; --q) { if (*q > '9') { *q += (*exp_buf - ('p' - 'a') - '9' - 1); diff --git a/libc/stdio/_uintmaxtostr.c b/libc/stdio/_uintmaxtostr.c index 7a80371b8..0d25a0a9f 100644 --- a/libc/stdio/_uintmaxtostr.c +++ b/libc/stdio/_uintmaxtostr.c @@ -129,7 +129,7 @@ char attribute_hidden *_uintmaxtostr(register char * __restrict bufend, uintmax_ digit = low % base; low /= base; } - + #ifndef __LOCALE_C_ONLY if (unlikely(outdigit)) { bufend -= __UCLIBC_CURLOCALE_DATA.outdigit_length[digit]; diff --git a/libc/stdio/_vfprintf.c b/libc/stdio/_vfprintf.c index 947b5b077..2b642fc35 100644 --- a/libc/stdio/_vfprintf.c +++ b/libc/stdio/_vfprintf.c @@ -35,7 +35,7 @@ /* April 1, 2002 * Initialize thread locks for fake files in vsnprintf and vdprintf. * reported by Erik Andersen (andersen@codepoet.com) - * Fix an arg promotion handling bug in _do_one_spec for %c. + * Fix an arg promotion handling bug in _do_one_spec for %c. * reported by Ilguiz Latypov * * May 10, 2002 @@ -241,7 +241,7 @@ enum { FLAG_THOUSANDS = 0x20, FLAG_I18N = 0x40, /* only works for d, i, u */ FLAG_WIDESTREAM = 0x80 -}; +}; /**********************************************************************/ @@ -544,7 +544,7 @@ int attribute_hidden _ppfs_init(register ppfs_t *ppfs, const char *fmt0) #if 1 /* TODO - use memset here since already "paid for"? */ register int *p = ppfs->argtype; - + r = MAX_ARGS; do { *p++ = __PA_NOARG; @@ -637,7 +637,7 @@ void attribute_hidden _ppfs_setargs(register ppfs_t *ppfs) *(int *) #endif GET_VA_ARG(p,u,unsigned int,ppfs->arg); - } + } if (ppfs->info.prec == INT_MIN) { ppfs->info.prec = #ifdef __va_arg_ptr @@ -690,7 +690,7 @@ void attribute_hidden _ppfs_setargs(register ppfs_t *ppfs) case PA_STRING: case PA_WSTRING: GET_VA_ARG(p,p,void *,ppfs->arg); - break; + break; case __PA_NOARG: continue; } @@ -701,7 +701,7 @@ void attribute_hidden _ppfs_setargs(register ppfs_t *ppfs) if (ppfs->info.width == INT_MIN) { ppfs->info.width = (int) GET_ARG_VALUE(p + ppfs->argnumber[0] - 1,u,unsigned int); - } + } if (ppfs->info.prec == INT_MIN) { ppfs->info.prec = (int) GET_ARG_VALUE(p + ppfs->argnumber[1] - 1,u,unsigned int); @@ -750,7 +750,7 @@ libc_hidden_proto(__ctype_b) /* TODO -- rethink this -- perhaps we should set to largest type??? */ -#ifdef _OVERLAPPING_DIFFERENT_ARGS +#ifdef _OVERLAPPING_DIFFERENT_ARGS #define PROMOTED_SIZE_OF(X) ((sizeof(X) + sizeof(int) - 1) / sizeof(X)) @@ -974,7 +974,7 @@ int attribute_hidden _ppfs_parsespec(ppfs_t *ppfs) restart_flags: /* Process flags. */ i = 1; p = spec_flags; - + do { if (*fmt == *p++) { ++fmt; @@ -1100,7 +1100,7 @@ int attribute_hidden _ppfs_parsespec(ppfs_t *ppfs) /* Otherwise error. */ return -1; } - + #if defined(__UCLIBC_HAS_GLIBC_CUSTOM_PRINTF__) || defined(__UCLIBC_HAS_PRINTF_M_SPEC__) DONE: #endif @@ -1260,7 +1260,7 @@ static size_t _outnstr(FILE *stream, const char *s, size_t wclen) mbstate.__mask = 0; todo = wclen; - + while (todo) { r = mbsrtowcs(wbuf, &s, ((todo <= sizeof(wbuf)/sizeof(wbuf[0])) @@ -1364,7 +1364,7 @@ static int _ppwfs_init(register ppfs_t *ppfs, const wchar_t *fmt0) #if 1 /* TODO - use memset here since already "paid for"? */ register int *p = ppfs->argtype; - + r = MAX_ARGS; do { *p++ = __PA_NOARG; @@ -1900,7 +1900,7 @@ int VFPRINTF_internal (FILE * __restrict stream, if (!*format) { /* we're done */ break; } - + if (format[1] != '%') { /* if we get here, *format == '%' */ /* TODO: _do_one_spec needs to know what the output funcs are!!! */ ppfs.fmtpos = (const char *)(++format); @@ -1960,7 +1960,7 @@ int VFPRINTF (FILE * __restrict stream, __STDIO_AUTO_THREADLOCK(stream); - if + if #ifdef L_vfprintf (!__STDIO_STREAM_IS_NARROW_WRITING(stream) && __STDIO_STREAM_TRANS_TO_WRITE(stream, __FLAG_NARROW)) diff --git a/libc/stdio/fdopen.c b/libc/stdio/fdopen.c index acf6231b2..635ab803d 100644 --- a/libc/stdio/fdopen.c +++ b/libc/stdio/fdopen.c @@ -15,7 +15,7 @@ FILE *fdopen(int filedes, const char *mode) intptr_t cur_mode; return (((cur_mode = fcntl(filedes, F_GETFL))) != -1) - ? _stdio_fopen(cur_mode, mode, NULL, filedes) + ? _stdio_fopen(cur_mode, mode, NULL, filedes) : NULL; } libc_hidden_def(fdopen) diff --git a/libc/stdio/fmemopen.c b/libc/stdio/fmemopen.c index eb4fa736e..ba194d726 100644 --- a/libc/stdio/fmemopen.c +++ b/libc/stdio/fmemopen.c @@ -142,7 +142,7 @@ FILE *fmemopen(void *s, size_t len, const char *modes) cookie->dynbuf = 1; *cookie->buf = 0; /* If we're appending, treat as empty file. */ } - + #ifndef __BCC__ fp = fopencookie(cookie, modes, _fmo_io_funcs); #else diff --git a/libc/stdio/fread.c b/libc/stdio/fread.c index d8b04f733..4f9c98465 100644 --- a/libc/stdio/fread.c +++ b/libc/stdio/fread.c @@ -56,7 +56,7 @@ size_t fread_unlocked(void * __restrict ptr, size_t size, size_t nmemb, goto DONE; } }