1a864dc36Sdarran /* 2a864dc36Sdarran * CDDL HEADER START 3a864dc36Sdarran * 4a864dc36Sdarran * The contents of this file are subject to the terms of the 5a864dc36Sdarran * Common Development and Distribution License, Version 1.0 only 6a864dc36Sdarran * (the "License"). You may not use this file except in compliance 7a864dc36Sdarran * with the License. 8a864dc36Sdarran * 9a864dc36Sdarran * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10a864dc36Sdarran * or http://www.opensolaris.org/os/licensing. 11a864dc36Sdarran * See the License for the specific language governing permissions 12a864dc36Sdarran * and limitations under the License. 13a864dc36Sdarran * 14a864dc36Sdarran * When distributing Covered Code, include this CDDL HEADER in each 15a864dc36Sdarran * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16a864dc36Sdarran * If applicable, add the following below this CDDL HEADER, with the 17a864dc36Sdarran * fields enclosed by brackets "[]" replaced with your own identifying 18a864dc36Sdarran * information: Portions Copyright [yyyy] [name of copyright owner] 19a864dc36Sdarran * 20a864dc36Sdarran * CDDL HEADER END 21a864dc36Sdarran */ 22a864dc36Sdarran /* 23a864dc36Sdarran * Copyright (c) 1998-2001 by Sun Microsystems, Inc. 24a864dc36Sdarran * All rights reserved. 25a864dc36Sdarran */ 26a864dc36Sdarran 27a864dc36Sdarran #ifndef _UTILS_H 28a864dc36Sdarran #define _UTILS_H 29a864dc36Sdarran 30a864dc36Sdarran #pragma ident "%Z%%M% %I% %E% SMI" 31a864dc36Sdarran 32a864dc36Sdarran #include <stdarg.h> 33a864dc36Sdarran 34a864dc36Sdarran #ifdef __cplusplus 35a864dc36Sdarran extern "C" { 36a864dc36Sdarran #endif 37a864dc36Sdarran 38a864dc36Sdarran #define E_SUCCESS 0 /* Exit status for success */ 39a864dc36Sdarran #define E_ERROR 1 /* Exit status for error */ 40a864dc36Sdarran #define E_USAGE 2 /* Exit status for usage error */ 41a864dc36Sdarran 42*440c6b29Sroy extern void vwarn(const char *, va_list) __printflike(1, 0); 43*440c6b29Sroy extern void warn(const char *, ...) __printflike(1, 2); 44*440c6b29Sroy extern void vdie(const char *, va_list) __printflike(1, 0) __dead; 45*440c6b29Sroy extern void die(const char *, ...) __printflike(1, 2) __dead; 46a864dc36Sdarran 47a864dc36Sdarran extern const char *getpname(void); 48a864dc36Sdarran 49a864dc36Sdarran #ifdef __cplusplus 50a864dc36Sdarran } 51a864dc36Sdarran #endif 52a864dc36Sdarran 53a864dc36Sdarran #endif /* _UTILS_H */ 54