utils.h revision affd2f3f
1#ifndef UTILS_H 2#define UTILS_H 1 3 4 /*\ 5 * 6 * COPYRIGHT 1990 7 * DIGITAL EQUIPMENT CORPORATION 8 * MAYNARD, MASSACHUSETTS 9 * ALL RIGHTS RESERVED. 10 * 11 * THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE AND 12 * SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT CORPORATION. 13 * DIGITAL MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THIS SOFTWARE 14 * FOR ANY PURPOSE. IT IS SUPPLIED "AS IS" WITHOUT EXPRESS OR IMPLIED 15 * WARRANTY. 16 * 17 * IF THE SOFTWARE IS MODIFIED IN A MANNER CREATING DERIVATIVE COPYRIGHT 18 * RIGHTS, APPROPRIATE LEGENDS MAY BE PLACED ON THE DERIVATIVE WORK IN 19 * ADDITION TO THAT SET FORTH ABOVE. 20 * 21 * Permission to use, copy, modify, and distribute this software and its 22 * documentation for any purpose and without fee is hereby granted, provided 23 * that the above copyright notice appear in all copies and that both that 24 * copyright notice and this permission notice appear in supporting 25 * documentation, and that the name of Digital Equipment Corporation not be 26 * used in advertising or publicity pertaining to distribution of the 27 * software without specific, written prior permission. 28 \*/ 29 30/***====================================================================***/ 31 32#ifdef HAVE_CONFIG_H 33# include "config.h" 34#endif 35 36#include <stdio.h> 37#include <X11/Xos.h> 38#include <X11/Xfuncproto.h> 39#include <X11/Xfuncs.h> 40#include <stdarg.h> 41#include <stddef.h> 42 43_XFUNCPROTOBEGIN 44 45/***====================================================================***/ 46 47#ifndef BOOLEAN_DEFINED 48typedef char Boolean; 49#endif 50 51#ifndef True 52#define True ((Boolean)1) 53#define False ((Boolean)0) 54#endif /* ndef True */ 55 56/***====================================================================***/ 57 58extern void uInformation(const char *s, ...) _X_ATTRIBUTE_PRINTF(1,2); 59extern void uAction(const char *s, ...) _X_ATTRIBUTE_PRINTF(1,2); 60extern void uWarning(const char *s, ...) _X_ATTRIBUTE_PRINTF(1,2); 61extern void uError(const char *s, ...) _X_ATTRIBUTE_PRINTF(1,2); 62extern void uFatalError(const char *s, ...) _X_ATTRIBUTE_PRINTF(1,2) _X_NORETURN; 63extern void uInternalError(const char *s, ...) _X_ATTRIBUTE_PRINTF(1,2); 64 65/***====================================================================***/ 66 67#define uStrCaseEqual(s1,s2) (uStrCaseCmp(s1,s2)==0) 68#ifdef HAVE_STRCASECMP 69#define uStrCaseCmp(s1,s2) (strcasecmp(s1,s2)) 70#else 71extern int uStrCaseCmp(const char * /* s1 */, 72 const char * /* s2 */); 73#endif 74 75/***====================================================================***/ 76 77_XFUNCPROTOEND 78#endif /* UTILS_H */ 79