Blame locale/programs/charmap-dir.h

Packit 6c4009
/* Copyright (C) 2000-2018 Free Software Foundation, Inc.
Packit 6c4009
   This file is part of the GNU C Library.
Packit 6c4009
Packit 6c4009
   This program is free software; you can redistribute it and/or modify
Packit 6c4009
   it under the terms of the GNU General Public License as published
Packit 6c4009
   by the Free Software Foundation; version 2 of the License, or
Packit 6c4009
   (at your option) any later version.
Packit 6c4009
Packit 6c4009
   This program is distributed in the hope that it will be useful,
Packit 6c4009
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 6c4009
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit 6c4009
   GNU General Public License for more details.
Packit 6c4009
Packit 6c4009
   You should have received a copy of the GNU General Public License
Packit 6c4009
   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
Packit 6c4009
Packit 6c4009
#ifndef _CHARMAP_DIR_H
Packit 6c4009
#define _CHARMAP_DIR_H 1
Packit 6c4009
Packit 6c4009
/* The data type of a charmap directory being traversed.  */
Packit 6c4009
typedef struct charmap_dir CHARMAP_DIR;
Packit 6c4009
Packit 6c4009
/* Starts a charmap directory traversal.
Packit 6c4009
   Returns a CHARMAP_DIR, or NULL if the directory doesn't exist.  */
Packit 6c4009
extern CHARMAP_DIR *charmap_opendir (const char *directory);
Packit 6c4009
Packit 6c4009
/* Reads the next directory entry.
Packit 6c4009
   Returns its charmap name, or NULL if past the last entry or upon error.
Packit 6c4009
   The storage returned may be overwritten by a later charmap_readdir
Packit 6c4009
   call on the same CHARMAP_DIR.  */
Packit 6c4009
extern const char *charmap_readdir (CHARMAP_DIR *dir);
Packit 6c4009
Packit 6c4009
/* Finishes a charmap directory traversal, and frees the resources
Packit 6c4009
   attached to the CHARMAP_DIR.  */
Packit 6c4009
extern int charmap_closedir (CHARMAP_DIR *dir);
Packit 6c4009
Packit 6c4009
/* Returns a NULL terminated list of alias names of a charmap.  */
Packit 6c4009
extern char **charmap_aliases (const char *directory, const char *name);
Packit 6c4009
Packit 6c4009
/* Frees an alias list returned by charmap_aliases.  */
Packit 6c4009
extern void charmap_free_aliases (char **aliases);
Packit 6c4009
Packit 6c4009
/* Opens a charmap for reading, given its name (not an alias name).  */
Packit 6c4009
extern FILE *charmap_open (const char *directory, const char *name);
Packit 6c4009
Packit 6c4009
#endif /* _CHARMAP_DIR_H */