dsimple.h revision afe13c8e
1b3307321Smrg/* $Xorg: dsimple.h,v 1.4 2001/02/09 02:05:54 xorgcvs Exp $ */ 2b3307321Smrg/* 3b3307321Smrg 4b3307321SmrgCopyright 1993, 1998 The Open Group 5b3307321Smrg 6b3307321SmrgPermission to use, copy, modify, distribute, and sell this software and its 7b3307321Smrgdocumentation for any purpose is hereby granted without fee, provided that 8b3307321Smrgthe above copyright notice appear in all copies and that both that 9b3307321Smrgcopyright notice and this permission notice appear in supporting 10b3307321Smrgdocumentation. 11b3307321Smrg 12b3307321SmrgThe above copyright notice and this permission notice shall be included 13b3307321Smrgin all copies or substantial portions of the Software. 14b3307321Smrg 15b3307321SmrgTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16b3307321SmrgOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17b3307321SmrgMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 18b3307321SmrgIN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 19b3307321SmrgOTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 20b3307321SmrgARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 21b3307321SmrgOTHER DEALINGS IN THE SOFTWARE. 22b3307321Smrg 23b3307321SmrgExcept as contained in this notice, the name of The Open Group shall 24b3307321Smrgnot be used in advertising or otherwise to promote the sale, use or 25b3307321Smrgother dealings in this Software without prior written authorization 26b3307321Smrgfrom The Open Group. 27b3307321Smrg 28b3307321Smrg*/ 29b3307321Smrg/* $XFree86: xc/programs/xlsfonts/dsimple.h,v 1.8 2002/12/24 17:43:01 tsi Exp $ */ 30b3307321Smrg 31b3307321Smrg/* 32b3307321Smrg * Just_display.h: This file contains the definitions needed to use the 33b3307321Smrg * functions in just_display.c. It also declares the global 34b3307321Smrg * variables dpy, screen, and program_name which are needed to 35b3307321Smrg * use just_display.c. 36b3307321Smrg * 37b3307321Smrg * Written by Mark Lillibridge. Last updated 7/1/87 38b3307321Smrg * 39b3307321Smrg * Send bugs, etc. to chariot@athena.mit.edu. 40b3307321Smrg */ 41b3307321Smrg 42b3307321Smrg /* Simple helper macros */ 43b3307321Smrg#ifndef MAX 44b3307321Smrg#define MAX(a,b) (((a)>(b))?(a):(b)) 45b3307321Smrg#endif /* MAX */ 46b3307321Smrg#ifndef MIN 47b3307321Smrg#define MIN(a,b) (((a)<(b))?(a):(b)) 48b3307321Smrg#endif /* MIN */ 49b3307321Smrg 50b3307321Smrg /* Global variables used by routines in just_display.c */ 51b3307321Smrg 52b3307321Smrgextern char *program_name; /* Name of this program */ 53b3307321Smrgextern Display *dpy; /* The current display */ 54b3307321Smrgextern int screen; /* The current screen */ 55b3307321Smrg 56b3307321Smrg#define INIT_NAME program_name=argv[0] /* use this in main to setup 57b3307321Smrg program_name */ 58b3307321Smrg 59b3307321Smrg /* Declaritions for functions in just_display.c */ 60b3307321Smrg 61b3307321Smrgchar *Get_Display_Name(int *, char **); 62afe13c8eSmrgDisplay *Open_Display(const char *); 63b3307321Smrgvoid Setup_Display_And_Screen(int *, char **); 64b3307321Smrgvoid Close_Display(void); 65b3307321SmrgWindow Select_Window_Args(int *, char **); 66b3307321Smrgvoid usage(void); 67b3307321Smrg 68b3307321Smrg#define X_USAGE "[host:display]" /* X arguments handled by 69b3307321Smrg Get_Display_Name */ 70b3307321Smrg 71b3307321Smrg/* 72b3307321Smrg * Other_stuff.h: Definitions of routines in other_stuff. 73b3307321Smrg * 74b3307321Smrg * Written by Mark Lillibridge. Last updated 7/1/87 75b3307321Smrg * 76b3307321Smrg * Send bugs, etc. to chariot@athena.mit.edu. 77b3307321Smrg */ 78b3307321Smrg 79afe13c8eSmrgWindow Select_Window(Display *, int); 80afe13c8eSmrgWindow Window_With_Name(Display *, Window, const char *); 81b3307321Smrg#ifdef __GNUC__ 82b3307321Smrgvoid Fatal_Error(char *, ...) __attribute__((__noreturn__)); 83b3307321Smrg#else 84b3307321Smrgvoid Fatal_Error(char *, ...); 85b3307321Smrg#endif 86b3307321Smrgvoid outl(char *, ...); 87