Sun Jun 9 01:11:49 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
[glibc.git] / locale / programs / locfile.h
bloba0fe06b674e314d7fb5b819ee960370c7f5adf91
1 /* Copyright (C) 1996 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3 Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
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
17 not, 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 loales. */
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];
57 /* Found in localedef.c. */
58 void def_to_process (const char *name, int category);
61 /* Found in locfile.c. */
62 struct localedef_t *locfile_read (const char *filename,
63 struct charset_t *charset);
65 void check_all_categories (struct localedef_t *locale,
66 struct charset_t *charset);
68 void write_all_categories (struct localedef_t *locale,
69 struct charset_t *charset, const char *output_path);
72 void write_locale_data (const char *output_path, const char *category,
73 size_t n_elem, struct iovec *vec);
75 #endif /* locfile.h */