]>
Commit | Line | Data |
---|---|---|
dff8da6b | 1 | /* Copyright (C) 2000-2024 Free Software Foundation, Inc. |
3e076219 UD |
2 | This file is part of the GNU C Library. |
3 | ||
43bc8ac6 | 4 | This program is free software; you can redistribute it and/or modify |
2e2efe65 RM |
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. | |
3e076219 | 8 | |
43bc8ac6 | 9 | This program is distributed in the hope that it will be useful, |
3e076219 | 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
43bc8ac6 UD |
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | GNU General Public License for more details. | |
3e076219 | 13 | |
43bc8ac6 | 14 | You should have received a copy of the GNU General Public License |
5a82c748 | 15 | along with this program; if not, see <https://www.gnu.org/licenses/>. */ |
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 */ |