about summary refs log tree commit diff
path: root/locale/programs/locfile.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-12-10 01:37:56 +0000
committerUlrich Drepper <drepper@redhat.com>2001-12-10 01:37:56 +0000
commit47e8b4439dda245845e85dfbb054693a9b132635 (patch)
treeef27110e00f1a9f726c74c2f8473499ccf3dd0de /locale/programs/locfile.c
parenta352ab4ca56142647227c3d2943adfa455679ada (diff)
downloadglibc-47e8b4439dda245845e85dfbb054693a9b132635.tar.gz
glibc-47e8b4439dda245845e85dfbb054693a9b132635.tar.xz
glibc-47e8b4439dda245845e85dfbb054693a9b132635.zip
Update.
2001-12-09  Ulrich Drepper  <drepper@redhat.com>

	Implement transliteration of characters in strings of the locale
	definitions.
	* locale/programs/linereader.c: Adjust for additional parameter to
	lr_token.
	(get_string): If character <Uxxxx> is not found try to transliterate
	it.
	* locale/programs/ld-ctype.c: Adjust for additional parameter to
	lr_token.  Add const to charmap parameter of all functions.
	(find_translit, find_translit2): New functions.
	* locale/programs/charmap.c: Adjust for additional parameter to
	lr_token.
	* locale/programs/repertoire.c: Likewise.
	* locale/programs/linereader.h: Likewise.
	* locale/programs/ld-address.c: Likewise.  Add const to charmap
	parameter of all functions.
	* locale/programs/ld-collate.c: Likewise.
	* locale/programs/ld-identification.c: Likewise.
	* locale/programs/ld-measurement.c: Likewise.
	* locale/programs/ld-messages.c: Likewise.
	* locale/programs/ld-monetary.c: Likewise.
	* locale/programs/ld-name.c: Likewise.
	* locale/programs/ld-numeric.c: Likewise.
	* locale/programs/ld-paper.c: Likewise.
	* locale/programs/ld-paper.c: Likewise.
	* locale/programs/ld-telephone.c: Likewise.
	* locale/programs/ld-time.c: Likewise.
	* locale/programs/locfile.c: Likewise.
	* locale/programs/localedef.c: Likewise.
	* locale/programs/localedef.h: Likewise.
	* locale/programs/locfile.h: Likewise.  Add declaration for
	find_translit.
	* locale/programs/simple-hash.c: Add const to first parameter of
	find_entry, iterate_table, and lookup.
	* locale/programs/simple-hash.h: Likewise.
	* locale/localeinfo.h: Don't define __LC_LAST here.  Include <locale.h>
	instead.
	* include/locale.h: Define __LC_LAST.
	* iconv/Makefile (CFLAGS-linereader.c): Define to -DNO_TRANSLITERATION.
Diffstat (limited to 'locale/programs/locfile.c')
-rw-r--r--locale/programs/locfile.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/locale/programs/locfile.c b/locale/programs/locfile.c
index 3d774ef43d..d2e9ba1382 100644
--- a/locale/programs/locfile.c
+++ b/locale/programs/locfile.c
@@ -37,7 +37,7 @@
 
 
 int
-locfile_read (struct localedef_t *result, struct charmap_t *charmap)
+locfile_read (struct localedef_t *result, const struct charmap_t *charmap)
 {
   const char *filename = result->name;
   const char *repertoire_name = result->repertoire_name;
@@ -97,7 +97,7 @@ locfile_read (struct localedef_t *result, struct charmap_t *charmap)
     /* Parse locale definition file and store result in RESULT.  */
   while (1)
     {
-      struct token *now = lr_token (ldfile, charmap, NULL, verbose);
+      struct token *now = lr_token (ldfile, charmap, NULL, NULL, verbose);
       enum token_t nowtok = now->tok;
       struct token *arg;
 
@@ -113,7 +113,7 @@ locfile_read (struct localedef_t *result, struct charmap_t *charmap)
 	case tok_escape_char:
 	case tok_comment_char:
 	  /* We need an argument.  */
-	  arg = lr_token (ldfile, charmap, NULL, verbose);
+	  arg = lr_token (ldfile, charmap, NULL, NULL, verbose);
 
 	  if (arg->tok != tok_ident)
 	    {
@@ -140,7 +140,7 @@ argument to `%s' must be a single character"),
 
 	case tok_repertoiremap:
 	  /* We need an argument.  */
-	  arg = lr_token (ldfile, charmap, NULL, verbose);
+	  arg = lr_token (ldfile, charmap, NULL, NULL, verbose);
 
 	  if (arg->tok != tok_ident)
 	    {
@@ -265,7 +265,7 @@ syntax error: not inside a locale definition section"));
 /* Semantic checking of locale specifications.  */
 
 static void (*const check_funcs[]) (struct localedef_t *,
-				    struct charmap_t *) =
+				    const struct charmap_t *) =
 {
   [LC_CTYPE] = ctype_finish,
   [LC_COLLATE] = collate_finish,
@@ -283,7 +283,7 @@ static void (*const check_funcs[]) (struct localedef_t *,
 
 void
 check_all_categories (struct localedef_t *definitions,
-		      struct charmap_t *charmap)
+		      const struct charmap_t *charmap)
 {
   int cnt;
 
@@ -295,8 +295,8 @@ check_all_categories (struct localedef_t *definitions,
 
 /* Writing the locale data files.  All files use the same output_path.  */
 
-static void (*const write_funcs[]) (struct localedef_t *, struct charmap_t *,
-				    const char *) =
+static void (*const write_funcs[]) (struct localedef_t *,
+				    const struct charmap_t *, const char *) =
 {
   [LC_CTYPE] = ctype_output,
   [LC_COLLATE] = collate_output,
@@ -314,7 +314,7 @@ static void (*const write_funcs[]) (struct localedef_t *, struct charmap_t *,
 
 void
 write_all_categories (struct localedef_t *definitions,
-		      struct charmap_t *charmap,
+		      const struct charmap_t *charmap,
 		      const char *output_path)
 {
   int cnt;