14.2 Include Files

The include files used in Example 14-1 are the standard ones, except for the few needed to perform system calls to get the user’s home directory, current Rubout key, etc. The <X11/Xresource.h> file is necessary to use the resource manager.

Example 14-1. basecalc — include files

#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xresource.h>
#include <X11/cursorfont.h>

#include <stdio.h>

#ifdef SysV
#include <termio.h>
#else
#include <sgtty.h>
#include <sys/ttychars.h>
#endif SysV

#include <ctype.h>
#include <pwd.h>

/* Global declarations file for this application */
#include "basecalc.h"

The constant definitions and global variables declared or defined in ./basecalc.h are shown above the routines in which they are used in the basecalc example program. You can take a look at the entire include file in Appendix D.

Get XLIB Programming Manual, Rel. 5, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.