Merge commit '00f1a4f432b3d8aad1aa270e91c44c57f03ef407'
[unleashed.git] / usr / src / cmd / genmsg / genmsg.h
blob534f0a01fe5096a1485b20309c344d66b1e811e5
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
19 * CDDL HEADER END
22 * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
26 #ifndef _GENMSG_H
27 #define _GENMSG_H
29 #pragma ident "%Z%%M% %I% %E% SMI"
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
36 * Boolean values.
38 #define TRUE 1
39 #define FALSE 0
42 * Default quote character for a message file.
44 #define QUOTE '"'
47 * Number to be updated by the auto message numbering.
49 #define NOMSGID -1
52 * Genmsg action mode is for genmsg to identify its tasks.
54 #define IsActiveMode(mode) (active_mode & (mode))
55 #define SetActiveMode(mode) (active_mode |= (mode))
56 #define ResetActiveMode(mode) (active_mode &= ~(mode))
58 typedef long Mode;
60 #define NoMode (0L) /* internal-mode */
61 #define ReplaceMode (1L<<0) /* internal-mode */
62 #define MessageMode (1L<<1) /* -o */
63 #define AppendMode (1L<<2) /* -a */
64 #define AutoNumMode (1L<<3) /* -l projfile */
65 #define ReverseMode (1L<<4) /* -r */
66 #define OverwriteMode (1L<<5) /* -f */
67 #define ProjectMode (1L<<6) /* -g new-projfile */
68 #define MsgCommentMode (1L<<7) /* -c comment-tag */
69 #define SetCommentMode (1L<<8) /* -c comment-tag */
70 #define BackCommentMode (1L<<9) /* -b */
71 #define LineInfoMode (1L<<10) /* -n */
72 #define PrefixMode (1L<<11) /* -m prefix */
73 #define SuffixMode (1L<<12) /* -M suffix */
74 #define TripleMode (1L<<13) /* -t */
75 #define DoubleLineMode (1L<<14) /* -d */
76 #define PreProcessMode (1L<<15) /* -p cpp-path */
77 #define NoErrorMode (1L<<16) /* -x */
79 extern Mode active_mode;
82 extern char *srcfile; /* from main.c */
83 extern FILE *newfp; /* from main.c */
85 extern void prg_err(char *fmt, ...);
86 extern void src_err(char *file, int line, char *fmt, ...);
88 #ifdef __cplusplus
90 #endif
92 #endif /* _GENMSG_H */