dmake: do not set MAKEFLAGS=k
[unleashed/tickless.git] / usr / src / lib / libast / i386 / include / ast / mc.h
blobb84df7239e30e347ece550ddad5782fba10e1bab
2 /* : : generated by proto : : */
3 /***********************************************************************
4 * *
5 * This software is part of the ast package *
6 * Copyright (c) 1985-2010 AT&T Intellectual Property *
7 * and is licensed under the *
8 * Common Public License, Version 1.0 *
9 * by AT&T Intellectual Property *
10 * *
11 * A copy of the License is available at *
12 * http://www.opensource.org/licenses/cpl1.0.txt *
13 * (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
14 * *
15 * Information and Software Systems Research *
16 * AT&T Research *
17 * Florham Park NJ *
18 * *
19 * Glenn Fowler <gsf@research.att.com> *
20 * David Korn <dgk@research.att.com> *
21 * Phong Vo <kpv@research.att.com> *
22 * *
23 ***********************************************************************/
27 * machine independent binary message catalog interface
29 * file layout
30 * all numbers are sfputu() format
32 * 4 char magic (^M^S^G0)
33 * <method locale YYYY-MM-DD>\0
34 * (<optional strings>\0)*
35 * \0
36 * string table size
37 * #msgs total
38 * #max set number
39 * #set-id 1
40 * #msgs in set 1
41 * ...
42 * #set-id #sets
43 * #msgs in set #sets
44 * end of sets (0)
45 * msg(1,1) size
46 * ...
47 * msg(#sets,#msgs) size
48 * string table
51 #ifndef _MC_H
52 #if !defined(__PROTO__)
53 #include <prototyped.h>
54 #endif
55 #if !defined(__LINKAGE__)
56 #define __LINKAGE__ /* 2004-08-11 transition */
57 #endif
59 #define _MC_H
61 #include <ast.h>
63 #define MC_MAGIC "\015\023\007\000"
64 #define MC_MAGIC_SIZE 4
66 #define MC_SET_MAX 1023
67 #define MC_NUM_MAX 32767
69 #define MC_NLS (1<<10)
71 #define MC_MESSAGE_SET(s) mcindex(s,NiL,NiL,NiL)
73 typedef struct
75 char** msg;
76 int num;
77 int gen;
78 } Mcset_t;
80 typedef struct
82 Mcset_t* set;
83 int num;
84 int gen;
85 char* translation;
86 #ifdef _MC_PRIVATE_
87 _MC_PRIVATE_
88 #endif
89 } Mc_t;
91 #if _BLD_ast && defined(__EXPORT__)
92 #undef __MANGLE__
93 #define __MANGLE__ __LINKAGE__ __EXPORT__
94 #endif
96 extern __MANGLE__ char* mcfind __PROTO__((char*, const char*, const char*, int, int));
97 extern __MANGLE__ Mc_t* mcopen __PROTO__((Sfio_t*));
98 extern __MANGLE__ char* mcget __PROTO__((Mc_t*, int, int, const char*));
99 extern __MANGLE__ int mcput __PROTO__((Mc_t*, int, int, const char*));
100 extern __MANGLE__ int mcdump __PROTO__((Mc_t*, Sfio_t*));
101 extern __MANGLE__ int mcindex __PROTO__((const char*, char**, int*, int*));
102 extern __MANGLE__ int mcclose __PROTO__((Mc_t*));
104 #undef __MANGLE__
105 #define __MANGLE__ __LINKAGE__
107 #endif