Back to index

glibc  2.9
catgetsinfo.h
Go to the documentation of this file.
00001 /* Copyright (C) 1996, 1997, 2001, 2002 Free Software Foundation, Inc.
00002    This file is part of the GNU C Library.
00003    Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
00004 
00005    The GNU C Library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Lesser General Public
00007    License as published by the Free Software Foundation; either
00008    version 2.1 of the License, or (at your option) any later version.
00009 
00010    The GNU C Library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Lesser General Public License for more details.
00014 
00015    You should have received a copy of the GNU Lesser General Public
00016    License along with the GNU C Library; if not, write to the Free
00017    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00018    02111-1307 USA.  */
00019 
00020 #include <sys/types.h>
00021 
00022 
00023 struct catalog_obj
00024 {
00025   u_int32_t magic;
00026   u_int32_t plane_size;
00027   u_int32_t plane_depth;
00028   /* This is in fact two arrays in one: always a pair of name and
00029      pointer into the data area.  */
00030   u_int32_t name_ptr[0];
00031 };
00032 
00033 
00034 /* This structure will be filled after loading the catalog.  */
00035 typedef struct catalog_info
00036 {
00037   enum { mmapped, malloced } status;
00038 
00039   size_t plane_size;
00040   size_t plane_depth;
00041   u_int32_t *name_ptr;
00042   const char *strings;
00043 
00044   struct catalog_obj *file_ptr;
00045   size_t file_size;
00046 } *__nl_catd;
00047 
00048 
00049 
00050 /* The magic number to signal we really have a catalog file.  */
00051 #define CATGETS_MAGIC 0x960408deU
00052 
00053 
00054 /* Prototypes for helper functions.  */
00055 extern int __open_catalog (const char *cat_name, const char *nlspath,
00056                         const char *env_var, __nl_catd __catalog);
00057 libc_hidden_proto (__open_catalog)