about summary refs log tree commit diff
path: root/locale/programs/locfile.h
diff options
context:
space:
mode:
Diffstat (limited to 'locale/programs/locfile.h')
-rw-r--r--locale/programs/locfile.h75
1 files changed, 75 insertions, 0 deletions
diff --git a/locale/programs/locfile.h b/locale/programs/locfile.h
new file mode 100644
index 0000000000..e337e961ed
--- /dev/null
+++ b/locale/programs/locfile.h
@@ -0,0 +1,75 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB.  If
+not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
+
+#ifndef _LOCFILE_H
+#define _LOCFILE_H
+
+#include <sys/uio.h>
+
+#include "charset.h"
+
+/* Opaque types for the different loales.  */
+struct locale_ctype_t;
+struct locale_collate_t;
+struct locale_monetary_t;
+struct locale_numeric_t;
+struct locale_time_t;
+struct locale_messages_t;
+
+struct localedef_t
+{
+  int failed;
+
+  int avail;
+  int binary;
+
+  union
+  {
+    void *generic;
+    struct locale_ctype_t *ctype;
+    struct locale_collate_t *collate;
+    struct locale_monetary_t *monetary;
+    struct locale_numeric_t *numeric;
+    struct locale_time_t *time;
+    struct locale_messages_t *messages;
+  } categories[6];
+
+  size_t len[6];
+};
+
+
+/* Found in localedef.c.  */
+void def_to_process (const char *name, int category);
+
+
+/* Found in locfile.c.  */
+struct localedef_t *locfile_read (const char *filename,
+				  struct charset_t *charset);
+
+void check_all_categories (struct localedef_t *locale,
+			   struct charset_t *charset);
+
+void write_all_categories (struct localedef_t *locale,
+			   const char *output_path);
+
+
+void write_locale_data (const char *output_path, const char *category,
+			size_t n_elem, struct iovec *vec);
+
+#endif /* locfile.h */