summaryrefslogtreecommitdiffstats
path: root/winsup/utils/locale.cc
Commit message (Collapse)AuthorAgeFilesLines
* * cygpath.cc: Change including headers to allow building againstCorinna Vinschen2012-07-061-1/+3
| | | | | | | | | | | | | | Mingw64 headers. Include ntdef.h and ntdll.h rather than ddk headers. Define _WIN32_WINNT and WINVER as 0x0602. (RtlEqualUnicodePathPrefix): Drop definition. Pulled in from ntdll.h now. (get_device_name): s/Zw/Nt. * dumper.cc: Include sys/param.h (dumper::dump_memory_region): Use MIN rather than min. * locale.cc: Include stdlib.h. Define _WIN32_WINNT and WINVER as 0x0602. * ps.cc: Include ntdef.h and ntdll.h rather than ddk headers. * regtool.cc (regDeleteKeyEx): Drop WINADVAPI qualifier.
* Clean up whitespace.Christopher Faylor2011-12-171-15/+15
|
* * locale.cc (print_locale_with_codeset): Fetch Windows path as UNICODECorinna Vinschen2011-11-281-3/+3
| | | | path and convert that to POSIX.
* * Align usage output, version output, as well as usage and versionCorinna Vinschen2011-10-101-13/+12
| | | | | | | | | option handling to use the same style throughout all Cygwin utils. Throughout use program_invocation_short_name to refer to current process name in Cygwin executables. * utils.sgml: Align documentation to above change. Add missing sections for getconf, ldd, and setmetamode. * strace.cc (proc_child): Avoid compiler warning.
* * locale.cc (usage): Restructure, rephrase, add new options. DropCorinna Vinschen2011-10-101-28/+68
| | | | | | | | | | | | | | arguments, don't exit. (print_version): New function. (longopts): Add -f, -n, and -V options. Reorder. (opts): Add -f, -n, and -V options. (main): Call GetSystemDefaultUILanguage for -s option. Call GetUserDefaultUILanguage for -u option. Add -f and -n options and call GetUserDefaultLCID and GetSystemDefaultLCID respectively. Return 0 after calling usage in -h case. Add -V option and call print_version. Don't print full usage in default case, rather just a short help message similar to GNU tools. * utils.sgml (locale): Align to above changes. Rephrase description.
* * locale.cc (print_locale_with_codeset): Align printing of locale namesCorinna Vinschen2011-05-031-4/+5
| | | | to POSIX.
* * loadlib.h: New header implementing safe LoadLibrary calls.Corinna Vinschen2010-08-281-3/+4
| | | | | | | | | | | | Include throughout files using LoadLibrary function. * cygcheck.cc (dump_sysinfo): Retrieve kernel32.dll handle via GetModuleHandle, rather than using LoadLibrary. * cygpath.cc (get_long_name): Ditto. (do_sysfolders): Append .dll suffix in LoadLibrary call. * ldh.cc (WinMain): Use LoadLibraryExW with DONT_RESOLVE_DLL_REFERENCES to avoid loading malicious library code. * locale.cc (print_locale_with_codeset): Change way to retrieve kernel32.dll path.
* * locale.cc (print_lc_xxx_charset): Remove.Corinna Vinschen2010-04-281-100/+98
| | | | | | | | | | | | | (enum type_t): Change according to the fact that nl_langinfo now returns all locale category values. (lc_ctype_names): Add new category members. Redefine for exclusive nl_langinfo usage. (lc_numeric_names): Ditto. (lc_time_names): Ditto. (lc_collate_names): Ditto. (lc_monetary_names): Ditto. (lc_messages_names): Ditto. (print_lc): Change switch according to new type_t values.
* * locale.cc (print_charmaps): Add EUC-CN and GB2312.Corinna Vinschen2010-03-271-0/+2
|
* * locale.cc (add_locale_alias_locales): Always use loc_num at functionCorinna Vinschen2010-03-231-1/+2
| | | | start to avoid confusing bsearch.
* * locale.cc: Revert accidental checkin of unfinished changes.Corinna Vinschen2010-03-231-98/+100
|
* * locale.cc (print_locale_with_codeset): Drop redundant name parameter.Corinna Vinschen2010-03-231-107/+105
| | | | | | Simplify creating locale string. Add "@" in case of a modifier. (print_locale): Drop name parameter in calls to print_locale_with_codeset.
* * locale.cc (printlocale): Remove.Corinna Vinschen2010-02-231-17/+165
| | | | | | | | | | | | | | | | (loc_t): New type to keep locale information for printing. (print_codeset): New function to print codeset as on Linux. (print_locale_with_codeset): New function to print single locale. Print verbose style as the Linux locale(1) tool. (print_locale): New function to print single locale plus its UTF-8 variation, if available. (compare_locales): New helper function for bsearch and qsort on loc_t. (add_locale): New function to store locale in loc_t array. (add_locale_alias_locales): New function to store locales from locale.alias file in loc_t. (print_all_locales): Call add_locale instead of printlocale. Call add_locale_alias_locales, sort locales alphabetically and print them.
* * locale.cc (lc_time_names): Add "date_fmt" entry.Corinna Vinschen2010-02-221-0/+1
|
* * locale.cc (print_lc_mstrings): New function to printCorinna Vinschen2010-02-191-2/+36
| | | | | | | | | semicolon-separated strings. (enum type_t): New type is_sepstrings_linf. (lc_time_names): Change type of era and alt_digits entry to is_sepstrings_linf. (print_lc): Add case for is_sepstrings_linf and call print_lc_mstrings in that case.
* * Makefile.in (CYGWIN_BINS): Rename getlocale to locale.Corinna Vinschen2010-02-171-0/+622
* getlocale.c: Rename to ... * locale.cc: Revamp to add full functionality of POSIX locale(1) tool, as far as Cygwin supports it. * utils.sgml (getlocale): Move and rename to ... (locale): Accommodate new functionality.