17c478bd9Sstevel@tonic-gate /* 27c478bd9Sstevel@tonic-gate * CDDL HEADER START 37c478bd9Sstevel@tonic-gate * 47c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*6e54a631Smuffin * Common Development and Distribution License (the "License"). 6*6e54a631Smuffin * You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate * 87c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate * and limitations under the License. 127c478bd9Sstevel@tonic-gate * 137c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate * 197c478bd9Sstevel@tonic-gate * CDDL HEADER END 207c478bd9Sstevel@tonic-gate */ 217c478bd9Sstevel@tonic-gate /* 22*6e54a631Smuffin * Copyright 2007 Sun Microsystems, Inc. All rights reserved. 23*6e54a631Smuffin * Use is subject to license terms. 247c478bd9Sstevel@tonic-gate */ 257c478bd9Sstevel@tonic-gate 26*6e54a631Smuffin #ifndef _GENMSG_H 27*6e54a631Smuffin #define _GENMSG_H 28*6e54a631Smuffin 297c478bd9Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 307c478bd9Sstevel@tonic-gate 31*6e54a631Smuffin #ifdef __cplusplus 32*6e54a631Smuffin extern "C" { 33*6e54a631Smuffin #endif 34*6e54a631Smuffin 357c478bd9Sstevel@tonic-gate /* 367c478bd9Sstevel@tonic-gate * Boolean values. 377c478bd9Sstevel@tonic-gate */ 387c478bd9Sstevel@tonic-gate #define TRUE 1 397c478bd9Sstevel@tonic-gate #define FALSE 0 407c478bd9Sstevel@tonic-gate 417c478bd9Sstevel@tonic-gate /* 427c478bd9Sstevel@tonic-gate * Default quote character for a message file. 437c478bd9Sstevel@tonic-gate */ 447c478bd9Sstevel@tonic-gate #define QUOTE '"' 457c478bd9Sstevel@tonic-gate 467c478bd9Sstevel@tonic-gate /* 477c478bd9Sstevel@tonic-gate * Number to be updated by the auto message numbering. 487c478bd9Sstevel@tonic-gate */ 497c478bd9Sstevel@tonic-gate #define NOMSGID -1 507c478bd9Sstevel@tonic-gate 517c478bd9Sstevel@tonic-gate /* 527c478bd9Sstevel@tonic-gate * Genmsg action mode is for genmsg to identify its tasks. 537c478bd9Sstevel@tonic-gate */ 547c478bd9Sstevel@tonic-gate #define IsActiveMode(mode) (active_mode & (mode)) 557c478bd9Sstevel@tonic-gate #define SetActiveMode(mode) (active_mode |= (mode)) 567c478bd9Sstevel@tonic-gate #define ResetActiveMode(mode) (active_mode &= ~(mode)) 577c478bd9Sstevel@tonic-gate 587c478bd9Sstevel@tonic-gate typedef long Mode; 597c478bd9Sstevel@tonic-gate 607c478bd9Sstevel@tonic-gate #define NoMode (0L) /* internal-mode */ 617c478bd9Sstevel@tonic-gate #define ReplaceMode (1L<<0) /* internal-mode */ 627c478bd9Sstevel@tonic-gate #define MessageMode (1L<<1) /* -o */ 637c478bd9Sstevel@tonic-gate #define AppendMode (1L<<2) /* -a */ 647c478bd9Sstevel@tonic-gate #define AutoNumMode (1L<<3) /* -l projfile */ 657c478bd9Sstevel@tonic-gate #define ReverseMode (1L<<4) /* -r */ 667c478bd9Sstevel@tonic-gate #define OverwriteMode (1L<<5) /* -f */ 677c478bd9Sstevel@tonic-gate #define ProjectMode (1L<<6) /* -g new-projfile */ 687c478bd9Sstevel@tonic-gate #define MsgCommentMode (1L<<7) /* -c comment-tag */ 697c478bd9Sstevel@tonic-gate #define SetCommentMode (1L<<8) /* -c comment-tag */ 707c478bd9Sstevel@tonic-gate #define BackCommentMode (1L<<9) /* -b */ 717c478bd9Sstevel@tonic-gate #define LineInfoMode (1L<<10) /* -n */ 727c478bd9Sstevel@tonic-gate #define PrefixMode (1L<<11) /* -m prefix */ 737c478bd9Sstevel@tonic-gate #define SuffixMode (1L<<12) /* -M suffix */ 747c478bd9Sstevel@tonic-gate #define TripleMode (1L<<13) /* -t */ 757c478bd9Sstevel@tonic-gate #define DoubleLineMode (1L<<14) /* -d */ 767c478bd9Sstevel@tonic-gate #define PreProcessMode (1L<<15) /* -p cpp-path */ 777c478bd9Sstevel@tonic-gate #define NoErrorMode (1L<<16) /* -x */ 787c478bd9Sstevel@tonic-gate 797c478bd9Sstevel@tonic-gate extern Mode active_mode; 807c478bd9Sstevel@tonic-gate 817c478bd9Sstevel@tonic-gate 827c478bd9Sstevel@tonic-gate extern char *srcfile; /* from main.c */ 837c478bd9Sstevel@tonic-gate extern FILE *newfp; /* from main.c */ 847c478bd9Sstevel@tonic-gate 857c478bd9Sstevel@tonic-gate extern void prg_err(char *fmt, ...); 867c478bd9Sstevel@tonic-gate extern void src_err(char *file, int line, char *fmt, ...); 87*6e54a631Smuffin 88*6e54a631Smuffin #ifdef __cplusplus 89*6e54a631Smuffin } 90*6e54a631Smuffin #endif 91*6e54a631Smuffin 92*6e54a631Smuffin #endif /* _GENMSG_H */ 93