Commit Graph

7 Commits

Author SHA1 Message Date
Corinna Vinschen 536ad25322 * locale.cc (add_locale_alias_locales): Always use loc_num at function
start to avoid confusing bsearch.
2010-03-23 21:26:03 +00:00
Corinna Vinschen 1399e29a1f * locale.cc: Revert accidental checkin of unfinished changes. 2010-03-23 21:20:31 +00:00
Corinna Vinschen 1d4c87a15d * locale.cc (print_locale_with_codeset): Drop redundant name parameter.
Simplify creating locale string.  Add "@" in case of a modifier.
	(print_locale): Drop name parameter in calls to
	print_locale_with_codeset.
2010-03-23 21:01:01 +00:00
Corinna Vinschen a2036998b1 * locale.cc (printlocale): Remove.
(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.
2010-02-23 14:07:08 +00:00
Corinna Vinschen bd87c87f81 * locale.cc (lc_time_names): Add "date_fmt" entry. 2010-02-22 10:56:00 +00:00
Corinna Vinschen f13fe16475 * locale.cc (print_lc_mstrings): New function to print
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.
2010-02-19 17:27:05 +00:00
Corinna Vinschen ce4f5f76ab * Makefile.in (CYGWIN_BINS): Rename getlocale to locale.
* 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.
2010-02-17 15:01:56 +00:00