xref: /illumos-gate/usr/src/head/pfmt.h (revision 7c478bd95313f5f23a4c958a745db2134aa03244)
1*7c478bd9Sstevel@tonic-gate /*
2*7c478bd9Sstevel@tonic-gate  * CDDL HEADER START
3*7c478bd9Sstevel@tonic-gate  *
4*7c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5*7c478bd9Sstevel@tonic-gate  * Common Development and Distribution License, Version 1.0 only
6*7c478bd9Sstevel@tonic-gate  * (the "License").  You may not use this file except in compliance
7*7c478bd9Sstevel@tonic-gate  * with the License.
8*7c478bd9Sstevel@tonic-gate  *
9*7c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*7c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
11*7c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
12*7c478bd9Sstevel@tonic-gate  * and limitations under the License.
13*7c478bd9Sstevel@tonic-gate  *
14*7c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
15*7c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*7c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
17*7c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
18*7c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
19*7c478bd9Sstevel@tonic-gate  *
20*7c478bd9Sstevel@tonic-gate  * CDDL HEADER END
21*7c478bd9Sstevel@tonic-gate  */
22*7c478bd9Sstevel@tonic-gate /*	Copyright (c) 1988 AT&T	*/
23*7c478bd9Sstevel@tonic-gate /*	  All Rights Reserved  	*/
24*7c478bd9Sstevel@tonic-gate 
25*7c478bd9Sstevel@tonic-gate 
26*7c478bd9Sstevel@tonic-gate #ifndef	_PFMT_H
27*7c478bd9Sstevel@tonic-gate #define	_PFMT_H
28*7c478bd9Sstevel@tonic-gate 
29*7c478bd9Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
30*7c478bd9Sstevel@tonic-gate 
31*7c478bd9Sstevel@tonic-gate #include <stdio.h>
32*7c478bd9Sstevel@tonic-gate #ifndef va_args
33*7c478bd9Sstevel@tonic-gate #include <stdarg.h>
34*7c478bd9Sstevel@tonic-gate #endif
35*7c478bd9Sstevel@tonic-gate 
36*7c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
37*7c478bd9Sstevel@tonic-gate extern "C" {
38*7c478bd9Sstevel@tonic-gate #endif
39*7c478bd9Sstevel@tonic-gate 
40*7c478bd9Sstevel@tonic-gate #define	MM_STD		0
41*7c478bd9Sstevel@tonic-gate #define	MM_NOSTD	0x100
42*7c478bd9Sstevel@tonic-gate #define	MM_GET		0
43*7c478bd9Sstevel@tonic-gate #define	MM_NOGET	0x200
44*7c478bd9Sstevel@tonic-gate 
45*7c478bd9Sstevel@tonic-gate #define	MM_ACTION	0x400
46*7c478bd9Sstevel@tonic-gate 
47*7c478bd9Sstevel@tonic-gate #define	MM_NOCONSOLE	0
48*7c478bd9Sstevel@tonic-gate #define	MM_CONSOLE	0x800
49*7c478bd9Sstevel@tonic-gate 
50*7c478bd9Sstevel@tonic-gate /* Classification */
51*7c478bd9Sstevel@tonic-gate #define	MM_NULLMC	0
52*7c478bd9Sstevel@tonic-gate #define	MM_HARD		0x1000
53*7c478bd9Sstevel@tonic-gate #define	MM_SOFT		0x2000
54*7c478bd9Sstevel@tonic-gate #define	MM_FIRM		0x4000
55*7c478bd9Sstevel@tonic-gate #define	MM_APPL		0x8000
56*7c478bd9Sstevel@tonic-gate #define	MM_UTIL		0x10000
57*7c478bd9Sstevel@tonic-gate #define	MM_OPSYS	0x20000
58*7c478bd9Sstevel@tonic-gate 
59*7c478bd9Sstevel@tonic-gate /* Most commonly used combinations */
60*7c478bd9Sstevel@tonic-gate #define	MM_SVCMD	MM_UTIL|MM_SOFT
61*7c478bd9Sstevel@tonic-gate 
62*7c478bd9Sstevel@tonic-gate #define	MM_ERROR	0
63*7c478bd9Sstevel@tonic-gate #define	MM_HALT		1
64*7c478bd9Sstevel@tonic-gate #define	MM_WARNING	2
65*7c478bd9Sstevel@tonic-gate #define	MM_INFO		3
66*7c478bd9Sstevel@tonic-gate 
67*7c478bd9Sstevel@tonic-gate #ifdef __STDC__
68*7c478bd9Sstevel@tonic-gate int pfmt(FILE *, long, const char *, ...);
69*7c478bd9Sstevel@tonic-gate int lfmt(FILE *, long, const char *, ...);
70*7c478bd9Sstevel@tonic-gate int vpfmt(FILE *, long, const char *, va_list);
71*7c478bd9Sstevel@tonic-gate int vlfmt(FILE *, long, const char *, va_list);
72*7c478bd9Sstevel@tonic-gate const char *setcat(const char *);
73*7c478bd9Sstevel@tonic-gate int setlabel(const char *);
74*7c478bd9Sstevel@tonic-gate int addsev(int, const char *);
75*7c478bd9Sstevel@tonic-gate #else
76*7c478bd9Sstevel@tonic-gate int pfmt();
77*7c478bd9Sstevel@tonic-gate int lfmt();
78*7c478bd9Sstevel@tonic-gate int vpfmt();
79*7c478bd9Sstevel@tonic-gate int vlfmt();
80*7c478bd9Sstevel@tonic-gate char *setcat();
81*7c478bd9Sstevel@tonic-gate int setlabel();
82*7c478bd9Sstevel@tonic-gate int addsev();
83*7c478bd9Sstevel@tonic-gate #endif
84*7c478bd9Sstevel@tonic-gate 
85*7c478bd9Sstevel@tonic-gate #define	DB_NAME_LEN		15
86*7c478bd9Sstevel@tonic-gate #define	MAXLABEL		25
87*7c478bd9Sstevel@tonic-gate 
88*7c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
89*7c478bd9Sstevel@tonic-gate }
90*7c478bd9Sstevel@tonic-gate #endif
91*7c478bd9Sstevel@tonic-gate 
92*7c478bd9Sstevel@tonic-gate #endif	/* _PFMT_H */
93