Back to index

glibc  2.9
charmap-dir.h
Go to the documentation of this file.
00001 /* Copyright (C) 2000, 2005 Free Software Foundation, Inc.
00002    This file is part of the GNU C Library.
00003 
00004    This program is free software; you can redistribute it and/or modify
00005    it under the terms of the GNU General Public License as published
00006    by the Free Software Foundation; version 2 of the License, or
00007    (at your option) any later version.
00008 
00009    This program is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012    GNU General Public License for more details.
00013 
00014    You should have received a copy of the GNU General Public License
00015    along with this program; if not, write to the Free Software Foundation,
00016    Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
00017 
00018 #ifndef _CHARMAP_DIR_H
00019 #define _CHARMAP_DIR_H 1
00020 
00021 /* The data type of a charmap directory being traversed.  */
00022 typedef struct charmap_dir CHARMAP_DIR;
00023 
00024 /* Starts a charmap directory traversal.
00025    Returns a CHARMAP_DIR, or NULL if the directory doesn't exist.  */
00026 extern CHARMAP_DIR *charmap_opendir (const char *directory);
00027 
00028 /* Reads the next directory entry.
00029    Returns its charmap name, or NULL if past the last entry or upon error.
00030    The storage returned may be overwritten by a later charmap_readdir
00031    call on the same CHARMAP_DIR.  */
00032 extern const char *charmap_readdir (CHARMAP_DIR *dir);
00033 
00034 /* Finishes a charmap directory traversal, and frees the resources
00035    attached to the CHARMAP_DIR.  */
00036 extern int charmap_closedir (CHARMAP_DIR *dir);
00037 
00038 /* Returns a NULL terminated list of alias names of a charmap.  */
00039 extern char **charmap_aliases (const char *directory, const char *name);
00040 
00041 /* Frees an alias list returned by charmap_aliases.  */
00042 extern void charmap_free_aliases (char **aliases);
00043 
00044 /* Opens a charmap for reading, given its name (not an alias name).  */
00045 extern FILE *charmap_open (const char *directory, const char *name);
00046 
00047 #endif /* _CHARMAP_DIR_H */