8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / cmd / msgfmt / common.h
blobaca1e40a1c995184ba82266a3d5906e54a7ca13d
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
20 * CDDL HEADER END
23 * Copyright (c) 2001 by Sun Microsystems, Inc.
24 * All rights reserved.
27 #ifndef _COMMON_H
28 #define _COMMON_H
30 #pragma ident "%Z%%M% %I% %E% SMI"
32 #include <stdio.h>
33 #include <string.h>
34 #include <stdarg.h>
35 #include <libintl.h>
36 #include <stdlib.h>
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
42 /* implementation dependent default domain name */
43 #define DEFAULT_DOMAIN "messages"
44 #define DEFAULT_DOMAIN_MO "messages.mo"
46 #define ERR_ERROR \
47 "ERROR: "
49 #define WARN_WARNING \
50 "WARNING: "
52 #define ERR_MALLOC \
53 "failed to allocate memory\n"
55 #define ERR_OPEN_FAILED \
56 "Cannot open file %s.\n"
58 #define ERR_READ_FAILED \
59 "Error in reading %s.\n"
61 #define DIAG_START_PROC \
62 "Processing file \"%s\"...\n"
64 struct flags {
65 char *idir;
66 char *ofile;
67 int fuzzy;
68 int verbose;
69 int strict;
70 int gnu_p;
71 int sun_p;
74 extern int parse_option(int *, char ***, struct flags *);
76 extern void error(char *, ...);
77 extern void warning(char *, ...);
78 extern void diag(char *, ...);
79 extern void *Xmalloc(size_t);
80 extern void *Xcalloc(size_t, size_t);
81 extern void *Xrealloc(void *, size_t);
82 extern char *Xstrdup(const char *);
84 #ifdef __cplusplus
86 #endif
88 #endif /* _COMMON_H */