]>
Commit | Line | Data |
---|---|---|
568035b7 | 1 | /* Copyright (C) 1996-2013 Free Software Foundation, Inc. |
6d52618b UD |
2 | This file is part of the GNU C Library. |
3 | Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>. | |
a641835a | 4 | |
6d52618b | 5 | The GNU C Library is free software; you can redistribute it and/or |
41bdb6e2 AJ |
6 | modify it under the terms of the GNU Lesser General Public |
7 | License as published by the Free Software Foundation; either | |
8 | version 2.1 of the License, or (at your option) any later version. | |
a641835a | 9 | |
6d52618b UD |
10 | The GNU C Library is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
41bdb6e2 | 13 | Lesser General Public License for more details. |
a641835a | 14 | |
41bdb6e2 | 15 | You should have received a copy of the GNU Lesser General Public |
59ba27a6 PE |
16 | License along with the GNU C Library; if not, see |
17 | <http://www.gnu.org/licenses/>. */ | |
a641835a RM |
18 | |
19 | #include <sys/types.h> | |
20 | ||
21 | ||
22 | struct catalog_obj | |
23 | { | |
24 | u_int32_t magic; | |
25 | u_int32_t plane_size; | |
26 | u_int32_t plane_depth; | |
27 | /* This is in fact two arrays in one: always a pair of name and | |
28 | pointer into the data area. */ | |
29 | u_int32_t name_ptr[0]; | |
30 | }; | |
31 | ||
32 | ||
33 | /* This structure will be filled after loading the catalog. */ | |
34 | typedef struct catalog_info | |
35 | { | |
ca130fe4 | 36 | enum { mmapped, malloced } status; |
a641835a RM |
37 | |
38 | size_t plane_size; | |
39 | size_t plane_depth; | |
40 | u_int32_t *name_ptr; | |
41 | const char *strings; | |
42 | ||
43 | struct catalog_obj *file_ptr; | |
44 | size_t file_size; | |
45 | } *__nl_catd; | |
46 | ||
47 | ||
48 | ||
49 | /* The magic number to signal we really have a catalog file. */ | |
57b36a0a | 50 | #define CATGETS_MAGIC 0x960408deU |
a641835a RM |
51 | |
52 | ||
53 | /* Prototypes for helper functions. */ | |
ca130fe4 UD |
54 | extern int __open_catalog (const char *cat_name, const char *nlspath, |
55 | const char *env_var, __nl_catd __catalog); | |
37ba7d66 | 56 | libc_hidden_proto (__open_catalog) |