summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaleb Keithley <kaleb@freedesktop.org>2003-11-17 19:03:41 +0000
committerKaleb Keithley <kaleb@freedesktop.org>2003-11-17 19:03:41 +0000
commit02703b3937cf5692742ef8cc783ec03000881c7d (patch)
tree7f8b4b7cbbd3d054df7888ed4b97d8132a177325
parent2d49a74b90fa6272a11b28083efffaf5fce9089b (diff)
merge XFree86 4.3.0.1 to -CURRENT
-rw-r--r--src/XpAttr.c7
-rw-r--r--src/XpContext.c9
-rw-r--r--src/XpDoc.c7
-rw-r--r--src/XpExtUtil.c25
-rw-r--r--src/XpExtVer.c7
-rw-r--r--src/XpGetData.c7
-rw-r--r--src/XpImageRes.c7
-rw-r--r--src/XpInput.c7
-rw-r--r--src/XpJob.c15
-rw-r--r--src/XpLocale.c7
-rw-r--r--src/XpNotifyPdm.c21
-rw-r--r--src/XpPage.c7
-rw-r--r--src/XpPageDim.c8
-rw-r--r--src/XpPrinter.c13
-rw-r--r--src/XpPutData.c8
-rw-r--r--src/XpScreens.c11
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 <X11/extensions/Printstr.h>
+#include <X11/Xlibint.h>
+#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 <X11/extensions/Printstr.h>
+#include <X11/Xlibint.h>
+#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 <X11/extensions/Printstr.h>
+#include <X11/Xlibint.h>
+#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 <stdio.h>
-#include "Printstr.h"
-#include "Xlibint.h"
-#include "extutil.h"
+#include <X11/extensions/Printstr.h>
+#include <X11/Xlibint.h>
+#include "XpExtUtil.h"
#include <X11/Xos.h>
#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 <X11/extensions/Printstr.h>
+#include <X11/Xlibint.h>
+#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 <X11/extensions/Printstr.h>
+#include <X11/Xlibint.h>
+#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 <X11/extensions/Printstr.h>
+#include <X11/Xlibint.h>
+#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 <X11/extensions/Printstr.h>
+#include <X11/Xlibint.h>
+#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 <X11/extensions/Printstr.h>
+#include <X11/Xlibint.h>
+#include <X11/Xos.h>
+#include "XpExtUtil.h"
#include <limits.h>
#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 <X11/extensions/Printstr.h>
+#include <X11/Xlibint.h>
+#include "XpExtUtil.h"
#include <X11/Xlocale.h>
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 <X11/extensions/Print.h>
+#include <X11/Xlibint.h>
+#include <X11/Xutil.h>
+#include <X11/Xatom.h>
+#include <X11/Xauth.h>
#include <stdlib.h>
#include <X11/Xos.h>
@@ -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 <X11/extensions/Printstr.h>
+#include <X11/Xlibint.h>
+#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 <X11/extensions/Printstr.h>
+#include <X11/Xlibint.h>
+#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 <X11/extensions/Printstr.h>
+#include <X11/Xlibint.h>
+#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 <X11/extensions/Printstr.h>
+#include <X11/Xlibint.h>
+#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 <X11/extensions/Printstr.h>
+#include <X11/Xlibint.h>
+#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);