diff options
Diffstat (limited to 'xlib/xutil.c')
-rw-r--r-- | xlib/xutil.c | 54 |
1 files changed, 28 insertions, 26 deletions
diff --git a/xlib/xutil.c b/xlib/xutil.c index db9d35e..267a624 100644 --- a/xlib/xutil.c +++ b/xlib/xutil.c @@ -1,34 +1,28 @@ -/* +/* * xutil.c -- * * This function contains generic X emulation routines. * * Copyright (c) 1995-1996 Sun Microsystems, Inc. * - * See the file "license.terms" for information on usage and redistribution - * of this file, and for a DISCLAIMER OF ALL WARRANTIES. + * See the file "license.terms" for information on usage and redistribution of + * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ #include <stdlib.h> #include <tk.h> -#ifdef MAC_TCL -# include <Xutil.h> -# include <Xatom.h> -#else -# include <X11/Xutil.h> -# include <X11/Xatom.h> -#endif +#include <X11/Xutil.h> +#include <X11/Xatom.h> /* *---------------------------------------------------------------------- * * XInternAtom -- * - * This procedure simulates the XInternAtom function by calling - * Tk_Uid to get a unique id for every atom. This is only a - * partial implementation, since it doesn't work across - * applications. + * This procedure simulates the XInternAtom function by calling Tk_Uid to + * get a unique id for every atom. This is only a partial implementation, + * since it doesn't work across applications. * * Results: * A new Atom. @@ -40,13 +34,13 @@ */ Atom -XInternAtom(display, atom_name, only_if_exists) - Display* display; - _Xconst char* atom_name; - Bool only_if_exists; +XInternAtom( + Display *display, + _Xconst char *atom_name, + Bool only_if_exists) { static Atom atom = XA_LAST_PREDEFINED; - + display->request++; return ++atom; } @@ -68,13 +62,13 @@ XInternAtom(display, atom_name, only_if_exists) */ XVisualInfo * -XGetVisualInfo(display, vinfo_mask, vinfo_template, nitems_return) - Display* display; - long vinfo_mask; - XVisualInfo* vinfo_template; - int* nitems_return; +XGetVisualInfo( + Display *display, + long vinfo_mask, + XVisualInfo *vinfo_template, + int *nitems_return) { - XVisualInfo *info = (XVisualInfo *)ckalloc(sizeof(XVisualInfo)); + XVisualInfo *info = (XVisualInfo *) ckalloc(sizeof(XVisualInfo)); info->visual = DefaultVisual(display, 0); info->visualid = info->visual->visualid; info->screen = 0; @@ -85,7 +79,7 @@ XGetVisualInfo(display, vinfo_mask, vinfo_template, nitems_return) info->red_mask = info->visual->red_mask; info->green_mask = info->visual->green_mask; info->blue_mask = info->visual->blue_mask; - + if (((vinfo_mask & VisualIDMask) && (vinfo_template->visualid != info->visualid)) || ((vinfo_mask & VisualScreenMask) @@ -112,3 +106,11 @@ XGetVisualInfo(display, vinfo_mask, vinfo_template, nitems_return) *nitems_return = 1; return info; } + +/* + * Local Variables: + * mode: c + * c-basic-offset: 4 + * fill-column: 78 + * End: + */ |