Update copyright notices with scripts/update-copyrights
[glibc.git] / locale / programs / charmap-dir.h
blobb586a259f455ef45058dd5a221b1ecb189ced716
1 /* Copyright (C) 2000-2014 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published
6 by the Free Software Foundation; version 2 of the License, or
7 (at your option) any later version.
9 This program 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
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, see <http://www.gnu.org/licenses/>. */
17 #ifndef _CHARMAP_DIR_H
18 #define _CHARMAP_DIR_H 1
20 /* The data type of a charmap directory being traversed. */
21 typedef struct charmap_dir CHARMAP_DIR;
23 /* Starts a charmap directory traversal.
24 Returns a CHARMAP_DIR, or NULL if the directory doesn't exist. */
25 extern CHARMAP_DIR *charmap_opendir (const char *directory);
27 /* Reads the next directory entry.
28 Returns its charmap name, or NULL if past the last entry or upon error.
29 The storage returned may be overwritten by a later charmap_readdir
30 call on the same CHARMAP_DIR. */
31 extern const char *charmap_readdir (CHARMAP_DIR *dir);
33 /* Finishes a charmap directory traversal, and frees the resources
34 attached to the CHARMAP_DIR. */
35 extern int charmap_closedir (CHARMAP_DIR *dir);
37 /* Returns a NULL terminated list of alias names of a charmap. */
38 extern char **charmap_aliases (const char *directory, const char *name);
40 /* Frees an alias list returned by charmap_aliases. */
41 extern void charmap_free_aliases (char **aliases);
43 /* Opens a charmap for reading, given its name (not an alias name). */
44 extern FILE *charmap_open (const char *directory, const char *name);
46 #endif /* _CHARMAP_DIR_H */