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