Makefile.am | 6 - configure.ac | 14 ++- man/Makefile.am | 2 man/XpCancelDoc.man | 60 +++++++-------- man/XpCancelJob.man | 38 ++++----- man/XpCancelPage.man | 54 ++++++------- man/XpCreateContext.man | 134 ++++++++++++++++----------------- man/XpDestroyContext.man | 32 ++++---- man/XpEndDoc.man | 22 ++--- man/XpEndJob.man | 28 +++---- man/XpEndPage.man | 32 ++++---- man/XpFreePrinterList.man | 22 ++--- man/XpGetAttributes.man | 44 +++++------ man/XpGetContext.man | 22 ++--- man/XpGetDocumentData.man | 172 +++++++++++++++++++++---------------------- man/XpGetImageResolution.man | 28 +++---- man/XpGetLocaleHinter.man | 24 +++--- man/XpGetOneAttribute.man | 28 +++---- man/XpGetPageDimensions.man | 30 +++---- man/XpGetPdmStartParams.man | 126 +++++++++++++++---------------- man/XpGetPrinterList.man | 72 +++++++++--------- man/XpGetScreenOfContext.man | 28 +++---- man/XpInputSelected.man | 52 ++++++------- man/XpPutDocumentData.man | 114 ++++++++++++++-------------- man/XpQueryExtension.man | 36 ++++----- man/XpQueryScreens.man | 32 ++++---- man/XpQueryVersion.man | 36 ++++----- man/XpRehashPrinterList.man | 36 ++++----- man/XpSelectInput.man | 34 ++++---- man/XpSetAttributes.man | 92 +++++++++++------------ man/XpSetContext.man | 74 +++++++++--------- man/XpSetImageResolution.man | 20 ++--- man/XpSetLocaleHinter.man | 160 ++++++++++++++++++++-------------------- man/XpStartDoc.man | 58 +++++++------- man/XpStartJob.man | 64 ++++++++-------- man/XpStartPage.man | 60 +++++++-------- man/libXp.man | 94 +++++++++++------------ src/Makefile.am | 2 src/XpAttr.c | 38 +++++---- src/XpContext.c | 2 src/XpDoc.c | 2 src/XpExtUtil.c | 23 ++--- src/XpExtUtil.h | 16 +++- src/XpExtVer.c | 4 - src/XpGetData.c | 2 src/XpImageRes.c | 2 src/XpInput.c | 2 src/XpJob.c | 4 - src/XpLocale.c | 2 src/XpNotifyPdm.c | 24 +++--- src/XpPage.c | 2 src/XpPageDim.c | 2 src/XpPrinter.c | 45 ++++++----- src/XpPutData.c | 2 src/XpScreens.c | 18 ++-- 55 files changed, 1098 insertions(+), 1074 deletions(-)
New commits: commit fac4696b912898a0e171fcb93c055bd7fb99161a Author: Alan Coopersmith <[email protected]> Date: Thu May 30 17:40:54 2013 -0700 libXp 1.0.2 Signed-off-by: Alan Coopersmith <[email protected]> diff --git a/configure.ac b/configure.ac index 16b966c..c721461 100644 --- a/configure.ac +++ b/configure.ac @@ -24,7 +24,7 @@ dnl Process this file with autoconf to create configure. AC_PREREQ([2.60]) # Initialize Autoconf -AC_INIT([libXp],[1.0.1], +AC_INIT([libXp],[1.0.2], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],[libXp]) AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_HEADERS([config.h]) commit e111065f6dd790c820fa67ea31055b18c68481e3 Author: Alan Coopersmith <[email protected]> Date: Fri Apr 26 23:59:25 2013 -0700 integer overflows in XpQueryScreens() [CVE-2013-2062 3/3] listCount is a CARD32 that needs to be bounds checked before it is multiplied by the size of the pointers to allocate, to avoid integer overflow leading to underallocation and writing data from the network past the end of the allocated buffer. Signed-off-by: Alan Coopersmith <[email protected]> diff --git a/src/XpScreens.c b/src/XpScreens.c index 815dfbf..b31e554 100644 --- a/src/XpScreens.c +++ b/src/XpScreens.c @@ -42,6 +42,7 @@ #include <X11/extensions/Printstr.h> #include <X11/Xlibint.h> #include "XpExtUtil.h" +#include <limits.h> Screen ** @@ -82,19 +83,17 @@ XpQueryScreens ( *list_count = rep.listCount; if (*list_count) { - scr_list = (Screen **) - Xmalloc( (unsigned) (sizeof(Screen *) * *list_count) ); + if (rep.listCount < (INT_MAX / sizeof(Screen *))) + scr_list = Xmalloc(sizeof(Screen *) * *list_count); + else + scr_list = NULL; if (!scr_list) { - UnlockDisplay(dpy); - SyncHandle(); - return ( (Screen **) NULL ); /* malloc error */ + _XEatDataWords(dpy, rep.length); + goto out; } i = 0; while(i < *list_count){ - /* - * Pull printer length and then name. - */ _XRead32 (dpy, &rootWindow, (long) sizeof(CARD32) ); scr_list[i] = NULL; for ( j = 0; j < XScreenCount(dpy); j++ ) { @@ -118,6 +117,7 @@ XpQueryScreens ( scr_list = (Screen **) NULL; } + out: UnlockDisplay(dpy); SyncHandle(); commit cc90f6be64bfd6973ae270b9bff494f577e1bda7 Author: Alan Coopersmith <[email protected]> Date: Fri Apr 26 23:59:25 2013 -0700 integer overflows in XpGetPrinterList() [CVE-2013-2062 2/3] listCount is a CARD32 that needs to be bounds checked before it is multiplied by the size of the structs to allocate, and the string lengths are CARD32s and need to be bounds checked before adding one to them to come up with the total size to allocate, to avoid integer overflow leading to underallocation and writing data from the network past the end of the allocated buffer. Signed-off-by: Alan Coopersmith <[email protected]> diff --git a/src/XpPrinter.c b/src/XpPrinter.c index bdc96e6..03b18c4 100644 --- a/src/XpPrinter.c +++ b/src/XpPrinter.c @@ -42,6 +42,7 @@ #include <X11/extensions/Printstr.h> #include <X11/Xlibint.h> #include "XpExtUtil.h" +#include <limits.h> #define _XpPadOut(len) (((len) + 3) & ~3) @@ -62,7 +63,7 @@ XpGetPrinterList ( long dataLenVR; CARD8 *dataVR; /* aka STRING8 */ - XPPrinterList ptr_list; + XPPrinterList ptr_list = NULL; XExtDisplayInfo *info = (XExtDisplayInfo *) xp_find_display (dpy); @@ -128,13 +129,12 @@ XpGetPrinterList ( *list_count = rep.listCount; if (*list_count) { - ptr_list = (XPPrinterList) - Xmalloc( (unsigned) (sizeof(XPPrinterRec) * (*list_count + 1))); + if (rep.listCount < (INT_MAX / sizeof(XPPrinterRec))) + ptr_list = Xmalloc(sizeof(XPPrinterRec) * (*list_count + 1)); if (!ptr_list) { - UnlockDisplay(dpy); - SyncHandle(); - return ( (XPPrinterList) NULL ); /* malloc error */ + _XEatDataWords(dpy, rep.length); + goto out; } /* @@ -150,16 +150,17 @@ XpGetPrinterList ( _XRead32 (dpy, &dataLenVR, (long) sizeof(CARD32) ); if (dataLenVR) { - dataVR = (CARD8 *) Xmalloc( (unsigned) dataLenVR + 1 ); + if (dataLenVR < INT_MAX) + dataVR = Xmalloc(dataLenVR + 1); + else + dataVR = NULL; if (!dataVR) { - UnlockDisplay(dpy); - SyncHandle(); - return ( (XPPrinterList) NULL ); /* malloc error */ + _XEatData(dpy, dataLenVR); + } else { + _XReadPad (dpy, (char *) dataVR, (long) dataLenVR); + dataVR[dataLenVR] = 0; } - - _XReadPad (dpy, (char *) dataVR, (long) dataLenVR); - dataVR[dataLenVR] = 0; ptr_list[i].name = (char *) dataVR; } else { @@ -172,16 +173,17 @@ XpGetPrinterList ( _XRead32 (dpy, &dataLenVR, (long) sizeof(CARD32) ); if (dataLenVR) { - dataVR = (CARD8 *) Xmalloc( (unsigned) dataLenVR + 1 ); + if (dataLenVR < INT_MAX) + dataVR = Xmalloc(dataLenVR + 1); + else + dataVR = NULL; if (!dataVR) { - UnlockDisplay(dpy); - SyncHandle(); - return ( (XPPrinterList) NULL ); /* malloc error */ + _XEatData(dpy, dataLenVR); + } else { + _XReadPad (dpy, (char *) dataVR, (long) dataLenVR); + dataVR[dataLenVR] = 0; } - - _XReadPad (dpy, (char *) dataVR, (long) dataLenVR); - dataVR[dataLenVR] = 0; ptr_list[i].desc = (char *) dataVR; } else { @@ -193,6 +195,7 @@ XpGetPrinterList ( ptr_list = (XPPrinterList) NULL; } + out: UnlockDisplay(dpy); SyncHandle(); commit babb1fc823ab3be192c48fe115feeb0d57f74d05 Author: Alan Coopersmith <[email protected]> Date: Fri Apr 26 23:59:25 2013 -0700 integer overflow in XpGetAttributes & XpGetOneAttribute [CVE-2013-2062 1/3] stringLen & valueLen are CARD32s and need to be bounds checked before adding one to them to come up with the total size to allocate, to avoid integer overflow leading to underallocation and writing data from the network past the end of the allocated buffer. Signed-off-by: Alan Coopersmith <[email protected]> diff --git a/src/XpAttr.c b/src/XpAttr.c index 6818daf..665e2e8 100644 --- a/src/XpAttr.c +++ b/src/XpAttr.c @@ -48,6 +48,7 @@ #include <stdio.h> #include <sys/stat.h> +#include <limits.h> char * XpGetAttributes ( @@ -83,17 +84,18 @@ XpGetAttributes ( /* * Read pool and return to caller. */ - buf = Xmalloc( (unsigned) rep.stringLen + 1 ); + if (rep.stringLen < INT_MAX) + buf = Xmalloc(rep.stringLen + 1); + else + buf = NULL; if (!buf) { - UnlockDisplay(dpy); - SyncHandle(); - return( (char *) NULL ); /* malloc error */ + _XEatDataWords(dpy, rep.length); + } + else { + _XReadPad (dpy, (char *) buf, rep.stringLen ); + buf[rep.stringLen] = 0; } - - _XReadPad (dpy, (char *) buf, (long) rep.stringLen ); - - buf[rep.stringLen] = 0; UnlockDisplay(dpy); SyncHandle(); @@ -144,18 +146,18 @@ XpGetOneAttribute ( /* * Read variable answer. */ - buf = Xmalloc( (unsigned) rep.valueLen + 1 ); + if (rep.valueLen < INT_MAX) + buf = Xmalloc(rep.valueLen + 1); + else + buf = NULL; if (!buf) { - UnlockDisplay(dpy); - SyncHandle(); - return( (char *) NULL ); /* malloc error */ + _XEatDataWords(dpy, rep.length); + } + else { + _XReadPad (dpy, (char *) buf, rep.valueLen); + buf[rep.valueLen] = 0; } - - buf[rep.valueLen] = 0; - - _XReadPad (dpy, (char *) buf, (long) rep.valueLen ); - buf[rep.valueLen] = 0; UnlockDisplay(dpy); SyncHandle(); commit 15ec6d1d0bb8c4cb24a190ed34e63312a0623670 Author: Alan Coopersmith <[email protected]> Date: Fri May 3 22:30:36 2013 -0700 Use _XEatDataWords to avoid overflow of rep.length bit shifting rep.length is a CARD32, so rep.length << 2 could overflow in 32-bit builds Signed-off-by: Alan Coopersmith <[email protected]> diff --git a/configure.ac b/configure.ac index 50b029c..16b966c 100644 --- a/configure.ac +++ b/configure.ac @@ -45,6 +45,12 @@ AC_PROG_LIBTOOL # Check for X and print proto PKG_CHECK_MODULES(XPRINT, x11 xext xextproto xau printproto) +# Check for _XEatDataWords function that may be patched into older Xlib release +SAVE_LIBS="$LIBS" +LIBS="$XPRINT_LIBS" +AC_CHECK_FUNCS([_XEatDataWords]) +LIBS="$SAVE_LIBS" + AC_CONFIG_FILES([Makefile src/Makefile man/Makefile diff --git a/src/XpExtUtil.h b/src/XpExtUtil.h index d479a95..1889825 100644 --- a/src/XpExtUtil.h +++ b/src/XpExtUtil.h @@ -48,6 +48,20 @@ extern char *_xpstrdup( const char * /* str */ ); +#ifndef HAVE__XEATDATAWORDS +#include <X11/Xmd.h> /* for LONG64 on 64-bit platforms */ +#include <limits.h> + +static inline void _XEatDataWords(Display *dpy, unsigned long n) +{ +# ifndef LONG64 + if (n >= (ULONG_MAX >> 2)) + _XIOError(dpy); +# endif + _XEatData (dpy, n << 2); +} +#endif + _XFUNCPROTOEND #endif /* _XPEXTUTIL_H */ commit 41aab7d289aba2aaf3839e96d0c9e2f15ede4bd1 Author: Alan Coopersmith <[email protected]> Date: Fri Jan 18 23:03:57 2013 -0800 Replace deprecated Automake INCLUDES variable with AM_CPPFLAGS Excerpt https://lists.gnu.org/archive/html/automake/2012-12/msg00038.html - Support for the long-deprecated INCLUDES variable will be removed altogether in Automake 1.14. The AM_CPPFLAGS variable should be used instead. This variable was deprecated in Automake releases prior to 1.10, which is the current minimum level required to build X. Signed-off-by: Alan Coopersmith <[email protected]> diff --git a/src/Makefile.am b/src/Makefile.am index 3ca2659..f42b633 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -24,7 +24,7 @@ libXp_la_LIBADD = $(XPRINT_LIBS) AM_CFLAGS = $(CWARNFLAGS) $(XPRINT_CFLAGS) $(MALLOC_ZERO_CFLAGS) -INCLUDES = -I$(top_srcdir)/include/X11/extensions +AM_CPPFLAGS = -I$(top_srcdir)/include/X11/extensions # # Library version number. This must match old versions on commit 73c9e094f3307f1f29e05e4534a530335e5bd61f Author: Alan Coopersmith <[email protected]> Date: Wed May 23 22:05:51 2012 -0700 Add const qualifiers to silence gcc -Wwrite-strings warnings Signed-off-by: Alan Coopersmith <[email protected]> diff --git a/src/XpExtUtil.c b/src/XpExtUtil.c index 30540d0..89f66c0 100644 --- a/src/XpExtUtil.c +++ b/src/XpExtUtil.c @@ -50,7 +50,7 @@ static XExtensionInfo xp_info_data; static XExtensionInfo *xp_info = &xp_info_data; -static /* const */ char *xp_extension_name = XP_PRINTNAME; +static const char *xp_extension_name = XP_PRINTNAME; static int XpClose(Display *, XExtCodes *); static char *XpError(Display *, int, XExtCodes *, char *, int); @@ -85,7 +85,7 @@ typedef struct _xpPrintData { XPrintLocalExtensionVersion *vers; } xpPrintData; -static char *XpErrorList[ /* XP_ERRORS */ ] = { +static const char *XpErrorList[ /* XP_ERRORS */ ] = { "XPBadContext", "XPBadSequence", "XPBadResourceID" diff --git a/src/XpExtUtil.h b/src/XpExtUtil.h index 4b880ae..d479a95 100644 --- a/src/XpExtUtil.h +++ b/src/XpExtUtil.h @@ -45,7 +45,7 @@ extern int XpCheckExtInitUnlocked( ); extern char *_xpstrdup( - char * /* str */ + const char * /* str */ ); _XFUNCPROTOEND diff --git a/src/XpNotifyPdm.c b/src/XpNotifyPdm.c index 579923c..9fccfdd 100644 --- a/src/XpNotifyPdm.c +++ b/src/XpNotifyPdm.c @@ -68,7 +68,7 @@ /* * str_dup using Xmalloc */ -char *_xpstrdup(char * str) +char *_xpstrdup(const char * str) { int len; char *newstr; @@ -104,7 +104,7 @@ _XpGetSelectionServer ( char *tstr1, *tstr2, *tstr3, *tstrptr; char *sel_displaystr; Display *sel_display; - char *selectionstr; + const char *selectionstr; /* @@ -727,7 +727,7 @@ XpNotifyPdm ( enum { XA_PDM_CLIENT_PROP, XA_PDM_START, XA_PDM_START_OK, XA_PDM_START_VXAUTH, XA_PDM_START_PXAUTH, XA_PDM_START_ERROR, NUM_ATOMS }; - static char *atom_names[] = { + static const char *atom_names[] = { "PDM_CLIENT_PROP", "PDM_START", "PDM_START_OK", "PDM_START_VXAUTH", "PDM_START_PXAUTH", "PDM_START_ERROR" }; @@ -791,7 +791,7 @@ XpNotifyPdm ( /* * Create property and transfer data to. */ - XInternAtoms( sel_display, atom_names, NUM_ATOMS, False, atoms ); + XInternAtoms( sel_display, (char **) atom_names, NUM_ATOMS, False, atoms ); XChangeProperty( sel_display, sel_window, atoms[XA_PDM_CLIENT_PROP], commit 8a8a30ce906cf6af7da54dccc88b04d49bd4c12b Author: Alan Coopersmith <[email protected]> Date: Wed May 23 22:04:52 2012 -0700 Fix XpEventToWire arguments to match what libXext expects Not that it appears to have ever been used, but this shuts up several gcc warnings. Signed-off-by: Alan Coopersmith <[email protected]> diff --git a/src/XpExtUtil.c b/src/XpExtUtil.c index 8d8ee52..30540d0 100644 --- a/src/XpExtUtil.c +++ b/src/XpExtUtil.c @@ -55,7 +55,7 @@ static /* const */ char *xp_extension_name = XP_PRINTNAME; static int XpClose(Display *, XExtCodes *); static char *XpError(Display *, int, XExtCodes *, char *, int); static Bool XpWireToEvent(Display *, XEvent *, xEvent *); -static Status XpEventToWire(Display *, XEvent *, xEvent **, int *); +static Status XpEventToWire(Display *, XEvent *, xEvent *); #define XpCheckExtension(dpy,i,val) \ XextCheckExtension (dpy, i, xp_extension_name, val) @@ -282,8 +282,7 @@ static Status XpEventToWire( Display *dpy, /* pointer to display structure */ XEvent *re, /* pointer to client event */ - xEvent **event, /* wire protocol event */ - int *count) + xEvent *event) /* wire protocol event */ { XExtDisplayInfo *info = (XExtDisplayInfo *) xp_find_display (dpy); @@ -339,6 +338,6 @@ XpEventToWire( #endif /* PRINT_SomeEventExample2 */ default: - return(_XUnknownNativeEvent(dpy, re, *event)); + return(_XUnknownNativeEvent(dpy, re, event)); } } commit 776e739b1690c7de11e50e2ae2a77d98bd69a3d6 Author: Alan Coopersmith <[email protected]> Date: Wed May 23 21:48:59 2012 -0700 Stop trying to use NULL for Status values Fixes gcc errors in 64-bit builds: XpNotifyPdm.c: In function 'XpGetPdmStartParams': XpNotifyPdm.c:234:10: error: cast from pointer to integer of different size XpNotifyPdm.c:271:10: error: cast from pointer to integer of different size XpNotifyPdm.c:286:10: error: cast from pointer to integer of different size Signed-off-by: Alan Coopersmith <[email protected]> diff --git a/src/XpNotifyPdm.c b/src/XpNotifyPdm.c index c1ceb8e..579923c 100644 --- a/src/XpNotifyPdm.c +++ b/src/XpNotifyPdm.c @@ -231,7 +231,7 @@ XpGetPdmStartParams ( /* * Error - cannot determine or establish a selection_display. */ - return( (Status) NULL ); + return( (Status) 0 ); } /* @@ -268,7 +268,7 @@ XpGetPdmStartParams ( XCloseDisplay( *selection_display ); *selection_display = (Display *) NULL; } - return( (Status) NULL ); + return( (Status) 0 ); } status = XmbTextListToTextProperty( *selection_display, list, 6, @@ -283,7 +283,7 @@ XpGetPdmStartParams ( XCloseDisplay( *selection_display ); *selection_display = (Display *) NULL; } - return( (Status) NULL ); + return( (Status) 0 ); } *type = text_prop.encoding; commit f665327b32962ed93e2b03e3e3546d3a163f8012 Author: Alan Coopersmith <[email protected]> Date: Fri Sep 16 22:47:24 2011 -0700 Strip trailing whitespace Performed with: find * -type f | xargs perl -i -p -e 's{[ \t]+$}{}' git diff -w & git diff -b show no diffs from this change Signed-off-by: Alan Coopersmith <[email protected]> diff --git a/Makefile.am b/Makefile.am index 63112ff..90655d5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,6 @@ -# +# # Copyright © 2003 Keith Packard, Noah Levitt -# +# # Permission to use, copy, modify, distribute, and sell this software and its # documentation for any purpose is hereby granted without fee, provided that # the above copyright notice appear in all copies and that both that @@ -10,7 +10,7 @@ # specific, written prior permission. Keith Packard makes no # representations about the suitability of this software for any purpose. It # is provided "as is" without express or implied warranty. -# +# # KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, # INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO # EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR diff --git a/configure.ac b/configure.ac index 419c935..50b029c 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ -dnl +dnl dnl Copyright © 2003 Keith Packard, Noah Levitt -dnl +dnl dnl Permission to use, copy, modify, distribute, and sell this software and its dnl documentation for any purpose is hereby granted without fee, provided that dnl the above copyright notice appear in all copies and that both that @@ -10,7 +10,7 @@ dnl advertising or publicity pertaining to distribution of the software without dnl specific, written prior permission. Keith Packard makes no dnl representations about the suitability of this software for any purpose. It dnl is provided "as is" without express or implied warranty. -dnl +dnl dnl KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, dnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO dnl EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR diff --git a/man/Makefile.am b/man/Makefile.am index 94c387f..c371efe 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -19,7 +19,7 @@ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. -# +# libmandir = $(LIB_MAN_DIR) diff --git a/man/XpCancelDoc.man b/man/XpCancelDoc.man index 5540415..9eb8a34 100644 --- a/man/XpCancelDoc.man +++ b/man/XpCancelDoc.man @@ -7,18 +7,18 @@ .\" Copyright 1996 Fujitsu Limited .\" Copyright 1996 Hitachi, Ltd. .\" Copyright 1996 X Consortium, Inc. -.\" -.\" Permission is hereby granted, free of charge, to any person obtaining a +.\" +.\" Permission is hereby granted, free of charge, to any person obtaining a .\" copy of this software and associated documentation files (the "Software"), -.\" to deal in the Software without restriction, including without limitation +.\" to deal in the Software without restriction, including without limitation .\" the rights to use, copy, modify, merge, publish, distribute, .\" sublicense, and/or sell copies of the Software, and to permit persons .\" to whom the Software is furnished to do so, subject to the following .\" conditions: -.\" +.\" .\" The above copyright notice and this permission notice shall be .\" included in all copies or substantial portions of the Software. -.\" +.\" .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, .\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. @@ -26,7 +26,7 @@ .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR .\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. -.\" +.\" .\" Except as contained in this notice, the names of the copyright holders .\" shall not be used in advertising or otherwise to promote the sale, use .\" or other dealings in this Software without prior written authorization @@ -51,37 +51,37 @@ XpCancelDoc \- Cancels a print document. Specifies a pointer to the Display structure; returned from XOpenDisplay. .TP .I discard -When TRUE, specifies that all XPPrintNotify events with a detail of -XPEndPageNotify or -XPEndDocNotify should be discarded. +When TRUE, specifies that all XPPrintNotify events with a detail of +XPEndPageNotify or +XPEndDocNotify should be discarded. .if n .ti +5n .if t .ti +.5i .SH DESCRIPTION .LP -XpCancelDoc cancels an in-progress document. If the job was started with -output_mode XPGetData -then the data stream to -XpGetDocumentData is interrupted; no further data for the current document will -be generated -but data for subsequent documents can be -generated. For many page description languages such arbitrary termination may -invalidate the +XpCancelDoc cancels an in-progress document. If the job was started with +output_mode XPGetData +then the data stream to +XpGetDocumentData is interrupted; no further data for the current document will +be generated +but data for subsequent documents can be +generated. For many page description languages such arbitrary termination may +invalidate the output. -If the job was started with output_mode XPSpool then depending on the driver and -spooler -implementation the entire document may be +If the job was started with output_mode XPSpool then depending on the driver and +spooler +implementation the entire document may be canceled or a partial document may be generated. -If -.I discard -is True all XPPrintNotify events with a detail field of XPEndPageNotify or -XPEndDocNotify are discarded before XpCancelDoc +If +.I discard +is True all XPPrintNotify events with a detail field of XPEndPageNotify or +XPEndDocNotify are discarded before XpCancelDoc returns. -For clients selecting XPPrintMask (see XpSelectInput), the event XPPrintNotify -will be -generated with its detail field set to +For clients selecting XPPrintMask (see XpSelectInput), the event XPPrintNotify +will be +generated with its detail field set to XPEndDocNotify. .SH DIAGNOSTICS .TP 15 @@ -89,9 +89,9 @@ XPEndDocNotify. A valid print context-id has not been set prior to making this call. .TP 15 .SM XPBadSequence -The function was not called in the proper order with respect to the other X -Print Service -Extension calls (example, XpEndDoc prior to +The function was not called in the proper order with respect to the other X +Print Service +Extension calls (example, XpEndDoc prior to XpStartDoc). .SH "SEE ALSO" .BR XpEndDoc (3Xp), diff --git a/man/XpCancelJob.man b/man/XpCancelJob.man index 6c6df54..c7ddc23 100644 --- a/man/XpCancelJob.man +++ b/man/XpCancelJob.man @@ -7,18 +7,18 @@ .\" Copyright 1996 Fujitsu Limited .\" Copyright 1996 Hitachi, Ltd. .\" Copyright 1996 X Consortium, Inc. -.\" -.\" Permission is hereby granted, free of charge, to any person obtaining a +.\" +.\" Permission is hereby granted, free of charge, to any person obtaining a .\" copy of this software and associated documentation files (the "Software"), -.\" to deal in the Software without restriction, including without limitation +.\" to deal in the Software without restriction, including without limitation .\" the rights to use, copy, modify, merge, publish, distribute, .\" sublicense, and/or sell copies of the Software, and to permit persons .\" to whom the Software is furnished to do so, subject to the following .\" conditions: -.\" +.\" .\" The above copyright notice and this permission notice shall be .\" included in all copies or substantial portions of the Software. -.\" +.\" .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, .\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. @@ -26,7 +26,7 @@ .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR .\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. -.\" +.\" .\" Except as contained in this notice, the names of the copyright holders .\" shall not be used in advertising or otherwise to promote the sale, use .\" or other dealings in this Software without prior written authorization @@ -37,10 +37,10 @@ XpCancelJob \- Cancels a single print job. .SH SYNOPSIS .br - cc [ flag... ] file... -lXp [ library... ] + cc [ flag... ] file... -lXp [ library... ] .br #include <X11/extensions/Print.h> -.LP +.LP .B void XpCancelJob ( .I display, @@ -62,22 +62,22 @@ Specifies a pointer to the Display structure; returned from XOpenDisplay. When TRUE, specifies that all XPPrintNotify events should be discarded. .SH DESCRIPTION .LP -XpCancelJob cancels an in-progress job. If the job was started with output_mode -XPGetData then the data stream to XpGetDocumentData is terminated. For many -page description languages such arbitrary termination may invalidate the +XpCancelJob cancels an in-progress job. If the job was started with output_mode +XPGetData then the data stream to XpGetDocumentData is terminated. For many +page description languages such arbitrary termination may invalidate the output. -If the job was started with output_mode XPSpool then depending on the driver -and spooler configuration the entire job may be canceled or a partial job may +If the job was started with output_mode XPSpool then depending on the driver +and spooler configuration the entire job may be canceled or a partial job may be generated. -If -.I discard -is TRUE, all XPPrintNotify events with a detail field of -XPEndPageNotify, XPEndDocNotify, or XPEndJobNotify are discarded before +If +.I discard +is TRUE, all XPPrintNotify events with a detail field of +XPEndPageNotify, XPEndDocNotify, or XPEndJobNotify are discarded before XpCancelJob returns. -For clients selecting XPPrintMask (see XpSelectInput), the event XPPrintNotify +For clients selecting XPPrintMask (see XpSelectInput), the event XPPrintNotify will be generated with its detail field set to XPEndJobNotify. .SH DIAGNOSTICS .TP 15 @@ -85,7 +85,7 @@ will be generated with its detail field set to XPEndJobNotify. A valid print context-id has not been set prior to making this call. .TP 15 .SM XPBadSequence -The function was not called in the proper order with respect to the other X +The function was not called in the proper order with respect to the other X Print Service Extension calls (for example, XpEndJob prior to XpStartJob). .SH "SEE ALSO" .BR XpEndJob (3Xp), diff --git a/man/XpCancelPage.man b/man/XpCancelPage.man index 207f37e..1566b84 100644 --- a/man/XpCancelPage.man +++ b/man/XpCancelPage.man @@ -7,18 +7,18 @@ .\" Copyright 1996 Fujitsu Limited .\" Copyright 1996 Hitachi, Ltd. .\" Copyright 1996 X Consortium, Inc. -.\" -.\" Permission is hereby granted, free of charge, to any person obtaining a +.\" +.\" Permission is hereby granted, free of charge, to any person obtaining a .\" copy of this software and associated documentation files (the "Software"), -.\" to deal in the Software without restriction, including without limitation +.\" to deal in the Software without restriction, including without limitation .\" the rights to use, copy, modify, merge, publish, distribute, .\" sublicense, and/or sell copies of the Software, and to permit persons .\" to whom the Software is furnished to do so, subject to the following .\" conditions: -.\" +.\" .\" The above copyright notice and this permission notice shall be .\" included in all copies or substantial portions of the Software. -.\" +.\" .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, .\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. @@ -26,7 +26,7 @@ .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR .\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. -.\" +.\" .\" Except as contained in this notice, the names of the copyright holders .\" shall not be used in advertising or otherwise to promote the sale, use .\" or other dealings in this Software without prior written authorization @@ -37,13 +37,13 @@ XpCancelPage \- Cancels a print page. .SH SYNOPSIS .br - cc [ flag... ] file... -lXp [ library... ] + cc [ flag... ] file... -lXp [ library... ] .br #include <X11/extensions/Print.h> -.LP +.LP .B void XpCancelPage ( -.I display, +.I display, .I discard ) .br @@ -58,36 +58,36 @@ XpCancelPage \- Cancels a print page. Specifies a pointer to the Display structure; returned from XOpenDisplay. .TP .I discard -When TRUE, specifies that XPPrintNotify events with a detail of XPEndPageNotify +When TRUE, specifies that XPPrintNotify events with a detail of XPEndPageNotify should be discarded. .SH DESCRIPTION .LP -XpCancelPage cancels an in-progress print page. If the job was started with -output_mode XPGetData then the data stream to XpGetDocumentData is interrupted; -no -further data for the current page is generated but data for subsequent pages can -be generated. For many page description languages, such arbitrary interruptions +XpCancelPage cancels an in-progress print page. If the job was started with +output_mode XPGetData then the data stream to XpGetDocumentData is interrupted; +no +further data for the current page is generated but data for subsequent pages can +be generated. For many page description languages, such arbitrary interruptions may invalidate the output. -If the job was started with output_mode XPSpool then depending on the driver and -spooler implementation the +If the job was started with output_mode XPSpool then depending on the driver and +spooler implementation the entire page may be canceled or a partial page may be generated. -If -.I discard -is True all XPPrintNotify events with a detail field of XPEndPageNotify +If +.I discard +is True all XPPrintNotify events with a detail field of XPEndPageNotify are discarded before XpCancelPage returns. -For clients selecting XPPrintMask (see XpSelectInput), the event XPPrintNotify -is -generated with its detail field set to XPEndPageNotify when the X Print Server -has -completed XpCancelPage. +For clients selecting XPPrintMask (see XpSelectInput), the event XPPrintNotify +is +generated with its detail field set to XPEndPageNotify when the X Print Server +has +completed XpCancelPage. .SH DIAGNOSTICS .TP 15 .SM XPBadSequence -The function was not called in the proper order with respect to the -other X Print Service Extension calls; for example, XpStartPage was +The function was not called in the proper order with respect to the +other X Print Service Extension calls; for example, XpStartPage was called before XpStartJob or was called for a type XPDocRaw document. .SH "SEE ALSO" .BR XpGetDocumentData (3Xp), diff --git a/man/XpCreateContext.man b/man/XpCreateContext.man index 8c1bb0f..76c9e2a 100644 --- a/man/XpCreateContext.man +++ b/man/XpCreateContext.man @@ -7,18 +7,18 @@ .\" Copyright 1996 Fujitsu Limited .\" Copyright 1996 Hitachi, Ltd. .\" Copyright 1996 X Consortium, Inc. -.\" -.\" Permission is hereby granted, free of charge, to any person obtaining a +.\" +.\" Permission is hereby granted, free of charge, to any person obtaining a .\" copy of this software and associated documentation files (the "Software"), -.\" to deal in the Software without restriction, including without limitation +.\" to deal in the Software without restriction, including without limitation .\" the rights to use, copy, modify, merge, publish, distribute, .\" sublicense, and/or sell copies of the Software, and to permit persons .\" to whom the Software is furnished to do so, subject to the following .\" conditions: -.\" +.\" .\" The above copyright notice and this permission notice shall be .\" included in all copies or substantial portions of the Software. -.\" +.\" .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, .\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. @@ -26,7 +26,7 @@ .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: http://lists.debian.org/[email protected]

