.
[glibc/history.git] / locale / programs / charmap-dir.h
blob028f926b0a7cc23a7294b335903660807aea05fe
1 /* Copyright (C) 2000, 2005 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, write to the Free Software Foundation,
16 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
18 #ifndef _CHARMAP_DIR_H
19 #define _CHARMAP_DIR_H 1
21 /* The data type of a charmap directory being traversed. */
22 typedef struct charmap_dir CHARMAP_DIR;
24 /* Starts a charmap directory traversal.
25 Returns a CHARMAP_DIR, or NULL if the directory doesn't exist. */
26 extern CHARMAP_DIR *charmap_opendir (const char *directory);
28 /* Reads the next directory entry.
29 Returns its charmap name, or NULL if past the last entry or upon error.
30 The storage returned may be overwritten by a later charmap_readdir
31 call on the same CHARMAP_DIR. */
32 extern const char *charmap_readdir (CHARMAP_DIR *dir);
34 /* Finishes a charmap directory traversal, and frees the resources
35 attached to the CHARMAP_DIR. */
36 extern int charmap_closedir (CHARMAP_DIR *dir);
38 /* Returns a NULL terminated list of alias names of a charmap. */
39 extern char **charmap_aliases (const char *directory, const char *name);
41 /* Frees an alias list returned by charmap_aliases. */
42 extern void charmap_free_aliases (char **aliases);
44 /* Opens a charmap for reading, given its name (not an alias name). */
45 extern FILE *charmap_open (const char *directory, const char *name);
47 #endif /* _CHARMAP_DIR_H */