dsimple.h revision 94a251fd
1e6232409Smrg/* $Xorg: dsimple.h,v 1.4 2001/02/09 02:05:54 xorgcvs Exp $ */ 2e6232409Smrg/* 3e6232409Smrg 4e6232409SmrgCopyright 1993, 1998 The Open Group 5e6232409Smrg 6e6232409SmrgPermission to use, copy, modify, distribute, and sell this software and its 7e6232409Smrgdocumentation for any purpose is hereby granted without fee, provided that 8e6232409Smrgthe above copyright notice appear in all copies and that both that 9e6232409Smrgcopyright notice and this permission notice appear in supporting 10e6232409Smrgdocumentation. 11e6232409Smrg 12e6232409SmrgThe above copyright notice and this permission notice shall be included 13e6232409Smrgin all copies or substantial portions of the Software. 14e6232409Smrg 15e6232409SmrgTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16e6232409SmrgOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17e6232409SmrgMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 18e6232409SmrgIN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 19e6232409SmrgOTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 20e6232409SmrgARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 21e6232409SmrgOTHER DEALINGS IN THE SOFTWARE. 22e6232409Smrg 23e6232409SmrgExcept as contained in this notice, the name of The Open Group shall 24e6232409Smrgnot be used in advertising or otherwise to promote the sale, use or 25e6232409Smrgother dealings in this Software without prior written authorization 26e6232409Smrgfrom The Open Group. 27e6232409Smrg 28e6232409Smrg*/ 29e6232409Smrg/* $XFree86: xc/programs/xlsfonts/dsimple.h,v 1.8 2002/12/24 17:43:01 tsi Exp $ */ 30e6232409Smrg 31e6232409Smrg/* 328fff3f40Smrg * dsimple.h: This file contains the definitions needed to use the 338fff3f40Smrg * functions in dsimple.c. It also declares the global 34e6232409Smrg * variables dpy, screen, and program_name which are needed to 358fff3f40Smrg * use dsimple.c. 36e6232409Smrg * 37e6232409Smrg * Written by Mark Lillibridge. Last updated 7/1/87 38e6232409Smrg * 39e6232409Smrg * Send bugs, etc. to chariot@athena.mit.edu. 40e6232409Smrg */ 41e6232409Smrg 4294a251fdSmrg#include <X11/Xfuncproto.h> 4394a251fdSmrg 44e6232409Smrg /* Simple helper macros */ 45e6232409Smrg#ifndef MAX 46e6232409Smrg#define MAX(a,b) (((a)>(b))?(a):(b)) 47e6232409Smrg#endif /* MAX */ 48e6232409Smrg#ifndef MIN 49e6232409Smrg#define MIN(a,b) (((a)<(b))?(a):(b)) 50e6232409Smrg#endif /* MIN */ 51e6232409Smrg 52e6232409Smrg /* Global variables used by routines in just_display.c */ 53e6232409Smrg 5494a251fdSmrgextern const char *program_name; /* Name of this program */ 55e6232409Smrgextern Display *dpy; /* The current display */ 56e6232409Smrgextern int screen; /* The current screen */ 57e6232409Smrg 58e6232409Smrg#define INIT_NAME program_name=argv[0] /* use this in main to setup 59e6232409Smrg program_name */ 60e6232409Smrg 618fff3f40Smrg/* Declarations for functions in dsimple.c */ 62e6232409Smrg 63e6232409Smrgvoid Setup_Display_And_Screen(int *, char **); 64e6232409Smrgvoid Close_Display(void); 6594a251fdSmrgvoid usage(void) _X_NORETURN; 66e6232409Smrg 67e6232409Smrg#define X_USAGE "[host:display]" /* X arguments handled by 68e6232409Smrg Get_Display_Name */ 69e6232409Smrg 7094a251fdSmrgvoid Fatal_Error(const char *, ...) _X_NORETURN _X_ATTRIBUTE_PRINTF(1,2); 71