Update to 2.1.x development version
[glibc.git] / locale / programs / locfile.h
blob604e726e2097741e9e3b9e7bef42c4086df1a184
1 /* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3 Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1996.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public License as
7 published by the Free Software Foundation; either version 2 of the
8 License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
15 You should have received a copy of the GNU Library General Public
16 License along with the GNU C Library; see the file COPYING.LIB. If not,
17 write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. */
20 #ifndef _LOCFILE_H
21 #define _LOCFILE_H
23 #include <sys/uio.h>
25 #include "charset.h"
27 /* Opaque types for the different locales. */
28 struct locale_ctype_t;
29 struct locale_collate_t;
30 struct locale_monetary_t;
31 struct locale_numeric_t;
32 struct locale_time_t;
33 struct locale_messages_t;
35 struct localedef_t
37 int failed;
39 int avail;
40 int binary;
42 union
44 void *generic;
45 struct locale_ctype_t *ctype;
46 struct locale_collate_t *collate;
47 struct locale_monetary_t *monetary;
48 struct locale_numeric_t *numeric;
49 struct locale_time_t *time;
50 struct locale_messages_t *messages;
51 } categories[6];
53 size_t len[6];
56 /* Declared in localedef.c. */
57 extern int be_quiet;
59 /* Found in localedef.c. */
60 void def_to_process (const char *name, int category);
63 /* Found in locfile.c. */
64 struct localedef_t *locfile_read (const char *filename,
65 struct charset_t *charset);
67 void check_all_categories (struct localedef_t *locale,
68 struct charset_t *charset);
70 void write_all_categories (struct localedef_t *locale,
71 struct charset_t *charset, const char *output_path);
74 void write_locale_data (const char *output_path, const char *category,
75 size_t n_elem, struct iovec *vec);
77 #endif /* locfile.h */