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