From 8575b69d8eb59ede70af9f4d82baee328b0571d8 Mon Sep 17 00:00:00 2001 From: Kaleb Keithley Date: Fri, 14 Nov 2003 16:48:49 +0000 Subject: XFree86 4.3.0.1 --- src/XpAttr.c | 7 ++++--- src/XpContext.c | 9 +++++---- src/XpDoc.c | 7 ++++--- src/XpExtUtil.c | 25 +++++++++++++++---------- src/XpExtVer.c | 7 ++++--- src/XpGetData.c | 7 ++++--- src/XpImageRes.c | 7 ++++--- src/XpInput.c | 7 ++++--- src/XpJob.c | 15 +++++++++++---- src/XpLocale.c | 7 ++++--- src/XpNotifyPdm.c | 21 +++++++++++---------- src/XpPage.c | 7 ++++--- src/XpPageDim.c | 8 ++++---- src/XpPrinter.c | 13 +++++++------ src/XpPutData.c | 8 ++++---- src/XpScreens.c | 11 ++++++----- 16 files changed, 95 insertions(+), 71 deletions(-) diff --git a/src/XpAttr.c b/src/XpAttr.c index 6101bcb..b8d5ec3 100644 --- a/src/XpAttr.c +++ b/src/XpAttr.c @@ -34,12 +34,13 @@ ** ****************************************************************************** *****************************************************************************/ +/* $XFree86: xc/lib/Xp/XpAttr.c,v 1.7 2002/10/16 00:37:31 dawes Exp $ */ #define NEED_REPLIES -#include "Printstr.h" -#include "Xlibint.h" -#include "extutil.h" +#include +#include +#include "XpExtUtil.h" #define _XpPadOut(len) (((len) + 3) & ~3) diff --git a/src/XpContext.c b/src/XpContext.c index b50ba8b..9415b4b 100644 --- a/src/XpContext.c +++ b/src/XpContext.c @@ -34,12 +34,13 @@ ** ****************************************************************************** *****************************************************************************/ +/* $XFree86: xc/lib/Xp/XpContext.c,v 1.7 2002/10/16 00:37:31 dawes Exp $ */ #define NEED_REPLIES -#include "Printstr.h" -#include "Xlibint.h" -#include "extutil.h" +#include +#include +#include "XpExtUtil.h" #define _XpPadOut(len) (((len) + 3) & ~3) @@ -200,7 +201,7 @@ XpGetScreenOfContext ( XExtDisplayInfo *info = (XExtDisplayInfo *) xp_find_display (dpy); int i; - Screen *checkScr; + Screen *checkScr = NULL; int ok; diff --git a/src/XpDoc.c b/src/XpDoc.c index 86281a8..2a78feb 100644 --- a/src/XpDoc.c +++ b/src/XpDoc.c @@ -34,10 +34,11 @@ ** ****************************************************************************** *****************************************************************************/ +/* $XFree86: xc/lib/Xp/XpDoc.c,v 1.4 2002/10/16 00:37:31 dawes Exp $ */ -#include "Printstr.h" -#include "Xlibint.h" -#include "extutil.h" +#include +#include +#include "XpExtUtil.h" typedef struct { int event_base_return; diff --git a/src/XpExtUtil.c b/src/XpExtUtil.c index fc323e7..b45e30a 100644 --- a/src/XpExtUtil.c +++ b/src/XpExtUtil.c @@ -34,13 +34,14 @@ ** ****************************************************************************** *****************************************************************************/ +/* $XFree86: xc/lib/Xp/XpExtUtil.c,v 1.7 2002/10/16 00:37:31 dawes Exp $ */ #define NEED_EVENTS #define NEED_REPLIES #include -#include "Printstr.h" -#include "Xlibint.h" -#include "extutil.h" +#include +#include +#include "XpExtUtil.h" #include #define ENQUEUE_EVENT True @@ -49,7 +50,6 @@ static XExtensionInfo xp_info_data; static XExtensionInfo *xp_info = &xp_info_data; static /* const */ char *xp_extension_name = XP_PRINTNAME; -static /* const */ XEvent emptyevent; static int XpClose(); static char *XpError(); @@ -73,9 +73,15 @@ static /* const */ XExtensionHooks xpprint_extension_hooks = { XpError, /* error_string */ }; +typedef struct { + int present; + short major_version; + short minor_version; +} XPrintLocalExtensionVersion; + typedef struct _xpPrintData { XEvent data; - XExtensionVersion *vers; + XPrintLocalExtensionVersion *vers; } xpPrintData; static char *XpErrorList[ /* XP_ERRORS */ ] = { @@ -95,7 +101,7 @@ static XEXT_GENERATE_ERROR_STRING (XpError, xp_extension_name, * XP Print extension versions. */ -static XExtensionVersion xpprintversions[] = {{XP_ABSENT,0,0}, +static XPrintLocalExtensionVersion xpprintversions[] = {{XP_ABSENT,0,0}, {XP_PRESENT, XP_PROTO_MAJOR, XP_PROTO_MINOR}}; @@ -139,7 +145,7 @@ int XpCheckExtInit(dpy, version_index) } ((xpPrintData *) info->data)->vers = - (XExtensionVersion *) Xmalloc(sizeof(XExtensionVersion)); + (XPrintLocalExtensionVersion *) Xmalloc(sizeof(XPrintLocalExtensionVersion)); if (!(((xpPrintData *) info->data)->vers)) { _XUnlockMutex(_Xglobal_lock); return (-1); @@ -277,7 +283,6 @@ XpEventToWire(dpy, re, event, count) register int *count; { XExtDisplayInfo *info = (XExtDisplayInfo *) xp_find_display (dpy); - int i; switch ((re->type & 0x7f) - info->codes->first_event) { @@ -287,6 +292,7 @@ XpEventToWire(dpy, re, event, count) register XDeviceKeyEvent *ev = (XDeviceKeyEvent*) re; register deviceKeyButtonPointer *kev; register deviceValuator *vev; + int i; *count = 2; kev = (deviceKeyButtonPointer *) Xmalloc (*count * sizeof (xEvent)); @@ -330,7 +336,6 @@ XpEventToWire(dpy, re, event, count) #endif /* PRINT_SomeEventExample2 */ default: - return(_XUnknownNativeEvent(dpy, re, event)); + return(_XUnknownNativeEvent(dpy, re, *event)); } } - diff --git a/src/XpExtVer.c b/src/XpExtVer.c index 1ca7047..4ce49f5 100644 --- a/src/XpExtVer.c +++ b/src/XpExtVer.c @@ -34,12 +34,13 @@ ** ****************************************************************************** *****************************************************************************/ +/* $XFree86: xc/lib/Xp/XpExtVer.c,v 1.5 2002/10/16 00:37:31 dawes Exp $ */ #define NEED_REPLIES -#include "Printstr.h" -#include "Xlibint.h" -#include "extutil.h" +#include +#include +#include "XpExtUtil.h" Bool diff --git a/src/XpGetData.c b/src/XpGetData.c index 2769634..1fb20b6 100644 --- a/src/XpGetData.c +++ b/src/XpGetData.c @@ -34,12 +34,13 @@ ** ****************************************************************************** *****************************************************************************/ +/* $XFree86: xc/lib/Xp/XpGetData.c,v 1.5 2002/10/16 00:37:32 dawes Exp $ */ #define NEED_REPLIES -#include "Printstr.h" -#include "Xlibint.h" -#include "extutil.h" +#include +#include +#include "XpExtUtil.h" #define MAX_XP_BUFFER_SIZE 32768 diff --git a/src/XpImageRes.c b/src/XpImageRes.c index d11cd14..ec4666f 100644 --- a/src/XpImageRes.c +++ b/src/XpImageRes.c @@ -34,13 +34,14 @@ ** ****************************************************************************** *****************************************************************************/ +/* $XFree86: xc/lib/Xp/XpImageRes.c,v 1.5 2002/10/16 00:37:32 dawes Exp $ */ #define NEED_REPLIES -#include "Printstr.h" -#include "Xlibint.h" -#include "extutil.h" +#include +#include +#include "XpExtUtil.h" Bool diff --git a/src/XpInput.c b/src/XpInput.c index 2224c39..3b3d5f8 100644 --- a/src/XpInput.c +++ b/src/XpInput.c @@ -34,12 +34,13 @@ ** ****************************************************************************** *****************************************************************************/ +/* $XFree86: xc/lib/Xp/XpInput.c,v 1.5 2002/10/16 00:37:32 dawes Exp $ */ #define NEED_REPLIES -#include "Printstr.h" -#include "Xlibint.h" -#include "extutil.h" +#include +#include +#include "XpExtUtil.h" void diff --git a/src/XpJob.c b/src/XpJob.c index 1ca9909..803551d 100644 --- a/src/XpJob.c +++ b/src/XpJob.c @@ -34,11 +34,16 @@ ** ****************************************************************************** *****************************************************************************/ +/* $XFree86: xc/lib/Xp/XpJob.c,v 1.6 2002/10/16 00:37:32 dawes Exp $ */ -#include "Printstr.h" -#include "Xlibint.h" -#include "X11/Xos.h" -#include "extutil.h" +#if defined(sun) && defined(i386) && defined(SVR4) && !defined(__EXTENSIONS__) +#define __EXTENSIONS__ +#endif + +#include +#include +#include +#include "XpExtUtil.h" #include #ifndef WIN32 #define X_INCLUDE_PWD_H @@ -96,7 +101,9 @@ XpStartJob ( char *joa; /* job owner attribute */ char *PwName; #ifndef WIN32 +#ifdef X_NEEDS_PWPARAMS _Xgetpwparams pwparams; +#endif struct passwd *pw; pw = _XGetpwuid(getuid(),pwparams); diff --git a/src/XpLocale.c b/src/XpLocale.c index 2e0864d..497092f 100644 --- a/src/XpLocale.c +++ b/src/XpLocale.c @@ -34,10 +34,11 @@ ** ****************************************************************************** *****************************************************************************/ +/* $XFree86: xc/lib/Xp/XpLocale.c,v 1.5 2002/10/16 00:37:32 dawes Exp $ */ -#include "Printstr.h" -#include "Xlibint.h" -#include "extutil.h" +#include +#include +#include "XpExtUtil.h" #include diff --git a/src/XpNotifyPdm.c b/src/XpNotifyPdm.c index 46c248a..a785c20 100644 --- a/src/XpNotifyPdm.c +++ b/src/XpNotifyPdm.c @@ -41,12 +41,13 @@ ** ****************************************************************************** *****************************************************************************/ +/* $XFree86: xc/lib/Xp/XpNotifyPdm.c,v 1.6 2002/10/16 00:37:32 dawes Exp $ */ -#include "Print.h" -#include "X11/Xlibint.h" -#include "X11/Xutil.h" -#include "X11/Xatom.h" -#include "X11/Xauth.h" +#include +#include +#include +#include +#include #include #include @@ -212,7 +213,6 @@ XpGetPdmStartParams ( int *nelements /* return value */ ) { - Display *sel_display; XTextProperty text_prop; int status; char str1[128], str2[128], str3[128]; @@ -241,14 +241,14 @@ XpGetPdmStartParams ( * locale_hint */ list[0] = XDisplayString( video_display ); - sprintf( str1, "0x%x", video_window ); + sprintf( str1, "0x%lx", (long)video_window ); list[1] = str1; list[2] = XDisplayString( print_display ); - sprintf( str2, "0x%x", print_window ); + sprintf( str2, "0x%lx", (long)print_window ); list[3] = str2; - sprintf( str3, "0x%x", print_context ); + sprintf( str3, "0x%lx", (long)print_context ); list[4] = str3; list[5] = XpGetLocaleNetString(); @@ -469,13 +469,14 @@ XpGetAuthParams ( /* * Error - cannot determine or establish a selection_display. */ - return( (Status) NULL ); + return (Status)0; } /* * Create property and transfer data to. */ *sel_target_atom = XInternAtom( *sel_display, "PDM_MBOX", False ); + return (Status)1; } diff --git a/src/XpPage.c b/src/XpPage.c index d405bbd..cfef7c4 100644 --- a/src/XpPage.c +++ b/src/XpPage.c @@ -34,10 +34,11 @@ ** ****************************************************************************** *****************************************************************************/ +/* $XFree86: xc/lib/Xp/XpPage.c,v 1.5 2002/10/16 00:37:32 dawes Exp $ */ -#include "Printstr.h" -#include "Xlibint.h" -#include "extutil.h" +#include +#include +#include "XpExtUtil.h" typedef struct { diff --git a/src/XpPageDim.c b/src/XpPageDim.c index 2062e44..35f190c 100644 --- a/src/XpPageDim.c +++ b/src/XpPageDim.c @@ -34,13 +34,13 @@ ** ****************************************************************************** *****************************************************************************/ - +/* $XFree86: xc/lib/Xp/XpPageDim.c,v 1.5 2002/10/16 00:37:32 dawes Exp $ */ #define NEED_REPLIES -#include "Printstr.h" -#include "Xlibint.h" -#include "extutil.h" +#include +#include +#include "XpExtUtil.h" Status diff --git a/src/XpPrinter.c b/src/XpPrinter.c index 99fbc33..ae73c93 100644 --- a/src/XpPrinter.c +++ b/src/XpPrinter.c @@ -34,12 +34,13 @@ ** ****************************************************************************** *****************************************************************************/ +/* $XFree86: xc/lib/Xp/XpPrinter.c,v 1.9 2002/10/16 00:37:32 dawes Exp $ */ #define NEED_REPLIES -#include "Printstr.h" -#include "Xlibint.h" -#include "extutil.h" +#include +#include +#include "XpExtUtil.h" #define _XpPadOut(len) (((len) + 3) & ~3) @@ -57,7 +58,7 @@ XpGetPrinterList ( char *locale; /* For decoding the variable portion of Reply */ - CARD32 dataLenVR; + long dataLenVR; CARD8 *dataVR; /* aka STRING8 */ XPPrinterList ptr_list; @@ -145,7 +146,7 @@ XpGetPrinterList ( /* * Pull printer length and then name. */ - _XRead32 (dpy, (char *) &dataLenVR, (long) sizeof(dataLenVR) ); + _XRead32 (dpy, &dataLenVR, (long) sizeof(CARD32) ); if (dataLenVR) { dataVR = (CARD8 *) Xmalloc( (unsigned) dataLenVR + 1 ); @@ -167,7 +168,7 @@ XpGetPrinterList ( /* * Pull localized description length and then description. */ - _XRead32 (dpy, (char *) &dataLenVR, (long) sizeof(dataLenVR) ); + _XRead32 (dpy, &dataLenVR, (long) sizeof(CARD32) ); if (dataLenVR) { dataVR = (CARD8 *) Xmalloc( (unsigned) dataLenVR + 1 ); diff --git a/src/XpPutData.c b/src/XpPutData.c index 8247d81..96c5e7d 100644 --- a/src/XpPutData.c +++ b/src/XpPutData.c @@ -34,11 +34,11 @@ ** ****************************************************************************** *****************************************************************************/ +/* $XFree86: xc/lib/Xp/XpPutData.c,v 1.4 2002/10/16 00:37:32 dawes Exp $ */ - -#include "Printstr.h" -#include "Xlibint.h" -#include "extutil.h" +#include +#include +#include "XpExtUtil.h" #define _XpPadOut(len) (((len) + 3) & ~3) diff --git a/src/XpScreens.c b/src/XpScreens.c index 7283f90..f301de1 100644 --- a/src/XpScreens.c +++ b/src/XpScreens.c @@ -34,12 +34,13 @@ ** ****************************************************************************** *****************************************************************************/ +/* $XFree86: xc/lib/Xp/XpScreens.c,v 1.6 2002/10/16 00:37:32 dawes Exp $ */ #define NEED_REPLIES -#include "Printstr.h" -#include "Xlibint.h" -#include "extutil.h" +#include +#include +#include "XpExtUtil.h" Screen ** @@ -52,7 +53,7 @@ XpQueryScreens ( xPrintQueryScreensReply rep; /* For decoding the variable portion of Reply */ - CARD32 rootWindow; + long rootWindow; /* For converting root winID to corresponding ScreenPtr */ Screen **scr_list; @@ -93,7 +94,7 @@ XpQueryScreens ( /* * Pull printer length and then name. */ - _XRead32 (dpy, (char *) &rootWindow, (long) sizeof(rootWindow) ); + _XRead32 (dpy, &rootWindow, (long) sizeof(CARD32) ); scr_list[i] = NULL; for ( j = 0; j < XScreenCount(dpy); j++ ) { checkScr = XScreenOfDisplay(dpy, j); -- cgit v1.2.1