]>
Commit | Line | Data |
---|---|---|
0ecb606c | 1 | /* Copyright (C) 2000, 2005 Free Software Foundation, Inc. |
3e076219 UD |
2 | This file is part of the GNU C Library. |
3 | ||
0ecb606c JJ |
4 | This program is free software; you can redistribute it and/or modify |
5 | it under the terms of the GNU General Public License version 2 as | |
6 | published by the Free Software Foundation. | |
3e076219 | 7 | |
0ecb606c | 8 | This program is distributed in the hope that it will be useful, |
3e076219 | 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
0ecb606c JJ |
10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
11 | GNU General Public License for more details. | |
3e076219 | 12 | |
0ecb606c JJ |
13 | You should have received a copy of the GNU General Public License |
14 | along with this program; if not, write to the Free Software Foundation, | |
15 | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ | |
3e076219 UD |
16 | |
17 | #ifndef _CHARMAP_DIR_H | |
18 | #define _CHARMAP_DIR_H 1 | |
19 | ||
20 | /* The data type of a charmap directory being traversed. */ | |
21 | typedef struct charmap_dir CHARMAP_DIR; | |
22 | ||
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); | |
26 | ||
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); | |
32 | ||
33 | /* Finishes a charmap directory traversal, and frees the resources | |
34 | attached to the CHARMAP_DIR. */ | |
35 | extern int charmap_closedir (CHARMAP_DIR *dir); | |
36 | ||
37 | /* Returns a NULL terminated list of alias names of a charmap. */ | |
38 | extern char **charmap_aliases (const char *directory, const char *name); | |
39 | ||
40 | /* Frees an alias list returned by charmap_aliases. */ | |
41 | extern void charmap_free_aliases (char **aliases); | |
42 | ||
43 | /* Opens a charmap for reading, given its name (not an alias name). */ | |
44 | extern FILE *charmap_open (const char *directory, const char *name); | |
45 | ||
46 | #endif /* _CHARMAP_DIR_H */ |