aboutsummaryrefslogtreecommitdiff
path: root/X11/extensions/extutil.h
diff options
context:
space:
mode:
Diffstat (limited to 'X11/extensions/extutil.h')
-rw-r--r--X11/extensions/extutil.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/X11/extensions/extutil.h b/X11/extensions/extutil.h
index 825d81e93..074cc183a 100644
--- a/X11/extensions/extutil.h
+++ b/X11/extensions/extutil.h
@@ -1,5 +1,4 @@
/*
- * $Xorg: extutil.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $
*
Copyright 1989, 1998 The Open Group
@@ -24,18 +23,18 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*
* Author: Jim Fulton, MIT The Open Group
- *
+ *
* Xlib Extension-Writing Utilities
*
* This package contains utilities for writing the client API for various
* protocol extensions. THESE INTERFACES ARE NOT PART OF THE X STANDARD AND
* ARE SUBJECT TO CHANGE!
*/
-/* $XFree86: xc/include/extensions/extutil.h,v 1.9 2001/12/14 19:53:28 dawes Exp $ */
#ifndef _EXTUTIL_H_
#define _EXTUTIL_H_
+#include <unistd.h>
#include <X11/extensions/Xext.h>
/*
@@ -125,7 +124,7 @@ extern void XextDestroyExtension(
extern XExtDisplayInfo *XextAddDisplay(
XExtensionInfo* /* extinfo */,
Display* /* dpy */,
- char* /* ext_name */,
+ _Xconst char* /* ext_name */,
XExtensionHooks* /* hooks */,
int /* nevents */,
XPointer /* data */
@@ -149,7 +148,7 @@ extern XExtDisplayInfo *XextFindDisplay(
/*
* helper macros to generate code that is common to all extensions; caller
* should prefix it with static if extension source is in one file; this
- * could be a utility function, but have to stack 6 unused arguments for
+ * could be a utility function, but have to stack 6 unused arguments for
* something that is called many, many times would be bad.
*/
#define XEXT_GENERATE_FIND_DISPLAY(proc,extinfo,extname,hooks,nev,data) \
@@ -180,7 +179,7 @@ char *proc (Display *dpy, int code, XExtCodes *codes, char *buf, int n) \
code -= codes->first_error; \
if (code >= 0 && code < nerr) { \
char tmp[256]; \
- sprintf (tmp, "%s.%d", extname, code); \
+ snprintf (tmp, sizeof(tmp), "%s.%d", extname, code); \
XGetErrorDatabaseText (dpy, "XProtoError", tmp, errl[code], buf, n); \
return buf; \
} \