summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/libc/strptime.cc
Commit message (Collapse)AuthorAgeFilesLines
* Clean up whitespace.Christopher Faylor2011-12-171-8/+8
|
* Based on newlib patch to strptime by Peter Rosin <peda@lysator.liu.se>:Corinna Vinschen2011-05-121-0/+92
| | | | | | | | * libc/time/strptime.c (is_leap_year): New static function. (first_day): Ditto. (__strptime): Fill in tm_yday when all of tm_year, tm_mon and tm_mday are updated. Fill in tm_mon, tm_mday and tm_wday when both of tm_year and tm_yday are updated.
* * libc/strptime.c: Remove misleading comment.Corinna Vinschen2011-04-011-4/+0
|
* * libc/strptime.cc: Implement support for era, alt_digits and POSIXCorinna Vinschen2010-02-261-47/+402
| | | | | | | | | | | | | | | | | | | | padding and width modifiers. (era_info_t): New type. (free_era_info): New static function to free era_info_t storage. (get_era_info): New static function to create era_info_t storage from LC_TIME era information. (alt_digits_t): New type. (get_alt_digits): New static function to create alt_digits_t storage from LC_TIME alt_digits information. (free_alt_digits): New static function to free alt_digits_t storage. (find_alt_digits): New static function to scan input for alternative digits and return them, if any. Return NULL otherwise. (__strptime): New static function taking all code from strptime. Implement handling for E, O, +, 0, and width modifiers per POSIX-1.2008. (strptime): Convert into wrapper function to provide era_info and alt_digits pointers and call __strptime. (conv_num): Take additional alt_digits_t parameter and if it's not NULL, call find_alt_digits to convert.
* * Makefile.in (DLL_OFILES): Add nlsfunc.o and strfmon.o.Corinna Vinschen2010-01-221-50/+10
| | | | | | | | | | | | | | | | | | | | | | | | | * autoload.cc (LocaleNameToLCID): Define. * cygwin.din (strfmon): Export. * nlsfuncs.cc: New file. Define a lot of internal functions called from setlocale. (wcscoll): Implement locale-aware here, using CompareStringW function. (strcoll): Ditto. (wcsxfrm): Implement locale-aware here, usingLCMapStringW function. (strxfrm): Ditto. (__set_charset_from_locale): Replace __set_charset_from_codepage. Return Linux-compatible charset. * strfuncs.cc (__set_charset_from_codepage): Remove. * wchar.h (__set_charset_from_codepage): Drop definition. * wincap.h (wincaps::has_localenames): New element. * wincap.cc: Implement above element throughout. * libc/strfmon.c: New file. * libc/strptime.cc: Remove locale constant strings in favor of access to locale-specifc data. (strptime): Point _CurrentTimeLocale to locale-specific data. Throughout use correct locale-specific format fields for all locale-specific formats. * include/monetary.h: New file. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
* * Makefile.in (DLL_OFILES): Remove _def_time.o.Corinna Vinschen2008-05-101-2/+27
| | | | | | * libc/_def_time.c: Remove. Move definitions of _DefaultTimeLocale and _CurrentTimeLocale ... * libc/strptime.cc: ... here.
* * include/sys/localedef.h: Remove.Corinna Vinschen2008-05-081-1/+18
| | | | | * libc/strptime.cc: Define _TimeLocale and declare _CurrentTimeLocale as well as _DefaultTimeLocale locally for Cygwin.
* * Makefile.in (DLL_OFILES): Add _def_time.o. Remove timelocal.o.Corinna Vinschen2008-05-081-474/+315
| | | | | | | | | | * include/sys/localedef.h: New file from NetBSD. * libc/_def_time.c: Ditto. * libc/getopt.c: Update to latest OpenBSD version 1.23. * libc/strptime.cc: Replace FreeBSD version 1.35 with latest NetBSD version 1.28. * libc/timelocal.cc: Remove. * libc/timelocal.h: Remove.
* * strptime.cc (_strptime): Fix gcc warnings.Christopher Faylor2005-11-181-0/+2
|
* * libc: Add subdirectory.Corinna Vinschen2005-11-181-0/+543
* Makefile.in (VPATH): Add libc subdir. (DLL_OFILES): Add strptime.o and timelocal.o. * cygwin.din: Export timelocal and timegm. * localtime.cc: Define STD_INSPIRED unconditionally. * include/cygwin/time.h (timelocal): Add declaration. (timegm): Ditto. * include/cygwin/version.h: Bump API minor version. * libc/strptime.cc: New file. * libc/timelocal.cc: New file. * libc/timelocal.h: New file.