gettext.h revision 2
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy * CDDL HEADER START
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy * The contents of this file are subject to the terms of the
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy * Common Development and Distribution License (the "License").
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy * You may not use this file except in compliance with the License.
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy * or http://www.opensolaris.org/os/licensing.
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy * See the License for the specific language governing permissions
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy * and limitations under the License.
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy * When distributing Covered Code, include this CDDL HEADER in each
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy * If applicable, add the following below this CDDL HEADER, with the
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy * fields enclosed by brackets "[]" replaced with your own identifying
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy * information: Portions Copyright [yyyy] [name of copyright owner]
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy * CDDL HEADER END
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy/* Type of MO file */
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy/* Msg_g_node->flag */
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy#define ST_CHK 0x1 /* header has been checked? */
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy * msg_pack->status:
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy * interaction between handle_lang() and handle_mo()
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy#define ST_GNU_MSG_FOUND 0x1 /* valid msg found in GNU MO */
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy#define ST_GNU_MO_FOUND 0x2 /* GNU MO found */
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy#define ST_SUN_MO_FOUND 0x4 /* Sun MO found */
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy * this structure is used for preserving nlspath templates at
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy * each Nls_node and also to use at _real_gettext_u().
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedytypedef struct nlstmp {
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy char *pathname; /* the full pathname to file */
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy struct nlstmp *next; /* link to the next entry */
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedytypedef struct {
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy struct msg_info *msg_file_info; /* information of msg file */
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy struct msg_struct *msg_list; /* message list */
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedytypedef struct {
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy unsigned int len; /* length of the expanded str of macro */
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy const char *ptr; /* pointer to the expanded str of macro */
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedytypedef struct {
} Msg_g_node;
typedef struct msg_node {
} msg;
} Msg_node;
typedef struct nls_node {
} Nls_node;
} Gettext_t;
struct msg_pack {
(char *)msgid1)
#define ROUND(m, s) if ((m) % (s)) (m) += ((s) - ((m) % (s)))
extern const char *defaultbind;
extern const char default_domain[];
extern char *_textdomain_u(const char *, char *);
extern char *_real_bindtextdomain_u(const char *, const char *, int);
extern char *_real_gettext_u(const char *, const char *,
extern char *get_codeset(const char *);
#ifdef GETTEXT_DEBUG
extern void gprintf(int, const char *, ...);
extern void printlist(void);
#ifdef __cplusplus