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/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 +- 20 files changed, 229 insertions(+), 229 deletions(-) (limited to 'libc/misc') 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); -- cgit v1.2.3