Update.
[glibc.git] / locale / programs / charmap-dir.h
blob1d07c64ec1050ca01e28430bc038d89717f8dcc4
1 /* Copyright (C) 2000 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, write to the Free
16 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
17 02111-1307 USA. */
19 #ifndef _CHARMAP_DIR_H
20 #define _CHARMAP_DIR_H 1
22 /* The data type of a charmap directory being traversed. */
23 typedef struct charmap_dir CHARMAP_DIR;
25 /* Starts a charmap directory traversal.
26 Returns a CHARMAP_DIR, or NULL if the directory doesn't exist. */
27 extern CHARMAP_DIR *charmap_opendir (const char *directory);
29 /* Reads the next directory entry.
30 Returns its charmap name, or NULL if past the last entry or upon error.
31 The storage returned may be overwritten by a later charmap_readdir
32 call on the same CHARMAP_DIR. */
33 extern const char *charmap_readdir (CHARMAP_DIR *dir);
35 /* Finishes a charmap directory traversal, and frees the resources
36 attached to the CHARMAP_DIR. */
37 extern int charmap_closedir (CHARMAP_DIR *dir);
39 /* Returns a NULL terminated list of alias names of a charmap. */
40 extern char **charmap_aliases (const char *directory, const char *name);
42 /* Frees an alias list returned by charmap_aliases. */
43 extern void charmap_free_aliases (char **aliases);
45 /* Opens a charmap for reading, given its name (not an alias name). */
46 extern FILE *charmap_open (const char *directory, const char *name);
48 #endif /* _CHARMAP_DIR_H */