summaryrefslogtreecommitdiff
path: root/locale/C-numeric.c
AgeCommit message (Collapse)Author
1996-05-03Fri May 3 13:32:08 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>cvs/libc-960504Roland McGrath
* intl/Makefile (CPPFLAGS): Change $(nlsdir) to $(i18ndir) in LOCALE_ALIAS_PATH. Fri May 3 03:14:02 1996 Ulrich Drepper <drepper@cygnus.com> * intl/Makefile (routines): Add l10nflist and explodename. (distribute): Add loadinfo.h and locale.alias. (install-others): New variable to install locale.alias. * intl/dcgettext.c, intl/finddomain.c, intl/gettextP.h, intl/loadmsgcat.c: Adapt for upcoming gettext-0.10.13. Some code is now shared with the locale implementation. * intl/explodename.c, intl/l10nflist.c, intl/loadinfo.h: New file. Extracted from finddomain.c. This is also used in the locale implementation. * intl/locale.alias: New file. Locale alias database compatible with X Window System's locale alias file. Can now be used in locale and gettext code. * libio/stdio.h: Add prototypes for asprint and vasprintf. * locale/C-collate.c, locale/C-ctype.c, locale/C-messages.c, locale/C-monetary.c, locale/C-numeric.c, locale/C-time.c: Add new field in structure with name of locale ("C" in this case). * locale/Makefile (routines): Add findlocale. * locale/findlocale.c: New file. Instead of trying to load the directly described file we now try to be much smarter when this fails. Use the same code as gettext does. * locale/loadlocale.c, locale/setlocale.c: Rewrite to know about new loading scheme. * locale/localeinfo.h: Adapt prototypes and declarations for new setlocale implementation. Remove definition of u32_t type. We now use u_int32_t from <sys/types.h>. * locale/programs/charset.h (ILLEGAL_CHAR_VALUE): Provide type with constant. * locale/programs/config.h, locale/lc-collate.c, locale/localeinfo.h, locale/programs/ld-collate.c, locale/programs/ld-ctype.c, locale/programs/ld-messages.c, locale/programs/ld-monetary.c, locale/programs/ld-numeric.c, locale/programs/ld-time.c, locale/weight.h, string/strcoll.c: Change to use u_int32_t and u_int16_t. * locale/programs/localedef.c (construct_output_path): Change name of output locale to contain normalized form of the character set portion. * string/Makefile (routines): Add agrz-ctsep and argz-next. (tests): Add tst-strlen. * string/argz-ctsep.c: New file. Implement reverse operation from argz-stringify. * string/argz-next.c: Non-inline version of function from argz.h. * string/argz.h, string/envz.h: Make usable as global header file. * string/envz.c: Fix declarations to use size_t where prototypes say so. * string/tst-strlen.c: New file. Another test for critical situation in strlen implementations. * sysdeps/i386/i586/strlen.S: Fix bug with highest byte in word being zero. * wctype/test_wctype.c: Fix controlling comparison after change to 32 bit character class array. Fri May 3 12:53:12 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu> * sysdeps/unix/sysv/linux/sys/socket.h: Remove spurious doubled line. Thu May 2 22:50:52 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/unix/sysv/linux/getpriority.c: New file. * sysdeps/unix/sysv/linux/syscalls.list: Add s_getpriority. Thu May 2 22:41:31 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/unix/sysv/linux/m68k/fpu_control.h (_FPU_DEFAULT): Disable all exceptions. Thu May 2 22:33:14 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/m68k/fpu/e_acos.c, sysdeps/m68k/fpu/e_acosf.c, sysdeps/m68k/fpu/e_fmod.c, sysdeps/m68k/fpu/e_fmodf.c, sysdeps/m68k/fpu/isinfl.c, sysdeps/m68k/fpu/isnanl.c, sysdeps/m68k/fpu/s_atan.c, sysdeps/m68k/fpu/s_atanf.c, sysdeps/m68k/fpu/s_frexp.c, sysdeps/m68k/fpu/s_frexpf.c, sysdeps/m68k/fpu/s_ilogb.c, sysdeps/m68k/fpu/s_ilogbf.c, sysdeps/m68k/fpu/s_isinf.c, sysdeps/m68k/fpu/s_isinff.c, sysdeps/m68k/fpu/s_ldexp.c, sysdeps/m68k/fpu/s_ldexpf.c, sysdeps/m68k/fpu/s_modf.c, sysdeps/m68k/fpu/s_modff.c: Don't define __NO_MATH_INLINES, which is already defined on command line. Thu May 2 22:18:28 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/libm-ieee754/e_j0f.c (__ieee754_j0f, __ieee754_y0f): Replace 0x80000000 by 0x48000000. * sysdeps/libm-ieee754/e_j1f.c (__ieee754_j1f): Likewise. Thu May 2 21:30:33 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sunrpc/svc_simple.c: Make global variable pl local to registerrpc. Thu May 2 00:24:04 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * time/Makefile (tz-cflags): New variable. (CFLAGS-tzfile.c): New variable. (CFLAGS-zic.c): Add $(tz-cflags). (tz-cc): Remove variable. ($(objpfx)tzfile.o, $(objpfx)zic.o): Remove targets. * sysdeps/mach/hurd/getcwd.c: Jump out of both loops when we find a name, instead of checking for reaching end of buffer, which happens when the match is the last entry in the buffer.
1996-05-01Wed May 1 09:10:04 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>Roland McGrath
* time/strftime.c: Use canonical autoconf nugget for time.h+sys/time.h include. Mon Apr 29 02:48:26 1996 Ulrich Drepper <drepper@cygnus.com> * ctype/ctype-info.c: (__ctype_width): New variable. (__ctype_names): Initialize correctly without offset. * locale/C-collate.c, locale/C-ctype.c, locale/C-messages.c, locale/C-monetary.c, locale/C-numeric.c, locale/C-time.c: Change copyright. * locale/C-ctype.c (_nl_C_LC_CTYPE_class32): Correct endianess for initialization value. * locale/lc-ctype.c (current): Add parameter for offset. (__ctype32_b, __ctype_width): Add initialization for these variables. * locale/programs/charmap.c: Finish support for WIDTH information. (new_width): New function. * locale/programs/charset.h (width_rule): new data structure. (charset_t): Add elements for width information. * locale/programs/ld-ctype.c (locale_ctype_t): Add element for width information. (allocate_arrays): Add new argument for charset. (ctype_finish): Make sure all characters named in charset width table are known to name table. (ctype_output): Correct handling of class and map name information and write out width information. (find_idx): Prepare for being called with NULL pointer as TABLE argument. This means only allocate name entry. (allocate_arrays): Correct handling of array element -1. Because EOF == -1 the value of element 127 must *not* be mirrored here. Fill width information from charset tables. * locale/programs/localedef.c (main): Correct loop over all categories after change of order from Thu Mar 28 14:22:51 1996. Add new charset argument to call of `write_all_categories'. * locale/programs/locales.h (ctype_finish, ctype_output): New charset argument. * locale/programs/locfile.c (write_all_categories): Call `ctype_output' with additional argument charset. * posix/getconf.c (vars): Add _POSIX_SYNC_IO, _POSIX_ASYNC_IO, and _POSIX_PRIO_IO definitions. * posix/posix2_lim.h: Add definition of _POSIX2_CHARCLASS_NAME_MAX and CHARCLASS_NAME_MAX. * posix/unistd.h: Document _POSIX_SYNC_IO, _POSIX_ASYNC_IO, and _POSIX_PRIO_IO. * stdlib/grouping.h: Prepare for use in wide string functions. * stdlib/stdlib.h: Correct prototypes for __strto*_internal functions. * stdlib/strtod.c: Extend for use as `wcsto{f,d,ld}'. * stdlib/strtol.c: Extend for use as `wcsto{l,ul,q,uq}'. * string/strcoll.c: Extend for use as `wcscoll'. * string/strxfrm.c: Extend for use as `wcsxfrm'. * sysdeps/generic/confname.h: Add definition of _PC_SYNC_IO, _PC_ASYNC_IO, _PC_PRIO_IO and _SC_CHARCLASS_NAME_MAX. * sysdeps/generic/stpncpy.c: Correct return value. * sysdeps/posix/fpathconf.c: Add handling of _PC_SYNC_IO, _PC_ASYNC_IO, and _PC_PRIO_IO. * sysdeps/posix/sysconf.c: Add handling of _SC_REALTIME_SIGNALS, _SC_PRIORITY_SCHEDULING, _SC_TIMERS, _SC_ASYNCHRONOUS_IO, _SC_PRIORITIZED_IO, _SC_SYNCHRONIZED_IO, _SC_FSYNC, _SC_MAPPED_FILES, _SC_MEMLOCK, _SC_MEMLOCK_RANGE, _SC_MEMORY_PROTECTION, _SC_MESSAGE_PASSING, _SC_SEMAPHORES, _SC_SHARED_MEMORY_OBJECTS, and _SC_CHARCLASS_NAME_MAX. * sysdeps/stub/sysconf.c: Ditto. * sysdeps/unix/sysv/sysv4/sysconf.c: Ditto. * sysdeps/unix/sysv/linux/Dist: Add sys/sysctl.h. * sysdeps/unix/sysv/linux/Makefile [subdir == misc] (sysdep_routines): Add s_sysctl and sysctl. * sysdeps/unix/sysv/linux/sys/mman.h: Add declaration of mremap. * sysdeps/unix/sysv/linux/sys/socket.h: New file. Wrapper around kernel header. * sysdeps/unix/sysv/linux/sys/sysctl.h: New file. Define interface to `sysctl' function. * sysdeps/unix/sysv/linux/syscalls.list: Add mremap and _sysctl. * sysdeps/unix/sysv/linux/sysconf.c: Add handling of _SC_CHARCLASS_NAME_MAX. * sysdeps/unix/sysv/linux/sysctl.c: new file. Implement caller of _sysctl system call. * sysvipc/Makefile (routines): Add ftok. * sysvipc/ftok.c: use variable `proj_id' not `id'. Patch by David Mosberger-Tang. * wcsmbs/Makefile (routines): Add wcpcpy, wcpncpy, wcstol, wcstoul, wcstoq, wcstouq, wcstod, wcstold, wcstof, wcscoll, wcsxfrm, wcwidth, and wcswidth. * wcsmbs/wchar.h: Add declarations for wcpcpy, wcpncpy, wcstol, wcstoul, wcstoq, wcstouq, wcstod, wcstold, wcstof, wcscoll, wcsxfrm, wcwidth, and wcswidth. Declare internal interfaces for wcsto* functions. [OPTIMIZE]: Define inline functions for wcsto* functions to call internal interface functions. * wcsmbs/wcpcpy.c, wcsmbs/wcpncpy.c: New files. Implement non- standard function equivalent to stpcpy/stpncpy. * wcsmbs/wcscoll.c: Implement `wcscoll' function by using `strcoll' implementation. * wcsmbs/wcscpy.c, wcsmbs/wcsncpy.c: Use wint_t instead of wchar_t. * wcsmbs/wcstod.c: Implement `wcstod' function by using `strtod' implementation. * wcsmbs/wcstof.c: Same for `wcstof'. * wcsmbs/wcstold.c: Same for `strtold'. * wcsmbs/wcstol.c: Implement `wcstol' function by using `strtol' implementation. * wcsmbs/wcstoq.c: Same for `wcstoq'. * wcsmbs/wcstoul.c: Same for `wcstoul'. * wcsmbs/wcstouq.c: Same for `wcstouq'. * wcsmbs/wcswidth.c: Implement `wcswidth' function from X/Open CAE. * wcsmbs/wcwidth.c: Ditto for `wcwidth'. * wcsmbs/wcwidth.h: Common function for definitions of above two functions. * wcsmbs/wcsxfrm.c: Implement `wcsxfrm function by using `strxfrm implementation. * wctype/wctype.c: Remove case for `wctype_t' being 16 bit type. * wctype/wctype.h (wint_t): Protect against multiple definition. (wctype_t): Always define as `unsigned long int'. * wctype.h: New file. Wrapper around wctype/wctype.h. * hurd/hurdstartup.c (_hurd_split_args): Function removed. (_hurd_startup): Use argz functions. * hurd/hurdexec.c: Use argz functions.
1996-03-28Thu Mar 28 03:25:10 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>Roland McGrath
* intl/Makefile (copysrc): Add missing > in sed cmd. Sat Mar 23 17:52:49 1996 Ulrich Drepper <drepper@gnu.ai.mit.edu> * Makeconfig: Rename Makefile variable nlsdir to i18ndir and change value to $(datadir)/i18n. `nls' is not an appropriate name. * Makefile (subdirs): Add new subdir wctype. * ctype/ctype-info.c: Add new global variable __ctype_names and initialize from _nl_C_LC_CTYPE. * ctype/ctype.h: In P1003.3b/D11 `alnum' is a separate character class. Use bit 11. [_ISbit]: Protect definition of bitmasks because they are also used in wctype.h. * libio/genops.c (_IO_sputbackc, _IO_sungetc): Clear EOF flag after successfully pushing back a character. Fundamental changes in locale implementation. Almost nothing from the old code is used anymore. * locale/charmap.c, locale/collate.c, locale/config.h, locale/ctypedump.c, locale/hash.h, locale/keyword.gperf, locale/keyword.h, locale/loadlocale.c, locale/locale-ctype.c, locale/locale.c locale/localeconv.c, locale/localedef.c, locale/localedef.h, locale/locfile-hash.c, locale/locfile-lex.c, locale/locfile-parse.c, locale/messages.c, locale/monetary.c, locale/numeric.c, locale/setlocale.c, locale/token.h, locale/xmalloc.c: Removed. * locale/Makefile: Update for new locale implementation with program source code distributed in subdir. * locale/categories.def, locale/iso-4217.def: Updated file for new locale implementation. * locale/langinfo.h: Updated for new locale implementation. (ERA_D_T_FMT, ERA_T_FMT): New official values according to P1003.2b/D11. (_NL_COLLATE_NRULES, _NL_COLLATE_RULES, _NL_COLLATE_HASH_SIZE, _NL_COLLATE_HASH_LAYERS, _NL_COLLATE_TABLE_EB, _NL_COLLATE_TABLE_EL, _NL_COLLATE_UNDEFINED, _NL_COLLATE_EXTRA_EB, _NL_COLLATE_EXTRA_EL, _NL_CTYPE_NAMES_EB, _NL_CTYPE_NAMES_EL, _NL_CTYPE_HASH_SIZE, _NL_CTYPE_HASH_LAYERS, _NL_CTYPE_CLASS_NAMES, _NL_CTYPE_MAP_NAMES, _NL_CTYPE_WIDTH): New internal values for extended LC_CTYPE and LC_COLLATE implementation. * locale/simple-hash.c, locale/simple-hash.h, locale/xmalloc.c, locale/xstrdup.c: Helper functions for locale related programs. * locale/C-collate.c, locale/C-ctype.c, locale/C-messages.c, locale/C-monetary.c, locale/C-numeric.c, locale/C-time.c, locale/lc-collate.c, locale/lc-ctype.c, locale/lc-messages.c, locale/lc-monetary.c, locale/lc-numeric.c, locale/lc-time.c: New implementation of locale functions, and new generated "C" locale data. * locale/loadlocale.c: Now handles word fields in locale binary automatically by changing the endianess if necessary. * locale/localeinfo.h (LIMAGIC): Changed magic number because of incompatible changes. (locale_data): Changed definition to allow word as a value type. (coll_sort_rule): Values for collation sorting mode. (_NL_CURRENT_WORD): New macro to access word value of locale entry. (__collate_table, __collate_extra): Declare new global variables for collation tables. * locale/programs/charmap-kw.gperf, locale/programs/charmap-kw.h, locale/programs/charmap.c, locale/programs/charset.c, locale/programs/charset.h, locale/programs/config.h, locale/programs/ctypedump.c, locale/programs/ld-collate.c, locale/programs/ld-ctype.c, locale/programs/ld-messages.c, locale/programs/ld-monetary.c, locale/programs/ld-numeric.c, locale/programs/ld-time.c, locale/programs/linereader.c, locale/programs/linereader.h, locale/programs/locale.c, locale/programs/localedef.c, locale/programs/locales.h, locale/programs/locfile-kw.gperf, locale/programs/locfile-kw.h, locale/programs/locfile-token.h, locale/programs/locfile.c, locale/programs/locfile.h, locale/programs/stringtrans.c, locale/programs/stringtrans.h: Implementation of locale related programs. * locale/weight.h: Functions to access collation tables. * posix/unistd.h: Define _POSIX2_LOCALEDEF. * stdio-common/printf_fp.c: Fix bug with printing certain numbers < 10^-1. Reported by Bill Metzenthen. * stdio-common/tfformat.c: Add new test for above bug. * string/strcoll.c, string/strxfrm.c: Real implementation of string collation according to ISO C. * wctype/Makefile, wctype/cname-lookup.h, wctype/iswctype.c, wctype/test_wctype.c, wctype/towctrans.c, wctype/wcfuncs.c, wctype/wctrans.c, wctype/wctype.c, wctype/wctype.h: New files. Implementation of wide character classes and mapping.
1995-03-16Thu Mar 16 00:04:41 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>Roland McGrath
* locale/C-ctype.c: New correct data generated by drepper. * Rules: Don't use $(libc.a). Parsing of grouped numbers contributed by Ulrich Drepper. * stdlib/strtol.c (__strtol_internal): Renamed from strtol. Take new flag arg; if nonzero, parse locale-dependent thousands grouping and interpret only the prefix that is correctly grouped. (strtol): Define this to call _strtol_internal with zero for the flag. Use a weak symbol for the definition. * stdlib/strtod.c (strtod, __strtod_internal): Likewise. Check for the exponent of the number overflowing the float format. * stdlib/stdlib.h (__strtof, __strtold): Declarations removed. (__strto{f,d,ld,l,ul,q,uq}_internal): Declare these functions. [__OPTIMIZE__]: Define inline functions calling those. * stdlib/grouping.h: New file, written by drepper. * stdlib/Makefile (distribute): Add grouping.h. * stdio/vfscanf.c: Grok %' modifier to numeric conversions. Call __strtoX_internal with the grouping flag set iff the modifier is present. Wed Mar 15 00:40:54 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu> * sysdeps/generic/memchr.c: Fix typos: limit.h -> limits.h. * mach/Machrules: Produce static deps for all object flavors. [interface-library]: Remove all these variables and rules. ($(interface-library)-routines): Define this variable. (extra-libs): Append $(interface-library) to this. * mach/Makefile (interface-library): Omit .a suffix. * hurd/Makefile: Likewise. Tue Mar 14 23:40:31 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu> * stdio/internals.c (flushbuf): If !FLUSH_ONLY, don't skip out early if no new data in buffer after priming. * Makerules (object-suffixes, libtypes): Move all these variables to Makeconfig. * Makeconfig (object-suffixes, libtypes): Moved here from Makerules. * Makerules (build-extra-lib): New canned sequence. * sysdeps/mach/hurd/euidaccess.c: Include fcntl.h. Declare ERR; fix uses of FILE and PORT. Remove bogus weak alias for `access'. * sysdeps/mach/hurd/dirfd.c: Include hurd/fd.h and errno.h. Add missing semicolon. * sysdeps/mach/hurd/opendir.c: Include hurd/fd.h. Use a `struct hurd_fd *' temp var, since DIRP->__fd is a `void *'. * sysdeps/mach/hurd/readdir.c: Include hurd/fd.h. * stdlib/wcstombs.c: #if 0 out code for non-ASCII chars until the locale data format is implemented. * sysdeps/mach/hurd/i386/trampoline.c (_hurd_setup_sighandler): Pass &__sigreturn on the stack to the trampoline code, so it is not position-dependent. * stdio/printf_fp.c (NDEBUG): Define this to disable assert. Don't include <stdarg.h>. (__printf_fp): Last arg ARGS is now `const void **const'; dereference ARGS[0] instead of using va_arg. * locale/setlocale.c: In LC_ALL case, initialize CATEGORY before loop to install data. * locale/loadlocale.c (_nl_category_num_items): Use _NL_ITEM_INDEX to extract number from item code. (_nl_load_locale): Close the descriptor when finished. * malloc/realloc.c (_realloc_internal): Call _malloc_internal in place of malloc. * time/tzfile.c (__tzfile_default): Initialize RULE_STDOFF to zero.
1995-03-10* locale/categories.def (LC_CTYPE): Merge CLASS_EB and CLASS_ELRoland McGrath
into just CLASS. Add standard/optional flag to all items. * locale/localeinfo.h (_NL_CURRENT_DEFINE): Fix typo. * ctype/ctype.h [__BYTE_ORDER == __LITTLE_ENDIAN] (_ISbit): Rearrange defn to satisfy compiler. * locale/localeinfo.h: Declare _nl_current.
1995-03-06Sun Mar 5 19:40:13 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>Roland McGrath
* locale/localeinfo.h: Rewritten for new locale system, using locale data files and with <langinfo.h> interface. * locale/setlocale.c: Rewritten to use locale data files. * langinfo.h: New file. * locale/langinfo.h: New file. * locale/nl_langinfo.c: New file. * locale/loadlocale.c: New file. * locale/lc-ctype.c: New file. * locale/lc-messages.c: New file. * locale/lc-monetary.c: New file. * locale/lc-numeric.c: New file. * locale/lc-time.c: New file. * locale/categories.def: New file. * locale/Makefile (headers): Remove localeinfo.h. (distribute): New variable; put localeinfo.h here, and categories.def. (routines): Add loadlocale. (categories): New variable. (aux): Use that to get C-category and lc-category. * ctype/ctype.h (_IS*): Use independent bits for all but _ISalnum. * locale/C-ctype.c, locale/C-messages.c: New files. * locale/C-monetary.c, locale/C-numeric.c, locale/C-time.c: Default "C" locale data updated for new locale system. * locale/C-collate.c: File removed. * locale/C-ctype_ct.c: File removed. * locale/C-ctype_mb.c: File removed. * locale/C-response.c: File removed. * locale/localeconv.c: Use _NL_CURRENT macro to access locale data. * stdio/printf_fp.c, stdio/vfprintf.c, stdio/vfscanf.c, stdlib/strtod.c, time/asctime.c, time/strftime.c: Include ../locale/localeinfo.h and use _NL_CURRENT macro to access locale data. * time/localtime.c: Don't include <localeinfo.h>. * time/tzset.c: Don't use locale items for default TZ value or "GMT" string (use "UTC"). * stdio/vfprintf.c [USE_IN_LIBIO] (PAD): Only call the function if WIDTH>0; update DONE. * malloc/malloc.c (morecore): Fix last change to calculate by blocks instead of bytes.
1995-02-18initial importRoland McGrath