diff options
author | Kaleb Keithley <kaleb@freedesktop.org> | 2003-11-25 19:26:57 +0000 |
---|---|---|
committer | Kaleb Keithley <kaleb@freedesktop.org> | 2003-11-25 19:26:57 +0000 |
commit | ac8f15d8622a23dd57928f1c40da5ecafbb31492 (patch) | |
tree | b465a0b386ce699c33c736b3a341a183901f7f17 | |
parent | 917de4a98eeb9a7eafeab7ddd8e1b1ae6aae6514 (diff) |
XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folksxf86-4_3_99_16
403 files changed, 7300 insertions, 14986 deletions
diff --git a/include/X11/ImUtil.h b/include/X11/ImUtil.h new file mode 100644 index 0000000..3a00e3c --- /dev/null +++ b/include/X11/ImUtil.h @@ -0,0 +1,31 @@ +/* $XFree86: xc/lib/X11/ImUtil.h,v 1.3 2003/04/23 22:04:58 torrey Exp $ */ + +#ifndef _IMUTIL_H_ +#define _IMUTIL_H_ + +extern int +_XGetScanlinePad( + Display *dpy, + int depth); + +extern int +_XGetBitsPerPixel( + Display *dpy, + int depth); + +extern int +_XSetImage( + XImage *srcimg, + register XImage *dstimg, + register int x, + register int y); + +extern int +_XReverse_Bytes( + register unsigned char *bpt, + register int nb); +extern void +_XInitImageFuncPtrs( + register XImage *image); + +#endif /* _IMUTIL_H_ */ diff --git a/include/X11/XKBlib.h b/include/X11/XKBlib.h index abeb92b..ac79475 100644 --- a/include/X11/XKBlib.h +++ b/include/X11/XKBlib.h @@ -24,7 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/X11/XKBlib.h,v 3.3 2001/08/01 00:44:38 tsi Exp $ */ +/* $XFree86: xc/lib/X11/XKBlib.h,v 3.6 2003/11/17 22:20:10 dawes Exp $ */ #ifndef _XKBLIB_H_ #define _XKBLIB_H_ @@ -295,86 +295,67 @@ typedef struct _XkbKbdDpyState XkbKbdDpyStateRec,*XkbKbdDpyStatePtr; _XFUNCPROTOBEGIN extern Bool XkbIgnoreExtension( -#if NeedFunctionPrototypes Bool /* ignore */ -#endif ); extern Display *XkbOpenDisplay( -#if NeedFunctionPrototypes char * /* name */, int * /* ev_rtrn */, int * /* err_rtrn */, int * /* major_rtrn */, int * /* minor_rtrn */, int * /* reason */ -#endif ); extern Bool XkbQueryExtension( -#if NeedFunctionPrototypes Display * /* dpy */, int * /* opcodeReturn */, int * /* eventBaseReturn */, int * /* errorBaseReturn */, int * /* majorRtrn */, int * /* minorRtrn */ -#endif ); extern Bool XkbUseExtension( -#if NeedFunctionPrototypes Display * /* dpy */, int * /* major_rtrn */, int * /* minor_rtrn */ -#endif ); extern Bool XkbLibraryVersion( -#if NeedFunctionPrototypes int * /* libMajorRtrn */, int * /* libMinorRtrn */ -#endif ); extern unsigned int XkbSetXlibControls( -#if NeedFunctionPrototypes Display* /* dpy */, unsigned int /* affect */, unsigned int /* values */ -#endif ); extern unsigned int XkbGetXlibControls( -#if NeedFunctionPrototypes Display* /* dpy */ -#endif ); +extern unsigned int XkbXlibControlsImplemented(void); + typedef Atom (*XkbInternAtomFunc)( -#if NeedFunctionPrototypes Display * /* dpy */, _Xconst char * /* name */, Bool /* only_if_exists */ -#endif ); typedef char * (*XkbGetAtomNameFunc)( -#if NeedFunctionPrototypes Display * /* dpy */, Atom /* atom */ -#endif ); extern void XkbSetAtomFuncs( -#if NeedFunctionPrototypes XkbInternAtomFunc /* getAtom */, XkbGetAtomNameFunc /* getName */ -#endif ); extern KeySym XkbKeycodeToKeysym( -#if NeedFunctionPrototypes Display * /* dpy */, #if NeedWidePrototypes unsigned int /* kc */, @@ -383,87 +364,69 @@ extern KeySym XkbKeycodeToKeysym( #endif int /* group */, int /* level */ -#endif ); extern unsigned int XkbKeysymToModifiers( -#if NeedFunctionPrototypes Display * /* dpy */, KeySym /* ks */ -#endif ); extern Bool XkbLookupKeySym( -#if NeedFunctionPrototypes Display * /* dpy */, KeyCode /* keycode */, unsigned int /* modifiers */, unsigned int * /* modifiers_return */, KeySym * /* keysym_return */ -#endif ); extern int XkbLookupKeyBinding( -#if NeedFunctionPrototypes Display * /* dpy */, KeySym /* sym_rtrn */, unsigned int /* mods */, char * /* buffer */, int /* nbytes */, int * /* extra_rtrn */ -#endif ); extern Bool XkbTranslateKeyCode( -#if NeedFunctionPrototypes XkbDescPtr /* xkb */, KeyCode /* keycode */, unsigned int /* modifiers */, unsigned int * /* modifiers_return */, KeySym * /* keysym_return */ -#endif ); extern int XkbTranslateKeySym( -#if NeedFunctionPrototypes Display * /* dpy */, register KeySym * /* sym_return */, unsigned int /* modifiers */, char * /* buffer */, int /* nbytes */, int * /* extra_rtrn */ -#endif ); extern Bool XkbSetAutoRepeatRate( -#if NeedFunctionPrototypes Display * /* dpy */, unsigned int /* deviceSpec */, unsigned int /* delay */, unsigned int /* interval */ -#endif ); extern Bool XkbGetAutoRepeatRate( -#if NeedFunctionPrototypes Display * /* dpy */, unsigned int /* deviceSpec */, unsigned int * /* delayRtrn */, unsigned int * /* intervalRtrn */ -#endif ); extern Bool XkbChangeEnabledControls( -#if NeedFunctionPrototypes Display * /* dpy */, unsigned int /* deviceSpec */, unsigned int /* affect */, unsigned int /* values */ -#endif ); extern Bool XkbDeviceBell( -#if NeedFunctionPrototypes Display * /* dpy */, Window /* win */, int /* deviceSpec */, @@ -471,21 +434,17 @@ extern Bool XkbDeviceBell( int /* bellID */, int /* percent */, Atom /* name */ -#endif ); extern Bool XkbForceDeviceBell( -#if NeedFunctionPrototypes Display * /* dpy */, int /* deviceSpec */, int /* bellClass */, int /* bellID */, int /* percent */ -#endif ); extern Bool XkbDeviceBellEvent( -#if NeedFunctionPrototypes Display * /* dpy */, Window /* win */, int /* deviceSpec */, @@ -493,101 +452,78 @@ extern Bool XkbDeviceBellEvent( int /* bellID */, int /* percent */, Atom /* name */ -#endif ); extern Bool XkbBell( -#if NeedFunctionPrototypes Display * /* dpy */, Window /* win */, int /* percent */, Atom /* name */ -#endif ); extern Bool XkbForceBell( -#if NeedFunctionPrototypes Display * /* dpy */, int /* percent */ -#endif ); extern Bool XkbBellEvent( -#if NeedFunctionPrototypes Display * /* dpy */, Window /* win */, int /* percent */, Atom /* name */ -#endif ); extern Bool XkbSelectEvents( -#if NeedFunctionPrototypes Display * /* dpy */, unsigned int /* deviceID */, unsigned int /* affect */, unsigned int /* values */ -#endif ); extern Bool XkbSelectEventDetails( -#if NeedFunctionPrototypes Display * /* dpy */, unsigned int /* deviceID */, unsigned int /* eventType */, unsigned long /* affect */, unsigned long /* details */ -#endif ); extern void XkbNoteMapChanges( -#if NeedFunctionPrototypes XkbMapChangesPtr /* old */, XkbMapNotifyEvent * /* new */, unsigned int /* wanted */ -#endif ); extern void XkbNoteNameChanges( -#if NeedFunctionPrototypes XkbNameChangesPtr /* old */, XkbNamesNotifyEvent * /* new */, unsigned int /* wanted */ -#endif ); extern Status XkbGetIndicatorState( -#if NeedFunctionPrototypes Display * /* dpy */, unsigned int /* deviceSpec */, unsigned int * /* pStateRtrn */ -#endif ); extern Status XkbGetDeviceIndicatorState( -#if NeedFunctionPrototypes Display * /* dpy */, unsigned int /* deviceSpec */, unsigned int /* ledClass */, unsigned int /* ledID */, unsigned int * /* pStateRtrn */ -#endif ); extern Status XkbGetIndicatorMap( -#if NeedFunctionPrototypes Display * /* dpy */, unsigned long /* which */, XkbDescPtr /* desc */ -#endif ); extern Bool XkbSetIndicatorMap( -#if NeedFunctionPrototypes Display * /* dpy */, unsigned long /* which */, XkbDescPtr /* desc */ -#endif ); #define XkbNoteIndicatorMapChanges(o,n,w) \ @@ -600,18 +536,15 @@ extern Bool XkbSetIndicatorMap( (XkbSetIndicatorMap((d),(c)->map_changes,x)) extern Bool XkbGetNamedIndicator( -#if NeedFunctionPrototypes Display * /* dpy */, Atom /* name */, int * /* pNdxRtrn */, Bool * /* pStateRtrn */, XkbIndicatorMapPtr /* pMapRtrn */, Bool * /* pRealRtrn */ -#endif ); extern Bool XkbGetNamedDeviceIndicator( -#if NeedFunctionPrototypes Display * /* dpy */, unsigned int /* deviceSpec */, unsigned int /* ledClass */, @@ -621,22 +554,18 @@ extern Bool XkbGetNamedDeviceIndicator( Bool * /* pStateRtrn */, XkbIndicatorMapPtr /* pMapRtrn */, Bool * /* pRealRtrn */ -#endif ); extern Bool XkbSetNamedIndicator( -#if NeedFunctionPrototypes Display * /* dpy */, Atom /* name */, Bool /* changeState */, Bool /* state */, Bool /* createNewMap */, XkbIndicatorMapPtr /* pMap */ -#endif ); extern Bool XkbSetNamedDeviceIndicator( -#if NeedFunctionPrototypes Display * /* dpy */, unsigned int /* deviceSpec */, unsigned int /* ledClass */, @@ -646,696 +575,548 @@ extern Bool XkbSetNamedDeviceIndicator( Bool /* state */, Bool /* createNewMap */, XkbIndicatorMapPtr /* pMap */ -#endif ); extern Bool XkbLockModifiers( -#if NeedFunctionPrototypes Display * /* dpy */, unsigned int /* deviceSpec */, unsigned int /* affect */, unsigned int /* values */ -#endif ); extern Bool XkbLatchModifiers( -#if NeedFunctionPrototypes Display * /* dpy */, unsigned int /* deviceSpec */, unsigned int /* affect */, unsigned int /* values */ -#endif ); extern Bool XkbLockGroup( -#if NeedFunctionPrototypes Display * /* dpy */, unsigned int /* deviceSpec */, unsigned int /* group */ -#endif ); extern Bool XkbLatchGroup( -#if NeedFunctionPrototypes Display * /* dpy */, unsigned int /* deviceSpec */, unsigned int /* group */ -#endif ); extern Bool XkbSetServerInternalMods( -#if NeedFunctionPrototypes Display * /* dpy */, unsigned int /* deviceSpec */, unsigned int /* affectReal */, unsigned int /* realValues */, unsigned int /* affectVirtual */, unsigned int /* virtualValues */ -#endif ); extern Bool XkbSetIgnoreLockMods( -#if NeedFunctionPrototypes Display * /* dpy */, unsigned int /* deviceSpec */, unsigned int /* affectReal */, unsigned int /* realValues */, unsigned int /* affectVirtual */, unsigned int /* virtualValues */ -#endif ); extern Bool XkbVirtualModsToReal( -#if NeedFunctionPrototypes XkbDescPtr /* xkb */, unsigned int /* virtual_mask */, unsigned int * /* mask_rtrn */ -#endif ); extern Bool XkbComputeEffectiveMap( -#if NeedFunctionPrototypes XkbDescPtr /* xkb */, XkbKeyTypePtr /* type */, unsigned char * /* map_rtrn */ -#endif ); extern Status XkbInitCanonicalKeyTypes( -#if NeedFunctionPrototypes XkbDescPtr /* xkb */, unsigned int /* which */, int /* keypadVMod */ -#endif ); extern XkbDescPtr XkbAllocKeyboard( -#if NeedFunctionPrototypes void -#endif ); extern void XkbFreeKeyboard( -#if NeedFunctionPrototypes XkbDescPtr /* xkb */, unsigned int /* which */, Bool /* freeDesc */ -#endif ); extern Status XkbAllocClientMap( -#if NeedFunctionPrototypes XkbDescPtr /* xkb */, unsigned int /* which */, unsigned int /* nTypes */ -#endif ); extern Status XkbAllocServerMap( -#if NeedFunctionPrototypes XkbDescPtr /* xkb */, unsigned int /* which */, unsigned int /* nActions */ -#endif ); extern void XkbFreeClientMap( -#if NeedFunctionPrototypes XkbDescPtr /* xkb */, unsigned int /* what */, Bool /* freeMap */ -#endif ); extern void XkbFreeServerMap( -#if NeedFunctionPrototypes XkbDescPtr /* xkb */, unsigned int /* what */, Bool /* freeMap */ -#endif ); extern XkbKeyTypePtr XkbAddKeyType( -#if NeedFunctionPrototypes XkbDescPtr /* xkb */, Atom /* name */, int /* map_count */, Bool /* want_preserve */, int /* num_lvls */ -#endif ); extern Status XkbAllocIndicatorMaps( -#if NeedFunctionPrototypes XkbDescPtr /* xkb */ -#endif ); extern void XkbFreeIndicatorMaps( -#if NeedFunctionPrototypes XkbDescPtr /* xkb */ -#endif ); extern XkbDescPtr XkbGetMap( -#if NeedFunctionPrototypes Display * /* dpy */, unsigned int /* which */, unsigned int /* deviceSpec */ -#endif ); extern Status XkbGetUpdatedMap( -#if NeedFunctionPrototypes Display * /* dpy */, unsigned int /* which */, XkbDescPtr /* desc */ -#endif ); extern Status XkbGetMapChanges( -#if NeedFunctionPrototypes Display * /* dpy */, XkbDescPtr /* xkb */, XkbMapChangesPtr /* changes */ -#endif ); extern Status XkbRefreshKeyboardMapping( -#if NeedFunctionPrototypes XkbMapNotifyEvent * /* event */ -#endif ); extern Status XkbGetKeyTypes( -#if NeedFunctionPrototypes Display * /* dpy */, unsigned int /* first */, unsigned int /* num */, XkbDescPtr /* xkb */ -#endif ); extern Status XkbGetKeySyms( -#if NeedFunctionPrototypes Display * /* dpy */, unsigned int /* first */, unsigned int /* num */, XkbDescPtr /* xkb */ -#endif ); extern Status XkbGetKeyActions( -#if NeedFunctionPrototypes Display * /* dpy */, unsigned int /* first */, unsigned int /* num */, XkbDescPtr /* xkb */ -#endif ); extern Status XkbGetKeyBehaviors( -#if NeedFunctionPrototypes Display * /* dpy */, unsigned int /* firstKey */, unsigned int /* nKeys */, XkbDescPtr /* desc */ -#endif ); extern Status XkbGetVirtualMods( -#if NeedFunctionPrototypes Display * /* dpy */, unsigned int /* which */, XkbDescPtr /* desc */ -#endif ); extern Status XkbGetKeyExplicitComponents( -#if NeedFunctionPrototypes Display * /* dpy */, unsigned int /* firstKey */, unsigned int /* nKeys */, XkbDescPtr /* desc */ -#endif ); extern Status XkbGetKeyModifierMap( -#if NeedFunctionPrototypes Display * /* dpy */, unsigned int /* firstKey */, unsigned int /* nKeys */, XkbDescPtr /* desc */ -#endif +); + +extern Status XkbGetKeyVirtualModMap( + Display * /* dpy */, + unsigned int /* first */, + unsigned int /* num */, + XkbDescPtr /* xkb */ ); extern Status XkbAllocControls( -#if NeedFunctionPrototypes XkbDescPtr /* xkb */, unsigned int /* which*/ -#endif ); extern void XkbFreeControls( -#if NeedFunctionPrototypes XkbDescPtr /* xkb */, unsigned int /* which */, Bool /* freeMap */ -#endif ); extern Status XkbGetControls( -#if NeedFunctionPrototypes Display * /* dpy */, unsigned long /* which */, XkbDescPtr /* desc */ -#endif ); extern Bool XkbSetControls( -#if NeedFunctionPrototypes Display * /* dpy */, unsigned long /* which */, XkbDescPtr /* desc */ -#endif ); extern void XkbNoteControlsChanges( -#if NeedFunctionPrototypes XkbControlsChangesPtr /* old */, XkbControlsNotifyEvent * /* new */, unsigned int /* wanted */ -#endif ); #define XkbGetControlsChanges(d,x,c) XkbGetControls(d,(c)->changed_ctrls,x) #define XkbChangeControls(d,x,c) XkbSetControls(d,(c)->changed_ctrls,x) extern Status XkbAllocCompatMap( -#if NeedFunctionPrototypes XkbDescPtr /* xkb */, unsigned int /* which */, unsigned int /* nInterpret */ -#endif ); extern void XkbFreeCompatMap( -#if NeedFunctionPrototypes XkbDescPtr /* xkb */, unsigned int /* which */, Bool /* freeMap */ -#endif ); extern Status XkbGetCompatMap( -#if NeedFunctionPrototypes Display * /* dpy */, unsigned int /* which */, XkbDescPtr /* xkb */ -#endif ); extern Bool XkbSetCompatMap( -#if NeedFunctionPrototypes Display * /* dpy */, unsigned int /* which */, XkbDescPtr /* xkb */, Bool /* updateActions */ -#endif ); extern XkbSymInterpretPtr XkbAddSymInterpret( -#if NeedFunctionPrototypes XkbDescPtr /* xkb */, XkbSymInterpretPtr /* si */, Bool /* updateMap */, XkbChangesPtr /* changes */ -#endif ); extern Status XkbAllocNames( -#if NeedFunctionPrototypes XkbDescPtr /* xkb */, unsigned int /* which */, int /* nTotalRG */, int /* nTotalAliases */ -#endif ); extern Status XkbGetNames( -#if NeedFunctionPrototypes Display * /* dpy */, unsigned int /* which */, XkbDescPtr /* desc */ -#endif ); extern Bool XkbSetNames( -#if NeedFunctionPrototypes Display * /* dpy */, unsigned int /* which */, unsigned int /* firstType */, unsigned int /* nTypes */, XkbDescPtr /* desc */ -#endif ); extern Bool XkbChangeNames( -#if NeedFunctionPrototypes Display * /* dpy */, XkbDescPtr /* xkb */, XkbNameChangesPtr /* changes */ -#endif ); extern void XkbFreeNames( -#if NeedFunctionPrototypes XkbDescPtr /* xkb */, unsigned int /* which */, Bool /* freeMap */ -#endif ); extern Status XkbGetState( -#if NeedFunctionPrototypes Display * /* dpy */, unsigned int /* deviceSpec */, XkbStatePtr /* rtrnState */ -#endif ); extern Bool XkbSetMap( -#if NeedFunctionPrototypes Display * /* dpy */, unsigned int /* which */, XkbDescPtr /* desc */ -#endif ); extern Bool XkbChangeMap( -#if NeedFunctionPrototypes Display* /* dpy */, XkbDescPtr /* desc */, XkbMapChangesPtr /* changes */ -#endif ); extern Bool XkbSetDetectableAutoRepeat( -#if NeedFunctionPrototypes Display * /* dpy */, Bool /* detectable */, Bool * /* supported */ -#endif ); extern Bool XkbGetDetectableAutoRepeat( -#if NeedFunctionPrototypes Display * /* dpy */, Bool * /* supported */ -#endif ); extern Bool XkbSetAutoResetControls( -#if NeedFunctionPrototypes Display * /* dpy */, unsigned int /* changes */, unsigned int * /* auto_ctrls */, unsigned int * /* auto_values */ -#endif ); extern Bool XkbGetAutoResetControls( -#if NeedFunctionPrototypes Display * /* dpy */, unsigned int * /* auto_ctrls */, unsigned int * /* auto_ctrl_values */ -#endif ); extern Bool XkbSetPerClientControls( -#if NeedFunctionPrototypes Display * /* dpy */, unsigned int /* change */, unsigned int * /* values */ -#endif ); extern Bool XkbGetPerClientControls( -#if NeedFunctionPrototypes Display * /* dpy */, unsigned int * /* ctrls */ -#endif ); extern Status XkbCopyKeyType( -#if NeedFunctionPrototypes XkbKeyTypePtr /* from */, XkbKeyTypePtr /* into */ -#endif ); extern Status XkbCopyKeyTypes( -#if NeedFunctionPrototypes XkbKeyTypePtr /* from */, XkbKeyTypePtr /* into */, int /* num_types */ -#endif ); extern Status XkbResizeKeyType( -#if NeedFunctionPrototypes XkbDescPtr /* xkb */, int /* type_ndx */, int /* map_count */, Bool /* want_preserve */, int /* new_num_lvls */ -#endif ); extern KeySym *XkbResizeKeySyms( -#if NeedFunctionPrototypes XkbDescPtr /* desc */, int /* forKey */, int /* symsNeeded */ -#endif ); extern XkbAction *XkbResizeKeyActions( -#if NeedFunctionPrototypes XkbDescPtr /* desc */, int /* forKey */, int /* actsNeeded */ -#endif ); extern Status XkbChangeTypesOfKey( -#if NeedFunctionPrototypes XkbDescPtr /* xkb */, int /* key */, int /* num_groups */, unsigned int /* groups */, int * /* newTypes */, XkbMapChangesPtr /* pChanges */ -#endif +); + +extern Status XkbChangeKeycodeRange( + XkbDescPtr /* xkb */, + int /* minKC */, + int /* maxKC */, + XkbChangesPtr /* changes */ ); /***====================================================================***/ extern XkbComponentListPtr XkbListComponents( -#if NeedFunctionPrototypes Display * /* dpy */, unsigned int /* deviceSpec */, XkbComponentNamesPtr /* ptrns */, int * /* max_inout */ -#endif ); extern void XkbFreeComponentList( -#if NeedFunctionPrototypes XkbComponentListPtr /* list */ -#endif ); extern XkbDescPtr XkbGetKeyboard( -#if NeedFunctionPrototypes Display * /* dpy */, unsigned int /* which */, unsigned int /* deviceSpec */ -#endif ); extern XkbDescPtr XkbGetKeyboardByName( -#if NeedFunctionPrototypes Display * /* dpy */, unsigned int /* deviceSpec */, XkbComponentNamesPtr /* names */, unsigned int /* want */, unsigned int /* need */, Bool /* load */ -#endif ); /***====================================================================***/ extern int XkbKeyTypesForCoreSymbols( /* returns # of groups */ -#if NeedFunctionPrototypes XkbDescPtr /* xkb */, /* keyboard device */ int /* map_width */, /* width of core KeySym array */ KeySym * /* core_syms */, /* always mapWidth symbols */ unsigned int /* protected */, /* explicit key types */ int * /* types_inout */, /* always four type indices */ KeySym * /* xkb_syms_rtrn */ /* must have enough space */ -#endif ); extern Bool XkbApplyCompatMapToKey( /* False only on error */ -#if NeedFunctionPrototypes XkbDescPtr /* xkb */, /* keymap to be edited */ KeyCode /* key */, /* key to be updated */ XkbChangesPtr /* changes */ /* resulting changes to map */ -#endif ); extern Bool XkbUpdateMapFromCore( /* False only on error */ -#if NeedFunctionPrototypes XkbDescPtr /* xkb */, /* XKB keyboard to be edited */ KeyCode /* first_key */, /* first changed key */ int /* num_keys */, /* number of changed keys */ int /* map_width */, /* width of core keymap */ KeySym * /* core_keysyms */, /* symbols from core keymap */ XkbChangesPtr /* changes */ /* resulting changes */ -#endif ); /***====================================================================***/ extern XkbDeviceLedInfoPtr XkbAddDeviceLedInfo( -#if NeedFunctionPrototypes XkbDeviceInfoPtr /* devi */, unsigned int /* ledClass */, unsigned int /* ledId */ -#endif ); extern Status XkbResizeDeviceButtonActions( -#if NeedFunctionPrototypes XkbDeviceInfoPtr /* devi */, unsigned int /* newTotal */ -#endif ); extern XkbDeviceInfoPtr XkbAllocDeviceInfo( -#if NeedFunctionPrototypes unsigned int /* deviceSpec */, unsigned int /* nButtons */, unsigned int /* szLeds */ -#endif ); extern void XkbFreeDeviceInfo( -#if NeedFunctionPrototypes XkbDeviceInfoPtr /* devi */, unsigned int /* which */, Bool /* freeDevI */ -#endif ); extern void XkbNoteDeviceChanges( -#if NeedFunctionPrototypes XkbDeviceChangesPtr /* old */, XkbExtensionDeviceNotifyEvent * /* new */, unsigned int /* wanted */ -#endif ); extern XkbDeviceInfoPtr XkbGetDeviceInfo( -#if NeedFunctionPrototypes Display * /* dpy */, unsigned int /* which */, unsigned int /* deviceSpec */, unsigned int /* ledClass */, unsigned int /* ledID */ -#endif ); extern Status XkbGetDeviceInfoChanges( -#if NeedFunctionPrototypes Display * /* dpy */, XkbDeviceInfoPtr /* devi */, XkbDeviceChangesPtr /* changes */ -#endif ); extern Status XkbGetDeviceButtonActions( -#if NeedFunctionPrototypes Display * /* dpy */, XkbDeviceInfoPtr /* devi */, Bool /* all */, unsigned int /* first */, unsigned int /* nBtns */ -#endif ); extern Status XkbGetDeviceLedInfo( -#if NeedFunctionPrototypes Display * /* dpy */, XkbDeviceInfoPtr /* devi */, unsigned int /* ledClass (class, XIDflt, XIAll) */, unsigned int /* ledId (id, XIDflt, XIAll) */, unsigned int /* which (XkbXI_Indicator{Names,Map}Mask */ -#endif ); extern Bool XkbSetDeviceInfo( -#if NeedFunctionPrototypes Display * /* dpy */, unsigned int /* which */, XkbDeviceInfoPtr /* devi */ -#endif ); extern Bool XkbChangeDeviceInfo( -#if NeedFunctionPrototypes Display* /* dpy */, XkbDeviceInfoPtr /* desc */, XkbDeviceChangesPtr /* changes */ -#endif ); extern Bool XkbSetDeviceLedInfo( -#if NeedFunctionPrototypes Display * /* dpy */, XkbDeviceInfoPtr /* devi */, unsigned int /* ledClass */, unsigned int /* ledID */, unsigned int /* which */ -#endif ); extern Bool XkbSetDeviceButtonActions( -#if NeedFunctionPrototypes Display * /* dpy */, XkbDeviceInfoPtr /* devi */, unsigned int /* first */, unsigned int /* nBtns */ -#endif ); /***====================================================================***/ extern char XkbToControl( -#if NeedFunctionPrototypes char /* c */ -#endif ); /***====================================================================***/ extern Bool XkbSetDebuggingFlags( -#if NeedFunctionPrototypes Display * /* dpy */, unsigned int /* mask */, unsigned int /* flags */, @@ -1344,15 +1125,25 @@ extern Bool XkbSetDebuggingFlags( unsigned int /* ctrls */, unsigned int * /* rtrn_flags */, unsigned int * /* rtrn_ctrls */ -#endif ); extern Bool XkbApplyVirtualModChanges( -#if NeedFunctionPrototypes XkbDescPtr /* xkb */, unsigned int /* changed */, XkbChangesPtr /* changes */ -#endif +); + +extern Bool XkbUpdateActionVirtualMods( + XkbDescPtr /* xkb */, + XkbAction * /* act */, + unsigned int /* changed */ +); + +extern void XkbUpdateKeyTypeVirtualMods( + XkbDescPtr /* xkb */, + XkbKeyTypePtr /* type */, + unsigned int /* changed */, + XkbChangesPtr /* changes */ ); _XFUNCPROTOEND diff --git a/include/X11/Xcms.h b/include/X11/Xcms.h index 4b71af4..b761808 100644 --- a/include/X11/Xcms.h +++ b/include/X11/Xcms.h @@ -27,7 +27,7 @@ * DESCRIPTION * Public include file for X Color Management System */ -/* $XFree86: xc/lib/X11/Xcms.h,v 1.5 2001/01/17 19:41:49 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Xcms.h,v 1.8 2003/11/17 22:20:10 dawes Exp $ */ #ifndef _XCMS_H_ #define _XCMS_H_ @@ -200,17 +200,14 @@ typedef struct _XcmsPerScrnInfo { typedef struct _XcmsCCC *XcmsCCC; typedef Status (*XcmsCompressionProc)( /* Gamut Compression Proc */ -#if NeedFunctionPrototypes XcmsCCC /* ccc */, XcmsColor* /* colors_in_out */, unsigned int /* ncolors */, unsigned int /* index */, Bool* /* compression_flags_return */ -#endif ); typedef Status (*XcmsWhiteAdjustProc)( /* White Point Adjust Proc */ -#if NeedFunctionPrototypes XcmsCCC /* ccc */, XcmsColor* /* initial_white_point*/, XcmsColor* /* target_white_point*/, @@ -218,7 +215,6 @@ typedef Status (*XcmsWhiteAdjustProc)( /* White Point Adjust Proc */ XcmsColor* /* colors_in_out */, unsigned int /* ncolors */, Bool* /* compression_flags_return */ -#endif ); /* @@ -239,17 +235,13 @@ typedef struct _XcmsCCC { } XcmsCCCRec; typedef Status (*XcmsScreenInitProc)( /* Screen Initialization Proc */ -#if NeedFunctionPrototypes Display* /* dpy */, int /* screen_number */, XcmsPerScrnInfo* /* screen_info */ -#endif ); typedef void (*XcmsScreenFreeProc)( -#if NeedFunctionPrototypes XPointer /* screenData */ -#endif ); /* @@ -271,14 +263,26 @@ typedef Status (*XcmsConversionProc)(XcmsCCC, XcmsColor *, unsigned int, * Until this is reworked, it's probably best to leave it unprotoized. * The code works regardless. */ -typedef Status (*XcmsConversionProc)(); +typedef Status (*XcmsDDConversionProc)( /* using device-dependent version */ + XcmsCCC /* ccc */, + XcmsColor* /* pcolors_in_out */, + unsigned int /* ncolors */, + Bool* /* pCompressed */ + ); + +typedef Status (*XcmsDIConversionProc)( /* using device-independent version */ + XcmsCCC /* ccc */, + XcmsColor* /* white_point */, + XcmsColor* /* pcolors_in_out */, + unsigned int /* ncolors */ + ); + +typedef XcmsDIConversionProc XcmsConversionProc; typedef XcmsConversionProc *XcmsFuncListPtr; typedef int (*XcmsParseStringProc)( /* Color String Parsing Proc */ -#if NeedFunctionPrototypes char* /* color_string */, XcmsColor* /* color_return */ -#endif ); /* @@ -286,7 +290,7 @@ typedef int (*XcmsParseStringProc)( /* Color String Parsing Proc */ * or Device-Dependent) */ typedef struct _XcmsColorSpace { - char *prefix; /* Prefix of string format. */ + const char *prefix; /* Prefix of string format. */ XcmsColorFormat id; /* Format ID number. */ XcmsParseStringProc parseString; /* String format parsing function */ @@ -333,120 +337,93 @@ typedef struct _XcmsFunctionSet { _XFUNCPROTOBEGIN extern Status XcmsAddColorSpace ( -#if NeedFunctionPrototypes XcmsColorSpace* /* pColorSpace */ -#endif ); extern Status XcmsAddFunctionSet ( -#if NeedFunctionPrototypes XcmsFunctionSet* /* functionSet */ -#endif ); extern Status XcmsAllocColor ( -#if NeedFunctionPrototypes Display* /* dpy */, Colormap /* colormap */, XcmsColor* /* color_in_out */, XcmsColorFormat /* result_format */ -#endif ); extern Status XcmsAllocNamedColor ( -#if NeedFunctionPrototypes Display* /* dpy */, Colormap /* colormap */, _Xconst char* /* color_string */, XcmsColor* /* color_scrn_return */, XcmsColor* /* color_exact_return */, XcmsColorFormat /* result_format */ -#endif ); extern XcmsCCC XcmsCCCOfColormap ( -#if NeedFunctionPrototypes Display* /* dpy */, Colormap /* colormap */ -#endif ); extern Status XcmsCIELabClipab( -#if NeedFunctionPrototypes XcmsCCC /* ccc */, XcmsColor* /* colors_in_out */, unsigned int /* ncolors */, unsigned int /* index */, Bool* /* compression_flags_return */ -#endif ); extern Status XcmsCIELabClipL( -#if NeedFunctionPrototypes XcmsCCC /* ccc */, XcmsColor* /* colors_in_out */, unsigned int /* ncolors */, unsigned int /* index */, Bool* /* compression_flags_return */ -#endif ); extern Status XcmsCIELabClipLab( -#if NeedFunctionPrototypes XcmsCCC /* ccc */, XcmsColor* /* colors_in_out */, unsigned int /* ncolors */, unsigned int /* index */, Bool* /* compression_flags_return */ -#endif ); extern Status XcmsCIELabQueryMaxC ( -#if NeedFunctionPrototypes XcmsCCC /* ccc */, XcmsFloat /* hue_angle */, XcmsFloat /* L_star */, XcmsColor* /* color_return */ -#endif ); extern Status XcmsCIELabQueryMaxL ( -#if NeedFunctionPrototypes XcmsCCC /* ccc */, XcmsFloat /* hue_angle */, XcmsFloat /* chroma */, XcmsColor* /* color_return */ -#endif ); extern Status XcmsCIELabQueryMaxLC ( -#if NeedFunctionPrototypes XcmsCCC /* ccc */, XcmsFloat /* hue_angle */, XcmsColor* /* color_return */ -#endif ); extern Status XcmsCIELabQueryMinL ( -#if NeedFunctionPrototypes XcmsCCC /* ccc */, XcmsFloat /* hue_angle */, XcmsFloat /* chroma */, XcmsColor* /* color_return */ -#endif ); extern Status XcmsCIELabToCIEXYZ ( -#if NeedFunctionPrototypes XcmsCCC /* ccc */, XcmsColor* /* white_point */, XcmsColor* /* colors */, unsigned int /* ncolors */ -#endif ); extern Status XcmsCIELabWhiteShiftColors( -#if NeedFunctionPrototypes XcmsCCC /* ccc */, XcmsColor* /* initial_white_point*/, XcmsColor* /* target_white_point*/, @@ -454,85 +431,67 @@ extern Status XcmsCIELabWhiteShiftColors( XcmsColor* /* colors_in_out */, unsigned int /* ncolors */, Bool* /* compression_flags_return */ -#endif ); extern Status XcmsCIELuvClipL( -#if NeedFunctionPrototypes XcmsCCC /* ccc */, XcmsColor* /* colors_in_out */, unsigned int /* ncolors */, unsigned int /* index */, Bool* /* compression_flags_return */ -#endif ); extern Status XcmsCIELuvClipLuv( -#if NeedFunctionPrototypes XcmsCCC /* ccc */, XcmsColor* /* colors_in_out */, unsigned int /* ncolors */, unsigned int /* index */, Bool* /* compression_flags_return */ -#endif ); extern Status XcmsCIELuvClipuv( -#if NeedFunctionPrototypes XcmsCCC /* ccc */, XcmsColor* /* colors_in_out */, unsigned int /* ncolors */, unsigned int /* index */, Bool* /* compression_flags_return */ -#endif ); extern Status XcmsCIELuvQueryMaxC ( -#if NeedFunctionPrototypes XcmsCCC /* ccc */, XcmsFloat /* hue_angle */, XcmsFloat /* L_star */, XcmsColor* /* color_return */ -#endif ); extern Status XcmsCIELuvQueryMaxL ( -#if NeedFunctionPrototypes XcmsCCC /* ccc */, XcmsFloat /* hue_angle */, XcmsFloat /* chroma */, XcmsColor* /* color_return */ -#endif ); extern Status XcmsCIELuvQueryMaxLC ( -#if NeedFunctionPrototypes XcmsCCC /* ccc */, XcmsFloat /* hue_angle */, XcmsColor* /* color_return */ -#endif ); extern Status XcmsCIELuvQueryMinL ( -#if NeedFunctionPrototypes XcmsCCC /* ccc */, XcmsFloat /* hue_angle */, XcmsFloat /* chroma */, XcmsColor* /* color_return */ -#endif ); extern Status XcmsCIELuvToCIEuvY ( -#if NeedFunctionPrototypes XcmsCCC /* ccc */, XcmsColor* /* white_point */, XcmsColor* /* colors */, unsigned int /* ncolors */ -#endif ); extern Status XcmsCIELuvWhiteShiftColors( -#if NeedFunctionPrototypes XcmsCCC /* ccc */, XcmsColor* /* initial_white_point*/, XcmsColor* /* target_white_point*/, @@ -540,99 +499,77 @@ extern Status XcmsCIELuvWhiteShiftColors( XcmsColor* /* colors_in_out */, unsigned int /* ncolors */, Bool* /* compression_flags_return */ -#endif ); extern Status XcmsCIEXYZToCIELab ( -#if NeedFunctionPrototypes XcmsCCC /* ccc */, XcmsColor* /* white_point */, XcmsColor* /* colors */, unsigned int /* ncolors */ -#endif ); extern Status XcmsCIEXYZToCIEuvY ( -#if NeedFunctionPrototypes XcmsCCC /* ccc */, XcmsColor* /* white_point */, XcmsColor* /* colors */, unsigned int /* ncolors */ -#endif ); extern Status XcmsCIEXYZToCIExyY ( -#if NeedFunctionPrototypes XcmsCCC /* ccc */, XcmsColor* /* white_point */, XcmsColor* /* colors */, unsigned int /* ncolors */ -#endif ); extern Status XcmsCIEXYZToRGBi ( -#if NeedFunctionPrototypes XcmsCCC /* ccc */, XcmsColor* /* colors */, unsigned int /* ncolors */, Bool* /* compression_flags_return */ -#endif ); extern Status XcmsCIEuvYToCIELuv ( -#if NeedFunctionPrototypes XcmsCCC /* ccc */, XcmsColor* /* white_point */, XcmsColor* /* colors */, unsigned int /* ncolors */ -#endif ); extern Status XcmsCIEuvYToCIEXYZ ( -#if NeedFunctionPrototypes XcmsCCC /* ccc */, XcmsColor* /* white_point */, XcmsColor* /* colors */, unsigned int /* ncolors */ -#endif ); extern Status XcmsCIEuvYToTekHVC ( -#if NeedFunctionPrototypes XcmsCCC /* ccc */, XcmsColor* /* white_point */, XcmsColor* /* colors */, unsigned int /* ncolors */ -#endif ); extern Status XcmsCIExyYToCIEXYZ ( -#if NeedFunctionPrototypes XcmsCCC /* ccc */, XcmsColor* /* white_point */, XcmsColor* /* colors */, unsigned int /* ncolors */ -#endif ); extern XcmsColor *XcmsClientWhitePointOfCCC ( -#if NeedFunctionPrototypes XcmsCCC /* ccc */ -#endif ); extern Status XcmsConvertColors ( -#if NeedFunctionPrototypes XcmsCCC /* ccc */, XcmsColor* /* colorArry_in_out */, unsigned int /* nColors */, XcmsColorFormat /* targetFormat */, Bool* /* compArry_return */ -#endif ); extern XcmsCCC XcmsCreateCCC ( -#if NeedFunctionPrototypes Display* /* dpy */, int /* screenNumber */, Visual* /* visual */, @@ -641,283 +578,215 @@ extern XcmsCCC XcmsCreateCCC ( XPointer /* gamutCompClientData */, XcmsWhiteAdjustProc /* whitePtAdjProc */, XPointer /* whitePtAdjClientData */ -#endif ); extern XcmsCCC XcmsDefaultCCC ( -#if NeedFunctionPrototypes Display* /* dpy */, int /* screenNumber */ -#endif ); extern Display *XcmsDisplayOfCCC ( -#if NeedFunctionPrototypes XcmsCCC /* ccc */ -#endif ); extern XcmsColorFormat XcmsFormatOfPrefix ( -#if NeedFunctionPrototypes char* /* prefix */ -#endif ); extern void XcmsFreeCCC ( -#if NeedFunctionPrototypes XcmsCCC /* ccc */ -#endif ); extern Status XcmsLookupColor ( -#if NeedFunctionPrototypes Display* /* dpy */, Colormap /* colormap */, _Xconst char* /* color_string */, XcmsColor* /* pColor_exact_in_out */, XcmsColor* /* pColor_scrn_in_out */, XcmsColorFormat /* result_format */ -#endif ); extern char *XcmsPrefixOfFormat ( -#if NeedFunctionPrototypes XcmsColorFormat /* id */ -#endif ); extern Status XcmsQueryBlack ( -#if NeedFunctionPrototypes XcmsCCC /* ccc */, XcmsColorFormat /* target_format */, XcmsColor* /* color_return */ -#endif ); extern Status XcmsQueryBlue ( -#if NeedFunctionPrototypes XcmsCCC /* ccc */, XcmsColorFormat /* target_format */, XcmsColor* /* color_return */ -#endif ); extern Status XcmsQueryColor ( -#if NeedFunctionPrototypes Display* /* dpy */, Colormap /* colormap */, XcmsColor* /* pColor_in_out */, XcmsColorFormat /* result_format */ -#endif ); extern Status XcmsQueryColors ( -#if NeedFunctionPrototypes Display* /* dpy */, Colormap /* colormap */, XcmsColor* /* colorArry_in_out */, unsigned int /* nColors */, XcmsColorFormat /* result_format */ -#endif ); extern Status XcmsQueryGreen ( -#if NeedFunctionPrototypes XcmsCCC /* ccc */, XcmsColorFormat /* target_format */, XcmsColor* /* color_return */ -#endif ); extern Status XcmsQueryRed ( -#if NeedFunctionPrototypes XcmsCCC /* ccc */, XcmsColorFormat /* target_format */, XcmsColor* /* color_return */ -#endif ); extern Status XcmsQueryWhite ( -#if NeedFunctionPrototypes XcmsCCC /* ccc */, XcmsColorFormat /* target_format */, XcmsColor* /* color_return */ -#endif ); extern Status XcmsRGBiToCIEXYZ ( -#if NeedFunctionPrototypes XcmsCCC /* ccc */, XcmsColor* /* colors */, unsigned int /* ncolors */, Bool* /* compression_flags_return */ -#endif ); extern Status XcmsRGBiToRGB ( -#if NeedFunctionPrototypes XcmsCCC /* ccc */, XcmsColor* /* colors */, unsigned int /* ncolors */, Bool* /* compression_flags_return */ -#endif ); extern Status XcmsRGBToRGBi ( -#if NeedFunctionPrototypes XcmsCCC /* ccc */, XcmsColor* /* colors */, unsigned int /* ncolors */, Bool* /* compression_flags_return */ -#endif ); extern int XcmsScreenNumberOfCCC ( -#if NeedFunctionPrototypes XcmsCCC /* ccc */ -#endif ); extern XcmsColor *XcmsScreenWhitePointOfCCC ( -#if NeedFunctionPrototypes XcmsCCC /* ccc */ -#endif ); extern XcmsCCC XcmsSetCCCOfColormap( -#if NeedFunctionPrototypes Display* /* dpy */, Colormap /* colormap */, XcmsCCC /* ccc */ -#endif ); extern XcmsCompressionProc XcmsSetCompressionProc ( -#if NeedFunctionPrototypes XcmsCCC /* ccc */, XcmsCompressionProc /* compression_proc */, XPointer /* client_data */ -#endif ); extern XcmsWhiteAdjustProc XcmsSetWhiteAdjustProc ( -#if NeedFunctionPrototypes XcmsCCC /* ccc */, XcmsWhiteAdjustProc /* white_adjust_proc */, XPointer /* client_data */ -#endif ); extern Status XcmsSetWhitePoint ( -#if NeedFunctionPrototypes XcmsCCC /* ccc */, XcmsColor* /* color */ -#endif ); extern Status XcmsStoreColor ( -#if NeedFunctionPrototypes Display* /* dpy */, Colormap /* colormap */, XcmsColor* /* pColor_in */ -#endif ); extern Status XcmsStoreColors ( -#if NeedFunctionPrototypes Display* /* dpy */, Colormap /* colormap */, XcmsColor* /* colorArry_in */, unsigned int /* nColors */, Bool* /* compArry_return */ -#endif ); extern Status XcmsTekHVCClipC( -#if NeedFunctionPrototypes XcmsCCC /* ccc */, XcmsColor* /* colors_in_out */, unsigned int /* ncolors */, unsigned int /* index */, Bool* /* compression_flags_return */ -#endif ); extern Status XcmsTekHVCClipV( -#if NeedFunctionPrototypes XcmsCCC /* ccc */, XcmsColor* /* colors_in_out */, unsigned int /* ncolors */, unsigned int /* index */, Bool* /* compression_flags_return */ -#endif ); extern Status XcmsTekHVCClipVC( -#if NeedFunctionPrototypes XcmsCCC /* ccc */, XcmsColor* /* colors_in_out */, unsigned int /* ncolors */, unsigned int /* index */, Bool* /* compression_flags_return */ -#endif ); extern Status XcmsTekHVCQueryMaxC ( -#if NeedFunctionPrototypes XcmsCCC /* ccc */, XcmsFloat /* hue */, XcmsFloat /* value */, XcmsColor* /* color_return */ -#endif ); extern Status XcmsTekHVCQueryMaxV ( -#if NeedFunctionPrototypes XcmsCCC /* ccc */, XcmsFloat /* hue */, XcmsFloat /* chroma */, XcmsColor* /* color_return */ -#endif ); extern Status XcmsTekHVCQueryMaxVC ( -#if NeedFunctionPrototypes XcmsCCC /* ccc */, XcmsFloat /* hue */, XcmsColor* /* color_return */ -#endif ); extern Status XcmsTekHVCQueryMaxVSamples ( -#if NeedFunctionPrototypes XcmsCCC /* ccc */, XcmsFloat /* hue */, XcmsColor* /* colors_return */, unsigned int /* nsamples */ -#endif ); extern Status XcmsTekHVCQueryMinV ( -#if NeedFunctionPrototypes XcmsCCC /* ccc */, XcmsFloat /* hue */, XcmsFloat /* chroma */, XcmsColor* /* color_return */ -#endif ); extern Status XcmsTekHVCToCIEuvY ( -#if NeedFunctionPrototypes XcmsCCC /* ccc */, XcmsColor* /* white_point */, XcmsColor* /* colors */, unsigned int /* ncolors */ -#endif ); extern Status XcmsTekHVCWhiteShiftColors( -#if NeedFunctionPrototypes XcmsCCC /* ccc */, XcmsColor* /* initial_white_point*/, XcmsColor* /* target_white_point*/, @@ -925,13 +794,10 @@ extern Status XcmsTekHVCWhiteShiftColors( XcmsColor* /* colors_in_out */, unsigned int /* ncolors */, Bool* /* compression_flags_return */ -#endif ); extern Visual *XcmsVisualOfCCC ( -#if NeedFunctionPrototypes XcmsCCC /* ccc */ -#endif ); _XFUNCPROTOEND diff --git a/include/X11/Xlib.h b/include/X11/Xlib.h index 7bd488c..f3aae5a 100644 --- a/include/X11/Xlib.h +++ b/include/X11/Xlib.h @@ -24,7 +24,7 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/Xlib.h,v 3.23 2002/05/31 18:45:42 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Xlib.h,v 3.25 2003/11/17 22:20:10 dawes Exp $ */ /* @@ -87,6 +87,17 @@ typedef unsigned long wchar_t; #endif #endif +extern int +_Xmblen( +#ifdef ISC + char const *str, + size_t len +#else + char *str, + int len +#endif + ); + /* API mentioning "UTF8" or "utf8" is an XFree86 extension, introduced in November 2000. Its presence is indicated through the following macro. */ #define X_HAVE_UTF8_STRING 1 @@ -167,9 +178,7 @@ typedef struct _XExtData { int number; /* number returned by XRegisterExtension */ struct _XExtData *next; /* next item on list of data for structure */ int (*free_private)( /* called to free private storage */ -#if NeedFunctionPrototypes struct _XExtData *extension -#endif ); XPointer private_data; /* data private to this extension. */ } XExtData; @@ -384,7 +393,6 @@ typedef struct _XImage { unsigned long blue_mask; XPointer obdata; /* hook for the object routines to hang on */ struct funcs { /* image manipulation routines */ -#if NeedFunctionPrototypes struct _XImage *(*create_image)( struct _XDisplay* /* display */, Visual* /* visual */, @@ -401,14 +409,6 @@ typedef struct _XImage { int (*put_pixel) (struct _XImage *, int, int, unsigned long); struct _XImage *(*sub_image)(struct _XImage *, int, int, unsigned int, unsigned int); int (*add_pixel) (struct _XImage *, long); -#else - struct _XImage *(*create_image)(); - int (*destroy_image)(); - unsigned long (*get_pixel)(); - int (*put_pixel)(); - struct _XImage *(*sub_image)(); - int (*add_pixel)(); -#endif } f; } XImage; @@ -526,9 +526,7 @@ _XDisplay XID private5; int private6; XID (*resource_alloc)( /* allocator function */ -#if NeedFunctionPrototypes struct _XDisplay* -#endif ); int byte_order; /* screen byte order, LSBFirst, MSBFirst */ int bitmap_unit; /* padding and data requirements */ @@ -549,9 +547,7 @@ _XDisplay unsigned max_request_size; /* maximum number 32 bit words in request*/ struct _XrmHashBucketRec *db; int (*private15)( -#if NeedFunctionPrototypes struct _XDisplay* -#endif ); char *display_name; /* "host:display" string used on this connect*/ int default_screen; /* default screen for operations */ @@ -572,9 +568,7 @@ Display, #endif *_XPrivDisplay; -#if NeedFunctionPrototypes /* prototypes require event type definitions */ #undef _XEVENT_ -#endif #ifndef _XEVENT_ /* * Definitions of specific events. @@ -1141,27 +1135,21 @@ typedef struct _XIM *XIM; typedef struct _XIC *XIC; typedef void (*XIMProc)( -#if NeedFunctionPrototypes XIM, XPointer, XPointer -#endif ); typedef Bool (*XICProc)( -#if NeedFunctionPrototypes XIC, XPointer, XPointer -#endif ); typedef void (*XIDProc)( -#if NeedFunctionPrototypes Display*, XPointer, XPointer -#endif ); typedef unsigned long XIMStyle; @@ -1231,11 +1219,7 @@ typedef struct { #define XLookupKeySym 3 #define XLookupBoth 4 -#if NeedFunctionPrototypes typedef void *XVaNestedList; -#else -typedef XPointer XVaNestedList; -#endif typedef struct { XPointer client_data; @@ -1397,32 +1381,25 @@ _XFUNCPROTOBEGIN extern int _Xdebug; extern XFontStruct *XLoadQueryFont( -#if NeedFunctionPrototypes Display* /* display */, _Xconst char* /* name */ -#endif ); extern XFontStruct *XQueryFont( -#if NeedFunctionPrototypes Display* /* display */, XID /* font_ID */ -#endif ); extern XTimeCoord *XGetMotionEvents( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, Time /* start */, Time /* stop */, int* /* nevents_return */ -#endif ); extern XModifierKeymap *XDeleteModifiermapEntry( -#if NeedFunctionPrototypes XModifierKeymap* /* modmap */, #if NeedWidePrototypes unsigned int /* keycode_entry */, @@ -1430,17 +1407,13 @@ extern XModifierKeymap *XDeleteModifiermapEntry( KeyCode /* keycode_entry */, #endif int /* modifier */ -#endif ); extern XModifierKeymap *XGetModifierMapping( -#if NeedFunctionPrototypes Display* /* display */ -#endif ); extern XModifierKeymap *XInsertModifiermapEntry( -#if NeedFunctionPrototypes XModifierKeymap* /* modmap */, #if NeedWidePrototypes unsigned int /* keycode_entry */, @@ -1448,17 +1421,13 @@ extern XModifierKeymap *XInsertModifiermapEntry( KeyCode /* keycode_entry */, #endif int /* modifier */ -#endif ); extern XModifierKeymap *XNewModifiermap( -#if NeedFunctionPrototypes int /* max_keys_per_mod */ -#endif ); extern XImage *XCreateImage( -#if NeedFunctionPrototypes Display* /* display */, Visual* /* visual */, unsigned int /* depth */, @@ -1469,15 +1438,11 @@ extern XImage *XCreateImage( unsigned int /* height */, int /* bitmap_pad */, int /* bytes_per_line */ -#endif ); extern Status XInitImage( -#if NeedFunctionPrototypes XImage* /* image */ -#endif ); extern XImage *XGetImage( -#if NeedFunctionPrototypes Display* /* display */, Drawable /* d */, int /* x */, @@ -1486,10 +1451,8 @@ extern XImage *XGetImage( unsigned int /* height */, unsigned long /* plane_mask */, int /* format */ -#endif ); extern XImage *XGetSubImage( -#if NeedFunctionPrototypes Display* /* display */, Drawable /* d */, int /* x */, @@ -1501,125 +1464,87 @@ extern XImage *XGetSubImage( XImage* /* dest_image */, int /* dest_x */, int /* dest_y */ -#endif ); /* * X function declarations. */ extern Display *XOpenDisplay( -#if NeedFunctionPrototypes _Xconst char* /* display_name */ -#endif ); extern void XrmInitialize( -#if NeedFunctionPrototypes void -#endif ); extern char *XFetchBytes( -#if NeedFunctionPrototypes Display* /* display */, int* /* nbytes_return */ -#endif ); extern char *XFetchBuffer( -#if NeedFunctionPrototypes Display* /* display */, int* /* nbytes_return */, int /* buffer */ -#endif ); extern char *XGetAtomName( -#if NeedFunctionPrototypes Display* /* display */, Atom /* atom */ -#endif ); extern Status XGetAtomNames( -#if NeedFunctionPrototypes Display* /* dpy */, Atom* /* atoms */, int /* count */, char** /* names_return */ -#endif ); extern char *XGetDefault( -#if NeedFunctionPrototypes Display* /* display */, _Xconst char* /* program */, _Xconst char* /* option */ -#endif ); extern char *XDisplayName( -#if NeedFunctionPrototypes _Xconst char* /* string */ -#endif ); extern char *XKeysymToString( -#if NeedFunctionPrototypes KeySym /* keysym */ -#endif ); extern int (*XSynchronize( -#if NeedFunctionPrototypes Display* /* display */, Bool /* onoff */ -#endif ))( -#if NeedNestedPrototypes Display* /* display */ -#endif ); extern int (*XSetAfterFunction( -#if NeedFunctionPrototypes Display* /* display */, int (*) ( -#if NeedNestedPrototypes Display* /* display */ -#endif ) /* procedure */ -#endif ))( -#if NeedNestedPrototypes Display* /* display */ -#endif ); extern Atom XInternAtom( -#if NeedFunctionPrototypes Display* /* display */, _Xconst char* /* atom_name */, Bool /* only_if_exists */ -#endif ); extern Status XInternAtoms( -#if NeedFunctionPrototypes Display* /* dpy */, char** /* names */, int /* count */, Bool /* onlyIfExists */, Atom* /* atoms_return */ -#endif ); extern Colormap XCopyColormapAndFree( -#if NeedFunctionPrototypes Display* /* display */, Colormap /* colormap */ -#endif ); extern Colormap XCreateColormap( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, Visual* /* visual */, int /* alloc */ -#endif ); extern Cursor XCreatePixmapCursor( -#if NeedFunctionPrototypes Display* /* display */, Pixmap /* source */, Pixmap /* mask */, @@ -1627,10 +1552,8 @@ extern Cursor XCreatePixmapCursor( XColor* /* background_color */, unsigned int /* x */, unsigned int /* y */ -#endif ); extern Cursor XCreateGlyphCursor( -#if NeedFunctionPrototypes Display* /* display */, Font /* source_font */, Font /* mask_font */, @@ -1638,59 +1561,43 @@ extern Cursor XCreateGlyphCursor( unsigned int /* mask_char */, XColor _Xconst * /* foreground_color */, XColor _Xconst * /* background_color */ -#endif ); extern Cursor XCreateFontCursor( -#if NeedFunctionPrototypes Display* /* display */, unsigned int /* shape */ -#endif ); extern Font XLoadFont( -#if NeedFunctionPrototypes Display* /* display */, _Xconst char* /* name */ -#endif ); extern GC XCreateGC( -#if NeedFunctionPrototypes Display* /* display */, Drawable /* d */, unsigned long /* valuemask */, XGCValues* /* values */ -#endif ); extern GContext XGContextFromGC( -#if NeedFunctionPrototypes GC /* gc */ -#endif ); extern void XFlushGC( -#if NeedFunctionPrototypes Display* /* display */, GC /* gc */ -#endif ); extern Pixmap XCreatePixmap( -#if NeedFunctionPrototypes Display* /* display */, Drawable /* d */, unsigned int /* width */, unsigned int /* height */, unsigned int /* depth */ -#endif ); extern Pixmap XCreateBitmapFromData( -#if NeedFunctionPrototypes Display* /* display */, Drawable /* d */, _Xconst char* /* data */, unsigned int /* width */, unsigned int /* height */ -#endif ); extern Pixmap XCreatePixmapFromBitmapData( -#if NeedFunctionPrototypes Display* /* display */, Drawable /* d */, char* /* data */, @@ -1699,10 +1606,8 @@ extern Pixmap XCreatePixmapFromBitmapData( unsigned long /* fg */, unsigned long /* bg */, unsigned int /* depth */ -#endif ); extern Window XCreateSimpleWindow( -#if NeedFunctionPrototypes Display* /* display */, Window /* parent */, int /* x */, @@ -1712,16 +1617,12 @@ extern Window XCreateSimpleWindow( unsigned int /* border_width */, unsigned long /* border */, unsigned long /* background */ -#endif ); extern Window XGetSelectionOwner( -#if NeedFunctionPrototypes Display* /* display */, Atom /* selection */ -#endif ); extern Window XCreateWindow( -#if NeedFunctionPrototypes Display* /* display */, Window /* parent */, int /* x */, @@ -1734,60 +1635,44 @@ extern Window XCreateWindow( Visual* /* visual */, unsigned long /* valuemask */, XSetWindowAttributes* /* attributes */ -#endif ); extern Colormap *XListInstalledColormaps( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, int* /* num_return */ -#endif ); extern char **XListFonts( -#if NeedFunctionPrototypes Display* /* display */, _Xconst char* /* pattern */, int /* maxnames */, int* /* actual_count_return */ -#endif ); extern char **XListFontsWithInfo( -#if NeedFunctionPrototypes Display* /* display */, _Xconst char* /* pattern */, int /* maxnames */, int* /* count_return */, XFontStruct** /* info_return */ -#endif ); extern char **XGetFontPath( -#if NeedFunctionPrototypes Display* /* display */, int* /* npaths_return */ -#endif ); extern char **XListExtensions( -#if NeedFunctionPrototypes Display* /* display */, int* /* nextensions_return */ -#endif ); extern Atom *XListProperties( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, int* /* num_prop_return */ -#endif ); extern XHostAddress *XListHosts( -#if NeedFunctionPrototypes Display* /* display */, int* /* nhosts_return */, Bool* /* state_return */ -#endif ); extern KeySym XKeycodeToKeysym( -#if NeedFunctionPrototypes Display* /* display */, #if NeedWidePrototypes unsigned int /* keycode */, @@ -1795,16 +1680,12 @@ extern KeySym XKeycodeToKeysym( KeyCode /* keycode */, #endif int /* index */ -#endif ); extern KeySym XLookupKeysym( -#if NeedFunctionPrototypes XKeyEvent* /* key_event */, int /* index */ -#endif ); extern KeySym *XGetKeyboardMapping( -#if NeedFunctionPrototypes Display* /* display */, #if NeedWidePrototypes unsigned int /* first_keycode */, @@ -1813,382 +1694,262 @@ extern KeySym *XGetKeyboardMapping( #endif int /* keycode_count */, int* /* keysyms_per_keycode_return */ -#endif ); extern KeySym XStringToKeysym( -#if NeedFunctionPrototypes _Xconst char* /* string */ -#endif ); extern long XMaxRequestSize( -#if NeedFunctionPrototypes Display* /* display */ -#endif ); extern long XExtendedMaxRequestSize( -#if NeedFunctionPrototypes Display* /* display */ -#endif ); extern char *XResourceManagerString( -#if NeedFunctionPrototypes Display* /* display */ -#endif ); extern char *XScreenResourceString( -#if NeedFunctionPrototypes Screen* /* screen */ -#endif ); extern unsigned long XDisplayMotionBufferSize( -#if NeedFunctionPrototypes Display* /* display */ -#endif ); extern VisualID XVisualIDFromVisual( -#if NeedFunctionPrototypes Visual* /* visual */ -#endif ); /* multithread routines */ extern Status XInitThreads( -#if NeedFunctionPrototypes void -#endif ); extern void XLockDisplay( -#if NeedFunctionPrototypes Display* /* display */ -#endif ); extern void XUnlockDisplay( -#if NeedFunctionPrototypes Display* /* display */ -#endif ); /* routines for dealing with extensions */ extern XExtCodes *XInitExtension( -#if NeedFunctionPrototypes Display* /* display */, _Xconst char* /* name */ -#endif ); extern XExtCodes *XAddExtension( -#if NeedFunctionPrototypes Display* /* display */ -#endif ); extern XExtData *XFindOnExtensionList( -#if NeedFunctionPrototypes XExtData** /* structure */, int /* number */ -#endif ); extern XExtData **XEHeadOfExtensionList( -#if NeedFunctionPrototypes XEDataObject /* object */ -#endif ); /* these are routines for which there are also macros */ extern Window XRootWindow( -#if NeedFunctionPrototypes Display* /* display */, int /* screen_number */ -#endif ); extern Window XDefaultRootWindow( -#if NeedFunctionPrototypes Display* /* display */ -#endif ); extern Window XRootWindowOfScreen( -#if NeedFunctionPrototypes Screen* /* screen */ -#endif ); extern Visual *XDefaultVisual( -#if NeedFunctionPrototypes Display* /* display */, int /* screen_number */ -#endif ); extern Visual *XDefaultVisualOfScreen( -#if NeedFunctionPrototypes Screen* /* screen */ -#endif ); extern GC XDefaultGC( -#if NeedFunctionPrototypes Display* /* display */, int /* screen_number */ -#endif ); extern GC XDefaultGCOfScreen( -#if NeedFunctionPrototypes Screen* /* screen */ -#endif ); extern unsigned long XBlackPixel( -#if NeedFunctionPrototypes Display* /* display */, int /* screen_number */ -#endif ); extern unsigned long XWhitePixel( -#if NeedFunctionPrototypes Display* /* display */, int /* screen_number */ -#endif ); extern unsigned long XAllPlanes( -#if NeedFunctionPrototypes void -#endif ); extern unsigned long XBlackPixelOfScreen( -#if NeedFunctionPrototypes Screen* /* screen */ -#endif ); extern unsigned long XWhitePixelOfScreen( -#if NeedFunctionPrototypes Screen* /* screen */ -#endif ); extern unsigned long XNextRequest( -#if NeedFunctionPrototypes Display* /* display */ -#endif ); extern unsigned long XLastKnownRequestProcessed( -#if NeedFunctionPrototypes Display* /* display */ -#endif ); extern char *XServerVendor( -#if NeedFunctionPrototypes Display* /* display */ -#endif ); extern char *XDisplayString( -#if NeedFunctionPrototypes Display* /* display */ -#endif ); extern Colormap XDefaultColormap( -#if NeedFunctionPrototypes Display* /* display */, int /* screen_number */ -#endif ); extern Colormap XDefaultColormapOfScreen( -#if NeedFunctionPrototypes Screen* /* screen */ -#endif ); extern Display *XDisplayOfScreen( -#if NeedFunctionPrototypes Screen* /* screen */ -#endif ); extern Screen *XScreenOfDisplay( -#if NeedFunctionPrototypes Display* /* display */, int /* screen_number */ -#endif ); extern Screen *XDefaultScreenOfDisplay( -#if NeedFunctionPrototypes Display* /* display */ -#endif ); extern long XEventMaskOfScreen( -#if NeedFunctionPrototypes Screen* /* screen */ -#endif ); extern int XScreenNumberOfScreen( -#if NeedFunctionPrototypes Screen* /* screen */ -#endif ); typedef int (*XErrorHandler) ( /* WARNING, this type not in Xlib spec */ -#if NeedFunctionPrototypes Display* /* display */, XErrorEvent* /* error_event */ -#endif ); extern XErrorHandler XSetErrorHandler ( -#if NeedFunctionPrototypes XErrorHandler /* handler */ -#endif ); typedef int (*XIOErrorHandler) ( /* WARNING, this type not in Xlib spec */ -#if NeedFunctionPrototypes Display* /* display */ -#endif ); extern XIOErrorHandler XSetIOErrorHandler ( -#if NeedFunctionPrototypes XIOErrorHandler /* handler */ -#endif ); extern XPixmapFormatValues *XListPixmapFormats( -#if NeedFunctionPrototypes Display* /* display */, int* /* count_return */ -#endif ); extern int *XListDepths( -#if NeedFunctionPrototypes Display* /* display */, int /* screen_number */, int* /* count_return */ -#endif ); /* ICCCM routines for things that don't require special include files; */ /* other declarations are given in Xutil.h */ extern Status XReconfigureWMWindow( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, int /* screen_number */, unsigned int /* mask */, XWindowChanges* /* changes */ -#endif ); extern Status XGetWMProtocols( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, Atom** /* protocols_return */, int* /* count_return */ -#endif ); extern Status XSetWMProtocols( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, Atom* /* protocols */, int /* count */ -#endif ); extern Status XIconifyWindow( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, int /* screen_number */ -#endif ); extern Status XWithdrawWindow( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, int /* screen_number */ -#endif ); extern Status XGetCommand( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, char*** /* argv_return */, int* /* argc_return */ -#endif ); extern Status XGetWMColormapWindows( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, Window** /* windows_return */, int* /* count_return */ -#endif ); extern Status XSetWMColormapWindows( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, Window* /* colormap_windows */, int /* count */ -#endif ); extern void XFreeStringList( -#if NeedFunctionPrototypes char** /* list */ -#endif ); extern int XSetTransientForHint( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, Window /* prop_window */ -#endif ); /* The following are given in alphabetical order */ extern int XActivateScreenSaver( -#if NeedFunctionPrototypes Display* /* display */ -#endif ); extern int XAddHost( -#if NeedFunctionPrototypes Display* /* display */, XHostAddress* /* host */ -#endif ); extern int XAddHosts( -#if NeedFunctionPrototypes Display* /* display */, XHostAddress* /* hosts */, int /* num_hosts */ -#endif ); extern int XAddToExtensionList( -#if NeedFunctionPrototypes struct _XExtData** /* structure */, XExtData* /* ext_data */ -#endif ); extern int XAddToSaveSet( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */ -#endif ); extern Status XAllocColor( -#if NeedFunctionPrototypes Display* /* display */, Colormap /* colormap */, XColor* /* screen_in_out */ -#endif ); extern Status XAllocColorCells( -#if NeedFunctionPrototypes Display* /* display */, Colormap /* colormap */, Bool /* contig */, @@ -2196,11 +1957,9 @@ extern Status XAllocColorCells( unsigned int /* nplanes */, unsigned long* /* pixels_return */, unsigned int /* npixels */ -#endif ); extern Status XAllocColorPlanes( -#if NeedFunctionPrototypes Display* /* display */, Colormap /* colormap */, Bool /* contig */, @@ -2212,119 +1971,89 @@ extern Status XAllocColorPlanes( unsigned long* /* rmask_return */, unsigned long* /* gmask_return */, unsigned long* /* bmask_return */ -#endif ); extern Status XAllocNamedColor( -#if NeedFunctionPrototypes Display* /* display */, Colormap /* colormap */, _Xconst char* /* color_name */, XColor* /* screen_def_return */, XColor* /* exact_def_return */ -#endif ); extern int XAllowEvents( -#if NeedFunctionPrototypes Display* /* display */, int /* event_mode */, Time /* time */ -#endif ); extern int XAutoRepeatOff( -#if NeedFunctionPrototypes Display* /* display */ -#endif ); extern int XAutoRepeatOn( -#if NeedFunctionPrototypes Display* /* display */ -#endif ); extern int XBell( -#if NeedFunctionPrototypes Display* /* display */, int /* percent */ -#endif ); extern int XBitmapBitOrder( -#if NeedFunctionPrototypes Display* /* display */ -#endif ); extern int XBitmapPad( -#if NeedFunctionPrototypes Display* /* display */ -#endif ); extern int XBitmapUnit( -#if NeedFunctionPrototypes Display* /* display */ -#endif ); extern int XCellsOfScreen( -#if NeedFunctionPrototypes Screen* /* screen */ -#endif ); extern int XChangeActivePointerGrab( -#if NeedFunctionPrototypes Display* /* display */, unsigned int /* event_mask */, Cursor /* cursor */, Time /* time */ -#endif ); extern int XChangeGC( -#if NeedFunctionPrototypes Display* /* display */, GC /* gc */, unsigned long /* valuemask */, XGCValues* /* values */ -#endif ); extern int XChangeKeyboardControl( -#if NeedFunctionPrototypes Display* /* display */, unsigned long /* value_mask */, XKeyboardControl* /* values */ -#endif ); extern int XChangeKeyboardMapping( -#if NeedFunctionPrototypes Display* /* display */, int /* first_keycode */, int /* keysyms_per_keycode */, KeySym* /* keysyms */, int /* num_codes */ -#endif ); extern int XChangePointerControl( -#if NeedFunctionPrototypes Display* /* display */, Bool /* do_accel */, Bool /* do_threshold */, int /* accel_numerator */, int /* accel_denominator */, int /* threshold */ -#endif ); extern int XChangeProperty( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, Atom /* property */, @@ -2333,99 +2062,75 @@ extern int XChangeProperty( int /* mode */, _Xconst unsigned char* /* data */, int /* nelements */ -#endif ); extern int XChangeSaveSet( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, int /* change_mode */ -#endif ); extern int XChangeWindowAttributes( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, unsigned long /* valuemask */, XSetWindowAttributes* /* attributes */ -#endif ); extern Bool XCheckIfEvent( -#if NeedFunctionPrototypes Display* /* display */, XEvent* /* event_return */, Bool (*) ( -#if NeedNestedPrototypes Display* /* display */, XEvent* /* event */, XPointer /* arg */ -#endif ) /* predicate */, XPointer /* arg */ -#endif ); extern Bool XCheckMaskEvent( -#if NeedFunctionPrototypes Display* /* display */, long /* event_mask */, XEvent* /* event_return */ -#endif ); extern Bool XCheckTypedEvent( -#if NeedFunctionPrototypes Display* /* display */, int /* event_type */, XEvent* /* event_return */ -#endif ); extern Bool XCheckTypedWindowEvent( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, int /* event_type */, XEvent* /* event_return */ -#endif ); extern Bool XCheckWindowEvent( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, long /* event_mask */, XEvent* /* event_return */ -#endif ); extern int XCirculateSubwindows( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, int /* direction */ -#endif ); extern int XCirculateSubwindowsDown( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */ -#endif ); extern int XCirculateSubwindowsUp( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */ -#endif ); extern int XClearArea( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, int /* x */, @@ -2433,50 +2138,38 @@ extern int XClearArea( unsigned int /* width */, unsigned int /* height */, Bool /* exposures */ -#endif ); extern int XClearWindow( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */ -#endif ); extern int XCloseDisplay( -#if NeedFunctionPrototypes Display* /* display */ -#endif ); extern int XConfigureWindow( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, unsigned int /* value_mask */, XWindowChanges* /* values */ -#endif ); extern int XConnectionNumber( -#if NeedFunctionPrototypes Display* /* display */ -#endif ); extern int XConvertSelection( -#if NeedFunctionPrototypes Display* /* display */, Atom /* selection */, Atom /* target */, Atom /* property */, Window /* requestor */, Time /* time */ -#endif ); extern int XCopyArea( -#if NeedFunctionPrototypes Display* /* display */, Drawable /* src */, Drawable /* dest */, @@ -2487,20 +2180,16 @@ extern int XCopyArea( unsigned int /* height */, int /* dest_x */, int /* dest_y */ -#endif ); extern int XCopyGC( -#if NeedFunctionPrototypes Display* /* display */, GC /* src */, unsigned long /* valuemask */, GC /* dest */ -#endif ); extern int XCopyPlane( -#if NeedFunctionPrototypes Display* /* display */, Drawable /* src */, Drawable /* dest */, @@ -2512,129 +2201,93 @@ extern int XCopyPlane( int /* dest_x */, int /* dest_y */, unsigned long /* plane */ -#endif ); extern int XDefaultDepth( -#if NeedFunctionPrototypes Display* /* display */, int /* screen_number */ -#endif ); extern int XDefaultDepthOfScreen( -#if NeedFunctionPrototypes Screen* /* screen */ -#endif ); extern int XDefaultScreen( -#if NeedFunctionPrototypes Display* /* display */ -#endif ); extern int XDefineCursor( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, Cursor /* cursor */ -#endif ); extern int XDeleteProperty( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, Atom /* property */ -#endif ); extern int XDestroyWindow( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */ -#endif ); extern int XDestroySubwindows( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */ -#endif ); extern int XDoesBackingStore( -#if NeedFunctionPrototypes Screen* /* screen */ -#endif ); extern Bool XDoesSaveUnders( -#if NeedFunctionPrototypes Screen* /* screen */ -#endif ); extern int XDisableAccessControl( -#if NeedFunctionPrototypes Display* /* display */ -#endif ); extern int XDisplayCells( -#if NeedFunctionPrototypes Display* /* display */, int /* screen_number */ -#endif ); extern int XDisplayHeight( -#if NeedFunctionPrototypes Display* /* display */, int /* screen_number */ -#endif ); extern int XDisplayHeightMM( -#if NeedFunctionPrototypes Display* /* display */, int /* screen_number */ -#endif ); extern int XDisplayKeycodes( -#if NeedFunctionPrototypes Display* /* display */, int* /* min_keycodes_return */, int* /* max_keycodes_return */ -#endif ); extern int XDisplayPlanes( -#if NeedFunctionPrototypes Display* /* display */, int /* screen_number */ -#endif ); extern int XDisplayWidth( -#if NeedFunctionPrototypes Display* /* display */, int /* screen_number */ -#endif ); extern int XDisplayWidthMM( -#if NeedFunctionPrototypes Display* /* display */, int /* screen_number */ -#endif ); extern int XDrawArc( -#if NeedFunctionPrototypes Display* /* display */, Drawable /* d */, GC /* gc */, @@ -2644,21 +2297,17 @@ extern int XDrawArc( unsigned int /* height */, int /* angle1 */, int /* angle2 */ -#endif ); extern int XDrawArcs( -#if NeedFunctionPrototypes Display* /* display */, Drawable /* d */, GC /* gc */, XArc* /* arcs */, int /* narcs */ -#endif ); extern int XDrawImageString( -#if NeedFunctionPrototypes Display* /* display */, Drawable /* d */, GC /* gc */, @@ -2666,11 +2315,9 @@ extern int XDrawImageString( int /* y */, _Xconst char* /* string */, int /* length */ -#endif ); extern int XDrawImageString16( -#if NeedFunctionPrototypes Display* /* display */, Drawable /* d */, GC /* gc */, @@ -2678,11 +2325,9 @@ extern int XDrawImageString16( int /* y */, _Xconst XChar2b* /* string */, int /* length */ -#endif ); extern int XDrawLine( -#if NeedFunctionPrototypes Display* /* display */, Drawable /* d */, GC /* gc */, @@ -2690,43 +2335,35 @@ extern int XDrawLine( int /* y1 */, int /* x2 */, int /* y2 */ -#endif ); extern int XDrawLines( -#if NeedFunctionPrototypes Display* /* display */, Drawable /* d */, GC /* gc */, XPoint* /* points */, int /* npoints */, int /* mode */ -#endif ); extern int XDrawPoint( -#if NeedFunctionPrototypes Display* /* display */, Drawable /* d */, GC /* gc */, int /* x */, int /* y */ -#endif ); extern int XDrawPoints( -#if NeedFunctionPrototypes Display* /* display */, Drawable /* d */, GC /* gc */, XPoint* /* points */, int /* npoints */, int /* mode */ -#endif ); extern int XDrawRectangle( -#if NeedFunctionPrototypes Display* /* display */, Drawable /* d */, GC /* gc */, @@ -2734,31 +2371,25 @@ extern int XDrawRectangle( int /* y */, unsigned int /* width */, unsigned int /* height */ -#endif ); extern int XDrawRectangles( -#if NeedFunctionPrototypes Display* /* display */, Drawable /* d */, GC /* gc */, XRectangle* /* rectangles */, int /* nrectangles */ -#endif ); extern int XDrawSegments( -#if NeedFunctionPrototypes Display* /* display */, Drawable /* d */, GC /* gc */, XSegment* /* segments */, int /* nsegments */ -#endif ); extern int XDrawString( -#if NeedFunctionPrototypes Display* /* display */, Drawable /* d */, GC /* gc */, @@ -2766,11 +2397,9 @@ extern int XDrawString( int /* y */, _Xconst char* /* string */, int /* length */ -#endif ); extern int XDrawString16( -#if NeedFunctionPrototypes Display* /* display */, Drawable /* d */, GC /* gc */, @@ -2778,11 +2407,9 @@ extern int XDrawString16( int /* y */, _Xconst XChar2b* /* string */, int /* length */ -#endif ); extern int XDrawText( -#if NeedFunctionPrototypes Display* /* display */, Drawable /* d */, GC /* gc */, @@ -2790,11 +2417,9 @@ extern int XDrawText( int /* y */, XTextItem* /* items */, int /* nitems */ -#endif ); extern int XDrawText16( -#if NeedFunctionPrototypes Display* /* display */, Drawable /* d */, GC /* gc */, @@ -2802,32 +2427,24 @@ extern int XDrawText16( int /* y */, XTextItem16* /* items */, int /* nitems */ -#endif ); extern int XEnableAccessControl( -#if NeedFunctionPrototypes Display* /* display */ -#endif ); extern int XEventsQueued( -#if NeedFunctionPrototypes Display* /* display */, int /* mode */ -#endif ); extern Status XFetchName( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, char** /* window_name_return */ -#endif ); extern int XFillArc( -#if NeedFunctionPrototypes Display* /* display */, Drawable /* d */, GC /* gc */, @@ -2837,21 +2454,17 @@ extern int XFillArc( unsigned int /* height */, int /* angle1 */, int /* angle2 */ -#endif ); extern int XFillArcs( -#if NeedFunctionPrototypes Display* /* display */, Drawable /* d */, GC /* gc */, XArc* /* arcs */, int /* narcs */ -#endif ); extern int XFillPolygon( -#if NeedFunctionPrototypes Display* /* display */, Drawable /* d */, GC /* gc */, @@ -2859,11 +2472,9 @@ extern int XFillPolygon( int /* npoints */, int /* shape */, int /* mode */ -#endif ); extern int XFillRectangle( -#if NeedFunctionPrototypes Display* /* display */, Drawable /* d */, GC /* gc */, @@ -2871,117 +2482,85 @@ extern int XFillRectangle( int /* y */, unsigned int /* width */, unsigned int /* height */ -#endif ); extern int XFillRectangles( -#if NeedFunctionPrototypes Display* /* display */, Drawable /* d */, GC /* gc */, XRectangle* /* rectangles */, int /* nrectangles */ -#endif ); extern int XFlush( -#if NeedFunctionPrototypes Display* /* display */ -#endif ); extern int XForceScreenSaver( -#if NeedFunctionPrototypes Display* /* display */, int /* mode */ -#endif ); extern int XFree( -#if NeedFunctionPrototypes void* /* data */ -#endif ); extern int XFreeColormap( -#if NeedFunctionPrototypes Display* /* display */, Colormap /* colormap */ -#endif ); extern int XFreeColors( -#if NeedFunctionPrototypes Display* /* display */, Colormap /* colormap */, unsigned long* /* pixels */, int /* npixels */, unsigned long /* planes */ -#endif ); extern int XFreeCursor( -#if NeedFunctionPrototypes Display* /* display */, Cursor /* cursor */ -#endif ); extern int XFreeExtensionList( -#if NeedFunctionPrototypes char** /* list */ -#endif ); extern int XFreeFont( -#if NeedFunctionPrototypes Display* /* display */, XFontStruct* /* font_struct */ -#endif ); extern int XFreeFontInfo( -#if NeedFunctionPrototypes char** /* names */, XFontStruct* /* free_info */, int /* actual_count */ -#endif ); extern int XFreeFontNames( -#if NeedFunctionPrototypes char** /* list */ -#endif ); extern int XFreeFontPath( -#if NeedFunctionPrototypes char** /* list */ -#endif ); extern int XFreeGC( -#if NeedFunctionPrototypes Display* /* display */, GC /* gc */ -#endif ); extern int XFreeModifiermap( -#if NeedFunctionPrototypes XModifierKeymap* /* modmap */ -#endif ); extern int XFreePixmap( -#if NeedFunctionPrototypes Display* /* display */, Pixmap /* pixmap */ -#endif ); extern int XGeometry( -#if NeedFunctionPrototypes Display* /* display */, int /* screen */, _Xconst char* /* position */, @@ -2995,48 +2574,38 @@ extern int XGeometry( int* /* y_return */, int* /* width_return */, int* /* height_return */ -#endif ); extern int XGetErrorDatabaseText( -#if NeedFunctionPrototypes Display* /* display */, _Xconst char* /* name */, _Xconst char* /* message */, _Xconst char* /* default_string */, char* /* buffer_return */, int /* length */ -#endif ); extern int XGetErrorText( -#if NeedFunctionPrototypes Display* /* display */, int /* code */, char* /* buffer_return */, int /* length */ -#endif ); extern Bool XGetFontProperty( -#if NeedFunctionPrototypes XFontStruct* /* font_struct */, Atom /* atom */, unsigned long* /* value_return */ -#endif ); extern Status XGetGCValues( -#if NeedFunctionPrototypes Display* /* display */, GC /* gc */, unsigned long /* valuemask */, XGCValues* /* values_return */ -#endif ); extern Status XGetGeometry( -#if NeedFunctionPrototypes Display* /* display */, Drawable /* d */, Window* /* root_return */, @@ -3046,69 +2615,53 @@ extern Status XGetGeometry( unsigned int* /* height_return */, unsigned int* /* border_width_return */, unsigned int* /* depth_return */ -#endif ); extern Status XGetIconName( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, char** /* icon_name_return */ -#endif ); extern int XGetInputFocus( -#if NeedFunctionPrototypes Display* /* display */, Window* /* focus_return */, int* /* revert_to_return */ -#endif ); extern int XGetKeyboardControl( -#if NeedFunctionPrototypes Display* /* display */, XKeyboardState* /* values_return */ -#endif ); extern int XGetPointerControl( -#if NeedFunctionPrototypes Display* /* display */, int* /* accel_numerator_return */, int* /* accel_denominator_return */, int* /* threshold_return */ -#endif ); extern int XGetPointerMapping( -#if NeedFunctionPrototypes Display* /* display */, unsigned char* /* map_return */, int /* nmap */ -#endif ); extern int XGetScreenSaver( -#if NeedFunctionPrototypes Display* /* display */, int* /* timeout_return */, int* /* interval_return */, int* /* prefer_blanking_return */, int* /* allow_exposures_return */ -#endif ); extern Status XGetTransientForHint( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, Window* /* prop_window_return */ -#endif ); extern int XGetWindowProperty( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, Atom /* property */, @@ -3121,19 +2674,15 @@ extern int XGetWindowProperty( unsigned long* /* nitems_return */, unsigned long* /* bytes_after_return */, unsigned char** /* prop_return */ -#endif ); extern Status XGetWindowAttributes( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, XWindowAttributes* /* window_attributes_return */ -#endif ); extern int XGrabButton( -#if NeedFunctionPrototypes Display* /* display */, unsigned int /* button */, unsigned int /* modifiers */, @@ -3144,11 +2693,9 @@ extern int XGrabButton( int /* keyboard_mode */, Window /* confine_to */, Cursor /* cursor */ -#endif ); extern int XGrabKey( -#if NeedFunctionPrototypes Display* /* display */, int /* keycode */, unsigned int /* modifiers */, @@ -3156,22 +2703,18 @@ extern int XGrabKey( Bool /* owner_events */, int /* pointer_mode */, int /* keyboard_mode */ -#endif ); extern int XGrabKeyboard( -#if NeedFunctionPrototypes Display* /* display */, Window /* grab_window */, Bool /* owner_events */, int /* pointer_mode */, int /* keyboard_mode */, Time /* time */ -#endif ); extern int XGrabPointer( -#if NeedFunctionPrototypes Display* /* display */, Window /* grab_window */, Bool /* owner_events */, @@ -3181,236 +2724,171 @@ extern int XGrabPointer( Window /* confine_to */, Cursor /* cursor */, Time /* time */ -#endif ); extern int XGrabServer( -#if NeedFunctionPrototypes Display* /* display */ -#endif ); extern int XHeightMMOfScreen( -#if NeedFunctionPrototypes Screen* /* screen */ -#endif ); extern int XHeightOfScreen( -#if NeedFunctionPrototypes Screen* /* screen */ -#endif ); extern int XIfEvent( -#if NeedFunctionPrototypes Display* /* display */, XEvent* /* event_return */, Bool (*) ( -#if NeedNestedPrototypes Display* /* display */, XEvent* /* event */, XPointer /* arg */ -#endif ) /* predicate */, XPointer /* arg */ -#endif ); extern int XImageByteOrder( -#if NeedFunctionPrototypes Display* /* display */ -#endif ); extern int XInstallColormap( -#if NeedFunctionPrototypes Display* /* display */, Colormap /* colormap */ -#endif ); extern KeyCode XKeysymToKeycode( -#if NeedFunctionPrototypes Display* /* display */, KeySym /* keysym */ -#endif ); extern int XKillClient( -#if NeedFunctionPrototypes Display* /* display */, XID /* resource */ -#endif ); extern Status XLookupColor( -#if NeedFunctionPrototypes Display* /* display */, Colormap /* colormap */, _Xconst char* /* color_name */, XColor* /* exact_def_return */, XColor* /* screen_def_return */ -#endif ); extern int XLowerWindow( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */ -#endif ); extern int XMapRaised( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */ -#endif ); extern int XMapSubwindows( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */ -#endif ); extern int XMapWindow( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */ -#endif ); extern int XMaskEvent( -#if NeedFunctionPrototypes Display* /* display */, long /* event_mask */, XEvent* /* event_return */ -#endif ); extern int XMaxCmapsOfScreen( -#if NeedFunctionPrototypes Screen* /* screen */ -#endif ); extern int XMinCmapsOfScreen( -#if NeedFunctionPrototypes Screen* /* screen */ -#endif ); extern int XMoveResizeWindow( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, int /* x */, int /* y */, unsigned int /* width */, unsigned int /* height */ -#endif ); extern int XMoveWindow( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, int /* x */, int /* y */ -#endif ); extern int XNextEvent( -#if NeedFunctionPrototypes Display* /* display */, XEvent* /* event_return */ -#endif ); extern int XNoOp( -#if NeedFunctionPrototypes Display* /* display */ -#endif ); extern Status XParseColor( -#if NeedFunctionPrototypes Display* /* display */, Colormap /* colormap */, _Xconst char* /* spec */, XColor* /* exact_def_return */ -#endif ); extern int XParseGeometry( -#if NeedFunctionPrototypes _Xconst char* /* parsestring */, int* /* x_return */, int* /* y_return */, unsigned int* /* width_return */, unsigned int* /* height_return */ -#endif ); extern int XPeekEvent( -#if NeedFunctionPrototypes Display* /* display */, XEvent* /* event_return */ -#endif ); extern int XPeekIfEvent( -#if NeedFunctionPrototypes Display* /* display */, XEvent* /* event_return */, Bool (*) ( -#if NeedNestedPrototypes Display* /* display */, XEvent* /* event */, XPointer /* arg */ -#endif ) /* predicate */, XPointer /* arg */ -#endif ); extern int XPending( -#if NeedFunctionPrototypes Display* /* display */ -#endif ); extern int XPlanesOfScreen( -#if NeedFunctionPrototypes Screen* /* screen */ - -#endif ); extern int XProtocolRevision( -#if NeedFunctionPrototypes Display* /* display */ -#endif ); extern int XProtocolVersion( -#if NeedFunctionPrototypes Display* /* display */ -#endif ); extern int XPutBackEvent( -#if NeedFunctionPrototypes Display* /* display */, XEvent* /* event */ -#endif ); extern int XPutImage( -#if NeedFunctionPrototypes Display* /* display */, Drawable /* d */, GC /* gc */, @@ -3421,28 +2899,22 @@ extern int XPutImage( int /* dest_y */, unsigned int /* width */, unsigned int /* height */ -#endif ); extern int XQLength( -#if NeedFunctionPrototypes Display* /* display */ -#endif ); extern Status XQueryBestCursor( -#if NeedFunctionPrototypes Display* /* display */, Drawable /* d */, unsigned int /* width */, unsigned int /* height */, unsigned int* /* width_return */, unsigned int* /* height_return */ -#endif ); extern Status XQueryBestSize( -#if NeedFunctionPrototypes Display* /* display */, int /* class */, Drawable /* which_screen */, @@ -3450,67 +2922,53 @@ extern Status XQueryBestSize( unsigned int /* height */, unsigned int* /* width_return */, unsigned int* /* height_return */ -#endif ); extern Status XQueryBestStipple( -#if NeedFunctionPrototypes Display* /* display */, Drawable /* which_screen */, unsigned int /* width */, unsigned int /* height */, unsigned int* /* width_return */, unsigned int* /* height_return */ -#endif ); extern Status XQueryBestTile( -#if NeedFunctionPrototypes Display* /* display */, Drawable /* which_screen */, unsigned int /* width */, unsigned int /* height */, unsigned int* /* width_return */, unsigned int* /* height_return */ -#endif ); extern int XQueryColor( -#if NeedFunctionPrototypes Display* /* display */, Colormap /* colormap */, XColor* /* def_in_out */ -#endif ); extern int XQueryColors( -#if NeedFunctionPrototypes Display* /* display */, Colormap /* colormap */, XColor* /* defs_in_out */, int /* ncolors */ -#endif ); extern Bool XQueryExtension( -#if NeedFunctionPrototypes Display* /* display */, _Xconst char* /* name */, int* /* major_opcode_return */, int* /* first_event_return */, int* /* first_error_return */ -#endif ); extern int XQueryKeymap( -#if NeedFunctionPrototypes Display* /* display */, char [32] /* keys_return */ -#endif ); extern Bool XQueryPointer( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, Window* /* root_return */, @@ -3520,11 +2978,9 @@ extern Bool XQueryPointer( int* /* win_x_return */, int* /* win_y_return */, unsigned int* /* mask_return */ -#endif ); extern int XQueryTextExtents( -#if NeedFunctionPrototypes Display* /* display */, XID /* font_ID */, _Xconst char* /* string */, @@ -3533,11 +2989,9 @@ extern int XQueryTextExtents( int* /* font_ascent_return */, int* /* font_descent_return */, XCharStruct* /* overall_return */ -#endif ); extern int XQueryTextExtents16( -#if NeedFunctionPrototypes Display* /* display */, XID /* font_ID */, _Xconst XChar2b* /* string */, @@ -3546,29 +3000,23 @@ extern int XQueryTextExtents16( int* /* font_ascent_return */, int* /* font_descent_return */, XCharStruct* /* overall_return */ -#endif ); extern Status XQueryTree( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, Window* /* root_return */, Window* /* parent_return */, Window** /* children_return */, unsigned int* /* nchildren_return */ -#endif ); extern int XRaiseWindow( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */ -#endif ); extern int XReadBitmapFile( -#if NeedFunctionPrototypes Display* /* display */, Drawable /* d */, _Xconst char* /* filename */, @@ -3577,184 +3025,140 @@ extern int XReadBitmapFile( Pixmap* /* bitmap_return */, int* /* x_hot_return */, int* /* y_hot_return */ -#endif ); extern int XReadBitmapFileData( -#if NeedFunctionPrototypes _Xconst char* /* filename */, unsigned int* /* width_return */, unsigned int* /* height_return */, unsigned char** /* data_return */, int* /* x_hot_return */, int* /* y_hot_return */ -#endif ); extern int XRebindKeysym( -#if NeedFunctionPrototypes Display* /* display */, KeySym /* keysym */, KeySym* /* list */, int /* mod_count */, _Xconst unsigned char* /* string */, int /* bytes_string */ -#endif ); extern int XRecolorCursor( -#if NeedFunctionPrototypes Display* /* display */, Cursor /* cursor */, XColor* /* foreground_color */, XColor* /* background_color */ -#endif ); extern int XRefreshKeyboardMapping( -#if NeedFunctionPrototypes XMappingEvent* /* event_map */ -#endif ); extern int XRemoveFromSaveSet( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */ -#endif ); extern int XRemoveHost( -#if NeedFunctionPrototypes Display* /* display */, XHostAddress* /* host */ -#endif ); extern int XRemoveHosts( -#if NeedFunctionPrototypes Display* /* display */, XHostAddress* /* hosts */, int /* num_hosts */ -#endif ); extern int XReparentWindow( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, Window /* parent */, int /* x */, int /* y */ -#endif ); extern int XResetScreenSaver( -#if NeedFunctionPrototypes Display* /* display */ -#endif ); extern int XResizeWindow( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, unsigned int /* width */, unsigned int /* height */ -#endif ); extern int XRestackWindows( -#if NeedFunctionPrototypes Display* /* display */, Window* /* windows */, int /* nwindows */ -#endif ); extern int XRotateBuffers( -#if NeedFunctionPrototypes Display* /* display */, int /* rotate */ -#endif ); extern int XRotateWindowProperties( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, Atom* /* properties */, int /* num_prop */, int /* npositions */ -#endif ); extern int XScreenCount( -#if NeedFunctionPrototypes Display* /* display */ -#endif ); extern int XSelectInput( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, long /* event_mask */ -#endif ); extern Status XSendEvent( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, Bool /* propagate */, long /* event_mask */, XEvent* /* event_send */ -#endif ); extern int XSetAccessControl( -#if NeedFunctionPrototypes Display* /* display */, int /* mode */ -#endif ); extern int XSetArcMode( -#if NeedFunctionPrototypes Display* /* display */, GC /* gc */, int /* arc_mode */ -#endif ); extern int XSetBackground( -#if NeedFunctionPrototypes Display* /* display */, GC /* gc */, unsigned long /* background */ -#endif ); extern int XSetClipMask( -#if NeedFunctionPrototypes Display* /* display */, GC /* gc */, Pixmap /* pixmap */ -#endif ); extern int XSetClipOrigin( -#if NeedFunctionPrototypes Display* /* display */, GC /* gc */, int /* clip_x_origin */, int /* clip_y_origin */ -#endif ); extern int XSetClipRectangles( -#if NeedFunctionPrototypes Display* /* display */, GC /* gc */, int /* clip_x_origin */, @@ -3762,314 +3166,240 @@ extern int XSetClipRectangles( XRectangle* /* rectangles */, int /* n */, int /* ordering */ -#endif ); extern int XSetCloseDownMode( -#if NeedFunctionPrototypes Display* /* display */, int /* close_mode */ -#endif ); extern int XSetCommand( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, char** /* argv */, int /* argc */ -#endif ); extern int XSetDashes( -#if NeedFunctionPrototypes Display* /* display */, GC /* gc */, int /* dash_offset */, _Xconst char* /* dash_list */, int /* n */ -#endif ); extern int XSetFillRule( -#if NeedFunctionPrototypes Display* /* display */, GC /* gc */, int /* fill_rule */ -#endif ); extern int XSetFillStyle( -#if NeedFunctionPrototypes Display* /* display */, GC /* gc */, int /* fill_style */ -#endif ); extern int XSetFont( -#if NeedFunctionPrototypes Display* /* display */, GC /* gc */, Font /* font */ -#endif ); extern int XSetFontPath( -#if NeedFunctionPrototypes Display* /* display */, char** /* directories */, int /* ndirs */ -#endif ); extern int XSetForeground( -#if NeedFunctionPrototypes Display* /* display */, GC /* gc */, unsigned long /* foreground */ -#endif ); extern int XSetFunction( -#if NeedFunctionPrototypes Display* /* display */, GC /* gc */, int /* function */ -#endif ); extern int XSetGraphicsExposures( -#if NeedFunctionPrototypes Display* /* display */, GC /* gc */, Bool /* graphics_exposures */ -#endif ); extern int XSetIconName( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, _Xconst char* /* icon_name */ -#endif ); extern int XSetInputFocus( -#if NeedFunctionPrototypes Display* /* display */, Window /* focus */, int /* revert_to */, Time /* time */ -#endif ); extern int XSetLineAttributes( -#if NeedFunctionPrototypes Display* /* display */, GC /* gc */, unsigned int /* line_width */, int /* line_style */, int /* cap_style */, int /* join_style */ -#endif ); extern int XSetModifierMapping( -#if NeedFunctionPrototypes Display* /* display */, XModifierKeymap* /* modmap */ -#endif ); extern int XSetPlaneMask( -#if NeedFunctionPrototypes Display* /* display */, GC /* gc */, unsigned long /* plane_mask */ -#endif ); extern int XSetPointerMapping( -#if NeedFunctionPrototypes Display* /* display */, _Xconst unsigned char* /* map */, int /* nmap */ -#endif ); extern int XSetScreenSaver( -#if NeedFunctionPrototypes Display* /* display */, int /* timeout */, int /* interval */, int /* prefer_blanking */, int /* allow_exposures */ -#endif ); extern int XSetSelectionOwner( -#if NeedFunctionPrototypes Display* /* display */, Atom /* selection */, Window /* owner */, Time /* time */ -#endif ); extern int XSetState( -#if NeedFunctionPrototypes Display* /* display */, GC /* gc */, unsigned long /* foreground */, unsigned long /* background */, int /* function */, unsigned long /* plane_mask */ -#endif ); extern int XSetStipple( -#if NeedFunctionPrototypes Display* /* display */, GC /* gc */, Pixmap /* stipple */ -#endif ); extern int XSetSubwindowMode( -#if NeedFunctionPrototypes Display* /* display */, GC /* gc */, int /* subwindow_mode */ -#endif ); extern int XSetTSOrigin( -#if NeedFunctionPrototypes Display* /* display */, GC /* gc */, int /* ts_x_origin */, int /* ts_y_origin */ -#endif ); extern int XSetTile( -#if NeedFunctionPrototypes Display* /* display */, GC /* gc */, Pixmap /* tile */ -#endif ); extern int XSetWindowBackground( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, unsigned long /* background_pixel */ -#endif ); extern int XSetWindowBackgroundPixmap( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, Pixmap /* background_pixmap */ -#endif ); extern int XSetWindowBorder( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, unsigned long /* border_pixel */ -#endif ); extern int XSetWindowBorderPixmap( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, Pixmap /* border_pixmap */ -#endif ); extern int XSetWindowBorderWidth( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, unsigned int /* width */ -#endif ); extern int XSetWindowColormap( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, Colormap /* colormap */ -#endif ); extern int XStoreBuffer( -#if NeedFunctionPrototypes Display* /* display */, _Xconst char* /* bytes */, int /* nbytes */, int /* buffer */ -#endif ); extern int XStoreBytes( -#if NeedFunctionPrototypes Display* /* display */, _Xconst char* /* bytes */, int /* nbytes */ -#endif ); extern int XStoreColor( -#if NeedFunctionPrototypes Display* /* display */, Colormap /* colormap */, XColor* /* color */ -#endif ); extern int XStoreColors( -#if NeedFunctionPrototypes Display* /* display */, Colormap /* colormap */, XColor* /* color */, int /* ncolors */ -#endif ); extern int XStoreName( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, _Xconst char* /* window_name */ -#endif ); extern int XStoreNamedColor( -#if NeedFunctionPrototypes Display* /* display */, Colormap /* colormap */, _Xconst char* /* color */, unsigned long /* pixel */, int /* flags */ -#endif ); extern int XSync( -#if NeedFunctionPrototypes Display* /* display */, Bool /* discard */ -#endif ); extern int XTextExtents( -#if NeedFunctionPrototypes XFontStruct* /* font_struct */, _Xconst char* /* string */, int /* nchars */, @@ -4077,11 +3407,9 @@ extern int XTextExtents( int* /* font_ascent_return */, int* /* font_descent_return */, XCharStruct* /* overall_return */ -#endif ); extern int XTextExtents16( -#if NeedFunctionPrototypes XFontStruct* /* font_struct */, _Xconst XChar2b* /* string */, int /* nchars */, @@ -4089,27 +3417,21 @@ extern int XTextExtents16( int* /* font_ascent_return */, int* /* font_descent_return */, XCharStruct* /* overall_return */ -#endif ); extern int XTextWidth( -#if NeedFunctionPrototypes XFontStruct* /* font_struct */, _Xconst char* /* string */, int /* count */ -#endif ); extern int XTextWidth16( -#if NeedFunctionPrototypes XFontStruct* /* font_struct */, _Xconst XChar2b* /* string */, int /* count */ -#endif ); extern Bool XTranslateCoordinates( -#if NeedFunctionPrototypes Display* /* display */, Window /* src_w */, Window /* dest_w */, @@ -4118,90 +3440,66 @@ extern Bool XTranslateCoordinates( int* /* dest_x_return */, int* /* dest_y_return */, Window* /* child_return */ -#endif ); extern int XUndefineCursor( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */ -#endif ); extern int XUngrabButton( -#if NeedFunctionPrototypes Display* /* display */, unsigned int /* button */, unsigned int /* modifiers */, Window /* grab_window */ -#endif ); extern int XUngrabKey( -#if NeedFunctionPrototypes Display* /* display */, int /* keycode */, unsigned int /* modifiers */, Window /* grab_window */ -#endif ); extern int XUngrabKeyboard( -#if NeedFunctionPrototypes Display* /* display */, Time /* time */ -#endif ); extern int XUngrabPointer( -#if NeedFunctionPrototypes Display* /* display */, Time /* time */ -#endif ); extern int XUngrabServer( -#if NeedFunctionPrototypes Display* /* display */ -#endif ); extern int XUninstallColormap( -#if NeedFunctionPrototypes Display* /* display */, Colormap /* colormap */ -#endif ); extern int XUnloadFont( -#if NeedFunctionPrototypes Display* /* display */, Font /* font */ -#endif ); extern int XUnmapSubwindows( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */ -#endif ); extern int XUnmapWindow( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */ -#endif ); extern int XVendorRelease( -#if NeedFunctionPrototypes Display* /* display */ -#endif ); extern int XWarpPointer( -#if NeedFunctionPrototypes Display* /* display */, Window /* src_w */, Window /* dest_w */, @@ -4211,32 +3509,24 @@ extern int XWarpPointer( unsigned int /* src_height */, int /* dest_x */, int /* dest_y */ -#endif ); extern int XWidthMMOfScreen( -#if NeedFunctionPrototypes Screen* /* screen */ -#endif ); extern int XWidthOfScreen( -#if NeedFunctionPrototypes Screen* /* screen */ -#endif ); extern int XWindowEvent( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, long /* event_mask */, XEvent* /* event_return */ -#endif ); extern int XWriteBitmapFile( -#if NeedFunctionPrototypes Display* /* display */, _Xconst char* /* filename */, Pixmap /* bitmap */, @@ -4244,7 +3534,6 @@ extern int XWriteBitmapFile( unsigned int /* height */, int /* x_hot */, int /* y_hot */ -#endif ); extern Bool XSupportsLocale (void); @@ -4254,196 +3543,143 @@ extern char *XSetLocaleModifiers( ); extern XOM XOpenOM( -#if NeedFunctionPrototypes Display* /* display */, struct _XrmHashBucketRec* /* rdb */, _Xconst char* /* res_name */, _Xconst char* /* res_class */ -#endif ); extern Status XCloseOM( -#if NeedFunctionPrototypes XOM /* om */ -#endif ); extern char *XSetOMValues( -#if NeedVarargsPrototypes XOM /* om */, ... -#endif ); extern char *XGetOMValues( -#if NeedVarargsPrototypes XOM /* om */, ... -#endif ); extern Display *XDisplayOfOM( -#if NeedFunctionPrototypes XOM /* om */ -#endif ); extern char *XLocaleOfOM( -#if NeedFunctionPrototypes XOM /* om */ -#endif ); extern XOC XCreateOC( -#if NeedVarargsPrototypes XOM /* om */, ... -#endif ); extern void XDestroyOC( -#if NeedFunctionPrototypes XOC /* oc */ -#endif ); extern XOM XOMOfOC( -#if NeedFunctionPrototypes XOC /* oc */ -#endif ); extern char *XSetOCValues( -#if NeedVarargsPrototypes XOC /* oc */, ... -#endif ); extern char *XGetOCValues( -#if NeedVarargsPrototypes XOC /* oc */, ... -#endif ); extern XFontSet XCreateFontSet( -#if NeedFunctionPrototypes Display* /* display */, _Xconst char* /* base_font_name_list */, char*** /* missing_charset_list */, int* /* missing_charset_count */, char** /* def_string */ -#endif ); extern void XFreeFontSet( -#if NeedFunctionPrototypes Display* /* display */, XFontSet /* font_set */ -#endif ); extern int XFontsOfFontSet( -#if NeedFunctionPrototypes XFontSet /* font_set */, XFontStruct*** /* font_struct_list */, char*** /* font_name_list */ -#endif ); extern char *XBaseFontNameListOfFontSet( -#if NeedFunctionPrototypes XFontSet /* font_set */ -#endif ); extern char *XLocaleOfFontSet( -#if NeedFunctionPrototypes XFontSet /* font_set */ -#endif ); extern Bool XContextDependentDrawing( -#if NeedFunctionPrototypes XFontSet /* font_set */ -#endif ); extern Bool XDirectionalDependentDrawing( -#if NeedFunctionPrototypes XFontSet /* font_set */ -#endif ); extern Bool XContextualDrawing( -#if NeedFunctionPrototypes XFontSet /* font_set */ -#endif ); extern XFontSetExtents *XExtentsOfFontSet( -#if NeedFunctionPrototypes XFontSet /* font_set */ -#endif ); extern int XmbTextEscapement( -#if NeedFunctionPrototypes XFontSet /* font_set */, _Xconst char* /* text */, int /* bytes_text */ -#endif ); extern int XwcTextEscapement( -#if NeedFunctionPrototypes XFontSet /* font_set */, _Xconst wchar_t* /* text */, int /* num_wchars */ -#endif ); extern int Xutf8TextEscapement( -#if NeedFunctionPrototypes XFontSet /* font_set */, _Xconst char* /* text */, int /* bytes_text */ -#endif ); extern int XmbTextExtents( -#if NeedFunctionPrototypes XFontSet /* font_set */, _Xconst char* /* text */, int /* bytes_text */, XRectangle* /* overall_ink_return */, XRectangle* /* overall_logical_return */ -#endif ); extern int XwcTextExtents( -#if NeedFunctionPrototypes XFontSet /* font_set */, _Xconst wchar_t* /* text */, int /* num_wchars */, XRectangle* /* overall_ink_return */, XRectangle* /* overall_logical_return */ -#endif ); extern int Xutf8TextExtents( -#if NeedFunctionPrototypes XFontSet /* font_set */, _Xconst char* /* text */, int /* bytes_text */, XRectangle* /* overall_ink_return */, XRectangle* /* overall_logical_return */ -#endif ); extern Status XmbTextPerCharExtents( -#if NeedFunctionPrototypes XFontSet /* font_set */, _Xconst char* /* text */, int /* bytes_text */, @@ -4453,11 +3689,9 @@ extern Status XmbTextPerCharExtents( int* /* num_chars */, XRectangle* /* overall_ink_return */, XRectangle* /* overall_logical_return */ -#endif ); extern Status XwcTextPerCharExtents( -#if NeedFunctionPrototypes XFontSet /* font_set */, _Xconst wchar_t* /* text */, int /* num_wchars */, @@ -4467,11 +3701,9 @@ extern Status XwcTextPerCharExtents( int* /* num_chars */, XRectangle* /* overall_ink_return */, XRectangle* /* overall_logical_return */ -#endif ); extern Status Xutf8TextPerCharExtents( -#if NeedFunctionPrototypes XFontSet /* font_set */, _Xconst char* /* text */, int /* bytes_text */, @@ -4481,11 +3713,9 @@ extern Status Xutf8TextPerCharExtents( int* /* num_chars */, XRectangle* /* overall_ink_return */, XRectangle* /* overall_logical_return */ -#endif ); extern void XmbDrawText( -#if NeedFunctionPrototypes Display* /* display */, Drawable /* d */, GC /* gc */, @@ -4493,11 +3723,9 @@ extern void XmbDrawText( int /* y */, XmbTextItem* /* text_items */, int /* nitems */ -#endif ); extern void XwcDrawText( -#if NeedFunctionPrototypes Display* /* display */, Drawable /* d */, GC /* gc */, @@ -4505,11 +3733,9 @@ extern void XwcDrawText( int /* y */, XwcTextItem* /* text_items */, int /* nitems */ -#endif ); extern void Xutf8DrawText( -#if NeedFunctionPrototypes Display* /* display */, Drawable /* d */, GC /* gc */, @@ -4517,11 +3743,9 @@ extern void Xutf8DrawText( int /* y */, XmbTextItem* /* text_items */, int /* nitems */ -#endif ); extern void XmbDrawString( -#if NeedFunctionPrototypes Display* /* display */, Drawable /* d */, XFontSet /* font_set */, @@ -4530,11 +3754,9 @@ extern void XmbDrawString( int /* y */, _Xconst char* /* text */, int /* bytes_text */ -#endif ); extern void XwcDrawString( -#if NeedFunctionPrototypes Display* /* display */, Drawable /* d */, XFontSet /* font_set */, @@ -4543,11 +3765,9 @@ extern void XwcDrawString( int /* y */, _Xconst wchar_t* /* text */, int /* num_wchars */ -#endif ); extern void Xutf8DrawString( -#if NeedFunctionPrototypes Display* /* display */, Drawable /* d */, XFontSet /* font_set */, @@ -4556,11 +3776,9 @@ extern void Xutf8DrawString( int /* y */, _Xconst char* /* text */, int /* bytes_text */ -#endif ); extern void XmbDrawImageString( -#if NeedFunctionPrototypes Display* /* display */, Drawable /* d */, XFontSet /* font_set */, @@ -4569,11 +3787,9 @@ extern void XmbDrawImageString( int /* y */, _Xconst char* /* text */, int /* bytes_text */ -#endif ); extern void XwcDrawImageString( -#if NeedFunctionPrototypes Display* /* display */, Drawable /* d */, XFontSet /* font_set */, @@ -4582,11 +3798,9 @@ extern void XwcDrawImageString( int /* y */, _Xconst wchar_t* /* text */, int /* num_wchars */ -#endif ); extern void Xutf8DrawImageString( -#if NeedFunctionPrototypes Display* /* display */, Drawable /* d */, XFontSet /* font_set */, @@ -4595,231 +3809,171 @@ extern void Xutf8DrawImageString( int /* y */, _Xconst char* /* text */, int /* bytes_text */ -#endif ); extern XIM XOpenIM( -#if NeedFunctionPrototypes Display* /* dpy */, struct _XrmHashBucketRec* /* rdb */, char* /* res_name */, char* /* res_class */ -#endif ); extern Status XCloseIM( -#if NeedFunctionPrototypes XIM /* im */ -#endif ); extern char *XGetIMValues( -#if NeedVarargsPrototypes XIM /* im */, ... -#endif ); extern char *XSetIMValues( -#if NeedVarargsPrototypes XIM /* im */, ... -#endif ); extern Display *XDisplayOfIM( -#if NeedFunctionPrototypes XIM /* im */ -#endif ); extern char *XLocaleOfIM( -#if NeedFunctionPrototypes XIM /* im*/ -#endif ); extern XIC XCreateIC( -#if NeedVarargsPrototypes XIM /* im */, ... -#endif ); extern void XDestroyIC( -#if NeedFunctionPrototypes XIC /* ic */ -#endif ); extern void XSetICFocus( -#if NeedFunctionPrototypes XIC /* ic */ -#endif ); extern void XUnsetICFocus( -#if NeedFunctionPrototypes XIC /* ic */ -#endif ); extern wchar_t *XwcResetIC( -#if NeedFunctionPrototypes XIC /* ic */ -#endif ); extern char *XmbResetIC( -#if NeedFunctionPrototypes XIC /* ic */ -#endif ); extern char *Xutf8ResetIC( -#if NeedFunctionPrototypes XIC /* ic */ -#endif ); extern char *XSetICValues( -#if NeedVarargsPrototypes XIC /* ic */, ... -#endif ); extern char *XGetICValues( -#if NeedVarargsPrototypes XIC /* ic */, ... -#endif ); extern XIM XIMOfIC( -#if NeedFunctionPrototypes XIC /* ic */ -#endif ); extern Bool XFilterEvent( -#if NeedFunctionPrototypes XEvent* /* event */, Window /* window */ -#endif ); extern int XmbLookupString( -#if NeedFunctionPrototypes XIC /* ic */, XKeyPressedEvent* /* event */, char* /* buffer_return */, int /* bytes_buffer */, KeySym* /* keysym_return */, Status* /* status_return */ -#endif ); extern int XwcLookupString( -#if NeedFunctionPrototypes XIC /* ic */, XKeyPressedEvent* /* event */, wchar_t* /* buffer_return */, int /* wchars_buffer */, KeySym* /* keysym_return */, Status* /* status_return */ -#endif ); extern int Xutf8LookupString( -#if NeedFunctionPrototypes XIC /* ic */, XKeyPressedEvent* /* event */, char* /* buffer_return */, int /* bytes_buffer */, KeySym* /* keysym_return */, Status* /* status_return */ -#endif ); extern XVaNestedList XVaCreateNestedList( -#if NeedVarargsPrototypes int /*unused*/, ... -#endif ); /* internal connections for IMs */ extern Bool XRegisterIMInstantiateCallback( -#if NeedFunctionPrototypes Display* /* dpy */, struct _XrmHashBucketRec* /* rdb */, char* /* res_name */, char* /* res_class */, XIDProc /* callback */, XPointer /* client_data */ -#endif ); extern Bool XUnregisterIMInstantiateCallback( -#if NeedFunctionPrototypes Display* /* dpy */, struct _XrmHashBucketRec* /* rdb */, char* /* res_name */, char* /* res_class */, XIDProc /* callback */, XPointer /* client_data */ -#endif ); typedef void (*XConnectionWatchProc)( -#if NeedFunctionPrototypes Display* /* dpy */, XPointer /* client_data */, int /* fd */, Bool /* opening */, /* open or close flag */ XPointer* /* watch_data */ /* open sets, close uses */ -#endif ); extern Status XInternalConnectionNumbers( -#if NeedFunctionPrototypes Display* /* dpy */, int** /* fd_return */, int* /* count_return */ -#endif ); extern void XProcessInternalConnection( -#if NeedFunctionPrototypes Display* /* dpy */, int /* fd */ -#endif ); extern Status XAddConnectionWatch( -#if NeedFunctionPrototypes Display* /* dpy */, XConnectionWatchProc /* callback */, XPointer /* client_data */ -#endif ); extern void XRemoveConnectionWatch( -#if NeedFunctionPrototypes Display* /* dpy */, XConnectionWatchProc /* callback */, XPointer /* client_data */ -#endif ); extern void XSetAuthorization( -#if NeedFunctionPrototypes char * /* name */, int /* namelen */, char * /* data */, int /* datalen */ -#endif ); extern int _Xmbtowc( -#if NeedFunctionPrototypes wchar_t * /* wstr */, #ifdef ISC char const * /* str */, @@ -4828,14 +3982,11 @@ extern int _Xmbtowc( char * /* str */, int /* len */ #endif -#endif ); extern int _Xwctomb( -#if NeedFunctionPrototypes char * /* str */, wchar_t /* wc */ -#endif ); _XFUNCPROTOEND diff --git a/include/X11/Xlibint.h b/include/X11/Xlibint.h index 9fca144..007c447 100644 --- a/include/X11/Xlibint.h +++ b/include/X11/Xlibint.h @@ -27,7 +27,7 @@ other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/Xlibint.h,v 3.24 2002/05/31 18:45:42 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Xlibint.h,v 3.28 2003/11/17 22:20:11 dawes Exp $ */ #ifndef _XLIBINT_H_ #define _XLIBINT_H_ 1 @@ -79,9 +79,7 @@ struct _XDisplay XID resource_id; /* allocator current ID */ int resource_shift; /* allocator shift to correct bits */ XID (*resource_alloc)( /* allocator function */ -#if NeedFunctionPrototypes struct _XDisplay* -#endif ); int byte_order; /* screen byte order, LSBFirst, MSBFirst */ int bitmap_unit; /* padding and data requirements */ @@ -102,9 +100,7 @@ struct _XDisplay unsigned max_request_size; /* maximum number 32 bit words in request*/ struct _XrmHashBucketRec *db; int (*synchandler)( /* Synchronization handler */ -#if NeedFunctionPrototypes struct _XDisplay* -#endif ); char *display_name; /* "host:display" string used on this connect*/ int default_screen; /* default screen for operations */ @@ -214,10 +210,8 @@ typedef struct _XSQEvent #define NEED_REPLIES #endif -#if NeedFunctionPrototypes /* prototypes require event type definitions */ #define NEED_EVENTS #define NEED_REPLIES -#endif #include <X11/Xproto.h> #ifdef __sgi #define _SGI_MP_SOURCE /* turn this on to get MP safe errno */ @@ -280,32 +274,24 @@ struct _XLockPtrs { /* in XlibInt.c */ extern void (*_XCreateMutex_fn)( -#if NeedFunctionPrototypes LockInfoPtr /* lock */ -#endif ); extern void (*_XFreeMutex_fn)( -#if NeedFunctionPrototypes LockInfoPtr /* lock */ -#endif ); extern void (*_XLockMutex_fn)( -#if NeedFunctionPrototypes LockInfoPtr /* lock */ #if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE) , char * /* file */ , int /* line */ #endif -#endif ); extern void (*_XUnlockMutex_fn)( -#if NeedFunctionPrototypes LockInfoPtr /* lock */ #if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE) , char * /* file */ , int /* line */ #endif -#endif ); extern LockInfoPtr _Xglobal_lock; @@ -631,6 +617,7 @@ extern void _XFlushGCCache(Display *dpy, GC gc); if (dpy->bufptr + (n) > dpy->bufmax) \ _XFlush (dpy); \ ptr = (type) dpy->bufptr; \ + (void)ptr; \ dpy->bufptr += (n); #ifdef WORD64 @@ -643,18 +630,14 @@ extern void _XFlushGCCache(Display *dpy, GC gc); #ifdef LONG64 #define Data32(dpy, data, len) _XData32(dpy, (long *)data, len) extern int _XData32( -#if NeedFunctionPrototypes Display *dpy, register long *data, unsigned len -#endif ); extern void _XRead32( -#if NeedFunctionPrototypes Display *dpy, register long *data, long len -#endif ); #else #define Data32(dpy, data, len) Data((dpy), (char *)(data), (len)) @@ -755,13 +738,11 @@ typedef struct _XInternalAsync { * The handler returns True iff it handled this reply. */ Bool (*handler)( -#if NeedNestedPrototypes Display* /* dpy */, xReply* /* rep */, char* /* buf */, int /* len */, XPointer /* data */ -#endif ); XPointer data; } _XAsyncHandler; @@ -785,15 +766,11 @@ extern void _XDeqAsyncHandler(Display *dpy, _XAsyncHandler *handler); } typedef void (*FreeFuncType) ( -#if NeedFunctionPrototypes Display* /* display */ -#endif ); typedef int (*FreeModmapType) ( -#if NeedFunctionPrototypes XModifierKeymap* /* modmap */ -#endif ); /* @@ -813,94 +790,72 @@ typedef struct _XFreeFuncs { /* types for InitExt.c */ typedef int (*CreateGCType) ( -#if NeedFunctionPrototypes Display* /* display */, GC /* gc */, XExtCodes* /* codes */ -#endif ); typedef int (*CopyGCType)( -#if NeedFunctionPrototypes Display* /* display */, GC /* gc */, XExtCodes* /* codes */ -#endif ); typedef int (*FlushGCType) ( -#if NeedFunctionPrototypes Display* /* display */, GC /* gc */, XExtCodes* /* codes */ -#endif ); typedef int (*FreeGCType) ( -#if NeedFunctionPrototypes Display* /* display */, GC /* gc */, XExtCodes* /* codes */ -#endif ); typedef int (*CreateFontType) ( -#if NeedFunctionPrototypes Display* /* display */, XFontStruct* /* fs */, XExtCodes* /* codes */ -#endif ); typedef int (*FreeFontType) ( -#if NeedFunctionPrototypes Display* /* display */, XFontStruct* /* fs */, XExtCodes* /* codes */ -#endif ); typedef int (*CloseDisplayType) ( -#if NeedFunctionPrototypes Display* /* display */, XExtCodes* /* codes */ -#endif ); typedef int (*ErrorType) ( -#if NeedFunctionPrototypes Display* /* display */, xError* /* err */, XExtCodes* /* codes */, int* /* ret_code */ -#endif ); typedef char* (*ErrorStringType) ( -#if NeedFunctionPrototypes Display* /* display */, int /* code */, XExtCodes* /* codes */, char* /* buffer */, int /* nbytes */ -#endif ); typedef void (*PrintErrorType)( -#if NeedFunctionPrototypes Display* /* display */, XErrorEvent* /* ev */, void* /* fp */ -#endif ); typedef void (*BeforeFlushType)( -#if NeedFunctionPrototypes Display* /* display */, XExtCodes* /* codes */, _Xconst char* /* data */, long /* len */ -#endif ); /* @@ -930,87 +885,60 @@ typedef struct _XExten { /* private to extension mechanism */ extern void Data(Display *dpy, char *data, long len); #endif extern int _XError( -#if NeedFunctionPrototypes Display* /* dpy */, xError* /* rep */ -#endif ); extern int _XIOError( -#if NeedFunctionPrototypes Display* /* dpy */ -#endif ); extern int (*_XIOErrorFunction)( -#if NeedNestedPrototypes Display* /* dpy */ -#endif ); extern int (*_XErrorFunction)( -#if NeedNestedPrototypes Display* /* dpy */, XErrorEvent* /* error_event */ -#endif ); extern void _XEatData( -#if NeedFunctionPrototypes Display* /* dpy */, unsigned long /* n */ -#endif ); extern char *_XAllocScratch( -#if NeedFunctionPrototypes Display* /* dpy */, unsigned long /* nbytes */ -#endif ); extern char *_XAllocTemp( -#if NeedFunctionPrototypes Display* /* dpy */, unsigned long /* nbytes */ -#endif ); extern void _XFreeTemp( -#if NeedFunctionPrototypes Display* /* dpy */, char* /* buf */, unsigned long /* nbytes */ -#endif ); extern Visual *_XVIDtoVisual( -#if NeedFunctionPrototypes Display* /* dpy */, VisualID /* id */ -#endif ); extern unsigned long _XSetLastRequestRead( -#if NeedFunctionPrototypes Display* /* dpy */, xGenericReply* /* rep */ -#endif ); extern int _XGetHostname( -#if NeedFunctionPrototypes char* /* buf */, int /* maxlen */ -#endif ); extern Screen *_XScreenOfWindow( -#if NeedFunctionPrototypes Display* /* dpy */, Window /* w */ -#endif ); extern Bool _XAsyncErrorHandler( -#if NeedFunctionPrototypes Display* /* dpy */, xReply* /* rep */, char* /* buf */, int /* len */, XPointer /* data */ -#endif ); extern char *_XGetAsyncReply( -#if NeedFunctionPrototypes Display* /* dpy */, char* /* replbuf */, xReply* /* rep */, @@ -1018,10 +946,8 @@ extern char *_XGetAsyncReply( int /* len */, int /* extra */, Bool /* discard */ -#endif ); extern void _XGetAsyncData( -#if NeedFunctionPrototypes Display* /* dpy */, char * /* data */, char * /* buf */, @@ -1029,374 +955,261 @@ extern void _XGetAsyncData( int /* skip */, int /* datalen */, int /* discardtotal */ -#endif ); extern void _XFlush( -#if NeedFunctionPrototypes Display* /* dpy */ -#endif ); extern int _XEventsQueued( -#if NeedFunctionPrototypes Display* /* dpy */, int /* mode */ -#endif ); extern void _XReadEvents( -#if NeedFunctionPrototypes Display* /* dpy */ -#endif ); extern int _XRead( -#if NeedFunctionPrototypes Display* /* dpy */, char* /* data */, long /* size */ -#endif ); extern void _XReadPad( -#if NeedFunctionPrototypes Display* /* dpy */, char* /* data */, long /* size */ -#endif ); extern void _XSend( -#if NeedFunctionPrototypes Display* /* dpy */, _Xconst char* /* data */, long /* size */ -#endif ); extern Status _XReply( -#if NeedFunctionPrototypes Display* /* dpy */, xReply* /* rep */, int /* extra */, Bool /* discard */ -#endif ); extern void _XEnq( -#if NeedFunctionPrototypes Display* /* dpy */, xEvent* /* event */ -#endif ); extern void _XDeq( -#if NeedFunctionPrototypes Display* /* dpy */, _XQEvent* /* prev */, _XQEvent* /* qelt */ -#endif ); extern Bool _XUnknownWireEvent( -#if NeedFunctionPrototypes Display* /* dpy */, XEvent* /* re */, xEvent* /* event */ -#endif ); extern Status _XUnknownNativeEvent( -#if NeedFunctionPrototypes Display* /* dpy */, XEvent* /* re */, xEvent* /* event */ -#endif ); extern Bool _XWireToEvent(Display *dpy, XEvent *re, xEvent *event); extern Bool _XDefaultWireError(Display *display, XErrorEvent *he, xError *we); extern Bool _XPollfdCacheInit(Display *dpy); +extern void _XPollfdCacheAdd(Display *dpy, int fd); +extern void _XPollfdCacheDel(Display *dpy, int fd); extern XID _XAllocID(Display *dpy); extern void _XAllocIDs(Display *dpy, XID *ids, int count); extern int _XFreeExtData( -#if NeedFunctionPrototypes XExtData* /* extension */ -#endif ); extern int (*XESetCreateGC( -#if NeedFunctionPrototypes Display* /* display */, int /* extension */, int (*) ( -#if NeedNestedPrototypes Display* /* display */, GC /* gc */, XExtCodes* /* codes */ -#endif ) /* proc */ -#endif ))( -#if NeedNestedPrototypes Display*, GC, XExtCodes* -#endif ); extern int (*XESetCopyGC( -#if NeedFunctionPrototypes Display* /* display */, int /* extension */, int (*) ( -#if NeedNestedPrototypes Display* /* display */, GC /* gc */, XExtCodes* /* codes */ -#endif ) /* proc */ -#endif ))( -#if NeedNestedPrototypes Display*, GC, XExtCodes* -#endif ); extern int (*XESetFlushGC( -#if NeedFunctionPrototypes Display* /* display */, int /* extension */, int (*) ( -#if NeedNestedPrototypes Display* /* display */, GC /* gc */, XExtCodes* /* codes */ -#endif ) /* proc */ -#endif ))( -#if NeedNestedPrototypes Display*, GC, XExtCodes* -#endif ); extern int (*XESetFreeGC( -#if NeedFunctionPrototypes Display* /* display */, int /* extension */, int (*) ( -#if NeedNestedPrototypes Display* /* display */, GC /* gc */, XExtCodes* /* codes */ -#endif ) /* proc */ -#endif ))( -#if NeedNestedPrototypes Display*, GC, XExtCodes* -#endif ); extern int (*XESetCreateFont( -#if NeedFunctionPrototypes Display* /* display */, int /* extension */, int (*) ( -#if NeedNestedPrototypes Display* /* display */, XFontStruct* /* fs */, XExtCodes* /* codes */ -#endif ) /* proc */ -#endif ))( -#if NeedNestedPrototypes Display*, XFontStruct*, XExtCodes* -#endif ); extern int (*XESetFreeFont( -#if NeedFunctionPrototypes Display* /* display */, int /* extension */, int (*) ( -#if NeedNestedPrototypes Display* /* display */, XFontStruct* /* fs */, XExtCodes* /* codes */ -#endif ) /* proc */ -#endif ))( -#if NeedNestedPrototypes Display*, XFontStruct*, XExtCodes* -#endif ); extern int (*XESetCloseDisplay( -#if NeedFunctionPrototypes Display* /* display */, int /* extension */, int (*) ( -#if NeedNestedPrototypes Display* /* display */, XExtCodes* /* codes */ -#endif ) /* proc */ -#endif ))( -#if NeedNestedPrototypes Display*, XExtCodes* -#endif ); extern int (*XESetError( -#if NeedFunctionPrototypes Display* /* display */, int /* extension */, int (*) ( -#if NeedNestedPrototypes Display* /* display */, xError* /* err */, XExtCodes* /* codes */, int* /* ret_code */ -#endif ) /* proc */ -#endif ))( -#if NeedNestedPrototypes Display*, xError*, XExtCodes*, int* -#endif ); extern char* (*XESetErrorString( -#if NeedFunctionPrototypes Display* /* display */, int /* extension */, char* (*) ( -#if NeedNestedPrototypes Display* /* display */, int /* code */, XExtCodes* /* codes */, char* /* buffer */, int /* nbytes */ -#endif ) /* proc */ -#endif ))( -#if NeedNestedPrototypes Display*, int, XExtCodes*, char*, int -#endif ); extern void (*XESetPrintErrorValues ( -#if NeedFunctionPrototypes Display* /* display */, int /* extension */, void (*)( -#if NeedNestedPrototypes Display* /* display */, XErrorEvent* /* ev */, void* /* fp */ -#endif ) /* proc */ -#endif ))( -#if NeedNestedPrototypes Display*, XErrorEvent*, void* -#endif ); extern Bool (*XESetWireToEvent( -#if NeedFunctionPrototypes Display* /* display */, int /* event_number */, Bool (*) ( -#if NeedNestedPrototypes Display* /* display */, XEvent* /* re */, xEvent* /* event */ -#endif ) /* proc */ -#endif ))( -#if NeedNestedPrototypes Display*, XEvent*, xEvent* -#endif ); extern Status (*XESetEventToWire( -#if NeedFunctionPrototypes Display* /* display */, int /* event_number */, Status (*) ( -#if NeedNestedPrototypes Display* /* display */, XEvent* /* re */, xEvent* /* event */ -#endif ) /* proc */ -#endif ))( -#if NeedNestedPrototypes Display*, XEvent*, xEvent* -#endif ); extern Bool (*XESetWireToError( -#if NeedFunctionPrototypes Display* /* display */, int /* error_number */, Bool (*) ( -#if NeedNestedPrototypes Display* /* display */, XErrorEvent* /* he */, xError* /* we */ -#endif ) /* proc */ -#endif ))( -#if NeedNestedPrototypes Display*, XErrorEvent*, xError* -#endif ); extern void (*XESetBeforeFlush( -#if NeedFunctionPrototypes Display* /* display */, int /* error_number */, void (*) ( -#if NeedNestedPrototypes Display* /* display */, XExtCodes* /* codes */, _Xconst char* /* data */, long /* len */ -#endif ) /* proc */ -#endif ))( -#if NeedNestedPrototypes Display*, XExtCodes*, _Xconst char*, long -#endif ); /* internal connections for IMs */ typedef void (*_XInternalConnectionProc)( -#if NeedFunctionPrototypes Display* /* dpy */, int /* fd */, XPointer /* call_data */ -#endif ); extern Status _XRegisterInternalConnection( -#if NeedFunctionPrototypes Display* /* dpy */, int /* fd */, _XInternalConnectionProc /* callback */, XPointer /* call_data */ -#endif ); extern void _XUnregisterInternalConnection( -#if NeedFunctionPrototypes Display* /* dpy */, int /* fd */ -#endif ); /* Display structure has pointers to these */ @@ -1417,48 +1230,36 @@ struct _XConnWatchInfo { /* info from XAddConnectionWatch */ #ifdef __UNIXOS2__ extern char* __XOS2RedirRoot( -#if NeedFunctionPrototypes char* -#endif ); #endif extern int _XTextHeight( -#if NeedFunctionPrototypes XFontStruct* /* font_struct */, _Xconst char* /* string */, int /* count */ -#endif ); extern int _XTextHeight16( -#if NeedFunctionPrototypes XFontStruct* /* font_struct */, _Xconst XChar2b* /* string */, int /* count */ -#endif ); #if defined(WIN32) extern int _XOpenFile( -#if NeedFunctionPrototypes _Xconst char* /* path */, int /* flags */ -#endif ); extern void* _XFopenFile( -#if NeedFunctionPrototypes _Xconst char* /* path */, _Xconst char* /* mode */ -#endif ); extern int _XAccessFile( -#if NeedFunctionPrototypes _Xconst char* /* path */ -#endif ); #else #define _XOpenFile(path,flags) open(path,flags) @@ -1469,14 +1270,33 @@ extern int _XAccessFile( extern Status _XEventToWire(Display *dpy, XEvent *re, xEvent *event); extern int _XF86LoadQueryLocaleFont( -#if NeedFunctionPrototypes Display* /* dpy */, _Xconst char* /* name*/, XFontStruct** /* xfp*/, Font* /* fidp */ -#endif ); +extern void _XProcessWindowAttributes ( + register Display *dpy, + xChangeWindowAttributesReq *req, + register unsigned long valuemask, + register XSetWindowAttributes *attributes); + +extern int _XDefaultError( + Display *dpy, + XErrorEvent *event); + +extern int _XDefaultIOError( + Display *dpy); + +extern void _XSetClipRectangles ( + register Display *dpy, + GC gc, + int clip_x_origin, int clip_y_origin, + XRectangle *rectangles, + int n, + int ordering); + _XFUNCPROTOEND #endif /* _XLIBINT_H_ */ diff --git a/include/X11/Xlocale.h b/include/X11/Xlocale.h index a202304..51ddc9c 100644 --- a/include/X11/Xlocale.h +++ b/include/X11/Xlocale.h @@ -26,7 +26,7 @@ other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/Xlocale.h,v 1.4 2001/12/14 19:54:09 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Xlocale.h,v 1.5 2003/11/17 22:20:11 dawes Exp $ */ #ifndef _XLOCALE_H_ #define _XLOCALE_H_ @@ -47,10 +47,8 @@ from The Open Group. _XFUNCPROTOBEGIN extern char *_Xsetlocale( -#if NeedFunctionPrototypes int /* category */, _Xconst char* /* name */ -#endif ); _XFUNCPROTOEND diff --git a/include/X11/Xresource.h b/include/X11/Xresource.h index acbff18..ed77d3d 100644 --- a/include/X11/Xresource.h +++ b/include/X11/Xresource.h @@ -46,7 +46,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/X11/Xresource.h,v 3.8 2001/12/14 19:54:10 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Xresource.h,v 3.9 2003/11/17 22:20:11 dawes Exp $ */ #ifndef _XRESOURCE_H_ #define _XRESOURCE_H_ @@ -74,9 +74,7 @@ _XFUNCPROTOBEGIN ****************************************************************/ extern char *Xpermalloc( -#if NeedFunctionPrototypes unsigned int /* size */ -#endif ); /**************************************************************** @@ -93,28 +91,20 @@ typedef char *XrmString; /* find quark for string, create new quark if none already exists */ extern XrmQuark XrmStringToQuark( -#if NeedFunctionPrototypes _Xconst char* /* string */ -#endif ); extern XrmQuark XrmPermStringToQuark( -#if NeedFunctionPrototypes _Xconst char* /* string */ -#endif ); /* find string for quark */ extern XrmString XrmQuarkToString( -#if NeedFunctionPrototypes XrmQuark /* quark */ -#endif ); extern XrmQuark XrmUniqueQuark( -#if NeedFunctionPrototypes void -#endif ); #define XrmStringsEqual(a1, a2) (strcmp(a1, a2) == 0) @@ -129,18 +119,14 @@ extern XrmQuark XrmUniqueQuark( typedef enum {XrmBindTightly, XrmBindLoosely} XrmBinding, *XrmBindingList; extern void XrmStringToQuarkList( -#if NeedFunctionPrototypes _Xconst char* /* string */, XrmQuarkList /* quarks_return */ -#endif ); extern void XrmStringToBindingQuarkList( -#if NeedFunctionPrototypes _Xconst char* /* string */, XrmBindingList /* bindings_return */, XrmQuarkList /* quarks_return */ -#endif ); /**************************************************************** @@ -192,92 +178,72 @@ typedef struct _XrmHashBucketRec *XrmDatabase; extern void XrmDestroyDatabase( -#if NeedFunctionPrototypes XrmDatabase /* database */ -#endif ); extern void XrmQPutResource( -#if NeedFunctionPrototypes XrmDatabase* /* database */, XrmBindingList /* bindings */, XrmQuarkList /* quarks */, XrmRepresentation /* type */, XrmValue* /* value */ -#endif ); extern void XrmPutResource( -#if NeedFunctionPrototypes XrmDatabase* /* database */, _Xconst char* /* specifier */, _Xconst char* /* type */, XrmValue* /* value */ -#endif ); extern void XrmQPutStringResource( -#if NeedFunctionPrototypes XrmDatabase* /* database */, XrmBindingList /* bindings */, XrmQuarkList /* quarks */, _Xconst char* /* value */ -#endif ); extern void XrmPutStringResource( -#if NeedFunctionPrototypes XrmDatabase* /* database */, _Xconst char* /* specifier */, _Xconst char* /* value */ -#endif ); extern void XrmPutLineResource( -#if NeedFunctionPrototypes XrmDatabase* /* database */, _Xconst char* /* line */ -#endif ); extern Bool XrmQGetResource( -#if NeedFunctionPrototypes XrmDatabase /* database */, XrmNameList /* quark_name */, XrmClassList /* quark_class */, XrmRepresentation* /* quark_type_return */, XrmValue* /* value_return */ -#endif ); extern Bool XrmGetResource( -#if NeedFunctionPrototypes XrmDatabase /* database */, _Xconst char* /* str_name */, _Xconst char* /* str_class */, char** /* str_type_return */, XrmValue* /* value_return */ -#endif ); extern Bool XrmQGetSearchList( -#if NeedFunctionPrototypes XrmDatabase /* database */, XrmNameList /* names */, XrmClassList /* classes */, XrmSearchList /* list_return */, int /* list_length */ -#endif ); extern Bool XrmQGetSearchResource( -#if NeedFunctionPrototypes XrmSearchList /* list */, XrmName /* name */, XrmClass /* class */, XrmRepresentation* /* type_return */, XrmValue* /* value_return */ -#endif ); /**************************************************************** @@ -289,89 +255,67 @@ extern Bool XrmQGetSearchResource( #ifndef _XP_PRINT_SERVER_ extern void XrmSetDatabase( -#if NeedFunctionPrototypes Display* /* display */, XrmDatabase /* database */ -#endif ); extern XrmDatabase XrmGetDatabase( -#if NeedFunctionPrototypes Display* /* display */ -#endif ); #endif /* !_XP_PRINT_SERVER_ */ extern XrmDatabase XrmGetFileDatabase( -#if NeedFunctionPrototypes _Xconst char* /* filename */ -#endif ); extern Status XrmCombineFileDatabase( -#if NeedFunctionPrototypes _Xconst char* /* filename */, XrmDatabase* /* target */, Bool /* override */ -#endif ); extern XrmDatabase XrmGetStringDatabase( -#if NeedFunctionPrototypes _Xconst char* /* data */ /* null terminated string */ -#endif ); extern void XrmPutFileDatabase( -#if NeedFunctionPrototypes XrmDatabase /* database */, _Xconst char* /* filename */ -#endif ); extern void XrmMergeDatabases( -#if NeedFunctionPrototypes XrmDatabase /* source_db */, XrmDatabase* /* target_db */ -#endif ); extern void XrmCombineDatabase( -#if NeedFunctionPrototypes XrmDatabase /* source_db */, XrmDatabase* /* target_db */, Bool /* override */ -#endif ); #define XrmEnumAllLevels 0 #define XrmEnumOneLevel 1 extern Bool XrmEnumerateDatabase( -#if NeedFunctionPrototypes XrmDatabase /* db */, XrmNameList /* name_prefix */, XrmClassList /* class_prefix */, int /* mode */, Bool (*)( -#if NeedNestedPrototypes XrmDatabase* /* db */, XrmBindingList /* bindings */, XrmQuarkList /* quarks */, XrmRepresentation* /* type */, XrmValue* /* value */, XPointer /* closure */ -#endif ) /* proc */, XPointer /* closure */ -#endif ); extern const char *XrmLocaleOfDatabase( -#if NeedFunctionPrototypes XrmDatabase /* database */ -#endif ); @@ -402,14 +346,12 @@ typedef struct { extern void XrmParseCommand( -#if NeedFunctionPrototypes XrmDatabase* /* database */, XrmOptionDescList /* table */, int /* table_count */, _Xconst char* /* name */, int* /* argc_in_out */, char** /* argv_in_out */ -#endif ); _XFUNCPROTOEND diff --git a/include/X11/Xutil.h b/include/X11/Xutil.h index 677670d..85b299d 100644 --- a/include/X11/Xutil.h +++ b/include/X11/Xutil.h @@ -46,7 +46,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/X11/Xutil.h,v 3.5 2003/01/26 02:40:10 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Xutil.h,v 3.7 2003/11/17 22:20:11 dawes Exp $ */ #ifndef _XUTIL_H_ #define _XUTIL_H_ @@ -184,6 +184,24 @@ typedef struct { char *res_class; } XClassHint; +#ifdef XUTIL_DEFINE_FUNCTIONS +extern int XDestroyImage( + XImage *ximage); +extern unsigned long XGetPixel( + XImage *ximage, + int x, int y); +extern int XPutPixel( + XImage *ximage, + int x, int y, + unsigned long pixel); +extern XImage *XSubImage( + XImage *ximage, + int x, int y, + unsigned int width, unsigned int height); +extern int XAddPixel( + XImage *ximage, + long value); +#else /* * These macros are used to give some sugar to the image routines so that * naive people are more comfortable with them. @@ -198,6 +216,7 @@ typedef struct { ((*((ximage)->f.sub_image))((ximage), (x), (y), (width), (height))) #define XAddPixel(ximage, value) \ ((*((ximage)->f.add_pixel))((ximage), (value))) +#endif /* * Compose sequence status structure, used in calling XLookupString. @@ -331,340 +350,257 @@ _XFUNCPROTOBEGIN /* The following declarations are alphabetized. */ extern XClassHint *XAllocClassHint ( -#if NeedFunctionPrototypes void -#endif ); extern XIconSize *XAllocIconSize ( -#if NeedFunctionPrototypes void -#endif ); extern XSizeHints *XAllocSizeHints ( -#if NeedFunctionPrototypes void -#endif ); extern XStandardColormap *XAllocStandardColormap ( -#if NeedFunctionPrototypes void -#endif ); extern XWMHints *XAllocWMHints ( -#if NeedFunctionPrototypes void -#endif ); extern int XClipBox( -#if NeedFunctionPrototypes Region /* r */, XRectangle* /* rect_return */ -#endif ); extern Region XCreateRegion( -#if NeedFunctionPrototypes void -#endif ); extern const char *XDefaultString (void); extern int XDeleteContext( -#if NeedFunctionPrototypes Display* /* display */, XID /* rid */, XContext /* context */ -#endif ); extern int XDestroyRegion( -#if NeedFunctionPrototypes Region /* r */ -#endif ); extern int XEmptyRegion( -#if NeedFunctionPrototypes Region /* r */ -#endif ); extern int XEqualRegion( -#if NeedFunctionPrototypes Region /* r1 */, Region /* r2 */ -#endif ); extern int XFindContext( -#if NeedFunctionPrototypes Display* /* display */, XID /* rid */, XContext /* context */, XPointer* /* data_return */ -#endif ); extern Status XGetClassHint( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, XClassHint* /* class_hints_return */ -#endif ); extern Status XGetIconSizes( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, XIconSize** /* size_list_return */, int* /* count_return */ -#endif ); extern Status XGetNormalHints( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, XSizeHints* /* hints_return */ -#endif ); extern Status XGetRGBColormaps( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, XStandardColormap** /* stdcmap_return */, int* /* count_return */, Atom /* property */ -#endif ); extern Status XGetSizeHints( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, XSizeHints* /* hints_return */, Atom /* property */ -#endif ); extern Status XGetStandardColormap( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, XStandardColormap* /* colormap_return */, Atom /* property */ -#endif ); extern Status XGetTextProperty( -#if NeedFunctionPrototypes Display* /* display */, Window /* window */, XTextProperty* /* text_prop_return */, Atom /* property */ -#endif ); extern XVisualInfo *XGetVisualInfo( -#if NeedFunctionPrototypes Display* /* display */, long /* vinfo_mask */, XVisualInfo* /* vinfo_template */, int* /* nitems_return */ -#endif ); extern Status XGetWMClientMachine( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, XTextProperty* /* text_prop_return */ -#endif ); extern XWMHints *XGetWMHints( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */ -#endif ); extern Status XGetWMIconName( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, XTextProperty* /* text_prop_return */ -#endif ); extern Status XGetWMName( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, XTextProperty* /* text_prop_return */ -#endif ); extern Status XGetWMNormalHints( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, XSizeHints* /* hints_return */, long* /* supplied_return */ -#endif ); extern Status XGetWMSizeHints( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, XSizeHints* /* hints_return */, long* /* supplied_return */, Atom /* property */ -#endif ); extern Status XGetZoomHints( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, XSizeHints* /* zhints_return */ -#endif ); extern int XIntersectRegion( -#if NeedFunctionPrototypes Region /* sra */, Region /* srb */, Region /* dr_return */ -#endif ); extern void XConvertCase( -#if NeedFunctionPrototypes KeySym /* sym */, KeySym* /* lower */, KeySym* /* upper */ -#endif ); extern int XLookupString( -#if NeedFunctionPrototypes XKeyEvent* /* event_struct */, char* /* buffer_return */, int /* bytes_buffer */, KeySym* /* keysym_return */, XComposeStatus* /* status_in_out */ -#endif ); extern Status XMatchVisualInfo( -#if NeedFunctionPrototypes Display* /* display */, int /* screen */, int /* depth */, int /* class */, XVisualInfo* /* vinfo_return */ -#endif ); extern int XOffsetRegion( -#if NeedFunctionPrototypes Region /* r */, int /* dx */, int /* dy */ -#endif ); extern Bool XPointInRegion( -#if NeedFunctionPrototypes Region /* r */, int /* x */, int /* y */ -#endif ); extern Region XPolygonRegion( -#if NeedFunctionPrototypes XPoint* /* points */, int /* n */, int /* fill_rule */ -#endif ); extern int XRectInRegion( -#if NeedFunctionPrototypes Region /* r */, int /* x */, int /* y */, unsigned int /* width */, unsigned int /* height */ -#endif ); extern int XSaveContext( -#if NeedFunctionPrototypes Display* /* display */, XID /* rid */, XContext /* context */, _Xconst char* /* data */ -#endif ); extern int XSetClassHint( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, XClassHint* /* class_hints */ -#endif ); extern int XSetIconSizes( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, XIconSize* /* size_list */, int /* count */ -#endif ); extern int XSetNormalHints( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, XSizeHints* /* hints */ -#endif ); extern void XSetRGBColormaps( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, XStandardColormap* /* stdcmaps */, int /* count */, Atom /* property */ -#endif ); extern int XSetSizeHints( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, XSizeHints* /* hints */, Atom /* property */ -#endif ); extern int XSetStandardProperties( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, _Xconst char* /* window_name */, @@ -673,60 +609,46 @@ extern int XSetStandardProperties( char** /* argv */, int /* argc */, XSizeHints* /* hints */ -#endif ); extern void XSetTextProperty( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, XTextProperty* /* text_prop */, Atom /* property */ -#endif ); extern void XSetWMClientMachine( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, XTextProperty* /* text_prop */ -#endif ); extern int XSetWMHints( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, XWMHints* /* wm_hints */ -#endif ); extern void XSetWMIconName( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, XTextProperty* /* text_prop */ -#endif ); extern void XSetWMName( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, XTextProperty* /* text_prop */ -#endif ); extern void XSetWMNormalHints( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, XSizeHints* /* hints */ -#endif ); extern void XSetWMProperties( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, XTextProperty* /* window_name */, @@ -736,11 +658,9 @@ extern void XSetWMProperties( XSizeHints* /* normal_hints */, XWMHints* /* wm_hints */, XClassHint* /* class_hints */ -#endif ); extern void XmbSetWMProperties( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, _Xconst char* /* window_name */, @@ -750,11 +670,9 @@ extern void XmbSetWMProperties( XSizeHints* /* normal_hints */, XWMHints* /* wm_hints */, XClassHint* /* class_hints */ -#endif ); extern void Xutf8SetWMProperties( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, _Xconst char* /* window_name */, @@ -764,65 +682,50 @@ extern void Xutf8SetWMProperties( XSizeHints* /* normal_hints */, XWMHints* /* wm_hints */, XClassHint* /* class_hints */ -#endif ); extern void XSetWMSizeHints( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, XSizeHints* /* hints */, Atom /* property */ -#endif ); extern int XSetRegion( -#if NeedFunctionPrototypes Display* /* display */, GC /* gc */, Region /* r */ -#endif ); extern void XSetStandardColormap( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, XStandardColormap* /* colormap */, Atom /* property */ -#endif ); extern int XSetZoomHints( -#if NeedFunctionPrototypes Display* /* display */, Window /* w */, XSizeHints* /* zhints */ -#endif ); extern int XShrinkRegion( -#if NeedFunctionPrototypes Region /* r */, int /* dx */, int /* dy */ -#endif ); extern Status XStringListToTextProperty( -#if NeedFunctionPrototypes char** /* list */, int /* count */, XTextProperty* /* text_prop_return */ -#endif ); extern int XSubtractRegion( -#if NeedFunctionPrototypes Region /* sra */, Region /* srb */, Region /* dr_return */ -#endif ); extern int XmbTextListToTextProperty( @@ -854,11 +757,9 @@ extern void XwcFreeStringList( ); extern Status XTextPropertyToStringList( -#if NeedFunctionPrototypes XTextProperty* /* text_prop */, char*** /* list_return */, int* /* count_return */ -#endif ); extern int XmbTextPropertyToTextList( @@ -883,23 +784,18 @@ extern int Xutf8TextPropertyToTextList( ); extern int XUnionRectWithRegion( -#if NeedFunctionPrototypes XRectangle* /* rectangle */, Region /* src_region */, Region /* dest_region_return */ -#endif ); extern int XUnionRegion( -#if NeedFunctionPrototypes Region /* sra */, Region /* srb */, Region /* dr_return */ -#endif ); extern int XWMGeometry( -#if NeedFunctionPrototypes Display* /* display */, int /* screen_number */, _Xconst char* /* user_geometry */, @@ -911,15 +807,12 @@ extern int XWMGeometry( int* /* width_return */, int* /* height_return */, int* /* gravity_return */ -#endif ); extern int XXorRegion( -#if NeedFunctionPrototypes Region /* sra */, Region /* srb */, Region /* dr_return */ -#endif ); _XFUNCPROTOEND diff --git a/man/AllPlanes.man b/man/AllPlanes.man index e7e2313..4df0c40 100644 --- a/man/AllPlanes.man +++ b/man/AllPlanes.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/AllPlanes.man,v 1.2 2001/01/27 18:19:56 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/AllPlanes.man,v 1.3 2003/04/28 22:17:53 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,67 +144,63 @@ .SH NAME AllPlanes, BlackPixel, WhitePixel, ConnectionNumber, DefaultColormap, DefaultDepth, XListDepths, DefaultGC, DefaultRootWindow, DefaultScreenOfDisplay, DefaultScreen, DefaultVisual, DisplayCells, DisplayPlanes, DisplayString, XMaxRequestSize, XExtendedMaxRequestSize, LastKnownRequestProcessed, NextRequest, ProtocolVersion, ProtocolRevision, QLength, RootWindow, ScreenCount, ScreenOfDisplay, ServerVendor, VendorRelease \- Display macros and functions .SH SYNTAX -AllPlanes -.LP -BlackPixel\^(\^\fIdisplay\fP\^, \^\fIscreen_number\fP\^) -.LP -WhitePixel\^(\^\fIdisplay\fP\^, \^\fIscreen_number\fP\^) -.LP -ConnectionNumber\^(\^\fIdisplay\fP\^) -.LP -DefaultColormap\^(\^\fIdisplay\fP\^, \^\fIscreen_number\fP\^) -.LP -DefaultDepth\^(\^\fIdisplay\fP\^, \^\fIscreen_number\fP\^) -.LP -int *XListDepths\^(\^\fIdisplay\fP, \fIscreen_number\fP, \fIcount_return\fP\^) -.br - Display *\fIdisplay\fP; -.br - int \fIscreen_number\fP; -.br - int *\fIcount_return\fP; -.LP -DefaultGC\^(\^\fIdisplay\fP\^, \^\fIscreen_number\fP\^) -.LP -DefaultRootWindow\^(\^\fIdisplay\fP\^) -.LP -DefaultScreenOfDisplay\^(\^\fIdisplay\fP\^) -.LP -DefaultScreen\^(\^\fIdisplay\fP\^) -.LP -DefaultVisual\^(\^\fIdisplay\fP\^, \^\fIscreen_number\fP\^) -.LP -DisplayCells\^(\^\fIdisplay\fP\^, \^\fIscreen_number\fP\^) -.LP -DisplayPlanes\^(\^\fIdisplay\fP\^, \^\fIscreen_number\fP\^) -.LP -DisplayString\^(\^\fIdisplay\fP\^) -.LP -long XMaxRequestSize(\^\fIdisplay\fP\^) - Display *\fIdisplay\fP\^; -.LP -long XExtendedMaxRequestSize(\^\fIdisplay\fP\^) - Display *\fIdisplay\fP\^; -.LP -LastKnownRequestProcessed\^(\^\fIdisplay\fP\^) -.LP -NextRequest\^(\^\fIdisplay\fP\^) -.LP -ProtocolVersion\^(\^\fIdisplay\fP\^) -.LP -ProtocolRevision\^(\^\fIdisplay\fP\^) -.LP -QLength\^(\^\fIdisplay\fP\^) -.LP -RootWindow\^(\^\fIdisplay\fP\^, \^\fIscreen_number\fP\^) -.LP -ScreenCount\^(\^\fIdisplay\fP\^) -.LP -ScreenOfDisplay\^(\^\fIdisplay\fP, \fIscreen_number\fP\^) -.LP -ServerVendor\^(\^\fIdisplay\fP\^) -.LP -VendorRelease\^(\^\fIdisplay\fP\^) +unsigned long AllPlanes; +.HP +unsigned long BlackPixel\^(\^Display *\fIdisplay\fP\^, int \^\fIscreen_number\fP\^); +.HP +unsigned long WhitePixel\^(\^Display *\fIdisplay\fP\^, int \^\fIscreen_number\fP\^); +.HP +int ConnectionNumber\^(\^Display *\fIdisplay\fP\^); +.HP +Colormap DefaultColormap\^(\^Display *\fIdisplay\fP\^, +\^int \fIscreen_number\fP\^); +.HP +int DefaultDepth\^(\^Display *\fIdisplay\fP\^, \^int \fIscreen_number\fP\^); +.HP +int *XListDepths\^(\^Display *\fIdisplay\fP, int \fIscreen_number\fP, int +\fIcount_return\fP\^); +.HP +GC DefaultGC\^(\^Display *\fIdisplay\fP\^, \^int \fIscreen_number\fP\^); +.HP +Window DefaultRootWindow\^(\^Display *\fIdisplay\fP\^); +.HP +Screen *DefaultScreenOfDisplay\^(\^Display *\fIdisplay\fP\^); +.HP +int DefaultScreen\^(\^Display *\fIdisplay\fP\^); +.HP +Visual *DefaultVisual\^(\^Display *\fIdisplay\fP\^, \^int +\fIscreen_number\fP\^); +.HP +int DisplayCells\^(\^Display *\fIdisplay\fP\^, \^int \fIscreen_number\fP\^); +.HP +int DisplayPlanes\^(\^Display *\fIdisplay\fP\^, \^int \fIscreen_number\fP\^); +.HP +char *DisplayString\^(\^Display *\fIdisplay\fP\^); +.HP +long XMaxRequestSize(\^Display *\fIdisplay\fP\^) +.HP +long XExtendedMaxRequestSize(\^Display *\fIdisplay\fP\^) +.HP +unsigned long LastKnownRequestProcessed\^(\^Display *\fIdisplay\fP\^); +.HP +unsigned long NextRequest\^(\^Display *\fIdisplay\fP\^); +.HP +int ProtocolVersion\^(\^Display *\fIdisplay\fP\^); +.HP +int ProtocolRevision\^(\^Display *\fIdisplay\fP\^); +.HP +int QLength\^(\^Display *\fIdisplay\fP\^); +.HP +Window RootWindow\^(\^Display *\fIdisplay\fP\^, \^int \fIscreen_number\fP\^); +.HP +int ScreenCount\^(\^Display *\fIdisplay\fP\^); +.HP +Screen *ScreenOfDisplay\^(\^Display *\fIdisplay\fP, int +\fIscreen_number\fP\^); +.HP +char *ServerVendor\^(\^Display *\fIdisplay\fP\^) +.HP +int VendorRelease\^(\^Display *\fIdisplay\fP\^) .SH ARGUMENTS .IP \fIdisplay\fP 1i Specifies the connection to the X server. diff --git a/man/BlackPixelOfScreen.man b/man/BlackPixelOfScreen.man index eb23f80..4bbc88a 100644 --- a/man/BlackPixelOfScreen.man +++ b/man/BlackPixelOfScreen.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/BlkPScrn.man,v 1.2 2001/01/27 18:19:56 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/BlkPScrn.man,v 1.3 2003/04/28 22:17:53 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,47 +144,46 @@ .SH NAME BlackPixelOfScreen, WhitePixelOfScreen, CellsOfScreen, DefaultColormapOfScreen, DefaultDepthOfScreen, DefaultGCOfScreen, DefaultVisualOfScreen, DoesBackingStore, DoesSaveUnders, DisplayOfScreen, XScreenNumberOfScreen, EventMaskOfScreen, HeightOfScreen, HeightMMOfScreen, MaxCmapsOfScreen, MinCmapsOfScreen, PlanesOfScreen, RootWindowOfScreen, WidthOfScreen, WidthMMOfScreen \- screen information functions and macros .SH SYNTAX -BlackPixelOfScreen\^(\^\fIscreen\fP\^) -.LP -WhitePixelOfScreen\^(\^\fIscreen\fP\^) -.LP -CellsOfScreen\^(\^\fIscreen\fP\^) -.LP -DefaultColormapOfScreen\^(\^\fIscreen\fP\^) -.LP -DefaultDepthOfScreen\^(\^\fIscreen\fP\^) -.LP -DefaultGCOfScreen\^(\^\fIscreen\fP\^) -.LP -DefaultVisualOfScreen\^(\^\fIscreen\fP\^) -.LP -DoesBackingStore\^(\^\fIscreen\fP\^) -.LP -DoesSaveUnders\^(\^\fIscreen\fP\^) -.LP -DisplayOfScreen\^(\^\fIscreen\fP\^) -.LP -int XScreenNumberOfScreen\^(\^\fIscreen\fP\^) -.br - Screen *\fIscreen\fP\^; -.LP -EventMaskOfScreen\^(\^\fIscreen\fP\^) -.LP -HeightOfScreen\^(\^\fIscreen\fP\^) -.LP -HeightMMOfScreen\^(\^\fIscreen\fP\^) -.LP -MaxCmapsOfScreen\^(\^\fIscreen\fP\^) -.LP -MinCmapsOfScreen\^(\^\fIscreen\fP\^) -.LP -PlanesOfScreen\^(\^\fIscreen\fP\^) -.LP -RootWindowOfScreen\^(\^\fIscreen\fP\^) -.LP -WidthOfScreen\^(\^\fIscreen\fP\^) -.LP -WidthMMOfScreen\^(\^\fIscreen\fP\^) +.HP +unsigned long BlackPixelOfScreen\^(\^Screen *\fIscreen\fP\^); +.HP +unsigned long WhitePixelOfScreen\^(\^Screen *\fIscreen\fP\^); +.HP +int CellsOfScreen\^(\^Screen *\fIscreen\fP\^); +.HP +Colormap DefaultColormapOfScreen\^(\^Screen *\fIscreen\fP\^); +.HP +int DefaultDepthOfScreen\^(\^Screen *\fIscreen\fP\^); +.HP +GC DefaultGCOfScreen\^(\^Screen *\fIscreen\fP\^); +.HP +Visual *DefaultVisualOfScreen\^(\^Screen *\fIscreen\fP\^); +.HP +int DoesBackingStore\^(\^Screen *\fIscreen\fP\^); +.HP +Bool DoesSaveUnders\^(\^Screen *\fIscreen\fP\^); +.HP +Display *DisplayOfScreen\^(\^Screen *\fIscreen\fP\^); +.HP +int XScreenNumberOfScreen\^(\^Screen *\fIscreen\fP\^); +.HP +long EventMaskOfScreen\^(\^Screen *\fIscreen\fP\^); +.HP +int HeightOfScreen\^(\^Screen *\fIscreen\fP\^); +.HP +int HeightMMOfScreen\^(\^Screen *\fIscreen\fP\^); +.HP +int MaxCmapsOfScreen\^(\^Screen *\fIscreen\fP\^); +.HP +int MinCmapsOfScreen\^(\^Screen *\fIscreen\fP\^); +.HP +int PlanesOfScreen\^(\^Screen *\fIscreen\fP\^); +.HP +Window RootWindowOfScreen\^(\^Screen *\fIscreen\fP\^); +.HP +int WidthOfScreen\^(\^Screen *\fIscreen\fP\^); +.HP +int WidthMMOfScreen\^(\^Screen *\fIscreen\fP\^); .SH ARGUMENTS .IP \fIscreen\fP 1i Specifies the appropriate diff --git a/man/DisplayOfCCC.man b/man/DisplayOfCCC.man index ceb5e12..053a2a3 100644 --- a/man/DisplayOfCCC.man +++ b/man/DisplayOfCCC.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/Dis3C.man,v 1.2 2001/01/27 18:19:56 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/Dis3C.man,v 1.3 2003/04/28 22:17:53 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,25 +144,16 @@ .SH NAME DisplayOfCCC, VisualOfCCC, ScreenNumberOfCCC, ScreenWhitePointOfCCC, ClientWhitePointOfCCC \- Color Conversion Context macros .SH SYNTAX -DisplayOfCCC\^(\^\fIccc\fP\^) -.br - XcmsCCC \fIccc\fP\^; -.LP -VisualOfCCC\^(\^\fIccc\fP\^) -.br - XcmsCCC \fIccc\fP\^; -.LP -ScreenNumberOfCCC\^(\^\fIccc\fP\^) -.br - XcmsCCC \fIccc\fP\^; -.LP -ScreenWhitePointOfCCC\^(\^\fIccc\fP\^) -.br - XcmsCCC \fIccc\fP\^; -.LP -ClientWhitePointOfCCC\^(\^\fIccc\fP\^) -.br - XcmsCCC \fIccc\fP\^; +.HP +Display *DisplayOfCCC\^(\^XcmsCCC \fIccc\fP\^); +.HP +Visual *VisualOfCCC\^(\^XcmsCCC \fIccc\fP\^); +.HP +int ScreenNumberOfCCC\^(\^XcmsCCC \fIccc\fP\^); +.HP +XcmsColor *ScreenWhitePointOfCCC\^(\^XcmsCCC \fIccc\fP\^); +.HP +XcmsColor *ClientWhitePointOfCCC\^(\^XcmsCCC \fIccc\fP\^); .SH ARGUMENTS .IP \fIccc\fP 1i Specifies the CCC. diff --git a/man/ImageByteOrder.man b/man/ImageByteOrder.man index 9b4ea65..405a11e 100644 --- a/man/ImageByteOrder.man +++ b/man/ImageByteOrder.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/ImageOrd.man,v 1.2 2001/01/27 18:19:56 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/ImageOrd.man,v 1.3 2003/04/28 22:17:53 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,27 +144,24 @@ .SH NAME ImageByteOrder, BitmapBitOrder, BitmapPad, BitmapUnit, DisplayHeight, DisplayHeightMM, DisplayWidth, DisplayWidthMM, XListPixmapFormats, XPixmapFormatValues \- image format functions and macros .SH SYNTAX -XPixmapFormatValues *XListPixmapFormats\^(\^\fIdisplay\fP, \fIcount_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - int *\fIcount_return\fP\^; -.LP -ImageByteOrder\^(\^\fIdisplay\fP\^) -.LP -BitmapBitOrder\^(\^\fIdisplay\fP\^) -.LP -BitmapPad\^(\^\fIdisplay\fP\^) -.LP -BitmapUnit\^(\^\fIdisplay\fP\^) -.LP -DisplayHeight\^(\^\fIdisplay\fP\^, \^\fIscreen_number\fP\^) -.LP -DisplayHeightMM\^(\^\fIdisplay\fP\^, \^\fIscreen_number\fP\^) -.LP -DisplayWidth\^(\^\fIdisplay\fP\^, \^\fIscreen_number\fP\^) -.LP -DisplayWidthMM\^(\^\fIdisplay\fP\^, \^\fIscreen_number\fP\^) +.HP +XPixmapFormatValues *XListPixmapFormats\^(\^Display *\fIdisplay\fP, int *\fIcount_return\fP\^); +.HP +int ImageByteOrder\^(\^Display *\fIdisplay\fP\^); +.HP +int BitmapBitOrder\^(\^Display *\fIdisplay\fP\^); +.HP +int BitmapPad\^(\^Display *\fIdisplay\fP\^); +.HP +int BitmapUnit\^(\^Display *\fIdisplay\fP\^); +.HP +int DisplayHeight\^(\^Display *\fIdisplay\fP\^, \^int \fIscreen_number\fP\^); +.HP +int DisplayHeightMM\^(\^Display *\fIdisplay\fP\^, \^int \fIscreen_number\fP\^); +.HP +int DisplayWidth\^(\^Display *\fIdisplay\fP\^, \^int \fIscreen_number\fP\^); +.HP +int DisplayWidthMM\^(\^Display *\fIdisplay\fP\^, \^int \fIscreen_number\fP\^); .SH ARGUMENTS .IP \fIdisplay\fP 1i Specifies the connection to the X server. diff --git a/man/IsCursorKey.man b/man/IsCursorKey.man index 81cd04f..82c9a22 100644 --- a/man/IsCursorKey.man +++ b/man/IsCursorKey.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/IsCKey.man,v 1.2 2001/01/27 18:19:56 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/IsCKey.man,v 1.3 2003/04/28 22:17:54 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,19 +144,19 @@ .SH NAME IsCursorKey, IsFunctionKey, IsKeypadKey, IsMiscFunctionKey, IsModiferKey, IsPFKey, IsPrivateKeypadKey \- keysym classification macros .SH SYNTAX -IsCursorKey\^(\^\fIkeysym\fP\^) +int IsCursorKey\^(\^KeySym \fIkeysym\fP\^); .LP -IsFunctionKey\^(\^\fIkeysym\fP\^) +int IsFunctionKey\^(\^KeySym \fIkeysym\fP\^); .LP -IsKeypadKey\^(\^\fIkeysym\fP\^) +int IsKeypadKey\^(\^KeySym \fIkeysym\fP\^); .LP -IsMiscFunctionKey\^(\^\fIkeysym\fP\^) +int IsMiscFunctionKey\^(\^KeySym \fIkeysym\fP\^); .LP -IsModifierKey\^(\^\fIkeysym\fP\^) +int IsModifierKey\^(\^KeySym \fIkeysym\fP\^); .LP -IsPFKey\^(\^\fIkeysym\fP\^) +int IsPFKey\^(\^KeySym \fIkeysym\fP\^); .LP -IsPrivateKeypadKey\^(\^\fIkeysym\fP\^) +int IsPrivateKeypadKey\^(\^KeySym \fIkeysym\fP\^); .SH ARGUMENTS .ds Fn tested .IP \fIkeysym\fP 1i diff --git a/man/XAddConnectionWatch.man b/man/XAddConnectionWatch.man index dd494da..ead88b9 100644 --- a/man/XAddConnectionWatch.man +++ b/man/XAddConnectionWatch.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XIntConn.man,v 1.3 2001/11/21 22:54:13 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XIntConn.man,v 1.4 2003/04/28 22:17:55 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,47 +144,21 @@ .SH NAME XAddConnectionWatch, XRemoveConnectionWatch, XProcessInternalConnection, XInternalConnectionNumbers \- handle Xlib internal connections .SH SYNTAX -typedef void (*XConnectionWatchProc)\^(\^\fIdisplay\fP, \fIclient_data\fP, \fIfd\fP, \fIopening\fP, \fIwatch_data\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - XPointer \fIclient_data\fP\^; -.br - int \fIfd\fP\^; -.br - Bool \fIopening\fP\^; -.br - XPointer *\fIwatch_data\fP\^; -.LP -Status XAddConnectionWatch\^(\^\fIdisplay\fP, \fIprocedure\fP\^, \fIclient_data\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - XWatchProc \fIprocedure\fP\^; -.br - XPointer \fIclient_data\fP\^; -.LP -Status XRemoveConnectionWatch\^(\^\fIdisplay\fP, \fIprocedure\fP\^, \fIclient_data\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - XWatchProc \fIprocedure\fP\^; -.br - XPointer \fIclient_data\fP\^; -.LP -void XProcessInternalConnection\^(\^\fIdisplay\fP, \fIfd\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - int \fIfd\fP\^; -.LP -Status XInternalConnectionNumbers\^(\^\fIdisplay\fP, \fIfd_return\fP\^, \fIcount_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - int **\fIfd_return\fP\^; -.br - int *\fIcount_return\fP\^; +.HP +typedef void (*XConnectionWatchProc)\^(\^Display *\fIdisplay\fP\^, XPointer +\fIclient_data\fP\^, int \fIfd\fP\^, Bool \fIopening\fP\^, XPointer +*\fIwatch_data\fP\^); +.HP +Status XAddConnectionWatch\^(\^Display *\fIdisplay\fP\^, XWatchProc +\fIprocedure\fP\^, XPointer \fIclient_data\fP\^); +.HP +Status XRemoveConnectionWatch\^(\^Display *\fIdisplay\fP\^, XWatchProc +\fIprocedure\fP\^, XPointer \fIclient_data\fP\^); +.HP +void XProcessInternalConnection\^(\^Display *\fIdisplay\fP\^, int \fIfd\fP\^); +.HP +Status XInternalConnectionNumbers\^(\^Display *\fIdisplay\fP\^, int +**\fIfd_return\fP\^, int *\fIcount_return\fP\^); .SH ARGUMENTS .IP \fIclient_data\fP 1i Specifies the additional client data. diff --git a/man/XAddHost.man b/man/XAddHost.man index e2ffd94..a4e5b27 100644 --- a/man/XAddHost.man +++ b/man/XAddHost.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XAddHost.man,v 1.2 2001/01/27 18:19:56 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XAddHost.man,v 1.3 2003/04/28 22:17:54 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,55 +144,24 @@ .SH NAME XAddHost, XAddHosts, XListHosts, XRemoveHost, XRemoveHosts, XSetAccessControl, XEnableAccessControl, XDisableAccessControl, XHostAddress \- control host access and host control structure .SH SYNTAX -XAddHost\^(\^\fIdisplay\fP, \fIhost\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - XHostAddress *\fIhost\fP\^; -.LP -XAddHosts\^(\^\fIdisplay\fP, \fIhosts\fP, \fInum_hosts\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - XHostAddress *\fIhosts\fP\^; -.br - int \fInum_hosts\fP\^; -.LP -XHostAddress *XListHosts\^(\^\fIdisplay\fP, \fInhosts_return\fP, \fIstate_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - int *\fInhosts_return\fP\^; -.br - Bool *\fIstate_return\fP\^; -.LP -XRemoveHost\^(\^\fIdisplay\fP, \fIhost\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - XHostAddress *\fIhost\fP\^; -.LP -XRemoveHosts\^(\^\fIdisplay\fP, \fIhosts\fP, \fInum_hosts\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - XHostAddress *\fIhosts\fP\^; -.br - int \fInum_hosts\fP\^; -.LP -XSetAccessControl\^(\^\fIdisplay\fP, \fImode\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - int \fImode\fP\^; -.LP -XEnableAccessControl\^(\^\fIdisplay\fP\^) -.br - Display *\fIdisplay\fP\^; -.LP -XDisableAccessControl\^(\^\fIdisplay\fP\^) -.br - Display *\fIdisplay\fP\^; +.HP +int XAddHost\^(\^Display *\fIdisplay\fP, XHostAddress *\fIhost\fP\^); +.HP +int XAddHosts\^(\^Display *\fIdisplay\fP, XHostAddress *\fIhosts\fP, +int \fInum_hosts\fP\^); +.HP +XHostAddress *XListHosts\^(\^Display *\fIdisplay\fP, int *\fInhosts_return\fP, +Bool \fIstate_return\fP\^); +.HP +int XRemoveHost\^(\^Display *\fIdisplay\fP, XHostAddress *\fIhost\fP\^); +.HP +int XRemoveHosts\^(\^Display *\fIdisplay\fP, XHostAddress *\fIhosts\fP, int \fInum_hosts\fP\^); +.HP +int XSetAccessControl\^(\^Display *\fIdisplay\fP, int \fImode\fP\^); +.HP +int XEnableAccessControl\^(\^Display *\fIdisplay\fP\^); +.HP +int XDisableAccessControl\^(\^Display *\fIdisplay\fP\^); .SH ARGUMENTS .IP \fIdisplay\fP 1i Specifies the connection to the X server. diff --git a/man/XAllocClassHint.man b/man/XAllocClassHint.man index fc0a173..63cfffc 100644 --- a/man/XAllocClassHint.man +++ b/man/XAllocClassHint.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XACHints.man,v 1.2 2001/01/27 18:19:56 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XACHints.man,v 1.3 2003/04/28 22:17:54 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,23 +144,12 @@ .SH NAME XAllocClassHint, XSetClassHint, XGetClassHint, XClassHint \- allocate class hints structure and set or read a window's WM_CLASS property .SH SYNTAX -XClassHint *XAllocClassHint\^(\|) -.LP -XSetClassHint\^(\^\fIdisplay\fP, \fIw\fP, \fIclass_hints\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - XClassHint *\fIclass_hints\fP\^; -.LP -Status XGetClassHint\^(\^\fIdisplay\fP, \fIw\fP, \fIclass_hints_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP; -.br - XClassHint *\fIclass_hints_return\fP\^; +.HP +XClassHint *XAllocClassHint\^(void\^); +.HP +XSetClassHint\^(\^Display *\fIdisplay\fP, Window \fIw\fP, XClassHint *\fIclass_hints\fP\^); +.HP +Status XGetClassHint\^(\^Display *\fIdisplay\fP, Window \fIw\fP, XClassHint *\fIclass_hints_return\fP\^); .SH ARGUMENTS .IP \fIdisplay\fP 1i Specifies the connection to the X server. diff --git a/man/XAllocColor.man b/man/XAllocColor.man index 96c0e5e..984f2f9 100644 --- a/man/XAllocColor.man +++ b/man/XAllocColor.man @@ -41,7 +41,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XAllColor.man,v 1.3 2001/02/09 03:47:45 tsi Exp $ +.\" $XFree86: xc/doc/man/X11/XAllColor.man,v 1.4 2003/04/28 22:17:54 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -146,74 +146,27 @@ .SH NAME XAllocColor, XAllocNamedColor, XAllocColorCells, XAllocColorPlanes, XFreeColors \- allocate and free colors .SH SYNTAX -Status XAllocColor\^(\^\fIdisplay\fP, \fIcolormap\fP\^, \fIscreen_in_out\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Colormap \fIcolormap\fP\^; -.br - XColor *\fIscreen_in_out\fP\^; -.LP -Status XAllocNamedColor\^(\^\fIdisplay\fP, \fIcolormap\fP\^, -\fIcolor_name\fP\^, \fIscreen_def_return\fP\^, \fIexact_def_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Colormap \fIcolormap\fP\^; -.br - char *\fIcolor_name\fP\^; -.br - XColor *\fIscreen_def_return\fP\^, *\fIexact_def_return\fP\^; -.LP -Status XAllocColorCells\^(\^\fIdisplay\fP, \fIcolormap\fP\^, \fIcontig\fP\^, -\fIplane_masks_return\fP\^, \fInplanes\fP\^, -.br - \fIpixels_return\fP\^, \fInpixels\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Colormap \fIcolormap\fP\^; -.br - Bool \fIcontig\fP\^; -.br - unsigned long \fIplane_masks_return\fP[\^]\^; -.br - unsigned int \fInplanes\fP\^; -.br - unsigned long \fIpixels_return\fP[\^]\^; -.br - unsigned int \fInpixels\fP\^; -.LP -Status XAllocColorPlanes\^(\^\fIdisplay\fP, \fIcolormap\fP\^, \fIcontig\fP\^, \fIpixels_return\fP\^, \fIncolors\fP\^, \fInreds\fP\^, \fIngreens\fP\^, -.br - \fInblues\fP\^, \fIrmask_return\fP\^, \fIgmask_return\fP\^, \fIbmask_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Colormap \fIcolormap\fP\^; -.br - Bool \fIcontig\fP\^; -.br - unsigned long \fIpixels_return\fP[\^]\^; -.br - int \fIncolors\fP\^; -.br - int \fInreds\fP\^, \fIngreens\fP\^, \fInblues\fP\^; -.br - unsigned long *\fIrmask_return\fP\^, *\fIgmask_return\fP\^, *\fIbmask_return\fP\^; -.LP -XFreeColors\^(\^\fIdisplay\fP, \fIcolormap\fP\^, \fIpixels\fP\^, \fInpixels\fP\^, \fIplanes\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Colormap \fIcolormap\fP\^; -.br - unsigned long \fIpixels\fP\^[\^]; -.br - int \fInpixels\fP\^; -.br - unsigned long \fIplanes\fP\^; -.SH ARGUMENTS +.HP +Status XAllocColor\^(\^Display *\fIdisplay\fP, Colormap \fIcolormap\fP\^, +XColor *\fIscreen_in_out\fP\^); +.HP +Status XAllocNamedColor\^(\^Display *\fIdisplay\fP, Colormap \fIcolormap\fP\^, +char *\fIcolor_name\fP\^, XColor *\fIscreen_def_return\fP\^, XColor +*\fIexact_def_return\fP\^); +.HP +Status XAllocColorCells\^(\^Display *\fIdisplay\fP, Colormap \fIcolormap\fP\^, +Bool \fIcontig\fP\^, unsigned long\fIplane_masks_return\fP[\^]\^, unsigned int +\fInplanes\fP\^, unsigned long \fIpixels_return\fP[\^]\^, unsigned int +\fInpixels\fP\^); +.HP +Status XAllocColorPlanes\^(\^Display *\fIdisplay\fP, Colormap +\fIcolormap\fP\^, Bool \fIcontig\fP\^, unsigned long +\fIpixels_return\fP[\^]\^, int \fIncolors\fP\^, int \fInreds\fP\^, int +\fIngreens\fP\^, int \fInblues\fP\^, unsigned long *\fIrmask_return\fP\^, +unsigned long *\fIgmask_return\fP\^, unsigned long *\fIbmask_return\fP\^); +.HP +int XFreeColors\^(\^Display *\fIdisplay\fP, Colormap \fIcolormap\fP\^, unsigned +long \fIpixels\fP\^[\^], int \fInpixels\fP\^, unsigned long \fIplanes\fP\^); .IP \fIcolor_name\fP 1i Specifies the color name string (for example, red) whose color definition structure you want returned. diff --git a/man/XAllocIconSize.man b/man/XAllocIconSize.man index a9d38a5..cabd70b 100644 --- a/man/XAllocIconSize.man +++ b/man/XAllocIconSize.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XAIcSize.man,v 1.2 2001/01/27 18:19:56 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XAIcSize.man,v 1.3 2003/04/28 22:17:54 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,27 +144,13 @@ .SH NAME XAllocIconSize, XSetIconSizes, XGetIconSizes, XIconSize \- allocate icon size structure and set or read a window's WM_ICON_SIZES property .SH SYNTAX -XIconSize *XAllocIconSize\^(\|) +XIconSize *XAllocIconSize\^(void\^); .LP -XSetIconSizes\^(\^\fIdisplay\fP, \fIw\fP, \fIsize_list\fP, \fIcount\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - XIconSize *\fIsize_list\fP\^; -.br - int \fIcount\fP\^; +int XSetIconSizes\^(\^Display *\fIdisplay\fP, Window \fIw\fP, XIconSize +*\fIsize_list\fP, int \fIcount\fP\^); .LP -Status XGetIconSizes\^(\^\fIdisplay\fP, \fIw\fP, \fIsize_list_return\fP, \fIcount_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - XIconSize **\fIsize_list_return\fP\^; -.br - int *\fIcount_return\fP\^; +Status XGetIconSizes\^(\^Display *\fIdisplay\fP, Window \fIw\fP, XIconSize +**\fIsize_list_return\fP, int \fIcount_return\fP\^); .SH ARGUMENTS .IP \fIdisplay\fP 1i Specifies the connection to the X server. diff --git a/man/XAllocSizeHints.man b/man/XAllocSizeHints.man index 5d6198d..64049e4 100644 --- a/man/XAllocSizeHints.man +++ b/man/XAllocSizeHints.man @@ -41,11 +41,11 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XASHints.man,v 1.4 2001/02/09 03:47:44 tsi Exp $ +.\" $XFree86: xc/doc/man/X11/XASHints.man,v 1.5 2003/04/28 22:17:54 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface -.ds xL Xlib \- C Language X Interface +.ds xL Xlib \- C Language X Interface, \fRO'Reilly and Associates, .ds xC Inter-Client Communication Conventions Manual .na .de Ds @@ -146,49 +146,19 @@ .SH NAME XAllocSizeHints, XSetWMNormalHints, XGetWMNormalHints, XSetWMSizeHints, XGetWMSizeHints, XSizeHints \- allocate size hints structure and set or read a window's WM_NORMAL_HINTS property .SH SYNTAX -XSizeHints *XAllocSizeHints\^(\|) -.LP -void XSetWMNormalHints\^(\^\fIdisplay\fP, \fIw\fP, \fIhints\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - XSizeHints *\fIhints\fP\^; -.LP -Status XGetWMNormalHints\^(\^\fIdisplay\fP, \fIw\fP, \fIhints_return\fP, -\fIsupplied_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - XSizeHints *\fIhints_return\fP\^; -.br - long *\fIsupplied_return\fP\^; -.LP -void XSetWMSizeHints\^(\^\fIdisplay\fP, \fIw\fP, \fIhints\fP, \fIproperty\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - XSizeHints *\fIhints\fP\^; -.br - Atom \fIproperty\fP\^; -.LP -Status XGetWMSizeHints\^(\^\fIdisplay\fP, \fIw\fP, \fIhints_return\fP, -\fIsupplied_return\fP, \fIproperty\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - XSizeHints *\fIhints_return\fP\^; -.br - long *\fIsupplied_return\fP\^; -.br - Atom \fIproperty\fP\^; +.HP +XSizeHints *XAllocSizeHints\^(void\^); +.HP +void XSetWMNormalHints\^(\^Display *\fIdisplay\fP, Window \fIw\fP, XSizeHints *\fIhints\fP\^); +.HP +Status XGetWMNormalHints\^(\^Display *\fIdisplay\fP, Window \fIw\fP, +XSizeHints *\fIhints_return\fP, long *\fIsupplied_return\fP\^); +.HP +void XSetWMSizeHints\^(\^Display *\fIdisplay\fP, Window \fIw\fP, XSizeHints +*\fIhints\fP, Atom \fIproperty\fP\^); +.HP +Status XGetWMSizeHints\^(\^Display *\fIdisplay\fP, Window \fIw\fP, XSizeHints +*\fIhints_return\fP, long *\fIsupplied_return\fP, Atom \fIproperty\fP\^); .SH ARGUMENTS .IP \fIdisplay\fP 1i Specifies the connection to the X server. @@ -325,7 +295,7 @@ the supplied_return argument will contain the following bits: .LP .Ds (USPosition|USSize|PPosition|PSize|PMinSize| - PMaxSize|PResizeInc|PAspect) + PMaxSize|PResizeInc|PAspect); .De .LP If the property is large enough to contain the base size diff --git a/man/XAllocStandardColormap.man b/man/XAllocStandardColormap.man index 685de49..f71fc5b 100644 --- a/man/XAllocStandardColormap.man +++ b/man/XAllocStandardColormap.man @@ -41,7 +41,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XASCmap.man,v 1.4 2001/02/09 03:47:44 tsi Exp $ +.\" $XFree86: xc/doc/man/X11/XASCmap.man,v 1.5 2003/04/28 22:17:54 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -146,33 +146,16 @@ .SH NAME XAllocStandardColormap, XSetRGBColormaps, XGetRGBColormaps, XStandardColormap \- allocate, set, or read a standard colormap structure .SH SYNTAX -XStandardColormap *XAllocStandardColormap\^(\|) -.LP -void XSetRGBColormaps\^(\^\fIdisplay\fP, \fIw\fP, \fIstd_colormap\fP, -\fIcount\fP, \fIproperty\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - XStandardColormap *\fIstd_colormap\fP\^; -.br - int \fIcount\fP\^; -.br - Atom \fIproperty\fP\^; -.LP -Status XGetRGBColormaps\^(\^\fIdisplay\fP, \fIw\fP, \fIstd_colormap_return\fP, -\fIcount_return\fP, \fIproperty\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - XStandardColormap **\fIstd_colormap_return\fP\^; -.br - int *\fIcount_return\fP\^; -.br - Atom \fIproperty\fP\^; +.HP +XStandardColormap *XAllocStandardColormap\^(void\^); +.HP +void XSetRGBColormaps\^(\^Display *\fIdisplay\fP, Window \fIw\fP, +XStandardColormap *\fIstd_colormap\fP, +int \fIcount\fP, Atom \fIproperty\fP\^); +.HP +Status XGetRGBColormaps\^(\^Display *\fIdisplay\fP, Window \fIw\fP, +XStandardColormap **\fIstd_colormap_return\fP, int *\fIcount_return\fP, +Atom \fIproperty\fP\^); .SH ARGUMENTS .IP \fIdisplay\fP 1i Specifies the connection to the X server. @@ -308,7 +291,7 @@ T{ T} T{ .ZN ReleaseByFreeingColormap T} T{ -( (XID) 1L) +( (XID) 1L); T} .TE /* Values */ @@ -346,7 +329,7 @@ green_max = 5, and blue_max = 5. .LP The red_mult, green_mult, and blue_mult members give the scale factors used to compose a full pixel value. -(See the discussion of the base_pixel members for further information.) +(See the discussion of the base_pixel members for further information.); For a 3/3/2 allocation, red_mult might be 32, green_mult might be 4, and blue_mult might be 1. For a 6-colors-each allocation, red_mult might be 36, @@ -398,7 +381,7 @@ the cells held by this standard colormap are to be released by freeing the colormap ID or by calling the .ZN XKillClient function on the indicated resource. -(Note that this method is necessary for allocating out of an existing colormap.) +(Note that this method is necessary for allocating out of an existing colormap.); .LP The properties containing the .ZN XStandardColormap diff --git a/man/XAllocWMHints.man b/man/XAllocWMHints.man index 816f014..e024c70 100644 --- a/man/XAllocWMHints.man +++ b/man/XAllocWMHints.man @@ -41,11 +41,12 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XAWMHints.man,v 1.3 2001/02/07 22:35:20 tsi Exp $ +.\" $XFree86: xc/doc/man/X11/XAWMHints.man,v 1.4 2003/04/28 22:17:54 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface -.ds xL Xlib \- C Language X Interface +.ds xL Xlib \- C Language X Interface, \fRO'Reilly and Associates, Sebastopol, +1991. .ds xC Inter-Client Communication Conventions Manual .na .de Ds @@ -146,22 +147,12 @@ .SH NAME XAllocWMHints, XSetWMHints, XGetWMHints, XWMHints \- allocate window manager hints structure and set or read a window's WM_HINTS property .SH SYNTAX -XWMHints *XAllocWMHints\^(\|) -.LP -XSetWMHints\^(\^\fIdisplay\fP, \fIw\fP, \fIwmhints\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - XWMHints *\fIwmhints\fP\^; - -.LP -XWMHints *XGetWMHints\^(\^\fIdisplay\fP, \fIw\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; +.HP +XWMHints *XAllocWMHints\^(void\^); +.HP +int XSetWMHints\^(\^Display *\fIdisplay\fP, Window \fIw\fP, XWMHints *\fIwmhints\fP\^); +.HP +XWMHints *XGetWMHints\^(\^Display *\fIdisplay\fP, Window \fIw\fP\^); .SH ARGUMENTS .IP \fIdisplay\fP 1i Specifies the connection to the X server. @@ -234,56 +225,56 @@ T{ T} T{ .ZN InputHint T} T{ -(1L << 0) +(1L << 0); T} T{ \&#define T} T{ .ZN StateHint T} T{ -(1L << 1) +(1L << 1); T} T{ \&#define T} T{ .ZN IconPixmapHint T} T{ -(1L << 2) +(1L << 2); T} T{ \&#define T} T{ .ZN IconWindowHint T} T{ -(1L << 3) +(1L << 3); T} T{ \&#define T} T{ .ZN IconPositionHint T} T{ -(1L << 4) +(1L << 4); T} T{ \&#define T} T{ .ZN IconMaskHint T} T{ -(1L << 5) +(1L << 5); T} T{ \&#define T} T{ .ZN WindowGroupHint T} T{ -(1L << 6) +(1L << 6); T} T{ \&#define T} T{ .ZN UrgencyHint T} T{ -(1L << 8) +(1L << 8); T} T{ \&#define @@ -294,7 +285,7 @@ T} T{ .br IconWindowHint|IconPositionHint| .br -IconMaskHint|WindowGroupHint) +IconMaskHint|WindowGroupHint); T} .TE .IN "XWMHints" "" "@DEF@" @@ -399,7 +390,7 @@ contents to be urgent, requiring the timely response of the user. The window manager will make some effort to draw the user's attention to this window while this flag is set. The client must provide some means by which the user can cause the urgency flag to be cleared (either mitigating -the condition that made the window urgent or merely shutting off the alarm) +the condition that made the window urgent or merely shutting off the alarm); or the window to be withdrawn. .SH DIAGNOSTICS .TP 1i diff --git a/man/XAllowEvents.man b/man/XAllowEvents.man index e2e77da..ba29864 100644 --- a/man/XAllowEvents.man +++ b/man/XAllowEvents.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XAllEvnt.man,v 1.2 2001/01/27 18:19:56 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XAllEvnt.man,v 1.3 2003/04/28 22:17:54 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,13 +144,9 @@ .SH NAME XAllowEvents \- release queued events .SH SYNTAX -XAllowEvents\^(\^\fIdisplay\fP, \fIevent_mode\fP\^, \fItime\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - int \fIevent_mode\fP\^; -.br - Time \fItime\fP\^; +.HP +int XAllowEvents\^(\^Display *\fIdisplay\fP, int \fIevent_mode\fP\^, +Time \fItime\fP\^); .SH ARGUMENTS .IP \fIdisplay\fP 1i Specifies the connection to the X server. diff --git a/man/XChangeKeyboardControl.man b/man/XChangeKeyboardControl.man index bf1e9e8..37935d7 100644 --- a/man/XChangeKeyboardControl.man +++ b/man/XChangeKeyboardControl.man @@ -41,7 +41,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XCKCntrl.man,v 1.3 2001/02/07 22:35:20 tsi Exp $ +.\" $XFree86: xc/doc/man/X11/XCKCntrl.man,v 1.4 2003/04/28 22:17:54 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -146,39 +146,20 @@ .SH NAME XChangeKeyboardControl, XGetKeyboardControl, XAutoRepeatOn, XAutoRepeatOff, XBell, XQueryKeymap, XKeyboardControl \- manipulate keyboard settings and keyboard control structure .SH SYNTAX -XChangeKeyboardControl\^(\^\fIdisplay\fP, \fIvalue_mask\fP\^, \fIvalues\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - unsigned long \fIvalue_mask\fP\^; -.br - XKeyboardControl *\fIvalues\fP\^; -.LP -XGetKeyboardControl\^(\^\fIdisplay\fP, \fIvalues_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - XKeyboardState *\fIvalues_return\fP\^; -.LP -XAutoRepeatOn\^(\^\fIdisplay\fP\^) -.br - Display *\fIdisplay\fP\^; -.LP -XAutoRepeatOff\^(\^\fIdisplay\fP\^) -.br - Display *\fIdisplay\fP\^; -.LP -XBell\^(\^\fIdisplay\fP, \fIpercent\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - int \fIpercent\fP\^; -.LP -XQueryKeymap\^(\^\fIdisplay\fP, \fIkeys_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - char \fIkeys_return\fP[32]\^; +.HP +int XChangeKeyboardControl\^(\^Display *\fIdisplay\fP, unsigned long +\fIvalue_mask\fP\^, XKeyBoardControl *\fIvalues\fP\^); +.HP +int XGetKeyboardControl\^(\^Display *\fIdisplay\fP, XKeyBoardState +*\fIvalues_return\fP\^); +.HP +int XAutoRepeatOn\^(\^Display *\fIdisplay\fP\^); +.HP +int XAutoRepeatOff\^(\^Display *\fIdisplay\fP\^); +.HP +int XBell\^(\^Display *\fIdisplay\fP, int \fIpercent\fP\^); +.HP +int XQueryKeymap\^(\^Display *\fIdisplay\fP, char \fIkeys_return\fP[32]\^); .SH ARGUMENTS .IP \fIdisplay\fP 1i Specifies the connection to the X server. diff --git a/man/XChangeKeyboardMapping.man b/man/XChangeKeyboardMapping.man index c4fcdbd..7773e67 100644 --- a/man/XChangeKeyboardMapping.man +++ b/man/XChangeKeyboardMapping.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XCKMping.man,v 1.3 2001/02/09 03:47:45 tsi Exp $ +.\" $XFree86: xc/doc/man/X11/XCKMping.man,v 1.4 2003/04/28 22:17:54 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,73 +144,31 @@ .SH NAME XChangeKeyboardMapping, XGetKeyboardMapping, XDisplayKeycodes, XSetModifierMapping, XGetModifierMapping, XNewModifiermap, XInsertModifiermapEntry, XDeleteModifiermapEntry, XFreeModifierMap XModifierKeymap \- manipulate keyboard encoding and keyboard encoding structure .SH SYNTAX -XChangeKeyboardMapping(\^\fIdisplay\fP, \fIfirst_keycode\fP, \fIkeysyms_per_keycode\fP, \fIkeysyms\fP, \fInum_codes\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - int \fIfirst_keycode\fP\^; -.br - int \fIkeysyms_per_keycode\fP\^; -.br - KeySym *\fIkeysyms\fP\^; -.br - int \fInum_codes\fP\^; -.LP -KeySym *XGetKeyboardMapping(\^\fIdisplay\fP, \fIfirst_keycode\fP, \fIkeycode_count\fP, -.br - \fIkeysyms_per_keycode_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - KeyCode \fIfirst_keycode\fP\^; -.br - int \fIkeycode_count\fP\^; -.br - int *\fIkeysyms_per_keycode_return\fP\^; -.LP -XDisplayKeycodes\^(\^\fIdisplay\fP\^, \fImin_keycodes_return\fP\^, -\fImax_keycodes_return\fP\^) -.br - Display *\^\fIdisplay\fP\^; -.br - int *\^\fImin_keycodes_return\fP\^, *\^\fImax_keycodes_return\fP\^; -.LP -int XSetModifierMapping(\^\fIdisplay\fP, \fImodmap\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - XModifierKeymap *\fImodmap\fP\^; -.LP -XModifierKeymap *XGetModifierMapping(\^\fIdisplay\fP\^) -.br - Display *\fIdisplay\fP\^; - -.LP -XModifierKeymap *XNewModifiermap(\^\fImax_keys_per_mod\fP\^) -.br - int \fImax_keys_per_mod\fP\^; -.LP -XModifierKeymap *XInsertModifiermapEntry\^(\^\fImodmap\fP, -\fIkeycode_entry\fP, \fImodifier\fP\^) -.br - XModifierKeymap *\fImodmap\fP\^; -.br - KeyCode \fIkeycode_entry\fP\^; -.br - int \fImodifier\fP\^; -.LP -XModifierKeymap *XDeleteModifiermapEntry\^(\^\fImodmap\fP, -\fIkeycode_entry\fP, \fImodifier\fP\^) -.br - XModifierKeymap *\fImodmap\fP\^; -.br - KeyCode \fIkeycode_entry\fP\^; -.br - int \fImodifier\fP\^; -.LP -XFreeModifiermap(\^\fImodmap\fP\^) -.br - XModifierKeymap *\fImodmap\fP; +.HP +int XChangeKeyboardMapping(\^Display *\fIdisplay\fP, int \fIfirst_keycode\fP, +int \fIkeysyms_per_keycode\fP, KeySym *\fIkeysyms\fP, int \fInum_codes\fP\^); +.HP +KeySym *XGetKeyboardMapping(\^Display *\fIdisplay\fP, KeyCode +\fIfirst_keycode\fP, int \fIkeycode_count\fP, int +*\fIkeysyms_per_keycode_return\fP\^); +.HP +int XDisplayKeycodes\^(\^Display *\fIdisplay\fP\^, int +*\fImin_keycodes_return\fP\^, int *\fImax_keycodes_return\fP\^); +.HP +int XSetModifierMapping(\^Display *\fIdisplay\fP, XModifierKeymap +*\fImodmap\fP\^); +.HP +XModifierKeymap *XGetModifierMapping(\^Display *\fIdisplay\fP\^); +.HP +XModifierKeymap *XNewModifiermap(\^int \fImax_keys_per_mod\fP\^); +.HP +XModifierKeymap *XInsertModifiermapEntry\^(\^XModifierKeymap *\fImodmap\fP, +KeyCode \fIkeycode_entry\fP, int \fImodifier\fP\^); +.HP +XModifierKeymap *XDeleteModifiermapEntry\^(\^XModifierKeymap *\fImodmap\fP, +KeyCode \fIkeycode_entry\fP, int \fImodifier\fP\^); +.HP +int XFreeModifiermap(\^XModifierKeymap *\fImodmap\fP\^); .SH ARGUMENTS .IP \fIdisplay\fP 1i Specifies the connection to the X server. diff --git a/man/XChangePointerControl.man b/man/XChangePointerControl.man index 4cfa502..996a073 100644 --- a/man/XChangePointerControl.man +++ b/man/XChangePointerControl.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XCPCntrl.man,v 1.2 2001/01/27 18:19:57 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XCPCntrl.man,v 1.3 2003/04/28 22:17:54 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,27 +144,14 @@ .SH NAME XChangePointerControl, XGetPointerControl \- control pointer .SH SYNTAX -XChangePointerControl\^(\^\fIdisplay\fP, \fIdo_accel\fP\^, \fIdo_threshold\fP\^, \fIaccel_numerator\fP\^, -.br - \fIaccel_denominator\fP\^, \fIthreshold\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Bool \fIdo_accel\fP\^, \fIdo_threshold\fP\^; -.br - int \fIaccel_numerator\fP\^, \fIaccel_denominator\fP\^; -.br - int \fIthreshold\fP\^; -.LP -XGetPointerControl\^(\^\fIdisplay\fP, \fIaccel_numerator_return\fP\^, \fIaccel_denominator_return\fP\^, -.br - \fIthreshold_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - int *\fIaccel_numerator_return\fP\^, *\fIaccel_denominator_return\fP\^; -.br - int *\fIthreshold_return\fP\^; +.HP +int XChangePointerControl\^(\^Display *\fIdisplay\fP\^, Bool \fIdo_accel\fP\^, +Bool \fIdo_threshold\fP\^, int \fIaccel_numerator\fP\^, int +\fIaccel_denominator\fP\^, int \fIthreshold\fP\^); +.HP +int XGetPointerControl\^(\^Display *\fIdisplay\fP\^, int +*\fIaccel_numerator_return\fP\^, int *\fIaccel_denominator_return\fP\^, int +*\fIthreshold_return\fP\^); .SH ARGUMENTS .IP \fIaccel_denominator\fP 1i Specifies the denominator for the acceleration multiplier. diff --git a/man/XChangeSaveSet.man b/man/XChangeSaveSet.man index df04b9f..4c734e2 100644 --- a/man/XChangeSaveSet.man +++ b/man/XChangeSaveSet.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XCSSet.man,v 1.2 2001/01/27 18:19:57 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XCSSet.man,v 1.3 2003/04/28 22:17:54 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,25 +144,12 @@ .SH NAME XChangeSaveSet, XAddToSaveSet, XRemoveFromSaveSet \- change a client's save set .SH SYNTAX -XChangeSaveSet\^(\^\fIdisplay\fP, \fIw\fP\^, \fIchange_mode\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - int \fIchange_mode\fP\^; -.LP -XAddToSaveSet\^(\^\fIdisplay\fP, \fIw\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.LP -XRemoveFromSaveSet\^(\^\fIdisplay\fP, \fIw\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; +.HP +int XChangeSaveSet\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, int \fIchange_mode\fP\^); +.HP +int XAddToSaveSet\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^); +.HP +int XRemoveFromSaveSet\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^); .SH ARGUMENTS .IP \fIchange_mode\fP 1i Specifies the mode. diff --git a/man/XChangeWindowAttributes.man b/man/XChangeWindowAttributes.man index d62816e..887246c 100644 --- a/man/XChangeWindowAttributes.man +++ b/man/XChangeWindowAttributes.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XCWAttrib.man,v 1.2 2001/01/27 18:19:57 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XCWAttrib.man,v 1.3 2003/04/28 22:17:54 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,55 +144,19 @@ .SH NAME XChangeWindowAttributes, XSetWindowBackground, XSetWindowBackgroundPixmap, XSetWindowBorder, XSetWindowBorderPixmap, XSetWindowColormap \- change window attributes .SH SYNTAX -XChangeWindowAttributes\^(\^\fIdisplay\fP, \fIw\fP\^, \fIvaluemask\fP\^, \fIattributes\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - unsigned long \fIvaluemask\fP\^; -.br - XSetWindowAttributes *\fIattributes\fP\^; -.LP -XSetWindowBackground\^(\^\fIdisplay\fP, \fIw\fP\^, \fIbackground_pixel\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - unsigned long \fIbackground_pixel\fP\^; -.LP -XSetWindowBackgroundPixmap\^(\^\fIdisplay\fP, \fIw\fP\^, \fIbackground_pixmap\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - Pixmap \fIbackground_pixmap\fP\^; -.LP -XSetWindowBorder\^(\^\fIdisplay\fP, \fIw\fP\^, \fIborder_pixel\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - unsigned long \fIborder_pixel\fP\^; -.LP -XSetWindowBorderPixmap\^(\^\fIdisplay\fP, \fIw\fP\^, \fIborder_pixmap\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - Pixmap \fIborder_pixmap\fP\^; -.LP -XSetWindowColormap\^(\^\fIdisplay\fP, \fIw\fP\^, \fIcolormap\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - Colormap \fIcolormap\fP\^; +.HP +int XChangeWindowAttributes\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, unsigned long \fIvaluemask\fP\^, XSetWindowAttributes *\fIattributes\fP\^); +.HP +int XSetWindowBackground\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, unsigned long \fIbackground_pixel\fP\^); +.HP +int XSetWindowBackgroundPixmap\^(\^Display *\fIdisplay\fP\^, Window +\fIw\fP\^, Pixmap \fIbackground_pixmap\fP\^); +.HP +int XSetWindowBorder\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, unsigned long \fIborder_pixel\fP\^); +.HP +int XSetWindowBorderPixmap\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, Pixmap \fIborder_pixmap\fP\^); +.HP +int XSetWindowColormap\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, Colormap \fIcolormap\fP\^); .SH ARGUMENTS .IP \fIattributes\fP 1i Specifies the structure from which the values (as specified by the value mask) diff --git a/man/XClearArea.man b/man/XClearArea.man index 5adfda8..6107540 100644 --- a/man/XClearArea.man +++ b/man/XClearArea.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XClrArea.man,v 1.3 2001/02/09 03:47:45 tsi Exp $ +.\" $XFree86: xc/doc/man/X11/XClrArea.man,v 1.4 2003/04/28 22:17:54 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,23 +144,12 @@ .SH NAME XClearArea, XClearWindow \- clear area or window .SH SYNTAX -XClearArea\^(\^\fIdisplay\fP, \fIw\fP\^, \fIx\fP\^, \fIy\fP\^, \fIwidth\fP\^, \fIheight\fP\^, \fIexposures\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - int \fIx\fP\^, \fIy\fP\^; -.br - unsigned int \fIwidth\fP\^, \fIheight\fP\^; -.br - Bool \fIexposures\fP\^; -.LP -XClearWindow\^(\^\fIdisplay\fP, \fIw\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; +.HP +int XClearArea\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, int \fIx\fP\^, +int \fIy\fP\^, unsigned \fIwidth\fP\^, unsigned \fIheight\fP\^, +Bool \fIexposures\fP\^); +.HP +int XClearWindow\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^); .SH ARGUMENTS .IP \fIdisplay\fP 1i Specifies the connection to the X server. diff --git a/man/XConfigureWindow.man b/man/XConfigureWindow.man index db253ff..e385546 100644 --- a/man/XConfigureWindow.man +++ b/man/XConfigureWindow.man @@ -41,7 +41,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XConfWin.man,v 1.4 2001/02/09 03:47:45 tsi Exp $ +.\" $XFree86: xc/doc/man/X11/XConfWin.man,v 1.5 2003/04/28 22:17:54 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -146,49 +146,19 @@ .SH NAME XConfigureWindow, XMoveWindow, XResizeWindow, XMoveResizeWindow, XSetWindowBorderWidth, XWindowChanges \- configure windows and window changes structure .SH SYNTAX -XConfigureWindow\^(\^\fIdisplay\fP, \fIw\fP\^, \fIvalue_mask\fP\^, \fIvalues\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - unsigned int \fIvalue_mask\fP\^; -.br - XWindowChanges *\fIvalues\fP\^; -.LP -XMoveWindow\^(\^\fIdisplay\fP, \fIw\fP\^, \fIx\fP\^, \fIy\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - int \fIx\fP\^, \fIy\fP\^; -.LP -XResizeWindow\^(\^\fIdisplay\fP, \fIw\fP\^, \fIwidth\fP\^, \fIheight\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - unsigned int \fIwidth\fP\^, \fIheight\fP\^; -.LP -XMoveResizeWindow\^(\^\fIdisplay\fP, \fIw\fP\^, \fIx\fP\^, \fIy\fP\^, \fIwidth\fP\^, \fIheight\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - int \fIx\fP\^, \fIy\fP\^; -.br - unsigned int \fIwidth\fP\^, \fIheight\fP\^; -.LP -XSetWindowBorderWidth\^(\^\fIdisplay\fP, \fIw\fP, \fIwidth\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - unsigned int \fIwidth\fP\^; +.HP +int XConfigureWindow\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, unsigned \fIvalue_mask\fP\^); +.HP +int XMoveWindow\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, int \fIx\fP\^, \fIy\fP\^); +.HP +int XResizeWindow\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, unsigned +\fIwidth\fP\^, unsigned \fIheight\fP\^); +.HP +int XMoveResizeWindow\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, int +\fIx\fP\^, int \fIy\fP\^, unsigned \fIwidth\fP\^, unsigned \fIheight\fP\^); +.HP +int XSetWindowBorderWidth\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, +unsigned \fIwidth\fP\^); .SH ARGUMENTS .IP \fIdisplay\fP 1i Specifies the connection to the X server. diff --git a/man/XCopyArea.man b/man/XCopyArea.man index 19cf637..20408f1 100644 --- a/man/XCopyArea.man +++ b/man/XCopyArea.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XCopyArea.man,v 1.3 2001/02/09 03:47:45 tsi Exp $ +.\" $XFree86: xc/doc/man/X11/XCopyArea.man,v 1.4 2003/04/28 22:17:54 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,35 +144,16 @@ .SH NAME XCopyArea, XCopyPlane \- copy areas .SH SYNTAX -XCopyArea\^(\^\fIdisplay\fP, \fIsrc\fP\^, \fIdest\fP\^, \fIgc\fP\^, \fIsrc_x\fP\^, \fIsrc_y\fP\^, \fIwidth\fP\^, \fIheight\fP\^, \fIdest_x\fP\^, \fIdest_y\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Drawable \fIsrc\fP\^, \fIdest\fP\^; -.br - GC \fIgc\fP\^; -.br - int \fIsrc_x\fP\^, \fIsrc_y\fP\^; -.br - unsigned int \fIwidth\fP\^, \fIheight\fP\^; -.br - int \fIdest_x\fP\^, \fIdest_y\fP\^; -.LP -XCopyPlane\^(\^\fIdisplay\fP, \fIsrc\fP\^, \fIdest\fP\^, \fIgc\fP\^, \fIsrc_x\fP\^, \fIsrc_y\fP\^, \fIwidth\fP\^, \fIheight\fP\^, \fIdest_x\fP\^, \fIdest_y\fP\^, \fIplane\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Drawable \fIsrc\fP\^, \fIdest\fP\^; -.br - GC \fIgc\fP\^; -.br - int \fIsrc_x\fP\^, \fIsrc_y\fP\^; -.br - unsigned int \fIwidth\fP\^, \fIheight\fP\^; -.br - int \fIdest_x\fP\^, \fIdest_y\fP\^; -.br - unsigned long \fIplane\fP\^; +.HP +int XCopyArea\^(\^Display *\fIdisplay\fP\^, Drawable \fIsrc\fP\^, Drawable +\fIdest\fP\^, GC \fIgc\fP\^, int \fIsrc_x\fP\^, int \fIsrc_y\fP\^, unsigned +int \fIwidth\fP\^, unsigned \fIheight\fP\^, int \fIdest_x\fP\^, int +\fIdest_y\fP\^); +.HP +int XCopyPlane\^(\^Display *\fIdisplay\fP\^, Drawable \fIsrc\fP\^, Drawable +\fIdest\fP\^, GC \fIgc\fP\^, int \fIsrc_x\fP\^, int \fIsrc_y\fP\^, unsigned +\fIwidth\fP\^, int \fIheight\fP\^, int \fIdest_x\fP\^, int \fIdest_y\fP\^, +unsigned long \fIplane\fP\^); .SH ARGUMENTS .ds Dx , which are relative to the origin of the destination rectangle and specify its upper-left corner diff --git a/man/XCreateColormap.man b/man/XCreateColormap.man index e4eed2e..789ea90 100644 --- a/man/XCreateColormap.man +++ b/man/XCreateColormap.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XCreCmap.man,v 1.3 2001/07/23 20:47:17 paulo Exp $ +.\" $XFree86: xc/doc/man/X11/XCreCmap.man,v 1.4 2003/04/28 22:17:54 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,27 +144,14 @@ .SH NAME XCreateColormap, XCopyColormapAndFree, XFreeColormap, XColor \- create, copy, or destroy colormaps and color structure .SH SYNTAX -Colormap XCreateColormap\^(\^\fIdisplay\fP, \fIw\fP\^, \fIvisual\fP\^, \fIalloc\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - Visual *\fIvisual\fP\^; -.br - int \fIalloc\fP\^; -.LP -Colormap XCopyColormapAndFree\^(\^\fIdisplay\fP, \fIcolormap\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Colormap \fIcolormap\fP\^; -.LP -XFreeColormap\^(\^\fIdisplay\fP, \fIcolormap\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Colormap \fIcolormap\fP\^; +.HP +Colormap XCreateColormap\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, +Visual *\fIvisual\fP\^, int \fIalloc\fP\^,); +.HP +Colormap XCopyColormapAndFree\^(\^Display *\fIdisplay\fP\^, Colormap +\fIcolormap\fP\^); +.HP +int XFreeColormap\^(\^Display *\fIdisplay\fP\^, Colormap \fIcolormap\fP\^); .SH ARGUMENTS .IP \fIalloc\fP 1i Specifies the colormap entries to be allocated. diff --git a/man/XCreateFontCursor.man b/man/XCreateFontCursor.man index f4b713c..38e9650 100644 --- a/man/XCreateFontCursor.man +++ b/man/XCreateFontCursor.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XCreFCur.man,v 1.3 2001/02/07 22:35:20 tsi Exp $ +.\" $XFree86: xc/doc/man/X11/XCreFCur.man,v 1.4 2003/04/28 22:17:54 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -145,40 +145,18 @@ XCreateFontCursor, XCreatePixmapCursor, XCreateGlyphCursor \- create cursors .SH SYNTAX \&#include <X11/cursorfont.h> -.sp 6p -Cursor XCreateFontCursor\^(\^\fIdisplay\fP, \fIshape\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - unsigned int \fIshape\fP\^; -.LP -Cursor XCreatePixmapCursor\^(\^\fIdisplay\fP, \fIsource\fP\^, \fImask\fP\^, \fIforeground_color\fP\^, \fIbackground_color\fP\^, \fIx\fP\^, \fIy\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Pixmap \fIsource\fP\^; -.br - Pixmap \fImask\fP\^; -.br - XColor *\fIforeground_color\fP\^; -.br - XColor *\fIbackground_color\fP\^; -.br - unsigned int \fIx\fP\^, \fIy\fP\^; -.LP -Cursor XCreateGlyphCursor\^(\^\fIdisplay\fP, \fIsource_font\fP\^, \fImask_font\fP\^, \fIsource_char\fP\^, \fImask_char\fP\^, -.br - \fIforeground_color\fP\^, \fIbackground_color\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Font \fIsource_font\fP\^, \fImask_font\fP\^; -.br - unsigned int \fIsource_char\fP\^, \fImask_char\fP\^; -.br - XColor *\fIforeground_color\fP\^; -.br - XColor *\fIbackground_color\fP\^; +.HP +Cursor XCreateFontCursor\^(\^Display *\fIdisplay\fP\^, unsigned int +\fIshape\fP\^); +.HP +Cursor XCreatePixmapCursor\^(\^Display *\fIdisplay\fP\^, Pixmap +\fIsource\fP\^, Pixmap \fImask\fP\^, XColor *\fIforeground_color\fP\^, XColor +*\fIbackground_color\fP\^, unsigned int \fIx\fP\^, \fIy\fP\^); +.HP +Cursor XCreateGlyphCursor\^(\^Display *\fIdisplay\fP\^, Font +\fIsource_font\fP\^, Font \fImask_font\fP\^, unsigned int \fIsource_char\fP\^, +unsigned int \fImask_char\fP\^, XColor *\fIforeground_color\fP\^, XColor +*\fIbackground_color\fP\^); .SH ARGUMENTS .IP \fIbackground_color\fP 1i Specifies the RGB values for the background of the source. diff --git a/man/XCreateFontSet.man b/man/XCreateFontSet.man index 35406dc..e63c0c5 100644 --- a/man/XCreateFontSet.man +++ b/man/XCreateFontSet.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XCreFSet.man,v 1.2 2001/01/27 18:19:57 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XCreFSet.man,v 1.3 2003/04/28 22:17:54 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,25 +144,12 @@ .SH NAME XCreateFontSet, XFreeFontSet \- create and free an international text drawing font set .SH SYNTAX -XFontSet XCreateFontSet\^(\^\fIdisplay\fP\^, \fIbase_font_name_list\fP\^, \fImissing_charset_list_return\fP\^, -.br - \fImissing_charset_count_return\fP\^, \fIdef_string_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - char *\fIbase_font_name_list\fP\^; -.br - char ***\fImissing_charset_list_return\fP\^; -.br - int *\fImissing_charset_count_return\fP\^; -.br - char **\fIdef_string_return\fP\^; -.LP -void XFreeFontSet\^(\^\fIdisplay\fP\^, \fIfont_set\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - XFontSet \fIfont_set\fP\^; +.HP +XFontSet XCreateFontSet\^(\^Display *\fIdisplay\fP\^, char +*\fIbase_font_name_list\fP\^, char ***\fImissing_charset_list_return\fP\^, int +*\fImissing_charset_count_return\fP\^, char **\fIdef_string_return\fP\^); +.HP +void XFreeFontSet\^(\^Display *\fIdisplay\fP\^, XFontSet \fIfont_set\fP\^); .SH ARGUMENTS .IP \fIdisplay\fP 1i Specifies the connection to the X server. diff --git a/man/XCreateGC.man b/man/XCreateGC.man index 4189eb8..08bf364 100644 --- a/man/XCreateGC.man +++ b/man/XCreateGC.man @@ -41,7 +41,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XCreGC.man,v 1.5 2001/02/09 03:47:45 tsi Exp $ +.\" $XFree86: xc/doc/man/X11/XCreGC.man,v 1.6 2003/04/28 22:17:54 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -146,54 +146,22 @@ .SH NAME XCreateGC, XCopyGC, XChangeGC, XGetGCValues, XFreeGC, XGContextFromGC, XGCValues \- create or free graphics contexts and graphics context structure .SH SYNTAX -GC XCreateGC\^(\^\fIdisplay\fP, \fId\fP\^, \fIvaluemask\fP\^, \fIvalues\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Drawable \fId\fP\^; -.br - unsigned long \fIvaluemask\fP\^; -.br - XGCValues *\^\fIvalues\fP\^; -.LP -XCopyGC\^(\^\fIdisplay\fP, \fIsrc\fP\^, \fIvaluemask\fP\^, \fIdest\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - GC \fIsrc\fP\^, \fIdest\fP\^; -.br - unsigned long \fIvaluemask\fP\^; -.LP -XChangeGC\^(\^\fIdisplay\fP, \fIgc\fP\^, \fIvaluemask\fP\^, \fIvalues\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - GC \fIgc\fP\^; -.br - unsigned long \fIvaluemask\fP\^; -.br - XGCValues *\^\fIvalues\fP\^; -.LP -Status XGetGCValues\^(\^\fIdisplay\fP, \fIgc\fP, \fIvaluemask\fP, -\fIvalues_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - GC \fIgc\fP\^; -.br - unsigned long \fIvaluemask\fP\^; -.br - XGCValues *\fIvalues_return\fP\^; -.LP -XFreeGC\^(\^\fIdisplay\fP, \fIgc\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - GC \fIgc\fP\^; -.LP -GContext XGContextFromGC\^(\^\fIgc\fP\^) -.br - GC \fIgc\fP\^; +.HP +GC XCreateGC\^(\^Display *\fIdisplay\fP\^, Drawable \fId\fP\^, unsigned long +\fIvaluemask\fP\^, XGCValues *\^\fIvalues\fP\^); +.HP +int XCopyGC\^(\^Display *\fIdisplay\fP\^, GC \fIsrc\fP\^, GC \fIdest\fP\^, +unsigned long \fIvaluemask\fP\^); +.HP +int XChangeGC\^(\^Display *\fIdisplay\fP\^, GC \fIgc\fP\^, unsigned long +\fIvaluemask\fP\^, XGCValues *\^\fIvalues\fP\^); +.HP +Status XGetGCValues\^(\^Display *\fIdisplay\fP\^, GC \fIgc\fP\^, unsigned long +\fIvaluemask\fP\^, XGCValues *\fIvalues_return\fP\^); +.HP +int XFreeGC\^(\^Display *\fIdisplay\fP\^, GC \fIgc\fP\^); +.HP +GContext XGContextFromGC\^(\^GC \fIgc\fP\^); .SH ARGUMENTS .IP \fId\fP 1i Specifies the drawable. diff --git a/man/XCreateIC.man b/man/XCreateIC.man index 6cf7bb3..62bde46 100644 --- a/man/XCreateIC.man +++ b/man/XCreateIC.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XCreIC.man,v 1.2 2001/01/27 18:19:57 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XCreIC.man,v 1.3 2003/04/28 22:17:54 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,17 +144,12 @@ .SH NAME XCreateIC, XDestroyIC, XIMOfIC \- create, destroy, and obtain the input method of an input context .SH SYNTAX -XIC XCreateIC\^(\^\fIim\fP\^, ...) -.br - XIM \fIim\fP\^; -.LP -void XDestroyIC\^(\^\fIic\fP\^) -.br - XIC \fIic\fP\^; -.LP -XIM XIMOfIC\^(\^\fIic\fP\^) -.br - XIC \fIic\fP\^; +.HP +XIC XCreateIC\^(\^XIM \fIim\fP\^, ...\^); +.HP +void XDestroyIC\^(\^XIC \fIic\fP\^); +.HP +XIM XIMOfIC\^(\^XIC \fIic\fP\^); .SH ARGUMENTS .IP \fIic\fP 1i Specifies the input context. diff --git a/man/XCreateOC.man b/man/XCreateOC.man index 001ba75..74f610e 100644 --- a/man/XCreateOC.man +++ b/man/XCreateOC.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XCreOC.man,v 1.2 2001/01/27 18:19:57 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XCreOC.man,v 1.3 2003/04/28 22:17:54 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,25 +144,16 @@ .SH NAME XCreateOC, XDestroyOC, XSetOCValues, XGetOCValues, XOMOfOC \- create output contexts .SH SYNTAX -XOC XCreateOC\^(\^\fIom\fP\^, ...) -.br - XOM \fIom\fP\^; -.LP -void XDestroyOC\^(\^\fIoc\fP\^) -.br - XOC \fIoc\fP\^; -.LP -char * XSetOCValues\^(\^\fIoc\fP\^, ...) -.br - XOC \fIoc\fP\^; -.LP -char * XGetOCValues\^(\^\fIoc\fP\^, ...) -.br - XOC \fIoc\fP\^; -.LP -XOM XOMOfOC\^(\^\fIoc\fP\^) -.br - XOC \fIoc\fP\^; +.HP +XOC XCreateOC\^(\^XOM \fIom\fP\^); +.HP +void XDestroyOC\^(\^XOC \fIoc\fP\^); +.HP +char * XSetOCValues\^(\^XOC \fIoc\fP\^, ...); +.HP +char * XGetOCValues\^(\^XOC \fIoc\fP\^, ...); +.HP +XOM XOMOfOC\^(\^XOC \fIoc\fP\^); .SH ARGUMENTS .IP \fIoc\fP 1i Specifies the output context. diff --git a/man/XCreatePixmap.man b/man/XCreatePixmap.man index d7ac1bf..3aeacdc 100644 --- a/man/XCreatePixmap.man +++ b/man/XCreatePixmap.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XCrePmap.man,v 1.2 2001/01/27 18:19:57 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XCrePmap.man,v 1.3 2003/04/28 22:17:54 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,21 +144,12 @@ .SH NAME XCreatePixmap, XFreePixmap \- create or destroy pixmaps .SH SYNTAX -Pixmap XCreatePixmap\^(\^\fIdisplay\fP, \fId\fP\^, \fIwidth\fP\^, \fIheight\fP\^, \fIdepth\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Drawable \fId\fP\^; -.br - unsigned int \fIwidth\fP\^, \fIheight\fP\^; -.br - unsigned int \fIdepth\fP\^; -.LP -XFreePixmap\^(\^\fIdisplay\fP, \fIpixmap\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Pixmap \fIpixmap\fP\^; +.HP +Pixmap XCreatePixmap\^(\^Display *\fIdisplay\fP\^, Drawable \fId\fP\^, +unsigned int \fIwidth\fP\^, unsigned int \fIheight\fP\^, unsigned int +\fIdepth\fP\^); +.HP +int XFreePixmap\^(\^Display *\fIdisplay\fP\^, Pixmap \fIpixmap\fP\^); .SH ARGUMENTS .IP \fId\fP 1i Specifies which screen the pixmap is created on. diff --git a/man/XCreateRegion.man b/man/XCreateRegion.man index 58a0039..8018872 100644 --- a/man/XCreateRegion.man +++ b/man/XCreateRegion.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XCreReg.man,v 1.2 2001/01/27 18:19:57 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XCreReg.man,v 1.3 2003/04/28 22:17:54 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,19 +144,12 @@ .SH NAME XCreateRegion, XSetRegion, XDestroyRegion \- create or destroy regions .SH SYNTAX -Region XCreateRegion\^() -.LP -XSetRegion\^(\^\fIdisplay\fP, \fIgc\fP\^, \fIr\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - GC \fIgc\fP\^; -.br - Region \fIr\fP\^; -.LP -XDestroyRegion\^(\^\fIr\fP\^) -.br - Region \fIr\fP\^; +.HP +Region XCreateRegion\^(void\^); +.HP +int XSetRegion\^(\^Display *\fIdisplay\fP\^, GC \fIgc\fP\^, Region \fIr\fP\^); +.HP +int XDestroyRegion\^(\^Region \fIr\fP\^); .SH ARGUMENTS .IP \fIdisplay\fP 1i Specifies the connection to the X server. diff --git a/man/XCreateWindow.man b/man/XCreateWindow.man index 258aaa2..f9cd6b4 100644 --- a/man/XCreateWindow.man +++ b/man/XCreateWindow.man @@ -41,7 +41,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XCreWin.man,v 1.4 2001/02/09 03:47:45 tsi Exp $ +.\" $XFree86: xc/doc/man/X11/XCreWin.man,v 1.5 2003/04/28 22:17:54 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -146,47 +146,10 @@ .SH NAME XCreateWindow, XCreateSimpleWindow, XSetWindowAttributes \- create windows and window attributes structure .SH SYNTAX -Window XCreateWindow\^(\^\fIdisplay\fP, \fIparent\fP\^, \fIx\fP\^, \fIy\fP\^, \fIwidth\fP\^, \fIheight\fP\^, \fIborder_width\fP\^, \fIdepth\fP\^, -.br - \fIclass\fP\^, \fIvisual\fP\^, \fIvaluemask\fP\^, \fIattributes\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIparent\fP\^; -.br - int \fIx\fP\^, \fIy\fP\^; -.br - unsigned int \fIwidth\fP\^, \fIheight\fP\^; -.br - unsigned int \fIborder_width\fP\^; -.br - int \fIdepth\fP\^; -.br - unsigned int \fIclass\fP\^; -.br - Visual *\fIvisual\fP\^ -.br - unsigned long \fIvaluemask\fP\^; -.br - XSetWindowAttributes *\fIattributes\fP\^; -.LP -Window XCreateSimpleWindow\^(\^\fIdisplay\fP, \fIparent\fP\^, \fIx\fP\^, \fIy\fP\^, \fIwidth\fP\^, \fIheight\fP\^, \fIborder_width\fP\^, -.br - \fIborder\fP\^, \fIbackground\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIparent\fP\^; -.br - int \fIx\fP\^, \fIy\fP\^; -.br - unsigned int \fIwidth\fP\^, \fIheight\fP\^; -.br - unsigned int \fIborder_width\fP\^; -.br - unsigned long \fIborder\fP\^; -.br - unsigned long \fIbackground\fP\^; +.HP +Window XCreateWindow\^(\^Display *\fIdisplay\fP\^, Window \fIparent\fP\^, int \fIx\fP\^, int \fIy\fP\^, unsigned int \fIwidth\fP\^, unsigned int \fIheight\fP\^, unsigned int \fIborder_width\fP\^, int \fIdepth\fP\^, unsigned int \fIclass\fP\^, Visual *\fIvisual\fP\^, unsigned long \fIvaluemask\fP\^, XSetWindowAttributes *\fIattributes\fP\^); +.HP +Window XCreateSimpleWindow\^(\^Display *\fIdisplay\fP\^, Window \fIparent\fP\^, int \fIx\fP\^, int \fIy\fP\^, unsigned int \fIwidth\fP\^, unsigned int \fIheight\fP\^, unsigned int \fIborder_width\fP\^, unsigned long \fIborder\fP\^, unsigned long \fIbackground\fP\^); .SH ARGUMENTS .IP \fIattributes\fP 1i Specifies the structure from which the values (as specified by the value mask) diff --git a/man/XDefineCursor.man b/man/XDefineCursor.man index b260d0c..a6790b1 100644 --- a/man/XDefineCursor.man +++ b/man/XDefineCursor.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XDefCur.man,v 1.2 2001/01/27 18:19:58 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XDefCur.man,v 1.3 2003/04/28 22:17:54 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,19 +144,11 @@ .SH NAME XDefineCursor, XUndefineCursor \- define cursors .SH SYNTAX -XDefineCursor\^(\^\fIdisplay\fP, \fIw\fP\^, \fIcursor\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - Cursor \fIcursor\fP\^; -.LP -XUndefineCursor\^(\^\fIdisplay\fP, \fIw\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; +.HP +int XDefineCursor\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, Cursor +\fIcursor\fP\^); +.HP +int XUndefineCursor\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^); .SH ARGUMENTS .IP \fIcursor\fP 1i Specifies the cursor that is to be displayed or diff --git a/man/XDestroyWindow.man b/man/XDestroyWindow.man index c96bb28..9863226 100644 --- a/man/XDestroyWindow.man +++ b/man/XDestroyWindow.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XDesWin.man,v 1.2 2001/01/27 18:19:58 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XDesWin.man,v 1.3 2003/04/28 22:17:54 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,17 +144,10 @@ .SH NAME XDestroyWindow, XDestroySubwindows \- destroy windows .SH SYNTAX -XDestroyWindow\^(\^\fIdisplay\fP, \fIw\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.LP -XDestroySubwindows\^(\^\fIdisplay\fP, \fIw\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; +.HP +int XDestroyWindow\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^); +.HP +int XDestroySubwindows\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^); .SH ARGUMENTS .IP \fIdisplay\fP 1i Specifies the connection to the X server. diff --git a/man/XDrawArc.man b/man/XDrawArc.man index fe1fae6..e26c469 100644 --- a/man/XDrawArc.man +++ b/man/XDrawArc.man @@ -41,7 +41,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XDrArc.man,v 1.3 2001/02/09 03:47:45 tsi Exp $ +.\" $XFree86: xc/doc/man/X11/XDrArc.man,v 1.4 2003/04/28 22:17:54 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -146,31 +146,13 @@ .SH NAME XDrawArc, XDrawArcs, XArc \- draw arcs and arc structure .SH SYNTAX -XDrawArc\^(\^\fIdisplay\fP, \fId\fP\^, \fIgc\fP\^, \fIx\fP\^, \fIy\fP\^, \fIwidth\fP\^, \fIheight\fP\^, \fIangle1\fP\^, \fIangle2\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Drawable \fId\fP\^; -.br - GC \fIgc\fP\^; -.br - int \fIx\fP\^, \fIy\fP\^; -.br - unsigned int \fIwidth\fP\^, \fIheight\fP\^; -.br - int \fIangle1\fP\^, \fIangle2\fP\^; -.LP -XDrawArcs\^(\^\fIdisplay\fP, \fId\fP\^, \fIgc\fP\^, \fIarcs\fP\^, \fInarcs\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Drawable \fId\fP\^; -.br - GC \fIgc\fP\^; -.br - XArc *\fIarcs\fP\^; -.br - int \fInarcs\fP\^; +.HP +int XDrawArc\^(\^Display *\fIdisplay\fP\^, Drawable \fId\fP\^, GC \fIgc\fP\^, +int \fIx\fP\^, int \fIy\fP\^, unsigned int \fIwidth\fP\^, unsigned int +\fIheight\fP\^, int \fIangle1\fP\^, int \fIangle2\fP\^); +.HP +int XDrawArcs\^(\^Display *\fIdisplay\fP\^, Drawable \fId\fP\^, GC \fIgc\fP\^, +XArc *\fIarcs\fP\^, int \fInarcs\fP\^); .SH ARGUMENTS .IP \fIangle1\fP 1i Specifies the start of the arc relative to the three-o'clock position diff --git a/man/XDrawImageString.man b/man/XDrawImageString.man index 0b471be..309b509 100644 --- a/man/XDrawImageString.man +++ b/man/XDrawImageString.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XDrIStr.man,v 1.3 2001/02/09 03:47:45 tsi Exp $ +.\" $XFree86: xc/doc/man/X11/XDrIStr.man,v 1.4 2003/04/28 22:17:54 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,33 +144,14 @@ .SH NAME XDrawImageString, XDrawImageString16 \- draw image text .SH SYNTAX -XDrawImageString\^(\^\fIdisplay\fP, \fId\fP\^, \fIgc\fP\^, \fIx\fP\^, \fIy\fP\^, \fIstring\fP\^, \fIlength\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Drawable \fId\fP\^; -.br - GC \fIgc\fP\^; -.br - int \fIx\fP\^, \fIy\fP\^; -.br - char *\fIstring\fP\^; -.br - int \fIlength\fP\^; -.LP -XDrawImageString16\^(\^\fIdisplay\fP, \fId\fP\^, \fIgc\fP\^, \fIx\fP\^, \fIy\fP\^, \fIstring\fP\^, \fIlength\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Drawable \fId\fP\^; -.br - GC \fIgc\fP\^; -.br - int \fIx\fP\^, \fIy\fP\^; -.br - XChar2b *\fIstring\fP\^; -.br - int \fIlength\fP\^; +.HP +int XDrawImageString\^(\^Display *\fIdisplay\fP\^, Drawable \fId\fP\^, GC +\fIgc\fP\^, int \fIx\fP\^, int \fIy\fP\^, char *\fIstring\fP\^, int +\fIlength\fP\^); +.HP +int XDrawImageString16\^(\^Display *\fIdisplay\fP\^, Drawable \fId\fP\^, GC +\fIgc\fP\^, int \fIx\fP\^, int \fIy\fP\^, XChar2b *\fIstring\fP\^, int +\fIlength\fP\^); .SH ARGUMENTS .IP \fId\fP 1i Specifies the drawable. diff --git a/man/XDrawLine.man b/man/XDrawLine.man index 5a4fd33..b911f43 100644 --- a/man/XDrawLine.man +++ b/man/XDrawLine.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XDrLine.man,v 1.2 2001/01/27 18:19:58 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XDrLine.man,v 1.3 2003/04/28 22:17:54 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,41 +144,15 @@ .SH NAME XDrawLine, XDrawLines, XDrawSegments, XSegment \- draw lines, polygons, and line structure .SH SYNTAX -XDrawLine\^(\^\fIdisplay\fP, \fId\fP\^, \fIgc\fP\^, \fIx1\fP\^, \fIy1\fP\^, \fIx2\fP\^, \fIy2\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Drawable \fId\fP\^; -.br - GC \fIgc\fP\^; -.br - int \fIx1\fP\^, \fIy1\fP\^, \fIx2\fP\^, \fIy2\fP\^; -.LP -XDrawLines\^(\^\fIdisplay\fP, \fId\fP\^, \fIgc\fP\^, \fIpoints\fP\^, \fInpoints\fP\^, \fImode\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Drawable \fId\fP\^; -.br - GC \fIgc\fP\^; -.br - XPoint *\fIpoints\fP\^; -.br - int \fInpoints\fP\^; -.br - int \fImode\fP\^; -.LP -XDrawSegments\^(\^\fIdisplay\fP, \fId\fP\^, \fIgc\fP\^, \fIsegments\fP\^, \fInsegments\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Drawable \fId\fP\^; -.br - GC \fIgc\fP\^; -.br - XSegment *\fIsegments\fP\^; -.br - int \fInsegments\fP\^; +.HP +int XDrawLine\^(\^Display *\fIdisplay\fP\^, Drawable \fId\fP\^, GC \fIgc\fP\^, +int \fIx1\fP\^, int \fIy1\fP\^, int \fIx2\fP\^, int \fIy2\fP\^); +.HP +int XDrawLines\^(\^Display *\fIdisplay\fP\^, Drawable \fId\fP\^, GC +\fIgc\fP\^, XPoint *\fIpoints\fP\^, int \fInpoints\fP\^, int \fImode\fP\^); +.HP +int XDrawSegments\^(\^Display *\fIdisplay\fP\^, Drawable \fId\fP\^, GC +\fIgc\fP\^, XSegment *\fIsegments\fP\^, int \fInsegments\fP\^); .SH ARGUMENTS .IP \fId\fP 1i Specifies the drawable. diff --git a/man/XDrawPoint.man b/man/XDrawPoint.man index 82a34b6..df0c0f4 100644 --- a/man/XDrawPoint.man +++ b/man/XDrawPoint.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XDrPoint.man,v 1.2 2001/01/27 18:19:58 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XDrPoint.man,v 1.3 2003/04/28 22:17:54 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,29 +144,12 @@ .SH NAME XDrawPoint, XDrawPoints, XPoint \- draw points and points structure .SH SYNTAX -XDrawPoint\^(\^\fIdisplay\fP, \fId\fP\^, \fIgc\fP\^, \fIx\fP\^, \fIy\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Drawable \fId\fP\^; -.br - GC \fIgc\fP\^; -.br - int \fIx\fP\^, \fIy\fP\^; -.LP -XDrawPoints\^(\^\fIdisplay\fP, \fId\fP\^, \fIgc\fP\^, \fIpoints\fP\^, \fInpoints\fP\^, \fImode\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Drawable \fId\fP\^; -.br - GC \fIgc\fP\^; -.br - XPoint *\fIpoints\fP\^; -.br - int \fInpoints\fP\^; -.br - int \fImode\fP\^; +.HP +int XDrawPoint\^(\^Display *\fIdisplay\fP\^, Drawable \fId\fP\^, GC +\fIgc\fP\^, int \fIx\fP\^, int \fIy\fP\^); +.HP +int XDrawPoints\^(\^Display *\fIdisplay\fP\^, Drawable \fId\fP\^, GC +\fIgc\fP\^, XPoint *\fIpoints\fP\^, int \fInpoints\fP\^, int \fImode\fP\^); .SH ARGUMENTS .IP \fId\fP 1i Specifies the drawable. diff --git a/man/XDrawRectangle.man b/man/XDrawRectangle.man index a2671d0..701f567 100644 --- a/man/XDrawRectangle.man +++ b/man/XDrawRectangle.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XDrRect.man,v 1.2 2001/01/27 18:19:58 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XDrRect.man,v 1.3 2003/04/28 22:17:54 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,29 +144,13 @@ .SH NAME XDrawRectangle, XDrawRectangles, XRectangle \- draw rectangles and rectangles structure .SH SYNTAX -XDrawRectangle\^(\^\fIdisplay\fP, \fId\fP\^, \fIgc\fP\^, \fIx\fP\^, \fIy\fP\^, \fIwidth\fP\^, \fIheight\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Drawable \fId\fP\^; -.br - GC \fIgc\fP\^; -.br - int \fIx\fP\^, \fIy\fP\^; -.br - unsigned int \fIwidth\fP\^, \fIheight\fP\^; -.LP -XDrawRectangles\^(\^\fIdisplay\fP, \fId\fP\^, \fIgc\fP\^, \fIrectangles\fP\^, \fInrectangles\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Drawable \fId\fP\^; -.br - GC \fIgc\fP\^; -.br - XRectangle \fIrectangles\fP\^[\^]\^; -.br - int \fInrectangles\fP\^; +.HP +int XDrawRectangle\^(\^Display *\fIdisplay\fP\^, Drawable \fId\fP\^, GC +\fIgc\fP\^, int \fIx\fP\^, int \fIy\fP\^, unsigned int \fIwidth\fP\^, unsigned +int \fIheight\fP\^); +.HP +int XDrawRectangles\^(\^Display *\fIdisplay\fP\^, Drawable \fId\fP\^, GC +\fIgc\fP\^, XRectangle \fIrectangles\fP\^[\^]\^, int \fInrectangles\fP\^); .SH ARGUMENTS .IP \fId\fP 1i Specifies the drawable. diff --git a/man/XDrawString.man b/man/XDrawString.man index 5e25097..6d05233 100644 --- a/man/XDrawString.man +++ b/man/XDrawString.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XDrString.man,v 1.3 2001/02/09 03:47:45 tsi Exp $ +.\" $XFree86: xc/doc/man/X11/XDrString.man,v 1.4 2003/04/28 22:17:54 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,33 +144,14 @@ .SH NAME XDrawString, XDrawString16 \- draw text characters .SH SYNTAX -XDrawString\^(\^\fIdisplay\fP, \fId\fP\^, \fIgc\fP\^, \fIx\fP\^, \fIy\fP\^, \fIstring\fP\^, \fIlength\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Drawable \fId\fP\^; -.br - GC \fIgc\fP\^; -.br - int \fIx\fP\^, \fIy\fP\^; -.br - char *\fIstring\fP\^; -.br - int \fIlength\fP\^; -.LP -XDrawString16\^(\^\fIdisplay\fP, \fId\fP\^, \fIgc\fP\^, \fIx\fP\^, \fIy\fP\^, \fIstring\fP\^, \fIlength\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Drawable \fId\fP\^; -.br - GC \fIgc\fP\^; -.br - int \fIx\fP\^, \fIy\fP\^; -.br - XChar2b *\fIstring\fP\^; -.br - int \fIlength\fP\^; +.HP +int XDrawString\^(\^Display *\fIdisplay\fP\^, Drawable \fId\fP\^, GC +\fIgc\fP\^, int \fIx\fP\^, int \fIy\fP\^, char *\fIstring\fP\^, int +\fIlength\fP\^); +.HP +int XDrawString16\^(\^Display *\fIdisplay\fP\^, Drawable \fId\fP\^, GC +\fIgc\fP\^, int \fIx\fP\^, int \fIy\fP\^, XChar2b *\fIstring\fP\^, int +\fIlength\fP\^); .SH ARGUMENTS .IP \fId\fP 1i Specifies the drawable. diff --git a/man/XDrawText.man b/man/XDrawText.man index 6a48ee0..ad6b05b 100644 --- a/man/XDrawText.man +++ b/man/XDrawText.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XDrText.man,v 1.3 2001/02/09 03:47:45 tsi Exp $ +.\" $XFree86: xc/doc/man/X11/XDrText.man,v 1.4 2003/04/28 22:17:54 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,33 +144,13 @@ .SH NAME XDrawText, XDrawText16, XTextItem, XTextItem16 \- draw polytext text and text drawing structures .SH SYNTAX -XDrawText\^(\^\fIdisplay\fP, \fId\fP\^, \fIgc\fP\^, \fIx\fP\^, \fIy\fP\^, \fIitems\fP\^, \fInitems\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Drawable \fId\fP\^; -.br - GC \fIgc\fP\^; -.br - int \fIx\fP\^, \fIy\fP\^; -.br - XTextItem *\fIitems\fP\^; -.br - int \fInitems\fP\^; -.LP -XDrawText16\^(\^\fIdisplay\fP, \fId\fP\^, \fIgc\fP\^, \fIx\fP\^, \fIy\fP\^, \fIitems\fP\^, \fInitems\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Drawable \fId\fP\^; -.br - GC \fIgc\fP\^; -.br - int \fIx\fP\^, \fIy\fP\^; -.br - XTextItem16 *\fIitems\fP\^; -.br - int \fInitems\fP\^; +.HP +int XDrawText\^(\^Display *\fIdisplay\fP\^, Drawable \fId\fP\^, GC \fIgc\fP\^, +int \fIx\fP\^, int \fIy\fP\^, XTextItem *\fIitems\fP\^, int \fInitems\fP\^); +.HP +int XDrawText16\^(\^Display *\fIdisplay\fP\^, Drawable \fId\fP\^, GC +\fIgc\fP\^, int \fIx\fP\^, int \fIy\fP\^, XTextItem16 *\fIitems\fP\^, int +\fInitems\fP\^); .SH ARGUMENTS .IP \fId\fP 1i Specifies the drawable. diff --git a/man/XEmptyRegion.man b/man/XEmptyRegion.man index fc815f6..9ef0d47 100644 --- a/man/XEmptyRegion.man +++ b/man/XEmptyRegion.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XERegion.man,v 1.3 2001/02/09 03:47:45 tsi Exp $ +.\" $XFree86: xc/doc/man/X11/XERegion.man,v 1.4 2003/04/28 22:17:54 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,27 +144,15 @@ .SH NAME XEmptyRegion, XEqualRegion, XPointInRegion, XRectInRegion \- determine if regions are empty or equal .SH SYNTAX -Bool XEmptyRegion\^(\^\fIr\fP\^) -.br - Region \fIr\fP\^; -.LP -Bool XEqualRegion\^(\^\fIr1\fP\^, \fIr2\fP\^) -.br - Region \fIr1\fP\^, \fIr2\fP\^; -.LP -Bool XPointInRegion\^(\^\fIr\fP\^, \fIx\fP\^, \fIy\fP\^) -.br - Region \fIr\fP\^; -.br - int \fIx\fP\^, \fIy\fP\^; -.LP -int XRectInRegion\^(\^\fIr\fP\^, \fIx\fP\^, \fIy\fP\^, \fIwidth\fP\^, \fIheight\fP\^) -.br - Region \fIr\fP\^; -.br - int \fIx\fP\^, \fIy\fP\^; -.br - unsigned int \fIwidth\fP\^, \fIheight\fP\^; +.HP +Bool XEmptyRegion\^(\^Region \fIr\fP\^); +.HP +Bool XEqualRegion\^(\^Region \fIr1\fP\^, Region \fIr2\fP\^); +.HP +Bool XPointInRegion\^(\^Region \fIr\fP\^, int \fIx\fP\^, int \fIy\fP\^); +.HP +int XRectInRegion\^(\^Region \fIr\fP\^, int \fIx\fP\^, int \fIy\fP\^, unsigned +int \fIwidth\fP\^, unsigned int \fIheight\fP\^); .SH ARGUMENTS .IP \fIr\fP 1i Specifies the region. diff --git a/man/XExtentsOfFontSet.man b/man/XExtentsOfFontSet.man index 3873b24..aea606b 100644 --- a/man/XExtentsOfFontSet.man +++ b/man/XExtentsOfFontSet.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XEofFSet.man,v 1.2 2001/01/27 18:19:58 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XEofFSet.man,v 1.3 2003/04/28 22:17:54 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,9 +144,8 @@ .SH NAME XExtentsOfFontSet \- obtain the maximum extents structure for a font set .SH SYNTAX -XFontSetExtents *XExtentsOfFontSet\^(\^\fIfont_set\fP\^) -.br - XFontSet \fIfont_set\fP\^; +.HP +XFontSetExtents *XExtentsOfFontSet\^(\^XFontSet \fIfont_set\fP\^); .SH ARGUMENTS .IP \fIfont_set\fP 1i Specifies the font set. diff --git a/man/XFillRectangle.man b/man/XFillRectangle.man index 6cf034a..1b57732 100644 --- a/man/XFillRectangle.man +++ b/man/XFillRectangle.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XFillRect.man,v 1.3 2001/02/09 03:47:45 tsi Exp $ +.\" $XFree86: xc/doc/man/X11/XFillRect.man,v 1.4 2003/04/28 22:17:54 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,71 +144,24 @@ .SH NAME XFillRectangle, XFillRectangles, XFillPolygon, XFillArc, XFillArcs \- fill rectangles, polygons, or arcs .SH SYNTAX -XFillRectangle\^(\^\fIdisplay\fP, \fId\fP\^, \fIgc\fP\^, \fIx\fP\^, \fIy\fP\^, \fIwidth\fP\^, \fIheight\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Drawable \fId\fP\^; -.br - GC \fIgc\fP\^; -.br - int \fIx\fP\^, \fIy\fP\^; -.br - unsigned int \fIwidth\fP\^, \fIheight\fP\^; -.LP -XFillRectangles\^(\^\fIdisplay\fP, \fId\fP\^, \fIgc\fP\^, \fIrectangles\fP\^, \fInrectangles\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Drawable \fId\fP\^; -.br - GC \fIgc\fP\^; -.br - XRectangle *\fIrectangles\fP\^; -.br - int \fInrectangles\fP\^; -.LP -XFillPolygon\^(\^\fIdisplay\fP, \fId\fP\^, \fIgc\fP\^, \fIpoints\fP\^, \fInpoints\fP\^, \fIshape\fP\^, \fImode\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Drawable \fId\fP\^; -.br - GC \fIgc\fP\^; -.br - XPoint *\fIpoints\fP\^; -.br - int \fInpoints\fP\^; -.br - int \fIshape\fP\^; -.br - int \fImode\fP\^; -.LP -XFillArc\^(\^\fIdisplay\fP, \fId\fP\^, \fIgc\fP\^, \fIx\fP\^, \fIy\fP\^, \fIwidth\fP\^, \fIheight\fP\^, \fIangle1\fP\^, \fIangle2\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Drawable \fId\fP\^; -.br - GC \fIgc\fP\^; -.br - int \fIx\fP\^, \fIy\fP\^; -.br - unsigned int \fIwidth\fP\^, \fIheight\fP\^; -.br - int \fIangle1\fP\^, \fIangle2\fP\^; -.LP -XFillArcs\^(\^\fIdisplay\fP, \fId\fP\^, \fIgc\fP\^, \fIarcs\fP\^, \fInarcs\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Drawable \fId\fP\^; -.br - GC \fIgc\fP\^; -.br - XArc *\fIarcs\fP\^; -.br - int \fInarcs\fP\^; +.HP +int XFillRectangle\^(\^Display *\fIdisplay\fP\^, Drawable \fId\fP\^, GC +\fIgc\fP\^, int \fIx\fP\^, int \fIy\fP\^, unsigned int \fIwidth\fP\^, unsigned +int \fIheight\fP\^); +.HP +int XFillRectangles\^(\^Display *\fIdisplay\fP\^, Drawable \fId\fP\^, GC +\fIgc\fP\^, XRectangle *\fIrectangles\fP\^, int \fInrectangles\fP\^); +.HP +int XFillPolygon\^(\^Display *\fIdisplay\fP\^, Drawable \fId\fP\^, GC +\fIgc\fP\^, XPoint *\fIpoints\fP\^, int \fInpoints\fP\^, int \fIshape\fP\^, +int \fImode\fP\^); +.HP +int XFillArc\^(\^Display *\fIdisplay\fP\^, Drawable \fId\fP\^, GC \fIgc\fP\^, +int \fIx\fP\^, int \fIy\fP\^, unsigned int \fIwidth\fP\^, unsigned int +\fIheight\fP\^, int \fIangle1\fP\^, int \fIangle2\fP\^); +.HP +int XFillArcs\^(\^Display *\fIdisplay\fP\^, Drawable \fId\fP\^, GC \fIgc\fP\^, +XArc *\fIarcs\fP\^, int \fInarcs\fP\^); .SH ARGUMENTS .IP \fIangle1\fP 1i Specifies the start of the arc relative to the three-o'clock position diff --git a/man/XFilterEvent.man b/man/XFilterEvent.man index a6aa3e9..478c488 100644 --- a/man/XFilterEvent.man +++ b/man/XFilterEvent.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XFEvent.man,v 1.2 2001/01/27 18:19:59 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XFEvent.man,v 1.3 2003/04/28 22:17:54 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,11 +144,8 @@ .SH NAME XFilterEvent \- filter X events for an input method .SH SYNTAX -Bool XFilterEvent\^(\^\fIevent\fP\^, \fIw\fP\^) -.br - XEvent *\fIevent\fP\^; -.br - Window \fIw\fP\^; +.HP +Bool XFilterEvent\^(\^XEvent *\fIevent\fP\^, Window \fIw\fP\^); .SH ARGUMENTS .ds Ev event to filter .IP \fIevent\fP 1i diff --git a/man/XFlush.man b/man/XFlush.man index 7472318..b4e7db0 100644 --- a/man/XFlush.man +++ b/man/XFlush.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XFlush.man,v 1.2 2001/01/27 18:19:59 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XFlush.man,v 1.3 2003/04/28 22:17:54 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,25 +144,14 @@ .SH NAME XFlush, XSync, XEventsQueued, XPending \- handle output buffer or event queue .SH SYNTAX -XFlush\^(\^\fIdisplay\fP\^) -.br - Display *\fIdisplay\fP\^; -.LP -XSync\^(\^\fIdisplay\fP, \fIdiscard\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Bool \fIdiscard\fP\^; -.LP -int XEventsQueued\^(\^\fIdisplay\fP, \fImode\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - int \fImode\fP\^; -.LP -int XPending\^(\^\fIdisplay\fP\^) -.br - Display *\fIdisplay\fP\^; +.HP +int XFlush\^(\^Display *\fIdisplay\fP\^); +.HP +int XSync\^(\^Display *\fIdisplay\fP\^, Bool \fIdiscard\fP\^); +.HP +int XEventsQueued\^(\^Display *\fIdisplay\fP\^, int \fImode\fP\^); +.HP +int XPending\^(\^Display *\fIdisplay\fP\^); .SH ARGUMENTS .IP \fIdiscard\fP 1i Specifies a Boolean value that indicates whether diff --git a/man/XFontsOfFontSet.man b/man/XFontsOfFontSet.man index 070ed98..46e9313 100644 --- a/man/XFontsOfFontSet.man +++ b/man/XFontsOfFontSet.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XFofFSet.man,v 1.2 2001/01/27 18:19:59 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XFofFSet.man,v 1.3 2003/04/28 22:17:54 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,33 +144,19 @@ .SH NAME XFontsOfFontSet, XBaseFontNameListOfFontSet, XLocaleOfFontSet, XContextDependentDrawing, XContextualDrawing, XDirectionalDependentDrawing \- obtain fontset information .SH SYNTAX -int XFontsOfFontSet\^(\^\fIfont_set\fP\^, \fIfont_struct_list_return\fP\^, \fIfont_name_list_return\fP\^) -.br - XFontSet \fIfont_set\fP\^; -.br - XFontStruct ***\fIfont_struct_list_return\fP\^; -.br - char ***\fIfont_name_list_return\fP\^; -.LP -char *XBaseFontNameListOfFontSet\^(\^\fIfont_set\fP\^) -.br - XFontSet \fIfont_set\fP\^; -.LP -char *XLocaleOfFontSet\^(\^\fIfont_set\fP\^) -.br - XFontSet \fIfont_set\fP\^; -.LP -Bool XContextDependentDrawing\^(\^\fIfont_set\fP\^) -.br - XFontSet \fIfont_set\fP\^; -.LP -Bool XContextualDrawing\^(\^\fIfont_set\fP\^) -.br - XFontSet \fIfont_set\fP\^; -.LP -Bool XDirectionalDependentDrawing\^(\^\fIfont_set\fP\^) -.br - XFontSet \fIfont_set\fP\^; +.HP +int XFontsOfFontSet\^(\^XFontSet \fIfont_set\fP\^, XFontStruct +***\fIfont_struct_list_return\fP\^, char ***\fIfont_name_list_return\fP\^); +.HP +char *XBaseFontNameListOfFontSet\^(\^XFontSet \fIfont_set\fP\^); +.HP +char *XLocaleOfFontSet\^(\^XFontSet \fIfont_set\fP\^); +.HP +Bool XContextDependentDrawing\^(\^XFontSet \fIfont_set\fP\^); +.HP +Bool XContextualDrawing\^(\^XFontSet \fIfont_set\fP\^); +.HP +Bool XDirectionalDependentDrawing\^(\^XFontSet \fIfont_set\fP\^); .SH ARGUMENTS .IP \fIfont_set\fP 1i Specifies the font set. diff --git a/man/XFree.man b/man/XFree.man index 821187f..1c082f9 100644 --- a/man/XFree.man +++ b/man/XFree.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XFree.man,v 1.2 2001/01/27 18:19:59 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XFree.man,v 1.3 2003/04/28 22:17:54 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,12 +144,10 @@ .SH NAME XFree \- free client data .SH SYNTAX -XFree\^(\^\fIdata\fP\^) -.br - void *\fIdata\fP\^; +int XFree\^(\^void *\fIdata\fP\^); .SH ARGUMENTS .IP \fIdata\fP 1i -Specifies the data that is to be freed. +Specifies the data that are to be freed. .SH DESCRIPTION The .ZN XFree diff --git a/man/XGetVisualInfo.man b/man/XGetVisualInfo.man index bfc2a74..f65861c 100644 --- a/man/XGetVisualInfo.man +++ b/man/XGetVisualInfo.man @@ -41,7 +41,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XGetVInfo.man,v 1.3 2001/02/07 22:35:20 tsi Exp $ +.\" $XFree86: xc/doc/man/X11/XGetVInfo.man,v 1.4 2003/04/28 22:17:55 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -146,31 +146,15 @@ .SH NAME XGetVisualInfo, XMatchVisualInfo, XVisualIDFromVisual, XVisualInfo \- obtain visual information and visual structure .SH SYNTAX -XVisualInfo *XGetVisualInfo\^(\^\fIdisplay\fP, \fIvinfo_mask\fP, \fIvinfo_template\fP, \fInitems_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - long \fIvinfo_mask\fP\^; -.br - XVisualInfo *\fIvinfo_template\fP\^; -.br - int *\fInitems_return\fP\^; -.LP -Status XMatchVisualInfo\^(\^\fIdisplay\fP, \fIscreen\fP, \fIdepth\fP, \fIclass\fP, \fIvinfo_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - int \fIscreen\fP\^; -.br - int \fIdepth\fP\^; -.br - int \fIclass\fP\^; -.br - XVisualInfo *\fIvinfo_return\fP\^; -.LP -VisualID XVisualIDFromVisual\^(\^\fIvisual\fP\^) -.br - Visual *\^\fIvisual\fP\^; +.HP +XVisualInfo *XGetVisualInfo\^(\^Display *\fIdisplay\fP\^, long +\fIvinfo_mask\fP\^, XVisualInfo *\fIvinfo_template\fP\^, int +*\fInitems_return\fP\^); +.HP +Status XMatchVisualInfo\^(\^Display *\fIdisplay\fP\^, int \fIscreen\fP\^, int +\fIdepth\fP\^, int \fIclass\fP\^, XVisualInfo *\fIvinfo_return\fP\^); +.HP +VisualID XVisualIDFromVisual\^(\^Visual *\^\fIvisual\fP\^); .SH ARGUMENTS .IP \fIclass\fP 1i Specifies the class of the screen. diff --git a/man/XGetWindowAttributes.man b/man/XGetWindowAttributes.man index 498697e..9a5067d 100644 --- a/man/XGetWindowAttributes.man +++ b/man/XGetWindowAttributes.man @@ -41,7 +41,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XGetWAttr.man,v 1.2 2001/01/27 18:19:59 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XGetWAttr.man,v 1.3 2003/04/28 22:17:55 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -146,31 +146,14 @@ .SH NAME XGetWindowAttributes, XGetGeometry, XWindowAttributes \- get current window attribute or geometry and current window attributes structure .SH SYNTAX -Status XGetWindowAttributes\^(\^\fIdisplay\fP, \fIw\fP\^, \fIwindow_attributes_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - XWindowAttributes *\fIwindow_attributes_return\fP\^; -.LP -Status XGetGeometry\^(\^\fIdisplay\fP, \fId\fP\^, \^\fIroot_return\fP\^, \fIx_return\fP\^, \fIy_return\fP\^, \fIwidth_return\fP\^, -.br - \fIheight_return\fP\^, \fIborder_width_return\fP\^, \fIdepth_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Drawable \fId\fP\^; -.br - Window *\fIroot_return\fP\^; -.br - int *\fIx_return\fP\^, *\fIy_return\fP\^; -.br - unsigned int *\fIwidth_return\fP\^, *\fIheight_return\fP\^; -.br - unsigned int *\fIborder_width_return\fP\^; -.br - unsigned int *\fIdepth_return\fP\^; +.HP +Status XGetWindowAttributes\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, +XWindowAttributes *\fIwindow_attributes_return\fP\^); +.HP +Status XGetGeometry\^(\^Display *\fIdisplay\fP\^, Drawable \fId\fP\^, Window +*\fIroot_return\fP\^, int *\fIx_return\fP\^, int *\fIy_return\fP\^, unsigned +int *\fIwidth_return\fP\^, unsigned int *\fIheight_return\fP\^, unsigned int +*\fIborder_width_return\fP\^, unsigned int *\fIdepth_return\fP\^); .SH ARGUMENTS .IP \fIborder_width_return\fP 1i Returns the border width in pixels. diff --git a/man/XGetWindowProperty.man b/man/XGetWindowProperty.man index 5c60886..e0a8f94 100644 --- a/man/XGetWindowProperty.man +++ b/man/XGetWindowProperty.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XGetWProp.man,v 1.2 2001/01/27 18:19:59 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XGetWProp.man,v 1.3 2003/04/28 22:17:55 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,77 +144,24 @@ .SH NAME XGetWindowProperty, XListProperties, XChangeProperty, XRotateWindowProperties, XDeleteProperty \- obtain and change window properties .SH SYNTAX -int XGetWindowProperty\^(\^\fIdisplay\fP, \fIw\fP\^, \fIproperty\fP\^, \fIlong_offset\fP\^, \fIlong_length\fP\^, \fIdelete\fP\^, \fIreq_type\fP\^, -.br - \fIactual_type_return\fP\^, \fIactual_format_return\fP\^, \fInitems_return\fP\^, \fIbytes_after_return\fP\^, -.br - \fIprop_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - Atom \fIproperty\fP\^; -.br - long \fIlong_offset\fP\^, \fIlong_length\fP\^; -.br - Bool \fIdelete\fP\^; -.br - Atom \fIreq_type\fP\^; -.br - Atom *\fIactual_type_return\fP\^; -.br - int *\fIactual_format_return\fP\^; -.br - unsigned long *\fInitems_return\fP\^; -.br - unsigned long *\fIbytes_after_return\fP\^; -.br - unsigned char **\fIprop_return\fP\^; -.LP -Atom *XListProperties\^(\^\fIdisplay\fP, \fIw\fP\^, \fInum_prop_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - int *\fInum_prop_return\fP\^; -.LP -XChangeProperty\^(\^\fIdisplay\fP, \fIw\fP\^, \fIproperty\fP\^, \fItype\fP\^, \fIformat\fP\^, \fImode\fP\^, \fIdata\fP\^, \fInelements\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - Atom \fIproperty\fP\^, \fItype\fP\^; -.br - int \fIformat\fP\^; -.br - int \fImode\fP\^; -.br - unsigned char *\fIdata\fP\^; -.br - int \fInelements\fP\^; -.LP -XRotateWindowProperties\^(\^\fIdisplay\fP, \fIw\fP, \fIproperties\fP, \fInum_prop\fP, \fInpositions\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - Atom \fIproperties\fP\^[]\^; -.br - int \fInum_prop\fP\^; -.br - int \fInpositions\fP\^; -.LP -XDeleteProperty\^(\^\fIdisplay\fP, \fIw\fP\^, \fIproperty\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - Atom \fIproperty\fP\^; +.HP +int XGetWindowProperty\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, Atom +\fIproperty\fP\^, long \fIlong_offset\fP\^, long \fIlong_length\fP\^, Bool +\fIdelete\fP\^, Atom \fIreq_type\fP\^, Atom *\fIactual_type_return\fP\^, int +*\fIactual_format_return\fP\^, unsigned long *\fInitems_return\fP\^, unsigned +long *\fIbytes_after_return\fP\^, unsigned char **\fIprop_return\fP\^); +.HP +Atom *XListProperties\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, int +*\fInum_prop_return\fP\^); +int XChangeProperty\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, Atom +\fIproperty\fP\^, Atom \fItype\fP\^, int \fIformat\fP\^, int \fImode\fP\^, +unsigned char *\fIdata\fP\^, int \fInelements\fP\^); +.HP +int XRotateWindowProperties\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, +Atom \fIproperties\fP\^[]\^, int \fInum_prop\fP\^, int \fInpositions\fP\^); +.HP +int XDeleteProperty\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, Atom +\fIproperty\fP\^); .SH ARGUMENTS .IP \fIactual_format_return\fP 1i Returns the actual format of the property. diff --git a/man/XGrabButton.man b/man/XGrabButton.man index 82d15b1..2a751a3 100644 --- a/man/XGrabButton.man +++ b/man/XGrabButton.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XGrButton.man,v 1.2 2001/01/27 18:19:59 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XGrButton.man,v 1.3 2003/04/28 22:17:55 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,37 +144,15 @@ .SH NAME XGrabButton, XUngrabButton \- grab pointer buttons .SH SYNTAX -XGrabButton\^(\^\fIdisplay\fP, \fIbutton\fP\^, \fImodifiers\fP\^, \fIgrab_window\fP\^, \fIowner_events\fP\^, \fIevent_mask\fP\^, -.br - \fIpointer_mode\fP\^, \fIkeyboard_mode\fP\^, \fIconfine_to\fP\^, \fIcursor\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - unsigned int \fIbutton\fP\^; -.br - unsigned int \fImodifiers\fP\^; -.br - Window \fIgrab_window\fP\^; -.br - Bool \fIowner_events\fP\^; -.br - unsigned int \fIevent_mask\fP\^; -.br - int \fIpointer_mode\fP\^, \fIkeyboard_mode\fP\^; -.br - Window \fIconfine_to\fP\^; -.br - Cursor \fIcursor\fP\^; -.LP -XUngrabButton\^(\^\fIdisplay\fP, \fIbutton\fP\^, \fImodifiers\fP\^, \fIgrab_window\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - unsigned int \fIbutton\fP\^; -.br - unsigned int \fImodifiers\fP\^; -.br - Window \fIgrab_window\fP\^; +.HP +int XGrabButton\^(\^Display *\fIdisplay\fP\^, unsigned int \fIbutton\fP\^, +unsigned int \fImodifiers\fP\^, Window \fIgrab_window\fP\^, Bool +\fIowner_events\fP\^, unsigned int \fIevent_mask\fP\^, int +\fIpointer_mode\fP\^, \fIkeyboard_mode\fP\^, Window \fIconfine_to\fP\^, Cursor +\fIcursor\fP\^); +.HP +int XUngrabButton\^(\^Display *\fIdisplay\fP\^, unsigned int \fIbutton\fP\^, +unsigned int \fImodifiers\fP\^, Window \fIgrab_window\fP\^); .SH ARGUMENTS .ds Bu grabbed or released .IP \fIbutton\fP 1i diff --git a/man/XGrabKey.man b/man/XGrabKey.man index 3ef6542..a0f8577 100644 --- a/man/XGrabKey.man +++ b/man/XGrabKey.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XGrKey.man,v 1.2 2001/01/27 18:19:59 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XGrKey.man,v 1.3 2003/04/28 22:17:55 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,31 +144,13 @@ .SH NAME XGrabKey, XUngrabKey \- grab keyboard keys .SH SYNTAX -XGrabKey\^(\^\fIdisplay\fP, \fIkeycode\fP\^, \fImodifiers\fP\^, \fIgrab_window\fP\^, \fIowner_events\fP\^, \fIpointer_mode\fP\^, -.br - \fIkeyboard_mode\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - int \fIkeycode\fP\^; -.br - unsigned int \fImodifiers\fP\^; -.br - Window \fIgrab_window\fP\^; -.br - Bool \fIowner_events\fP\^; -.br - int \fIpointer_mode\fP\^, \fIkeyboard_mode\fP\^; -.LP -XUngrabKey\^(\^\fIdisplay\fP, \fIkeycode\fP\^, \fImodifiers\fP\^, \fIgrab_window\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - int \fIkeycode\fP\^; -.br - unsigned int \fImodifiers\fP\^; -.br - Window \fIgrab_window\fP\^; +.HP +int XGrabKey\^(\^Display *\fIdisplay\fP\^, int \fIkeycode\fP\^, unsigned int +\fImodifiers\fP\^, Window \fIgrab_window\fP\^, Bool \fIowner_events\fP\^, int +\fIpointer_mode\fP\^, int \fIkeyboard_mode\fP\^); +.HP +int XUngrabKey\^(\^Display *\fIdisplay\fP\^, int \fIkeycode\fP\^, unsigned int +\fImodifiers\fP\^, Window \fIgrab_window\fP\^); .SH ARGUMENTS .IP \fIdisplay\fP 1i Specifies the connection to the X server. diff --git a/man/XGrabKeyboard.man b/man/XGrabKeyboard.man index f359962..6be0088 100644 --- a/man/XGrabKeyboard.man +++ b/man/XGrabKeyboard.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XGrKeybrd.man,v 1.2 2001/01/27 18:20:00 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XGrKeybrd.man,v 1.3 2003/04/28 22:17:55 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,23 +144,12 @@ .SH NAME XGrabKeyboard, XUngrabKeyboard \- grab the keyboard .SH SYNTAX -int XGrabKeyboard\^(\^\fIdisplay\fP, \fIgrab_window\fP\^, \fIowner_events\fP\^, \fIpointer_mode\fP\^, \fIkeyboard_mode\fP\^, \fItime\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIgrab_window\fP\^; -.br - Bool \fIowner_events\fP\^; -.br - int \fIpointer_mode\fP\^, \fIkeyboard_mode\fP\^; -.br - Time \fItime\fP\^; -.LP -XUngrabKeyboard\^(\^\fIdisplay\fP, \fItime\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Time \fItime\fP\^; +.HP +int XGrabKeyboard\^(\^Display *\fIdisplay\fP\^, Window \fIgrab_window\fP\^, +Bool \fIowner_events\fP\^, int \fIpointer_mode\fP\^, int +\fIkeyboard_mode\fP\^, Time \fItime\fP\^); +.HP +int XUngrabKeyboard\^(\^Display *\fIdisplay\fP\^, Time \fItime\fP\^); .SH ARGUMENTS .IP \fIdisplay\fP 1i Specifies the connection to the X server. diff --git a/man/XGrabPointer.man b/man/XGrabPointer.man index 0b2853f..1f42f40 100644 --- a/man/XGrabPointer.man +++ b/man/XGrabPointer.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XGrPntr.man,v 1.2 2001/01/27 18:20:00 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XGrPntr.man,v 1.3 2003/04/28 22:17:55 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,40 +144,16 @@ .SH NAME XGrabPointer, XUngrabPointer, XChangeActivePointerGrab \- grab the pointer .SH SYNTAX -int XGrabPointer\^(\^\fIdisplay\fP, \fIgrab_window\fP\^, \fIowner_events\fP\^, \fIevent_mask\fP\^, \fIpointer_mode\fP\^, - \fIkeyboard_mode\fP\^, \fIconfine_to\fP\^, \fIcursor\fP\^, \fItime\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIgrab_window\fP\^; -.br - Bool \fIowner_events\fP\^; -.br - unsigned int \fIevent_mask\fP\^; -.br - int \fIpointer_mode\fP\^, \fIkeyboard_mode\fP\^; -.br - Window \fIconfine_to\fP\^; -.br - Cursor \fIcursor\fP\^; -.br - Time \fItime\fP\^; -.LP -XUngrabPointer\^(\^\fIdisplay\fP, \fItime\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Time \fItime\fP\^; -.LP -XChangeActivePointerGrab\^(\^\fIdisplay\fP, \fIevent_mask\fP\^, \fIcursor\fP\^, \fItime\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - unsigned int \fIevent_mask\fP\^; -.br - Cursor \fIcursor\fP\^; -.br - Time \fItime\fP\^; +.HP +int XGrabPointer\^(\^Display *\fIdisplay\fP\^, Window \fIgrab_window\fP\^, +Bool \fIowner_events\fP\^, unsigned int \fIevent_mask\fP\^, int +\fIpointer_mode\fP\^, int \fIkeyboard_mode\fP\^, Window \fIconfine_to\fP\^, +Cursor \fIcursor\fP\^, Time \fItime\fP\^); +.HP +int XUngrabPointer\^(\^Display *\fIdisplay\fP\^, Time \fItime\fP\^); +.HP +int XChangeActivePointerGrab\^(\^Display *\fIdisplay\fP\^, unsigned int +\fIevent_mask\fP\^, Cursor \fIcursor\fP\^, Time \fItime\fP\^); .SH ARGUMENTS .IP \fIconfine_to\fP 1i Specifies the window to confine the pointer in or diff --git a/man/XGrabServer.man b/man/XGrabServer.man index c93db20..229b09f 100644 --- a/man/XGrabServer.man +++ b/man/XGrabServer.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XGrServer.man,v 1.2 2001/01/27 18:20:00 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XGrServer.man,v 1.3 2003/04/28 22:17:55 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,13 +144,10 @@ .SH NAME XGrabServer, XUngrabServer \- grab the server .SH SYNTAX -XGrabServer\^(\^\fIdisplay\fP\^) -.br - Display *\fIdisplay\fP\^; -.LP -XUngrabServer\^(\^\fIdisplay\fP\^) -.br - Display *\fIdisplay\fP\^; +.HP +int XGrabServer\^(\^Display *\fIdisplay\fP\^); +.HP +int XUngrabServer\^(\^Display *\fIdisplay\fP\^); .SH ARGUMENTS .IP \fIdisplay\fP 1i Specifies the connection to the X server. diff --git a/man/XIconifyWindow.man b/man/XIconifyWindow.man index 27e82f7..20643e5 100644 --- a/man/XIconifyWindow.man +++ b/man/XIconifyWindow.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XIcWin.man,v 1.3 2001/02/09 03:47:45 tsi Exp $ +.\" $XFree86: xc/doc/man/X11/XIcWin.man,v 1.4 2003/04/28 22:17:55 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,34 +144,16 @@ .SH NAME XIconifyWindow, XWithdrawWindow, XReconfigureWMWindow \- manipulate top-level windows .SH SYNTAX -Status XIconifyWindow\^(\^\fIdisplay\fP, \fIw\fP, \fIscreen_number\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP; -.br - int \fIscreen_number\fP\^; -.LP -Status XWithdrawWindow\^(\^\fIdisplay\fP, \fIw\fP, \fIscreen_number\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - int \fIscreen_number\fP\^; -.LP -Status XReconfigureWMWindow\^(\^\fIdisplay\fP, \fIw\fP, \fIscreen_number\fP, -\fIvalue_mask\fP, \fIvalues\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - int \fIscreen_number\fP\^; -.br - unsigned int \fIvalue_mask\fP\^; -.br - XWindowChanges *\fIvalues\fP; +.HP +Status XIconifyWindow\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP, int +\fIscreen_number\fP\^); +.HP +Status XWithdrawWindow\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, int +\fIscreen_number\fP\^); +.HP +Status XReconfigureWMWindow\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, +int \fIscreen_number\fP\^, unsigned int \fIvalue_mask\fP\^, XWindowChanges +*\fIvalues\fP); .SH ARGUMENTS .IP \fIdisplay\fP 1i Specifies the connection to the X server. diff --git a/man/XIfEvent.man b/man/XIfEvent.man index ef9eb21..e467b77 100644 --- a/man/XIfEvent.man +++ b/man/XIfEvent.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XIfEvent.man,v 1.2 2001/01/27 18:20:00 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XIfEvent.man,v 1.3 2003/04/28 22:17:55 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,35 +144,15 @@ .SH NAME XIfEvent, XCheckIfEvent, XPeekIfEvent \- check the event queue with a predicate procedure .SH SYNTAX -XIfEvent\^(\^\fIdisplay\fP, \fIevent_return\fP, \fIpredicate\fP, \fIarg\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - XEvent *\fIevent_return\fP\^; -.br - Bool (\^*\fIpredicate\fP\^)\^(\^)\^; -.br - XPointer \fIarg\fP\^; -.LP -Bool XCheckIfEvent\^(\^\fIdisplay\fP, \fIevent_return\fP, \fIpredicate\fP, \fIarg\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - XEvent *\fIevent_return\fP\^; -.br - Bool (\^*\fIpredicate\fP\^)\^(\^)\^; -.br - XPointer \fIarg\fP\^; -.LP -XPeekIfEvent\^(\^\fIdisplay\fP, \fIevent_return\fP, \fIpredicate\fP, \fIarg\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - XEvent *\fIevent_return\fP\^; -.br - Bool (\^*\fIpredicate\fP\^)\^(\^)\^; -.br - XPointer \fIarg\fP\^; +.HP +int XIfEvent\^(\^Display *\fIdisplay\fP\^, XEvent *\fIevent_return\fP\^, Bool +(\^*\fIpredicate\fP\^)\^(\^)\^, XPointer \fIarg\fP\^); +.HP +Bool XCheckIfEvent\^(\^Display *\fIdisplay\fP\^, XEvent *\fIevent_return\fP\^, +Bool (\^*\fIpredicate\fP\^)\^(\^)\^, XPointer \fIarg\fP\^); +.HP +int XPeekIfEvent\^(\^Display *\fIdisplay\fP\^, XEvent *\fIevent_return\fP\^, +Bool (\^*\fIpredicate\fP\^)\^(\^)\^, XPointer \fIarg\fP\^); .SH ARGUMENTS .IP \fIarg\fP 1i Specifies the user-supplied argument that will be passed to the predicate procedure. diff --git a/man/XInitImage.man b/man/XInitImage.man index 7b021f7..771b103 100644 --- a/man/XInitImage.man +++ b/man/XInitImage.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XCreImage.man,v 1.2 2001/01/27 18:19:57 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XCreImage.man,v 1.3 2003/04/28 22:17:54 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,73 +144,26 @@ .SH NAME XInitImage, XCreateImage, XGetPixel, XPutPixel, XSubImage, XAddPixel, XDestroyImage \- image utilities .SH SYNTAX -Status XInitImage\^(\^\fIimage\fP\^) -.br - XImage *\fIimage\fP\^; -.LP -XImage *XCreateImage\^(\^\fIdisplay\fP, \fIvisual\fP, \fIdepth\fP, \fIformat\fP, \fIoffset\fP, \fIdata\fP, \fIwidth\fP, \fIheight\fP\^, \fIbitmap_pad\fP, -.br - \fIbytes_per_line\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Visual *\fIvisual\fP\^; -.br - unsigned int \fIdepth\fP\^; -.br - int \fIformat\fP\^; -.br - int \fIoffset\fP\^; -.br - char *\fIdata\fP\^; -.br - unsigned int \fIwidth\fP\^; -.br - unsigned int \fIheight\fP\^; -.br - int \fIbitmap_pad\fP\^; -.br - int \fIbytes_per_line\fP\^; -.LP -unsigned long XGetPixel\^(\^\fIximage\fP, \fIx\fP, \fIy\fP\^) -.br - XImage *\fIximage\fP\^; -.br - int \fIx\fP\^; -.br - int \fIy\fP\^; -.LP -XPutPixel\^(\^\fIximage\fP, \fIx\fP, \fIy\fP, \fIpixel\fP\^) -.br - XImage *\fIximage\fP\^; -.br - int \fIx\fP\^; -.br - int \fIy\fP\^; -.br - unsigned long \fIpixel\fP\^; -.LP -XImage *XSubImage\^(\^\fIximage\fP, \fIx\fP, \fIy\fP, \fIsubimage_width\fP, \fIsubimage_height\fP\^) -.br - XImage *\fIximage\fP\^; -.br - int \fIx\fP\^; -.br - int \fIy\fP\^; -.br - unsigned int \fIsubimage_width\fP\^; -.br - unsigned int \fIsubimage_height\fP\^; -.LP -XAddPixel\^(\^\fIximage\fP, \fIvalue\fP\^) -.br - XImage *\fIximage\fP\^; -.br - long \fIvalue\fP\^; -.LP -XDestroyImage\^(\^\fIximage\fP\^) -.br - XImage *\^\fIximage\fP\^; +.HP +Status XInitImage\^(\^XImage *\fIimage\fP\^); +.HP +XImage *XCreateImage\^(\^Display *\fIdisplay\fP\^, Visual *\fIvisual\fP\^, +unsigned int \fIdepth\fP\^, int \fIformat\fP\^, int \fIoffset\fP\^, char +*\fIdata\fP\^, unsigned int \fIwidth\fP\^, unsigned int \fIheight\fP\^, int +\fIbitmap_pad\fP\^, int \fIbytes_per_line\fP\^); +.HP +unsigned long XGetPixel\^(\^XImage *\fIximage\fP\^, int \fIx\fP\^, int +\fIy\fP\^); +.HP +int XPutPixel\^(\^XImage *\fIximage\fP\^, int \fIx\fP\^, int \fIy\fP\^, +unsigned long \fIpixel\fP\^); +.HP +XImage *XSubImage\^(\^XImage *\fIximage\fP\^, int \fIx\fP\^, int \fIy\fP\^, +unsigned int \fIsubimage_width\fP\^, unsigned int \fIsubimage_height\fP\^); +.HP +int XAddPixel\^(\^XImage *\fIximage\fP\^, long \fIvalue\fP\^); +.HP +int XDestroyImage\^(\^XImage *\^\fIximage\fP\^); .SH ARGUMENTS .IP \fIbitmap_pad\fP 1i Specifies the quantum of a scanline (8, 16, or 32). diff --git a/man/XInitThreads.man b/man/XInitThreads.man index 241d275..d674988 100644 --- a/man/XInitThreads.man +++ b/man/XInitThreads.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XThreads.man,v 1.2 2001/01/27 18:20:06 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XThreads.man,v 1.3 2003/04/28 22:17:57 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,15 +144,12 @@ .SH NAME XInitThreads, XLockDisplay, XUnlockDisplay \- multi-threading support .SH SYNTAX -Status XInitThreads\^(\|); -.LP -void XLockDisplay\^(\^\fIdisplay\fP\^) -.br - Display *\fIdisplay\fP\^; -.LP -void XUnlockDisplay\^(\^\fIdisplay\fP\^) -.br - Display *\fIdisplay\fP\^; +.HP +Status XInitThreads\^(void); +.HP +void XLockDisplay\^(\^Display *\fIdisplay\fP\^); +.HP +void XUnlockDisplay\^(\^Display *\fIdisplay\fP\^); .SH ARGUMENTS .IP \fIdisplay\fP 1i Specifies the connection to the X server. diff --git a/man/XInstallColormap.man b/man/XInstallColormap.man index 793576d..0095825 100644 --- a/man/XInstallColormap.man +++ b/man/XInstallColormap.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XInstCmap.man,v 1.3 2001/07/23 20:47:17 paulo Exp $ +.\" $XFree86: xc/doc/man/X11/XInstCmap.man,v 1.4 2003/04/28 22:17:55 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,25 +144,14 @@ .SH NAME XInstallColormap, XUninstallColormap, XListInstalledColormaps \- control colormaps .SH SYNTAX -XInstallColormap\^(\^\fIdisplay\fP, \fIcolormap\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Colormap \fIcolormap\fP\^; -.LP -XUninstallColormap\^(\^\fIdisplay\fP, \fIcolormap\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Colormap \fIcolormap\fP\^; -.LP -Colormap *XListInstalledColormaps\^(\^\fIdisplay\fP, \fIw\fP, \fInum_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - int *\fInum_return\fP\^; +.HP +int XInstallColormap\^(\^Display *\fIdisplay\fP\^, Colormap \fIcolormap\fP\^); +.HP +int XUninstallColormap\^(\^Display *\fIdisplay\fP\^, Colormap +\fIcolormap\fP\^); +.HP +Colormap *XListInstalledColormaps\^(\^Display *\fIdisplay\fP\^, Window +\fIw\fP\^, int *\fInum_return\fP\^); .SH ARGUMENTS .IP \fIcolormap\fP 1i Specifies the colormap. diff --git a/man/XInternAtom.man b/man/XInternAtom.man index fa16f5d..0c80455 100644 --- a/man/XInternAtom.man +++ b/man/XInternAtom.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XInternA.man,v 1.2 2001/01/27 18:20:01 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XInternA.man,v 1.3 2003/04/28 22:17:55 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,41 +144,17 @@ .SH NAME XInternAtom, XInternAtoms, XGetAtomName, XGetAtomNames \- create or return atom names .SH SYNTAX -Atom XInternAtom\^(\^\fIdisplay\fP, \fIatom_name\fP\^, \fIonly_if_exists\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - char *\fIatom_name\fP\^; -.br - Bool \fIonly_if_exists\fP\^; -.LP -Status XInternAtoms\^(\^\fIdisplay\fP, \fInames\fP\^, \fIcount\fP\^, \fIonly_if_exists\fP, \fIatoms_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - char **\fInames\fP\^; -.br - int \fIcount\fP\^; -.br - Bool \fIonly_if_exists\fP\^; -.br - Atom *\fIatoms_return\fP\^; -.LP -char *XGetAtomName\^(\^\fIdisplay\fP, \fIatom\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Atom \fIatom\fP\^; -.LP -Status XGetAtomNames\^(\^\fIdisplay\fP, \fIatoms\fP, \fIcount\fP\^, \fInames_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Atom *\fIatoms\fP\^; -.br - int \fIcount\fP\^; -.br - char **\fInames_return\fP\^; +.HP +Atom XInternAtom\^(\^Display *\fIdisplay\fP\^, char *\fIatom_name\fP\^, Bool +\fIonly_if_exists\fP\^); +.HP +Status XInternAtoms\^(\^Display *\fIdisplay\fP\^, char **\fInames\fP\^, int +\fIcount\fP\^, Bool \fIonly_if_exists\fP\^, Atom *\fIatoms_return\fP\^); +.HP +char *XGetAtomName\^(\^Display *\fIdisplay\fP\^, Atom \fIatom\fP\^); +.HP +Status XGetAtomNames\^(\^Display *\fIdisplay\fP\^, Atom *\fIatoms\fP\^, int +\fIcount\fP\^, char **\fInames_return\fP\^); .SH ARGUMENTS .IP \fIatom\fP 1i Specifies the atom for the property name you want returned. diff --git a/man/XIntersectRegion.man b/man/XIntersectRegion.man index 6a0ee0d..f62b622 100644 --- a/man/XIntersectRegion.man +++ b/man/XIntersectRegion.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XInterReg.man,v 1.3 2001/02/09 03:47:45 tsi Exp $ +.\" $XFree86: xc/doc/man/X11/XInterReg.man,v 1.4 2003/04/28 22:17:55 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,42 +144,25 @@ .SH NAME XIntersectRegion, XUnionRegion, XUnionRectWithRegion, XSubtractRegion, XXorRegion, XOffsetRegion, XShrinkRegion \- region arithmetic .SH SYNTAX -XIntersectRegion\^(\^\fIsra\fP\^, \fIsrb\fP\^, \fIdr_return\fP\^) -.br - Region \fIsra\fP\^, \fIsrb\fP\^, \fIdr_return\fP\^; -.LP -XUnionRegion\^(\^\fIsra\fP\^, \fIsrb\fP\^, \fIdr_return\fP\^) -.br - Region \fIsra\fP\^, \fIsrb\fP\^, \fIdr_return\fP\^; -.LP -XUnionRectWithRegion\^(\^\fIrectangle\fP, \fIsrc_region\fP, -\fIdest_region_return\fP\^) -.br - XRectangle *\fIrectangle\fP\^; -.br - Region \fIsrc_region\fP\^; -.br - Region \fIdest_region_return\fP\^; -.LP -XSubtractRegion\^(\^\fIsra\fP\^, \fIsrb\fP\^, \fIdr_return\fP\^) -.br - Region \fIsra\fP\^, \fIsrb\fP\^, \fIdr_return\fP\^; -.LP -XXorRegion\^(\^\fIsra\fP\^, \fIsrb\fP\^, \fIdr_return\fP\^) -.br - Region \fIsra\fP\^, \fIsrb\fP\^, \fIdr_return\fP\^; -.LP -XOffsetRegion\^(\^\fIr\fP\^, \fIdx\fP\^, \fIdy\fP\^) -.br - Region \fIr\fP\^; -.br - int \fIdx\fP\^, \fIdy\fP\^; -.LP -XShrinkRegion\^(\^\fIr\fP\^, \fIdx\fP\^, \fIdy\fP\^) -.br - Region \fIr\fP\^; -.br - int \fIdx\fP\^, \fIdy\fP\^; +.HP +int XIntersectRegion\^(\^Region \fIsra\fP\^, Region \fIsrb\fP\^, Region +\fIdr_return\fP\^); +.HP +int XUnionRegion\^(\^Region \fIsra\fP\^, Region \fIsrb\fP\^, Region +\fIdr_return\fP\^); +.HP +int XUnionRectWithRegion\^(\^XRectangle *\fIrectangle\fP\^, Region +\fIsrc_region\fP\^, Region \fIdest_region_return\fP\^); +.HP +int XSubtractRegion\^(\^Region \fIsra\fP\^, Region \fIsrb\fP\^, Region +\fIdr_return\fP\^); +.HP +int XXorRegion\^(\^Region \fIsra\fP\^, Region \fIsrb\fP\^, Region +\fIdr_return\fP\^); +.HP +int XOffsetRegion\^(\^Region \fIr\fP\^, int \fIdx\fP\^, int \fIdy\fP\^); +.HP +int XShrinkRegion\^(\^Region \fIr\fP\^, int \fIdx\fP\^, int \fIdy\fP\^); .SH ARGUMENTS .IP \fIdest_region_return\fP 1i Returns the destination region. diff --git a/man/XListFonts.man b/man/XListFonts.man index 07d1073..5674b93 100644 --- a/man/XListFonts.man +++ b/man/XListFonts.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XListFont.man,v 1.2 2001/01/27 18:20:01 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XListFont.man,v 1.3 2003/04/28 22:17:55 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,39 +144,18 @@ .SH NAME XListFonts, XFreeFontNames, XListFontsWithInfo, XFreeFontInfo \- obtain or free font names and information .SH SYNTAX -char **XListFonts\^(\^\fIdisplay\fP, \fIpattern\fP\^, \fImaxnames\fP, \fIactual_count_return\fP\^) -.br - Display *\^\fIdisplay\fP\^; -.br - char *\^\fIpattern\fP\^; -.br - int \fImaxnames\fP\^; -.br - int *\^\fIactual_count_return\fP\^; -.LP -XFreeFontNames\^(\^\fIlist\fP\^) -.br - char *\fIlist\fP\^[\^]\^; -.LP -char **XListFontsWithInfo\^(\^\fIdisplay\fP, \fIpattern\fP, \fImaxnames\fP, \fIcount_return\fP, \fIinfo_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - char *\fIpattern\fP\^; -.br - int \fImaxnames\fP\^; -.br - int *\fIcount_return\fP\^; -.br - XFontStruct **\fIinfo_return\fP\^; -.LP -XFreeFontInfo(\^\fInames\fP, \fIfree_info\fP, \fIactual_count\fP\^) -.br - char **\fInames\fP\^; -.br - XFontStruct *\fIfree_info\fP; -.br - int \fIactual_count\fP\^; +.HP +char **XListFonts\^(\^Display *\^\fIdisplay\fP\^, char *\^\fIpattern\fP\^, int +\fImaxnames\fP\^, int *\^\fIactual_count_return\fP\^); +.HP +int XFreeFontNames\^(\^char *\fIlist\fP\^[\^]\^); +.HP +char **XListFontsWithInfo\^(\^Display *\fIdisplay\fP\^, char *\fIpattern\fP\^, +int \fImaxnames\fP\^, int *\fIcount_return\fP\^, XFontStruct +**\fIinfo_return\fP\^); +.HP +int XFreeFontInfo(\^char **\fInames\fP\^, XFontStruct *\fIfree_info\fP, int +\fIactual_count\fP\^); .SH ARGUMENTS .IP \fIactual_count\fP 1i Specifies the actual number of font names. diff --git a/man/XLoadFont.man b/man/XLoadFont.man index 571549c..52affe7 100644 --- a/man/XLoadFont.man +++ b/man/XLoadFont.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XLoadFont.man,v 1.2 2001/01/27 18:20:01 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XLoadFont.man,v 1.3 2003/04/28 22:17:55 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,43 +144,20 @@ .SH NAME XLoadFont, XQueryFont, XLoadQueryFont, XFreeFont, XGetFontProperty, XUnloadFont, XCharStruct, XFontProp, XChar2b, XFontStruct \- load or unload fonts and font metric structures .SH SYNTAX -Font XLoadFont\^(\^\fIdisplay\fP, \fIname\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - char *\fIname\fP\^; -.LP -XFontStruct *XQueryFont\^(\^\fIdisplay\fP, \fIfont_ID\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - XID \fIfont_ID\fP\^; -.LP -XFontStruct *XLoadQueryFont\^(\^\fIdisplay\fP, \fIname\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - char *\fIname\fP\^; -.LP -XFreeFont\^(\^\fIdisplay\fP, \fIfont_struct\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - XFontStruct *\fIfont_struct\fP\^; -.LP -Bool XGetFontProperty\^(\^\fIfont_struct\fP\^, \^\fIatom\fP\^, \^\fIvalue_return\fP\^) -.br - XFontStruct *\fIfont_struct\fP\^; -.br - Atom \fIatom\fP\^; -.br - unsigned long *\fIvalue_return\fP\^; -.LP -XUnloadFont\^(\^\fIdisplay\fP, \fIfont\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Font \fIfont\fP\^; +.HP +Font XLoadFont\^(\^Display *\fIdisplay\fP\^, char *\fIname\fP\^); +.HP +XFontStruct *XQueryFont\^(\^Display *\fIdisplay\fP\^, XID \fIfont_ID\fP\^); +.HP +XFontStruct *XLoadQueryFont\^(\^Display *\fIdisplay\fP\^, char +*\fIname\fP\^); +.HP +int XFreeFont\^(\^Display *\fIdisplay\fP\^, XFontStruct *\fIfont_struct\fP\^); +.HP +Bool XGetFontProperty\^(\^XFontStruct *\fIfont_struct\fP\^, Atom \fIatom\fP\^, +unsigned long *\fIvalue_return\fP\^); +.HP +int XUnloadFont\^(\^Display *\fIdisplay\fP\^, Font \fIfont\fP\^); .SH ARGUMENTS .IP \fIatom\fP 1i Specifies the atom for the property name you want returned. diff --git a/man/XLookupKeysym.man b/man/XLookupKeysym.man index 434d6c9..9041f75 100644 --- a/man/XLookupKeysym.man +++ b/man/XLookupKeysym.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XLookKsym.man,v 1.4 2003/02/15 17:48:39 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XLookKsym.man,v 1.5 2003/04/28 22:17:55 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,42 +144,18 @@ .SH NAME XLookupKeysym, XRefreshKeyboardMapping, XLookupString, XRebindKeysym \- handle keyboard input events in Latin-1 .SH SYNTAX -KeySym XLookupKeysym(\^\fIkey_event\fP, \fIindex\fP\^) -.br - XKeyEvent *\fIkey_event\fP\^; -.br - int \fIindex\fP\^; -.LP -XRefreshKeyboardMapping(\^\fIevent_map\fP\^) -.br - XMappingEvent *\fIevent_map\fP\^; -.LP -int XLookupString(\^\fIevent_struct\fP, \fIbuffer_return\fP, - \fIbytes_buffer\fP, \fIkeysym_return\fP, \fIstatus_in_out\fP\^) -.br - XKeyEvent *\fIevent_struct\fP\^; -.br - char *\fIbuffer_return\fP\^; -.br - int \fIbytes_buffer\fP\^; -.br - KeySym *\fIkeysym_return\fP\^; -.br - XComposeStatus *\fIstatus_in_out\fP\^; -.LP -XRebindKeysym(\^\fIdisplay\fP, \fIkeysym\fP, \fIlist\fP, \fImod_count\fP, \fIstring\fP, \fInum_bytes\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - KeySym \fIkeysym\fP\^; -.br - KeySym \fIlist\fP\^[\^]\^; -.br - int \fImod_count\fP\^; -.br - unsigned char *\fIstring\fP\^; -.br - int \fInum_bytes\fP\^; +.HP +KeySym XLookupKeysym(\^XKeyEvent *\fIkey_event\fP\^, int \fIindex\fP\^); +.HP +int XRefreshKeyboardMapping(\^XMappingEvent *\fIevent_map\fP\^); +.HP +int XLookupString(\^XKeyEvent *\fIevent_struct\fP\^, char +*\fIbuffer_return\fP\^, int \fIbytes_buffer\fP\^, KeySym +*\fIkeysym_return\fP\^, XComposeStatus *\fIstatus_in_out\fP\^); +.HP +int XRebindKeysym(\^Display *\fIdisplay\fP\^, KeySym \fIkeysym\fP\^, KeySym +\fIlist\fP\^[\^]\^, int \fImod_count\fP\^, unsigned char *\fIstring\fP\^, int +\fInum_bytes\fP\^); .SH ARGUMENTS .IP \fIbuffer_return\fP 1i Returns the translated characters. diff --git a/man/XMapWindow.man b/man/XMapWindow.man index 164ab66..af20ed9 100644 --- a/man/XMapWindow.man +++ b/man/XMapWindow.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XMapWin.man,v 1.2 2001/01/27 18:20:01 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XMapWin.man,v 1.3 2003/04/28 22:17:55 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,23 +144,12 @@ .SH NAME XMapWindow, XMapRaised, XMapSubwindows \- map windows .SH SYNTAX -XMapWindow\^(\^\fIdisplay\fP, \fIw\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.LP -XMapRaised\^(\^\fIdisplay\fP, \fIw\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.LP -XMapSubwindows\^(\^\fIdisplay\fP, \fIw\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; +.HP +int XMapWindow\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^); +.HP +int XMapRaised\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^); +.HP +int XMapSubwindows\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^); .SH ARGUMENTS .IP \fIdisplay\fP 1i Specifies the connection to the X server. diff --git a/man/XNextEvent.man b/man/XNextEvent.man index 6211468..a7eecb4 100644 --- a/man/XNextEvent.man +++ b/man/XNextEvent.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XNEvent.man,v 1.2 2001/01/27 18:20:01 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XNEvent.man,v 1.3 2003/04/28 22:17:55 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,71 +144,28 @@ .SH NAME XNextEvent, XPeekEvent, XWindowEvent, XCheckWindowEvent, XMaskEvent, XCheckMaskEvent, XCheckTypedEvent, XCheckTypedWindowEvent \- select events by type .SH SYNTAX -XNextEvent\^(\^\fIdisplay\fP, \fIevent_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - XEvent *\fIevent_return\fP\^; -.LP -XPeekEvent\^(\^\fIdisplay\fP, \fIevent_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - XEvent *\fIevent_return\fP\^; -.LP -XWindowEvent\^(\^\fIdisplay\fP, \fIw\fP\^, \fIevent_mask\fP\^, \fIevent_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - long \fIevent_mask\fP\^; -.br - XEvent *\fIevent_return\fP\^; -.LP -Bool XCheckWindowEvent\^(\^\fIdisplay\fP, \fIw\fP\^, \fIevent_mask\fP\^, \fIevent_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - long \fIevent_mask\fP\^; -.br - XEvent *\fIevent_return\fP\^; -.LP -XMaskEvent\^(\^\fIdisplay\fP, \fIevent_mask\fP\^, \fIevent_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - long \fIevent_mask\fP\^; -.br - XEvent *\fIevent_return\fP\^; -.LP -Bool XCheckMaskEvent\^(\^\fIdisplay\fP, \fIevent_mask\fP\^, \fIevent_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - long \fIevent_mask\fP\^; -.br - XEvent *\fIevent_return\fP\^; -.LP -Bool XCheckTypedEvent\^(\^\fIdisplay\fP, \fIevent_type\fP\^, \fIevent_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - int \fIevent_type\fP\^; -.br - XEvent *\fIevent_return\fP\^; -.LP -Bool XCheckTypedWindowEvent\^(\^\fIdisplay\fP, \fIw\fP\^, \fIevent_type\fP\^, \fIevent_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - int \fIevent_type\fP\^; -.br - XEvent *\fIevent_return\fP\^; +.HP +int XNextEvent\^(\^Display *\fIdisplay\fP\^, XEvent *\fIevent_return\fP\^); +.HP +int XPeekEvent\^(\^Display *\fIdisplay\fP\^, XEvent *\fIevent_return\fP\^); +.HP +int XWindowEvent\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, long +\fIevent_mask\fP\^, XEvent *\fIevent_return\fP\^); +.HP +Bool XCheckWindowEvent\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, long +\fIevent_mask\fP\^, XEvent *\fIevent_return\fP\^); +.HP +int XMaskEvent\^(\^Display *\fIdisplay\fP\^, long \fIevent_mask\fP\^, XEvent +*\fIevent_return\fP\^); +.HP +Bool XCheckMaskEvent\^(\^Display *\fIdisplay\fP\^, long \fIevent_mask\fP\^, +XEvent *\fIevent_return\fP\^); +.HP +Bool XCheckTypedEvent\^(\^Display *\fIdisplay\fP\^, int \fIevent_type\fP\^, +XEvent *\fIevent_return\fP\^); +.HP +Bool XCheckTypedWindowEvent\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, +int \fIevent_type\fP\^, XEvent *\fIevent_return\fP\^); .SH ARGUMENTS .IP \fIdisplay\fP 1i Specifies the connection to the X server. diff --git a/man/XNoOp.man b/man/XNoOp.man index c001366..a3ba2fa 100644 --- a/man/XNoOp.man +++ b/man/XNoOp.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XNoOp.man,v 1.2 2001/01/27 18:20:01 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XNoOp.man,v 1.3 2003/04/28 22:17:55 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,9 +144,7 @@ .SH NAME XNoOp \- No Operation .SH SYNTAX -XNoOp\^(\^\fIdisplay\fP\^) -.br - Display *\fIdisplay\fP\^; +int XNoOp\^(\^Display *\fIdisplay\fP\^); .SH ARGUMENTS .IP \fIdisplay\fP 1i Specifies the connection to the X server. diff --git a/man/XOpenDisplay.man b/man/XOpenDisplay.man index 3be2113..7134afe 100644 --- a/man/XOpenDisplay.man +++ b/man/XOpenDisplay.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XOpDsply.man,v 1.2 2001/01/27 18:20:01 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XOpDsply.man,v 1.3 2003/04/28 22:17:55 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,13 +144,10 @@ .SH NAME XOpenDisplay, XCloseDisplay \- connect or disconnect to X server .SH SYNTAX -Display *XOpenDisplay\^(\^\fIdisplay_name\fP\^) -.br - char *\fIdisplay_name\fP\^; -.LP -XCloseDisplay\^(\fIdisplay\fP\^) -.br - Display *\fIdisplay\fP\^; +.HP +Display *XOpenDisplay\^(\^char *\fIdisplay_name\fP\^); +.HP +int XCloseDisplay\^(Display *\fIdisplay\fP\^); .SH ARGUMENTS .IP \fIdisplay\fP 1i Specifies the connection to the X server. diff --git a/man/XOpenIM.man b/man/XOpenIM.man index ae1274e..fcf12e9 100644 --- a/man/XOpenIM.man +++ b/man/XOpenIM.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XOpenIM.man,v 1.2 2001/01/27 18:20:02 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XOpenIM.man,v 1.3 2003/04/28 22:17:55 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,63 +144,27 @@ .SH NAME XOpenIM, XCloseIM, XSetIMValues, XGetIMValues, XDisplayOfIM, XLocaleOfIM, XRegisterIMInstantiateCallback, XUnregisterIMInstantiateCallback \- open, close, and otain input method information .SH SYNTAX -XIM XOpenIM\^(\^\fIdisplay\fP\^, \fIdb\fP\^, \fIres_name\fP\^, \fIres_class\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - XrmDatabase \fIdb\fP\^; -.br - char *\fIres_name\fP\^; -.br - char *\fIres_class\fP\^; -.LP -Status XCloseIM\^(\^\fIim\fP\^) -.br - XIM \fIim\fP\^; -.LP -char * XSetIMValues\^(\^\fIim\fP\^, ...) -.br - XIM \fIim\fP\^; -.LP -char * XGetIMValues\^(\^\fIim\fP\^, ...) -.br - XIM \fIim\fP\^; -.LP -Display * XDisplayOfIM\^(\^\fIim\fP\^) -.br - XIM \fIim\fP\^; -.LP -char * XLocaleOfIM\^(\^\fIim\fP\^) -.br - XIM \fIim\fP\^; -.LP -Bool XRegisterIMInstantiateCallback\^(\^\fIdisplay\fP\^, \fIdb\fP\^, \fIres_name\fP\^, \fIres_class\fP\^, \fIcallback\fP\^, \fIclient_data\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - XrmDatabase \fIdb\fP\^; -.br - char *\fIres_name\fP\^; -.br - char *\fIres_class\fP\^; -.br - XIMProc \fIcallback\fP\^; -.br - XPointer *\fIclient_data\fP\^; -.LP -Bool XUnregisterIMInstantiateCallback\^(\^\fIdisplay\fP\^, \fIdb\fP\^, \fIres_name\fP\^, \fIres_class\fP\^, \fIcallback\fP\^, \fIclient_data\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - XrmDatabase \fIdb\fP\^; -.br - char *\fIres_name\fP\^; -.br - char *\fIres_class\fP\^; -.br - XIMProc \fIcallback\fP\^; -.br - XPointer *\fIclient_data\fP\^; +.HP +XIM XOpenIM\^(\^Display *\fIdisplay\fP\^, XrmDatabase \fIdb\fP\^, char +*\fIres_name\fP\^, char *\fIres_class\fP\^); +.HP +Status XCloseIM\^(\^XIM \fIim\fP\^); +.HP +char *XSetIMValues\^(\^XIM \fIim\fP\^, ...); +.HP +char *XGetIMValues\^(\^XIM \fIim\fP\^, ...); +.HP +Display *XDisplayOfIM\^(\^XIM \fIim\fP\^); +.HP +char *XLocaleOfIM\^(\^XIM \fIim\fP\^); +.HP +Bool XRegisterIMInstantiateCallback\^(\^Display *\fIdisplay\fP\^, XrmDatabase +\fIdb\fP\^, char *\fIres_name\fP\^, char *\fIres_class\fP\^, XIMProc +\fIcallback\fP\^, XPointer *\fIclient_data\fP\^); +.HP +Bool XUnregisterIMInstantiateCallback\^(\^Display *\fIdisplay\fP\^, +XrmDatabase \fIdb\fP\^, char *\fIres_name\fP\^, char *\fIres_class\fP\^, +XIMProc \fIcallback\fP\^, XPointer *\fIclient_data\fP\^); .LP .SH ARGUMENTS .IP \fIcallback\fP 1i diff --git a/man/XOpenOM.man b/man/XOpenOM.man index 6a45ad3..89285ec 100644 --- a/man/XOpenOM.man +++ b/man/XOpenOM.man @@ -41,7 +41,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XOpenOM.man,v 1.4 2001/02/09 03:47:45 tsi Exp $ +.\" $XFree86: xc/doc/man/X11/XOpenOM.man,v 1.5 2003/04/28 22:17:55 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -145,35 +145,19 @@ .SH NAME XOpenOM, XCloseOM, XSetOMValues, XGetOMValues, XDisplayOfOM, XLocaleOfOM \- open output methods .SH SYNTAX -XOM XOpenOM\^(\^\fIdisplay\fP\^, \fIdb\fP\^, \fIres_name\fP\^, \fIres_class\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - XrmDatabase \fIdb\fP\^; -.br - char *\fIres_name\fP\^; -.br - char *\fIres_class\fP\^; -.LP -Status XCloseOM\^(\^\fIom\fP\^) -.br - XOM \fIom\fP\^; -.LP -char * XSetOMValues\^(\^\fIom\fP\^, ...) -.br - XOM \fIom\fP\^; -.LP -char * XGetOMValues\^(\^\fIom\fP\^, ...) -.br - XOM \fIom\fP\^; -.LP -Display * XDisplayOfOM\^(\^\fIom\fP\^) -.br - XOM \fIom\fP\^; -.LP -char * XLocaleOfOM\^(\^\fIom\fP\^) -.br - XOM \fIom\fP\^; +.HP +XOM XOpenOM\^(\^Display *\fIdisplay\fP\^, XrmDatabase \fIdb\fP\^, char +*\fIres_name\fP\^, char *\fIres_class\fP\^); +.HP +Status XCloseOM\^(\^XOM \fIom\fP\^); +.HP +char *XSetOMValues\^(\^XOM \fIom\fP\^); +.HP +char *XGetOMValues\^(\^XOM \fIom\fP\^); +.HP +Display *XDisplayOfOM\^(\^XOM \fIom\fP\^); +.HP +char *XLocaleOfOM\^(\^XOM \fIom\fP\^); .SH ARGUMENTS .IP \fIdisplay\fP 1i Specifies the connection to the X server. diff --git a/man/XParseGeometry.man b/man/XParseGeometry.man index ae82e75..feb8771 100644 --- a/man/XParseGeometry.man +++ b/man/XParseGeometry.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XParGeom.man,v 1.3 2001/02/09 03:47:45 tsi Exp $ +.\" $XFree86: xc/doc/man/X11/XParGeom.man,v 1.4 2003/04/28 22:17:56 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,38 +144,16 @@ .SH NAME XParseGeometry, XWMGeometry \- parse window geometry .SH SYNTAX -int XParseGeometry\^(\^\fIparsestring\fP\^, \fIx_return\fP\^, \fIy_return\fP\^, \fIwidth_return\fP\^, \fIheight_return\fP\^) -.br - char *\fIparsestring\fP\^; -.br - int *\fIx_return\fP\^, *\fIy_return\fP\^; -.br - unsigned int *\fIwidth_return\fP\^, *\fIheight_return\fP\^; -.LP -int XWMGeometry\^(\^\fIdisplay\fP, \fIscreen\fP, \fIuser_geom\fP, -\fIdef_geom\fP, \fIbwidth\fP, \fIhints\fP, \fIx_return\fP, \fIy_return\fP, -.br - \fIwidth_return\fP, \fIheight_return\fP, \fIgravity_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - int \fIscreen\fP\^; -.br - char *\fIuser_geom\fP\^; -.br - char *\fIdef_geom\fP\^; -.br - unsigned int \fIbwidth\fP\^; -.br - XSizeHints *\fIhints\fP\^; -.br - int *\fIx_return\fP, *\fIy_return\fP\^; -.br - int *\fIwidth_return\fP\^; -.br - int *\fIheight_return\fP\^; -.br - int *\fIgravity_return\fP\^; +.HP +int XParseGeometry\^(\^char *\fIparsestring\fP\^, int *\fIx_return\fP\^, int +*\fIy_return\fP\^, unsigned int *\fIwidth_return\fP\^, unsigned int +*\fIheight_return\fP\^); +.HP +int XWMGeometry\^(\^Display *\fIdisplay\fP\^, int \fIscreen\fP\^, char +*\fIuser_geom\fP\^, char *\fIdef_geom\fP\^, unsigned int \fIbwidth\fP\^, +XSizeHints *\fIhints\fP\^, int *\fIx_return\fP, int *\fIy_return\fP\^, int +*\fIwidth_return\fP\^, int *\fIheight_return\fP\^, int +*\fIgravity_return\fP\^); .SH ARGUMENTS .IP \fIposition\fP 1i .br diff --git a/man/XPolygonRegion.man b/man/XPolygonRegion.man index 994513d..b5c8654 100644 --- a/man/XPolygonRegion.man +++ b/man/XPolygonRegion.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XPolyReg.man,v 1.2 2001/01/27 18:20:02 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XPolyReg.man,v 1.3 2003/04/28 22:17:56 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,19 +144,11 @@ .SH NAME XPolygonRegion, XClipBox \- generate regions .SH SYNTAX -Region XPolygonRegion\^(\^\fIpoints\fP\^, \fIn\fP\^, \fIfill_rule\fP\^) -.br - XPoint \fIpoints[]\fP\^; -.br - int \fIn\fP\^; -.br - int \fIfill_rule\fP\^; -.LP -XClipBox\^(\^\fIr\fP\^, \fIrect_return\fP\^) -.br - Region \fIr\fP\^; -.br - XRectangle *\fIrect_return\fP\^; +.HP +Region XPolygonRegion\^(\^XPoint \fIpoints\fP[]\^, int \fIn\fP\^, int +\fIfill_rule\fP\^); +.HP +int XClipBox\^(\^Region \fIr\fP\^, XRectangle *\fIrect_return\fP\^); .SH ARGUMENTS .IP \fIfill_rule\fP 1i Specifies the fill-rule you want to set for the specified GC. diff --git a/man/XPutBackEvent.man b/man/XPutBackEvent.man index d2a337e..b69ee4d 100644 --- a/man/XPutBackEvent.man +++ b/man/XPutBackEvent.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XPutBEvnt.man,v 1.2 2001/01/27 18:20:02 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XPutBEvnt.man,v 1.3 2003/04/28 22:17:56 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,11 +144,8 @@ .SH NAME XPutBackEvent \- put events back on the queue .SH SYNTAX -XPutBackEvent\^(\^\fIdisplay\fP, \fIevent\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - XEvent *\fIevent\fP\^; +.HP +XPutBackEvent\^(\^Display *\fIdisplay\fP\^, XEvent *\fIevent\fP\^); .SH ARGUMENTS .IP \fIdisplay\fP 1i Specifies the connection to the X server. diff --git a/man/XPutImage.man b/man/XPutImage.man index c49445c..8a54a01 100644 --- a/man/XPutImage.man +++ b/man/XPutImage.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XPutImage.man,v 1.3 2001/02/09 03:47:46 tsi Exp $ +.\" $XFree86: xc/doc/man/X11/XPutImage.man,v 1.4 2003/04/28 22:17:56 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,55 +144,20 @@ .SH NAME XPutImage, XGetImage, XGetSubImage \- transfer images .SH SYNTAX -XPutImage\^(\^\fIdisplay\fP, \fId\fP\^, \fIgc\fP\^, \fIimage\fP\^, \fIsrc_x\fP, \fIsrc_y\fP, \fIdest_x\fP\^, \fIdest_y\fP\^, \fIwidth\fP\^, \fIheight\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Drawable \fId\fP\^; -.br - GC \fIgc\fP\^; -.br - XImage *\fIimage\fP\^; -.br - int \fIsrc_x\fP\^, \fIsrc_y\fP\^; -.br - int \fIdest_x\fP\^, \fIdest_y\fP\^; -.br - unsigned int \fIwidth\fP\^, \fIheight\fP\^; -.LP -XImage *XGetImage\^(\^\fIdisplay\fP, \fId\fP\^, \fIx\fP\^, \fIy\fP\^, \fIwidth\fP\^, \fIheight\fP\^, \fIplane_mask\fP, \fIformat\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Drawable \fId\fP\^; -.br - int \fIx\fP\^, \fIy\fP\^; -.br - unsigned int \fIwidth\fP\^, \fIheight\fP\^; -.br - unsigned long \fIplane_mask\fP\^; -.br - int \fIformat\fP\^; -.LP -XImage *XGetSubImage\^(\^\fIdisplay\fP, \fId\fP\^, \fIx\fP\^, \fIy\fP\^, \fIwidth\fP\^, \fIheight\fP\^, \fIplane_mask\fP, \fIformat\fP\^, \fIdest_image\fP\^, \fIdest_x\fP\^, -.br - \fIdest_y\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Drawable \fId\fP\^; -.br - int \fIx\fP\^, \fIy\fP\^; -.br - unsigned int \fIwidth\fP\^, \fIheight\fP\^; -.br - unsigned long \fIplane_mask\fP\^; -.br - int \fIformat\fP\^; -.br - XImage *\fIdest_image\fP\^; -.br - int \fIdest_x\fP\^, \fIdest_y\fP\^; +.HP +int XPutImage\^(\^Display *\fIdisplay\fP\^, Drawable \fId\fP\^, GC \fIgc\fP\^, +XImage *\fIimage\fP\^, int \fIsrc_x\fP\^, int \fIsrc_y\fP\^, int +\fIdest_x\fP\^, int \fIdest_y\fP\^, unsigned int \fIwidth\fP\^, unsigned int +\fIheight\fP\^); +.HP +XImage *XGetImage\^(\^Display *\fIdisplay\fP\^, Drawable \fId\fP\^, int +\fIx\fP\^, int \fIy\fP\^, unsigned int \fIwidth\fP\^, unsigned int +\fIheight\fP\^, unsigned long \fIplane_mask\fP\^, int \fIformat\fP\^); +.HP +XImage *XGetSubImage\^(\^Display *\fIdisplay\fP\^, Drawable \fId\fP\^, int +\fIx\fP\^, int \fIy\fP\^, unsigned int \fIwidth\fP\^, unsigned int +\fIheight\fP\^, unsigned long \fIplane_mask\fP\^, int \fIformat\fP\^, XImage +*\fIdest_image\fP\^, int \fIdest_x\fP\^, \fIdest_y\fP\^); .SH ARGUMENTS .IP \fId\fP 1i Specifies the drawable. diff --git a/man/XQueryBestSize.man b/man/XQueryBestSize.man index cbb02aa..40c507b 100644 --- a/man/XQueryBestSize.man +++ b/man/XQueryBestSize.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XQBSize.man,v 1.2 2001/01/27 18:20:02 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XQBSize.man,v 1.3 2003/04/28 22:17:56 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,37 +144,19 @@ .SH NAME XQueryBestSize, XQueryBestTile, XQueryBestStipple \- determine efficient sizes .SH SYNTAX -Status XQueryBestSize\^(\^\fIdisplay\fP, \fIclass\fP, \fIwhich_screen\fP, \fIwidth\fP, \fIheight\fP, \fIwidth_return\fP, \fIheight_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - int \fIclass\fP\^; -.br - Drawable \fIwhich_screen\fP\^; -.br - unsigned int \fIwidth\fP, \fIheight\fP\^; -.br - unsigned int *\fIwidth_return\fP, *\fIheight_return\fP\^; -.LP -Status XQueryBestTile\^(\^\fIdisplay\fP, \fIwhich_screen\fP, \fIwidth\fP, \fIheight\fP, \fIwidth_return\fP, \fIheight_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Drawable \fIwhich_screen\fP\^; -.br - unsigned int \fIwidth\fP, \fIheight\fP\^; -.br - unsigned int *\fIwidth_return\fP, *\fIheight_return\fP\^; -.LP -Status XQueryBestStipple\^(\^\fIdisplay\fP, \fIwhich_screen\fP, \fIwidth\fP, \fIheight\fP, \fIwidth_return\fP, \fIheight_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Drawable \fIwhich_screen\fP\^; -.br - unsigned int \fIwidth\fP, \fIheight\fP\^; -.br - unsigned int *\fIwidth_return\fP, *\fIheight_return\fP\^; +.HP +Status XQueryBestSize\^(\^Display *\fIdisplay\fP\^, int \fIclass\fP\^, +Drawable \fIwhich_screen\fP\^, unsigned int \fIwidth\fP, unsigned int +\fIheight\fP\^, unsigned int *\fIwidth_return\fP, unsigned int +*\fIheight_return\fP\^); +.HP +Status XQueryBestTile\^(\^Display *\fIdisplay\fP\^, Drawable +\fIwhich_screen\fP\^, unsigned int \fIwidth\fP, unsigned int \fIheight\fP\^, +unsigned int *\fIwidth_return\fP, unsigned int *\fIheight_return\fP\^); +.HP +Status XQueryBestStipple\^(\^Display *\fIdisplay\fP\^, Drawable +\fIwhich_screen\fP\^, unsigned int \fIwidth\fP, unsigned int \fIheight\fP\^, +unsigned int *\fIwidth_return\fP, unsigned int *\fIheight_return\fP\^); .SH ARGUMENTS .IP \fIclass\fP 1i Specifies the class that you are interested in. diff --git a/man/XQueryColor.man b/man/XQueryColor.man index cac6b05..9d37479 100644 --- a/man/XQueryColor.man +++ b/man/XQueryColor.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XQColor.man,v 1.4 2001/02/09 03:47:46 tsi Exp $ +.\" $XFree86: xc/doc/man/X11/XQColor.man,v 1.5 2003/04/28 22:17:56 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,44 +144,19 @@ .SH NAME XQueryColor, XQueryColors, XLookupColor, XParseColor \- obtain color values .SH SYNTAX -XQueryColor\^(\^\fIdisplay\fP, \fIcolormap\fP\^, \fIdef_in_out\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Colormap \fIcolormap\fP\^; -.br - XColor *\fIdef_in_out\fP\^; -.LP -XQueryColors\^(\^\fIdisplay\fP, \fIcolormap\fP\^, \fIdefs_in_out\fP\^, \fIncolors\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Colormap \fIcolormap\fP\^; -.br - XColor \fIdefs_in_out\fP[\^]\^; -.br - int \fIncolors\fP\^; -.LP -Status XLookupColor\^(\^\fIdisplay\fP, \fIcolormap\fP, \fIcolor_name\fP, -\fIexact_def_return\fP\^, \fIscreen_def_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Colormap \fIcolormap\fP\^; -.br - char *\fIcolor_name\fP\^; -.br - XColor *\fIexact_def_return\fP\^, *\fIscreen_def_return\fP\^; -.LP -Status XParseColor\^(\^\fIdisplay\fP, \fIcolormap\fP\^, \^\fIspec\fP\^, \fIexact_def_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Colormap \fIcolormap\fP\^; -.br - char *\fIspec\fP\^; -.br - XColor *\fIexact_def_return\fP\^; +.HP +int XQueryColor\^(\^Display *\fIdisplay\fP\^, Colormap \fIcolormap\fP\^, XColor +*\fIdef_in_out\fP\^); +.HP +int XQueryColors\^(\^Display *\fIdisplay\fP\^, Colormap \fIcolormap\fP\^, +XColor \fIdefs_in_out\fP[\^]\^, int \fIncolors\fP\^); +.HP +Status XLookupColor\^(\^Display *\fIdisplay\fP\^, Colormap \fIcolormap\fP\^, +char *\fIcolor_name\fP\^, XColor *\fIexact_def_return\fP\^, XColor +*\fIscreen_def_return\fP\^); +.HP +Status XParseColor\^(\^Display *\fIdisplay\fP\^, Colormap \fIcolormap\fP\^, +char *\fIspec\fP\^, XColor *\fIexact_def_return\fP\^); .SH ARGUMENTS .IP \fIcolormap\fP 1i Specifies the colormap. diff --git a/man/XQueryPointer.man b/man/XQueryPointer.man index 1bae081..8fa2e2a 100644 --- a/man/XQueryPointer.man +++ b/man/XQueryPointer.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XQPointer.man,v 1.2 2001/01/27 18:20:02 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XQPointer.man,v 1.3 2003/04/28 22:17:56 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,21 +144,11 @@ .SH NAME XQueryPointer \- get pointer coordinates .SH SYNTAX -Bool XQueryPointer\^(\^\fIdisplay\fP, \fIw\fP\^, \fIroot_return\fP\^, \fIchild_return\fP\^, \fIroot_x_return\fP\^, \fIroot_y_return\fP\^, -.br - \fIwin_x_return\fP\^, \fIwin_y_return\fP\^, \fImask_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - Window *\fIroot_return\fP\^, *\fIchild_return\fP\^; -.br - int *\fIroot_x_return\fP\^, *\fIroot_y_return\fP\^; -.br - int *\fIwin_x_return\fP\^, *\fIwin_y_return\fP\^; -.br - unsigned int *\fImask_return\fP\^; +.HP +Bool XQueryPointer\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, Window +*\fIroot_return\fP\^, Window *\fIchild_return\fP\^, int +*\fIroot_x_return\fP\^, int *\fIroot_y_return\fP\^, int *\fIwin_x_return\fP\^, +int *\fIwin_y_return\fP\^, unsigned int *\fImask_return\fP\^); .SH ARGUMENTS .IP \fIchild_return\fP 1i Returns the child window that the pointer is located in, if any. diff --git a/man/XQueryTree.man b/man/XQueryTree.man index 13b52cb..f689897 100644 --- a/man/XQueryTree.man +++ b/man/XQueryTree.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XQTree.man,v 1.3 2001/02/09 03:47:46 tsi Exp $ +.\" $XFree86: xc/doc/man/X11/XQTree.man,v 1.4 2003/04/28 22:17:56 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,19 +144,10 @@ .SH NAME XQueryTree \- query window tree information .SH SYNTAX -Status XQueryTree\^(\^\fIdisplay\fP, \fIw\fP\^, \fIroot_return\fP\^, \fIparent_return\fP\^, \fIchildren_return\fP\^, \fInchildren_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - Window *\fIroot_return\fP\^; -.br - Window *\fIparent_return\fP\^; -.br - Window **\fIchildren_return\fP\^; -.br - unsigned int *\fInchildren_return\fP\^; +.HP +Status XQueryTree\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, Window +*\fIroot_return\fP\^, Window *\fIparent_return\fP\^, Window +**\fIchildren_return\fP\^, unsigned int *\fInchildren_return\fP\^); .SH ARGUMENTS .IP \fIchildren_return\fP 1i Returns the list of children. diff --git a/man/XRaiseWindow.man b/man/XRaiseWindow.man index c31c0c2..a62a0f9 100644 --- a/man/XRaiseWindow.man +++ b/man/XRaiseWindow.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XRaiseWin.man,v 1.2 2001/01/27 18:20:03 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XRaiseWin.man,v 1.3 2003/04/28 22:17:56 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,45 +144,20 @@ .SH NAME XRaiseWindow, XLowerWindow, XCirculateSubwindows, XCirculateSubwindowsUp, XCirculateSubwindowsDown, XRestackWindows \- change window stacking order .SH SYNTAX -XRaiseWindow\^(\^\fIdisplay\fP, \fIw\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.LP -XLowerWindow\^(\^\fIdisplay\fP, \fIw\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.LP -XCirculateSubwindows\^(\^\fIdisplay\fP, \fIw\fP\^, \fIdirection\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - int \fIdirection\fP\^; -.LP -XCirculateSubwindowsUp\^(\^\fIdisplay\fP, \fIw\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.LP -XCirculateSubwindowsDown\^(\^\fIdisplay\fP, \fIw\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.LP -XRestackWindows\^(\^\fIdisplay\fP, \fIwindows\fP\^, \^\fInwindows\fP\^); -.br - Display *\fIdisplay\fP\^; -.br - Window \fIwindows\fP\^[]; -.br - int \fInwindows\fP\^; +.HP +int XRaiseWindow\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^); +.HP +int XLowerWindow\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^); +.HP +int XCirculateSubwindows\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, int +\fIdirection\fP\^); +.HP +int XCirculateSubwindowsUp\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^); +.HP +int XCirculateSubwindowsDown\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^); +.HP +int XRestackWindows\^(\^Display *\fIdisplay\fP\^, Window \fIwindows\fP\^[], int +\fInwindows\fP\^); .SH ARGUMENTS .IP \fIdirection\fP 1i Specifies the direction (up or down) that you want to circulate diff --git a/man/XReadBitmapFile.man b/man/XReadBitmapFile.man index ade48a5..f35eb4d 100644 --- a/man/XReadBitmapFile.man +++ b/man/XReadBitmapFile.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XReadBF.man,v 1.3 2001/02/07 22:35:20 tsi Exp $ +.\" $XFree86: xc/doc/man/X11/XReadBF.man,v 1.4 2003/04/28 22:17:56 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,67 +144,27 @@ .SH NAME XReadBitmapFile, XReadBitmapFileData, XWriteBitmapFile, XCreatePixmapFromBitmapData, XCreateBitmapFromData \- manipulate bitmaps .SH SYNTAX -int XReadBitmapFile(\^\fIdisplay\fP, \fId\fP, \fIfilename\fP, \fIwidth_return\fP, \fIheight_return\fP, \fIbitmap_return\fP, \fIx_hot_return\fP, -.br - \fIy_hot_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Drawable \fId\fP\^; -.br - char *\fIfilename\fP\^; -.br - unsigned int *\fIwidth_return\fP, *\fIheight_return\fP\^; -.br - Pixmap *\fIbitmap_return\fP\^; -.br - int *\fIx_hot_return\fP, *\fIy_hot_return\fP\^; -.LP -int XReadBitmapFileData(\^\fIfilename\fP, \fIwidth_return\fP, \fIheight_return\fP, \fIdata_return\fP, \fIx_hot_return\fP, \fIy_hot_return\fP\^) -.br - char *\fIfilename\fP\^; -.br - unsigned int *\fIwidth_return\fP, *\fIheight_return\fP\^; -.br - unsigned char *\fIdata_return\fP\^; -.br - int *\fIx_hot_return\fP, *\fIy_hot_return\fP\^; -.LP -int XWriteBitmapFile(\^\fIdisplay\fP, \fIfilename\fP, \fIbitmap\fP, \fIwidth\fP, \fIheight\fP, \fIx_hot\fP, \fIy_hot\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - char *\fIfilename\fP\^; -.br - Pixmap \fIbitmap\fP\^; -.br - unsigned int \fIwidth\fP, \fIheight\fP\^; -.br - int \fIx_hot\fP, \fIy_hot\fP\^; -.LP -Pixmap XCreatePixmapFromBitmapData\^(\^\fIdisplay\fP, \fId\fP, \fIdata\fP, \fIwidth\fP, \fIheight\fP, \fIfg\fP, \fIbg\fP, \fIdepth\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Drawable \fId\fP\^; -.br - char *\fIdata\fP\^; -.br - unsigned int \fIwidth\fP, \fIheight\fP\^; -.br - unsigned long \fIfg\fP, \fIbg\fP\^; -.br - unsigned int \fIdepth\fP\^; -.LP -Pixmap XCreateBitmapFromData(\^\fIdisplay\fP, \fId\fP, \fIdata\fP, \fIwidth\fP, \fIheight\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Drawable \fId\fP\^; -.br - char *\fIdata\fP\^; -.br - unsigned int \fIwidth\fP, \fIheight\fP\^; +.HP +int XReadBitmapFile(\^Display *\fIdisplay\fP\^, Drawable \fId\fP\^, char +*\fIfilename\fP\^, unsigned int *\fIwidth_return\fP, unsigned int +*\fIheight_return\fP\^, Pixmap *\fIbitmap_return\fP\^, int +*\fIx_hot_return\fP, int *\fIy_hot_return\fP\^); +.HP +int XReadBitmapFileData(\^char *\fIfilename\fP\^, unsigned int +*\fIwidth_return\fP, unsigned int *\fIheight_return\fP\^, unsigned char +*\fIdata_return\fP\^, int *\fIx_hot_return\fP, int *\fIy_hot_return\fP\^); +.HP +int XWriteBitmapFile(\^Display *\fIdisplay\fP\^, char *\fIfilename\fP\^, +Pixmap \fIbitmap\fP\^, unsigned int \fIwidth\fP, unsigned int \fIheight\fP\^, +int \fIx_hot\fP, int \fIy_hot\fP\^); +.HP +Pixmap XCreatePixmapFromBitmapData\^(\^Display *\fIdisplay\fP\^, Drawable +\fId\fP\^, char *\fIdata\fP\^, unsigned int \fIwidth\fP, unsigned int +\fIheight\fP\^, unsigned long \fIfg\fP, unsigned int \fIbg\fP\^, unsigned int +\fIdepth\fP\^); +.HP +Pixmap XCreateBitmapFromData(\^Display *\fIdisplay\fP\^, Drawable \fId\fP\^, +char *\fIdata\fP\^, unsigned int \fIwidth\fP, unsigned int \fIheight\fP\^); .SH ARGUMENTS .IP \fIbitmap\fP 1i Specifies the bitmap. diff --git a/man/XRecolorCursor.man b/man/XRecolorCursor.man index ad8a8f1..70e50ec 100644 --- a/man/XRecolorCursor.man +++ b/man/XRecolorCursor.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XRecCur.man,v 1.2 2001/01/27 18:20:03 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XRecCur.man,v 1.3 2003/04/28 22:17:56 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,29 +144,15 @@ .SH NAME XRecolorCursor, XFreeCursor, XQueryBestCursor \- manipulate cursors .SH SYNTAX -XRecolorCursor\^(\^\fIdisplay\fP, \fIcursor\fP\^, \fIforeground_color\fP\^, \fIbackground_color\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Cursor \fIcursor\fP\^; -.br - XColor *\fIforeground_color\fP\^, *\fIbackground_color\fP\^; -.LP -XFreeCursor\^(\^\fIdisplay\fP, \fIcursor\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Cursor \fIcursor\fP\^; -.LP -Status XQueryBestCursor\^(\^\fIdisplay\fP, \fId\fP, \fIwidth\fP\^, \fIheight\fP\^, \fIwidth_return\fP\^, \fIheight_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Drawable \fId\fP\^; -.br - unsigned int \fIwidth\fP\^, \fIheight\fP\^; -.br - unsigned int *\fIwidth_return\fP\^, *\fIheight_return\fP\^; +.HP +int XRecolorCursor\^(\^Display *\fIdisplay\fP\^, Cursor \fIcursor\fP\^, XColor +*\fIforeground_color\fP\^, XColor *\fIbackground_color\fP\^); +.HP +int XFreeCursor\^(\^Display *\fIdisplay\fP\^, Cursor \fIcursor\fP\^); +.HP +Status XQueryBestCursor\^(\^Display *\fIdisplay\fP\^, Drawable \fId\fP\^, +unsigned int \fIwidth\fP\^, unsigned int \fIheight\fP\^, unsigned int +*\fIwidth_return\fP\^, unsigned int *\fIheight_return\fP\^); .SH ARGUMENTS .IP \fIbackground_color\fP 1i Specifies the RGB values for the background of the source. diff --git a/man/XReparentWindow.man b/man/XReparentWindow.man index 730c8c8..1fa0922 100644 --- a/man/XReparentWindow.man +++ b/man/XReparentWindow.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XReparWin.man,v 1.2 2001/01/27 18:20:03 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XReparWin.man,v 1.3 2003/04/28 22:17:56 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,15 +144,9 @@ .SH NAME XReparentWindow \- reparent windows .SH SYNTAX -XReparentWindow\^(\^\fIdisplay\fP, \fIw\fP\^, \fIparent\fP\^, \fIx\fP\^, \fIy\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - Window \fIparent\fP\^; -.br - int \fIx\fP\^, \fIy\fP\^; +.HP +int XReparentWindow\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, Window +\fIparent\fP\^, int \fIx\fP\^, int \fIy\fP\^); .SH ARGUMENTS .IP \fIdisplay\fP 1i Specifies the connection to the X server. diff --git a/man/XResourceManagerString.man b/man/XResourceManagerString.man index 27340c7..699c388 100644 --- a/man/XResourceManagerString.man +++ b/man/XResourceManagerString.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XRMStr.man,v 1.2 2001/01/27 18:20:03 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XRMStr.man,v 1.3 2003/04/28 22:17:56 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,13 +144,10 @@ .SH NAME XResourceManagerString, XScreenResourceString \- obtain server resource properties .SH SYNTAX -char *XResourceManagerString\^(\^\fIdisplay\fP\^) -.br - Display *\fIdisplay\fP\^; -.LP -char *XScreenResourceString\^(\^\fIscreen\fP\^) -.br - Screen *\fIscreen\fP\^; +.HP +char *XResourceManagerString\^(\^Display *\fIdisplay\fP\^); +.HP +char *XScreenResourceString\^(\^Screen *\fIscreen\fP\^); .SH ARGUMENTS .IP \fIdisplay\fP 1i Specifies the connection to the X server. diff --git a/man/XSaveContext.man b/man/XSaveContext.man index 1972a22..62f9b2f 100644 --- a/man/XSaveContext.man +++ b/man/XSaveContext.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSContext.man,v 1.2 2001/01/27 18:20:03 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XSContext.man,v 1.3 2003/04/28 22:17:56 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,38 +144,20 @@ .SH NAME XSaveContext, XFindContext, XDeleteContext, XUniqueContext \- associative look-up routines .SH SYNTAX -int XSaveContext(\^\fIdisplay\fP, \fIrid\fP, \fIcontext\fP, \fIdata\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - XID \fIrid\fP\^; -.br - XContext \fIcontext\fP\^; -.br - XPointer \fIdata\fP\^; +.HP +int XSaveContext(\^Display *\fIdisplay\fP\^, XID \fIrid\fP\^, XContext +\fIcontext\fP\^, XPointer \fIdata\fP\^); +.HP +int XFindContext(\^Display *\fIdisplay\fP\^, XID \fIrid\fP\^, XContext +\fIcontext\fP\^, XPointer *\fIdata_return\fP\^); +.HP +int XDeleteContext(\^Display *\fIdisplay\fP\^, XID \fIrid\fP, XContext +\fIcontext\fP); .LP -int XFindContext(\^\fIdisplay\fP, \fIrid\fP, \fIcontext\fP, \fIdata_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - XID \fIrid\fP\^; -.br - XContext \fIcontext\fP\^; -.br - XPointer *\fIdata_return\fP\^; -.LP -int XDeleteContext(\^\fIdisplay\fP, \fIrid\fP, \fIcontext\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - XID \fIrid\fP; -.br - XContext \fIcontext\fP; -.LP -XContext XUniqueContext(\^) +XContext XUniqueContext(void); .SH ARGUMENTS .IP \fIcontext\fP 1i -Specifies the context type to which the data belongs. +Specifies the context type to which the data belongs. .IP \fIdata\fP 1i Specifies the data to be associated with the window and type. .IP \fIdata_return\fP 1i diff --git a/man/XSelectInput.man b/man/XSelectInput.man index b0b2fb5..1c81fb7 100644 --- a/man/XSelectInput.man +++ b/man/XSelectInput.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSInput.man,v 1.2 2001/01/27 18:20:03 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XSInput.man,v 1.3 2003/04/28 22:17:56 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,13 +144,9 @@ .SH NAME XSelectInput \- select input events .SH SYNTAX -XSelectInput\^(\^\fIdisplay\fP, \fIw\fP\^, \fIevent_mask\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - long \fIevent_mask\fP\^; +.HP +int XSelectInput\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, long +\fIevent_mask\fP\^); .SH ARGUMENTS .IP \fIdisplay\fP 1i Specifies the connection to the X server. diff --git a/man/XSendEvent.man b/man/XSendEvent.man index f1dcc61..2df8959 100644 --- a/man/XSendEvent.man +++ b/man/XSendEvent.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSeEvent.man,v 1.3 2001/02/09 03:47:46 tsi Exp $ +.\" $XFree86: xc/doc/man/X11/XSeEvent.man,v 1.4 2003/04/28 22:17:57 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,31 +144,14 @@ .SH NAME XSendEvent, XDisplayMotionBufferSize, XGetMotionEvents, XTimeCoord \- send events and pointer motion history structure .SH SYNTAX -Status XSendEvent\^(\^\fIdisplay\fP, \fIw\fP\^, \fIpropagate\fP\^, \fIevent_mask\fP\^, \fIevent_send\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - Bool \fIpropagate\fP\^; -.br - long \fIevent_mask\fP\^; -.br - XEvent *\fIevent_send\fP\^; -.LP -unsigned long XDisplayMotionBufferSize\^(\^\fIdisplay\fP\^) -.br - Display *\fIdisplay\fP\^; -.LP -XTimeCoord *XGetMotionEvents\^(\^\fIdisplay\fP, \fIw\fP\^, \fIstart\fP\^, \fIstop\fP\^, \fInevents_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - Time \fIstart\fP\^, \fIstop\fP\^; -.br - int *\fInevents_return\fP\^; +.HP +Status XSendEvent\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, Bool +\fIpropagate\fP\^, long \fIevent_mask\fP\^, XEvent *\fIevent_send\fP\^); +.HP +unsigned long XDisplayMotionBufferSize\^(\^Display *\fIdisplay\fP\^); +.HP +XTimeCoord *XGetMotionEvents\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, +Time \fIstart\fP\^, Time \fIstop\fP\^, int *\fInevents_return\fP\^); .SH ARGUMENTS .IP \fIdisplay\fP 1i Specifies the connection to the X server. diff --git a/man/XSetArcMode.man b/man/XSetArcMode.man index 808f669..7f856c5 100644 --- a/man/XSetArcMode.man +++ b/man/XSetArcMode.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSeArcMod.man,v 1.2 2001/01/27 18:20:04 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XSeArcMod.man,v 1.3 2003/04/28 22:17:56 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,29 +144,15 @@ .SH NAME XSetArcMode, XSetSubwindowMode, XSetGraphicsExposure \- GC convenience routines .SH SYNTAX -XSetArcMode\^(\^\fIdisplay\fP, \fIgc\fP\^, \fIarc_mode\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - GC \fIgc\fP\^; -.br - int \fIarc_mode\fP\^; -.LP -XSetSubwindowMode\^(\^\fIdisplay\fP, \fIgc\fP\^, \fIsubwindow_mode\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - GC \fIgc\fP\^; -.br - int \fIsubwindow_mode\fP\^; -.LP -XSetGraphicsExposures\^(\^\fIdisplay\fP, \fIgc\fP\^, \fIgraphics_exposures\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - GC \fIgc\fP\^; -.br - Bool \fIgraphics_exposures\fP\^; +.HP +int XSetArcMode\^(\^Display *\fIdisplay\fP\^, GC \fIgc\fP\^, int +\fIarc_mode\fP\^); +.HP +int XSetSubwindowMode\^(\^Display *\fIdisplay\fP\^, GC \fIgc\fP\^, int +\fIsubwindow_mode\fP\^); +.HP +int XSetGraphicsExposures\^(\^Display *\fIdisplay\fP\^, GC \fIgc\fP\^, Bool +\fIgraphics_exposures\fP\^); .SH ARGUMENTS .IP \fIarc_mode\fP 1i Specifies the arc mode. diff --git a/man/XSetClipOrigin.man b/man/XSetClipOrigin.man index 1cbfc56..63fcc07 100644 --- a/man/XSetClipOrigin.man +++ b/man/XSetClipOrigin.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSeClipO.man,v 1.2 2001/01/27 18:20:04 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XSeClipO.man,v 1.3 2003/04/28 22:17:56 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,35 +144,16 @@ .SH NAME XSetClipOrigin, XSetClipMask, XSetClipRectangles \- GC convenience routines .SH SYNTAX -XSetClipOrigin\^(\^\fIdisplay\fP, \fIgc\fP\^, \fIclip_x_origin\fP\^, \fIclip_y_origin\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - GC \fIgc\fP\^; -.br - int \fIclip_x_origin\fP\^, \fIclip_y_origin\fP\^; -.LP -XSetClipMask\^(\^\fIdisplay\fP, \fIgc\fP, \fIpixmap\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - GC \fIgc\fP\^; -.br - Pixmap \fIpixmap\fP\^; -.LP -XSetClipRectangles\^(\^\fIdisplay\fP, \fIgc\fP\^, \fIclip_x_origin\fP\^, \fIclip_y_origin\fP\^, \fIrectangles\fP\^, \fIn\fP\^, \fIordering\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - GC \fIgc\fP\^; -.br - int \fIclip_x_origin\fP\^, \fIclip_y_origin\fP\^; -.br - XRectangle \fIrectangles\fP[]\^; -.br - int \fIn\fP\^; -.br - int \fIordering\fP\^; +.HP +int XSetClipOrigin\^(\^Display *\fIdisplay\fP\^, GC \fIgc\fP\^, int +\fIclip_x_origin\fP\^, int \fIclip_y_origin\fP\^); +.HP +int XSetClipMask\^(\^Display *\fIdisplay\fP\^, GC \fIgc\fP\^, Pixmap +\fIpixmap\fP\^); +.HP +int XSetClipRectangles\^(\^Display *\fIdisplay\fP\^, GC \fIgc\fP\^, int +\fIclip_x_origin\fP\^, int \fIclip_y_origin\fP\^, XRectangle +\fIrectangles\fP[]\^, int \fIn\fP\^, int \fIordering\fP\^); .SH ARGUMENTS .IP \fIdisplay\fP 1i Specifies the connection to the X server. diff --git a/man/XSetCloseDownMode.man b/man/XSetCloseDownMode.man index 7d1a510..fa6bd25 100644 --- a/man/XSetCloseDownMode.man +++ b/man/XSetCloseDownMode.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSeClosDM.man,v 1.2 2001/01/27 18:20:04 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XSeClosDM.man,v 1.3 2003/04/28 22:17:57 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,17 +144,10 @@ .SH NAME XSetCloseDownMode, XKillClient \- control clients .SH SYNTAX -XSetCloseDownMode\^(\^\fIdisplay\fP, \fIclose_mode\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - int \fIclose_mode\fP\^; -.LP -XKillClient\^(\^\fIdisplay\fP, \fIresource\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - XID \fIresource\fP\^; +.HP +int XSetCloseDownMode\^(\^Display *\fIdisplay\fP\^, int \fIclose_mode\fP\^); +.HP +int XKillClient\^(\^Display *\fIdisplay\fP\^, XID \fIresource\fP\^); .SH ARGUMENTS .IP \fIclose_mode\fP 1i Specifies the client close-down mode. diff --git a/man/XSetCommand.man b/man/XSetCommand.man index f9cd97b..78dd5b2 100644 --- a/man/XSetCommand.man +++ b/man/XSetCommand.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSeCmd.man,v 1.3 2001/02/09 03:47:46 tsi Exp $ +.\" $XFree86: xc/doc/man/X11/XSeCmd.man,v 1.4 2003/04/28 22:17:57 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,26 +144,12 @@ .SH NAME XSetCommand, XGetCommand \- set or read a window's WM_COMMAND property .SH SYNTAX -XSetCommand\^(\^\fIdisplay\fP, \fIw\fP, \fIargv\fP, \fIargc\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - char **\fIargv\fP\^; -.br - int \fIargc\fP\^; -.LP -Status XGetCommand\^(\^\fIdisplay\fP, \fIw\fP, \fIargv_return\fP, -\fIargc_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - char ***\fIargv_return\fP\^; -.br - int *\fIargc_return\fP\^; +.HP +int XSetCommand\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, char +**\fIargv\fP\^, int \fIargc\fP\^); +.HP +Status XGetCommand\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, char +***\fIargv_return\fP\^, int *\fIargc_return\fP\^); .SH ARGUMENTS .IP \fIargc\fP 1i Specifies the number of arguments. diff --git a/man/XSetErrorHandler.man b/man/XSetErrorHandler.man index a752eab..9e856de 100644 --- a/man/XSetErrorHandler.man +++ b/man/XSetErrorHandler.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSeErrHan.man,v 1.2 2001/01/27 18:20:04 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XSeErrHan.man,v 1.3 2003/04/28 22:17:57 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,39 +144,21 @@ .SH NAME XSetErrorHandler, XGetErrorText, XDisplayName, XSetIOErrorHandler, XGetErrorDatabaseText \- default error handlers .SH SYNTAX -int (*XSetErrorHandler\^(\^\fIhandler\fP\^)\^)\^(\^) -.br - int (\^*\^\fIhandler\fP\^)\^(Display *, XErrorEvent *) -.LP -XGetErrorText\^(\^\fIdisplay\fP, \fIcode\fP, \fIbuffer_return\fP, \fIlength\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - int \fIcode\fP\^; -.br - char *\fIbuffer_return\fP\^; -.br - int \fIlength\fP\^; -.LP -char *XDisplayName\^(\^\fIstring\fP\^) -.br - char *\fIstring\fP\^; -.LP -int (*XSetIOErrorHandler\^(\^\fIhandler\fP\^)\^)\^(\^) -.br - int (\^*\^\fIhandler\fP\^)(Display *); -.LP -XGetErrorDatabaseText\^(\^\fIdisplay\fP, \fIname\fP, \fImessage\fP, \fIdefault_string\fP, \fIbuffer_return\fP, \fIlength\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - char *\fIname\fP, *\fImessage\fP\^; -.br - char *\fIdefault_string\fP\^; -.br - char *\fIbuffer_return\fP\^; -.br - int \fIlength\fP\^; +.HP +int (*XSetErrorHandler\^(\^int (\^*\^\fIhandler\fP\^)\^(Display *, XErrorEvent +*)\^)\^)\^(\^); +.HP +int XGetErrorText\^(\^Display *\fIdisplay\fP\^, int \fIcode\fP\^, char +*\fIbuffer_return\fP\^, int \fIlength\fP\^); +.HP +char *XDisplayName\^(\^char *\fIstring\fP\^); +.HP +int (*XSetIOErrorHandler\^(\^int (\^*\^\fIhandler\fP\^)(Display +*)\^)\^)\^(\^); +.HP +int XGetErrorDatabaseText\^(\^Display *\fIdisplay\fP\^, char *\fIname\fP, char +*\fImessage\fP\^, char *\fIdefault_string\fP\^, char *\fIbuffer_return\fP\^, +int \fIlength\fP\^); .SH ARGUMENTS .IP \fIbuffer_return\fP 1i Returns the error description. diff --git a/man/XSetFillStyle.man b/man/XSetFillStyle.man index 2f12198..9593af7 100644 --- a/man/XSetFillStyle.man +++ b/man/XSetFillStyle.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSeFillS.man,v 1.2 2001/01/27 18:20:04 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XSeFillS.man,v 1.3 2003/04/28 22:17:57 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,21 +144,12 @@ .SH NAME XSetFillStyle, XSetFillRule \- GC convenience routines .SH SYNTAX -XSetFillStyle\^(\^\fIdisplay\fP, \fIgc\fP\^, \fIfill_style\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - GC \fIgc\fP\^; -.br - int \fIfill_style\fP\^; -.LP -XSetFillRule\^(\^\fIdisplay\fP, \fIgc\fP\^, \fIfill_rule\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - GC \fIgc\fP\^; -.br - int \fIfill_rule\fP\^; +.HP +int XSetFillStyle\^(\^Display *\fIdisplay\fP\^, GC \fIgc\fP\^, int +\fIfill_style\fP\^); +.HP +int XSetFillRule\^(\^Display *\fIdisplay\fP\^, GC \fIgc\fP\^, int +\fIfill_rule\fP\^); .SH ARGUMENTS .IP \fIdisplay\fP 1i Specifies the connection to the X server. diff --git a/man/XSetFont.man b/man/XSetFont.man index 41e0c34..1597ce5 100644 --- a/man/XSetFont.man +++ b/man/XSetFont.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSeFont.man,v 1.2 2001/01/27 18:20:04 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XSeFont.man,v 1.3 2003/04/28 22:17:57 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,13 +144,8 @@ .SH NAME XSetFont \- GC convenience routines .SH SYNTAX -XSetFont\^(\^\fIdisplay\fP, \fIgc\fP\^, \fIfont\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - GC \fIgc\fP\^; -.br - Font \fIfont\fP\^; +.HP +int XSetFont\^(\^Display *\fIdisplay\fP\^, GC \fIgc\fP\^, Font \fIfont\fP\^); .SH ARGUMENTS .IP \fIdisplay\fP 1i Specifies the connection to the X server. diff --git a/man/XSetFontPath.man b/man/XSetFontPath.man index c8ff409..78420d2 100644 --- a/man/XSetFontPath.man +++ b/man/XSetFontPath.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSeFontP.man,v 1.2 2001/01/27 18:20:04 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XSeFontP.man,v 1.3 2003/04/28 22:17:57 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,25 +144,12 @@ .SH NAME XSetFontPath, XGetFontPath, XFreeFontPath \- set, get, or free the font search path .SH SYNTAX -XSetFontPath\^(\^\fIdisplay\fP, \fIdirectories\fP\^, \fIndirs\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - char **\fIdirectories\fP\^; -.br - int \fIndirs\fP\^; -.LP -char **XGetFontPath\^(\^\fIdisplay\fP, \fInpaths_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - int *\fInpaths_return\fP\^; - -.LP -XFreeFontPath\^(\^\fIlist\fP\^) -.br - char **\fIlist\fP\^; - +int XSetFontPath\^(\^Display *\fIdisplay\fP\^, char **\fIdirectories\fP\^, int +\fIndirs\fP\^); +.HP +char **XGetFontPath\^(\^Display *\fIdisplay\fP\^, int *\fInpaths_return\fP\^); +.HP +int XFreeFontPath\^(\^char **\fIlist\fP\^); .SH ARGUMENTS .IP \fIdirectories\fP 1i Specifies the directory path used to look for a font. diff --git a/man/XSetICFocus.man b/man/XSetICFocus.man index b68d0e8..67296b1 100644 --- a/man/XSetICFocus.man +++ b/man/XSetICFocus.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSICFoc.man,v 1.2 2001/01/27 18:20:03 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XSICFoc.man,v 1.3 2003/04/28 22:17:56 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,13 +144,10 @@ .SH NAME XSetICFocus, XUnsetICFocus \- set and unset input context focus .SH SYNTAX -void XSetICFocus\^(\^\fIic\fP\^) -.br - XIC \fIic\fP\^; -.LP -void XUnsetICFocus\^(\^\fIic\fP\^) -.br - XIC \fIic\fP\^; +.HP +void XSetICFocus\^(\^XIC \fIic\fP\^); +.HP +void XUnsetICFocus\^(\^XIC \fIic\fP\^); .SH ARGUMENTS .IP \fIic\fP 1i Specifies the input context. diff --git a/man/XSetICValues.man b/man/XSetICValues.man index 3cc1441..5fe7adc 100644 --- a/man/XSetICValues.man +++ b/man/XSetICValues.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSICVals.man,v 1.2 2001/01/27 18:20:03 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XSICVals.man,v 1.3 2003/04/28 22:17:56 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,13 +144,10 @@ .SH NAME XSetICValues, XGetICValues \- set and obtain XIC values .SH SYNTAX -char * XSetICValues\^(\^\fIic\fP\^, ...) -.br - XIC \fIic\fP\^; -.LP -char * XGetICValues\^(\^\fIic\fP\^, ...) -.br - XIC \fIic\fP\^; +.HP +char * XSetICValues\^(\^XIC \fIic\fP, ...\^); +.HP +char * XGetICValues\^(\^XIC \fIic\fP, ...\^); .SH ARGUMENTS .IP \fIic\fP 1i Specifies the input context. diff --git a/man/XSetInputFocus.man b/man/XSetInputFocus.man index 9fc671b..e22c7d5 100644 --- a/man/XSetInputFocus.man +++ b/man/XSetInputFocus.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSeInFoc.man,v 1.2 2001/01/27 18:20:04 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XSeInFoc.man,v 1.3 2003/04/28 22:17:57 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,23 +144,12 @@ .SH NAME XSetInputFocus, XGetInputFocus \- control input focus .SH SYNTAX -XSetInputFocus\^(\^\fIdisplay\fP, \fIfocus\fP\^, \fIrevert_to\fP\^, \fItime\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIfocus\fP\^; -.br - int \fIrevert_to\fP\^; -.br - Time \fItime\fP\^; -.LP -XGetInputFocus\^(\^\fIdisplay\fP, \fIfocus_return\fP\^, \fIrevert_to_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window *\fIfocus_return\fP\^; -.br - int *\fIrevert_to_return\fP\^; +.HP +int XSetInputFocus\^(\^Display *\fIdisplay\fP\^, Window \fIfocus\fP\^, int +\fIrevert_to\fP\^, Time \fItime\fP\^); +.HP +int XGetInputFocus\^(\^Display *\fIdisplay\fP\^, Window *\fIfocus_return\fP\^, +int *\fIrevert_to_return\fP\^); .SH ARGUMENTS .IP \fIdisplay\fP 1i Specifies the connection to the X server. diff --git a/man/XSetLineAttributes.man b/man/XSetLineAttributes.man index cf2d0b7..bf93358 100644 --- a/man/XSetLineAttributes.man +++ b/man/XSetLineAttributes.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSeLAttr.man,v 1.2 2001/01/27 18:20:04 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XSeLAttr.man,v 1.3 2003/04/28 22:17:57 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,31 +144,13 @@ .SH NAME XSetLineAttributes, XSetDashes \- GC convenience routines .SH SYNTAX -XSetLineAttributes\^(\^\fIdisplay\fP, \fIgc\fP\^, \fIline_width\fP\^, \fIline_style\fP\^, \fIcap_style\fP\^, \fIjoin_style\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - GC \fIgc\fP\^; -.br - unsigned int \fIline_width\fP\^; -.br - int \fIline_style\fP\^; -.br - int \fIcap_style\fP\^; -.br - int \fIjoin_style\fP\^; -.LP -XSetDashes\^(\^\fIdisplay\fP, \fIgc\fP\^, \fIdash_offset\fP\^, \fIdash_list\fP\^, \fIn\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - GC \fIgc\fP\^; -.br - int \fIdash_offset\fP\^; -.br - char \fIdash_list\fP[]\^; -.br - int \fIn\fP\^; +.HP +int XSetLineAttributes\^(\^Display *\fIdisplay\fP\^, GC \fIgc\fP\^, unsigned +int \fIline_width\fP\^, int \fIline_style\fP\^, int \fIcap_style\fP\^, int +\fIjoin_style\fP\^); +.HP +int XSetDashes\^(\^Display *\fIdisplay\fP\^, GC \fIgc\fP\^, int +\fIdash_offset\fP\^, char \fIdash_list\fP[]\^, int \fIn\fP\^); .SH ARGUMENTS .IP \fIcap_style\fP 1i Specifies the line-style and cap-style you want to set for the specified GC. diff --git a/man/XSetPointerMapping.man b/man/XSetPointerMapping.man index b8308fe..eb2e599 100644 --- a/man/XSetPointerMapping.man +++ b/man/XSetPointerMapping.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSePMap.man,v 1.2 2001/01/27 18:20:04 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XSePMap.man,v 1.3 2003/04/28 22:17:57 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,21 +144,12 @@ .SH NAME XSetPointerMapping, XGetPointerMapping \- manipulate pointer settings .SH SYNTAX -int XSetPointerMapping\^(\^\fIdisplay\fP, \fImap\fP, \fInmap\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - unsigned char \fImap\fP\^[]\^; -.br - int \fInmap\fP\^; -.LP -int XGetPointerMapping\^(\^\fIdisplay\fP, \fImap_return\fP, \fInmap\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - unsigned char \fImap_return\fP\^[]\^; -.br - int \fInmap\fP\^; +.HP +int XSetPointerMapping\^(\^Display *\fIdisplay\fP\^, unsigned char +\fImap\fP\^[]\^, int \fInmap\fP\^); +.HP +int XGetPointerMapping\^(\^Display *\fIdisplay\fP\^, unsigned char +\fImap_return\fP\^[]\^, int \fInmap\fP\^); .SH ARGUMENTS .IP \fIdisplay\fP 1i Specifies the connection to the X server. diff --git a/man/XSetScreenSaver.man b/man/XSetScreenSaver.man index e68a5d9..8633358 100644 --- a/man/XSetScreenSaver.man +++ b/man/XSetScreenSaver.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSeScSav.man,v 1.2 2001/01/27 18:20:04 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XSeScSav.man,v 1.3 2003/04/28 22:17:57 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,41 +144,20 @@ .SH NAME XSetScreenSaver, XForceScreenSaver, XActivateScreenSaver, XResetScreenSaver, XGetScreenSaver \- manipulate the screen saver .SH SYNTAX -XSetScreenSaver\^(\^\fIdisplay\fP, \fItimeout\fP\^, \fIinterval\fP\^, \fIprefer_blanking\fP\^, \fIallow_exposures\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - int \fItimeout\fP\^, \fIinterval\fP\^; -.br - int \fIprefer_blanking\fP\^; -.br - int \fIallow_exposures\fP\^; -.LP -XForceScreenSaver\^(\^\fIdisplay\fP\^, \fImode\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - int \fImode\fP\^; -.LP -XActivateScreenSaver\^(\^\fIdisplay\fP\^) -.br - Display *\fIdisplay\fP\^; -.LP -XResetScreenSaver\^(\^\fIdisplay\fP\^) -.br - Display *\fIdisplay\fP\^; -.LP -XGetScreenSaver\^(\^\fIdisplay\fP, \fItimeout_return\fP\^, \fIinterval_return\fP\^, \fIprefer_blanking_return\fP\^, -.br - \fIallow_exposures_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - int *\fItimeout_return\fP\^, *\fIinterval_return\fP\^; -.br - int *\fIprefer_blanking_return\fP\^; -.br - int *\fIallow_exposures_return\fP\^; +.HP +int XSetScreenSaver\^(\^Display *\fIdisplay\fP\^, int \fItimeout\fP\^, +int \fIinterval\fP\^, int \fIprefer_blanking\fP\^, int +\fIallow_exposures\fP\^); +.HP +int XForceScreenSaver\^(\^Display *\fIdisplay\fP\^, int \fImode\fP\^); +.HP +int XActivateScreenSaver\^(\^Display *\fIdisplay\fP\^); +.HP +int XResetScreenSaver\^(\^Display *\fIdisplay\fP\^); +.HP +int XGetScreenSaver\^(\^Display *\fIdisplay\fP\^, int *\fItimeout_return\fP\^, +int *\fIinterval_return\fP\^, int *\fIprefer_blanking_return\fP\^, int +*\fIallow_exposures_return\fP\^); .SH ARGUMENTS .IP \fIallow_exposures\fP 1i Specifies the screen save control values. diff --git a/man/XSetSelectionOwner.man b/man/XSetSelectionOwner.man index 255b824..16e89e2 100644 --- a/man/XSetSelectionOwner.man +++ b/man/XSetSelectionOwner.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSeSelOwn.man,v 1.2 2001/01/27 18:20:04 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XSeSelOwn.man,v 1.3 2003/04/28 22:17:57 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,33 +144,16 @@ .SH NAME XSetSelectionOwner, XGetSelectionOwner, XConvertSelection \- manipulate window selection .SH SYNTAX -XSetSelectionOwner\^(\^\fIdisplay\fP, \fIselection\fP\^, \fIowner\fP\^, \fItime\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Atom \fIselection\fP\^; -.br - Window \fIowner\fP\^; -.br - Time \fItime\fP\^; -.LP -Window XGetSelectionOwner\^(\^\fIdisplay\fP, \fIselection\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Atom \fIselection\fP\^; -.LP -XConvertSelection\^(\^\fIdisplay\fP, \fIselection\fP\^, \fItarget\fP\^, \fIproperty\fP\^, \fIrequestor\fP\^, \fItime\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Atom \fIselection\fP\^, \fItarget\fP\^; -.br - Atom \fIproperty\fP\^; -.br - Window \fIrequestor\fP\^; -.br - Time \fItime\fP\^; +.HP +int XSetSelectionOwner\^(\^Display *\fIdisplay\fP\^, Atom \fIselection\fP\^, +Window \fIowner\fP\^, Time \fItime\fP\^); +.HP +Window XGetSelectionOwner\^(\^Display *\fIdisplay\fP\^, Atom +\fIselection\fP\^); +.HP +int XConvertSelection\^(\^Display *\fIdisplay\fP\^, Atom \fIselection\fP\^, +Atom \fItarget\fP\^, Atom \fIproperty\fP\^, Window \fIrequestor\fP\^, Time +\fItime\fP\^); .SH ARGUMENTS .IP \fIdisplay\fP 1i Specifies the connection to the X server. diff --git a/man/XSetState.man b/man/XSetState.man index b8dd4d2..b5a992a 100644 --- a/man/XSetState.man +++ b/man/XSetState.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSeState.man,v 1.3 2001/12/17 03:04:40 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XSeState.man,v 1.4 2003/04/28 22:17:57 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,49 +144,22 @@ .SH NAME XSetState, XSetFunction, XSetPlaneMask, XSetForeground, XSetBackground \- GC convenience routines .SH SYNTAX -XSetState\^(\^\fIdisplay\fP, \fIgc\fP\^, \fIforeground\fP\^, \fIbackground\fP\^, \fIfunction\fP\^, \fIplane_mask\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - GC \fIgc\fP\^; -.br - unsigned long \fIforeground\fP\^, \fIbackground\fP\^; -.br - int \fIfunction\fP\^; -.br - unsigned long \fIplane_mask\fP\^; -.LP -XSetFunction\^(\^\fIdisplay\fP, \fIgc\fP\^, \fIfunction\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - GC \fIgc\fP\^; -.br - int \fIfunction\fP\^; -.LP -XSetPlaneMask\^(\^\fIdisplay\fP, \fIgc\fP\^, \fIplane_mask\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - GC \fIgc\fP\^; -.br - unsigned long \fIplane_mask\fP\^; -.LP -XSetForeground\^(\^\fIdisplay\fP, \fIgc\fP\^, \fIforeground\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - GC \fIgc\fP\^; -.br - unsigned long \fIforeground\fP\^; -.LP -XSetBackground\^(\^\fIdisplay\fP, \fIgc\fP\^, \fIbackground\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - GC \fIgc\fP\^; -.br - unsigned long \fIbackground\fP\^; +.HP +int XSetState\^(\^Display *\fIdisplay\fP\^, GC \fIgc\fP\^, unsigned long +\fIforeground\fP\^, unsigned int \fIbackground\fP\^, int \fIfunction\fP\^, +unsigned long \fIplane_mask\fP\^); +.HP +int XSetFunction\^(\^Display *\fIdisplay\fP\^, GC \fIgc\fP\^, int +\fIfunction\fP\^); +.HP +int XSetPlaneMask\^(\^Display *\fIdisplay\fP\^, GC \fIgc\fP\^, unsigned long +\fIplane_mask\fP\^); +.HP +int XSetForeground\^(\^Display *\fIdisplay\fP\^, GC \fIgc\fP\^, unsigned long +\fIforeground\fP\^); +.HP +int XSetBackground\^(\^Display *\fIdisplay\fP\^, GC \fIgc\fP\^, unsigned long +\fIbackground\fP\^); .SH ARGUMENTS .IP \fIbackground\fP 1i Specifies the background you want to set for the specified GC. diff --git a/man/XSetTextProperty.man b/man/XSetTextProperty.man index 924b047..409b54f 100644 --- a/man/XSetTextProperty.man +++ b/man/XSetTextProperty.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSeTProp.man,v 1.3 2001/02/09 03:47:46 tsi Exp $ +.\" $XFree86: xc/doc/man/X11/XSeTProp.man,v 1.4 2003/04/28 22:17:57 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,27 +144,12 @@ .SH NAME XSetTextProperty, XGetTextProperty \- set and read text properties .SH SYNTAX -void XSetTextProperty\^(\^\fIdisplay\fP, \fIw\fP, \fItext_prop\fP, -\fIproperty\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - XTextProperty *\fItext_prop\fP\^; -.br - Atom \fIproperty\fP\^; -.LP -Status XGetTextProperty\^(\^\fIdisplay\fP, \fIw\fP, \fItext_prop_return\fP, -\fIproperty\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - XTextProperty *\fItext_prop_return\fP\^; -.br - Atom \fIproperty\fP\^; +.HP +void XSetTextProperty\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, +XTextProperty *\fItext_prop\fP\^, Atom \fIproperty\fP\^); +.HP +Status XGetTextProperty\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, +XTextProperty *\fItext_prop_return\fP\^, Atom \fIproperty\fP\^); .SH ARGUMENTS .IP \fIdisplay\fP 1i Specifies the connection to the X server. diff --git a/man/XSetTile.man b/man/XSetTile.man index f1d413f..63446a7 100644 --- a/man/XSetTile.man +++ b/man/XSetTile.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSeTile.man,v 1.2 2001/01/27 18:20:05 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XSeTile.man,v 1.3 2003/04/28 22:17:57 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,29 +144,15 @@ .SH NAME XSetTile, XSetStipple, XSetTSOrigin \- GC convenience routines .SH SYNTAX -XSetTile\^(\^\fIdisplay\fP, \fIgc\fP\^, \fItile\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - GC \fIgc\fP\^; -.br - Pixmap \fItile\fP\^; -.LP -XSetStipple\^(\^\fIdisplay\fP, \fIgc\fP\^, \fIstipple\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - GC \fIgc\fP\^; -.br - Pixmap \fIstipple\fP\^; -.LP -XSetTSOrigin\^(\^\fIdisplay\fP, \fIgc\fP\^, \fIts_x_origin\fP\^, \fIts_y_origin\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - GC \fIgc\fP\^; -.br - int \fIts_x_origin\fP\^, \fIts_y_origin\fP\^; +.HP +int XSetTile\^(\^Display *\fIdisplay\fP\^, GC \fIgc\fP\^, Pixmap +\fItile\fP\^); +.HP +int XSetStipple\^(\^Display *\fIdisplay\fP\^, GC \fIgc\fP\^, Pixmap +\fIstipple\fP\^); +.HP +int XSetTSOrigin\^(\^Display *\fIdisplay\fP\^, GC \fIgc\fP\^, int +\fIts_x_origin\fP\^, int \fIts_y_origin\fP\^); .SH ARGUMENTS .IP \fIdisplay\fP 1i Specifies the connection to the X server. diff --git a/man/XSetTransientForHint.man b/man/XSetTransientForHint.man index 83eff92..a937d80 100644 --- a/man/XSetTransientForHint.man +++ b/man/XSetTransientForHint.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSeTFHint.man,v 1.2 2001/01/27 18:20:05 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XSeTFHint.man,v 1.3 2003/04/28 22:17:57 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,21 +144,12 @@ .SH NAME XSetTransientForHint, XGetTransientForHint \- set or read a window's WM_TRANSIENT_FOR property .SH SYNTAX -XSetTransientForHint\^(\^\fIdisplay\fP, \fIw\fP, \fIprop_window\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - Window \fIprop_window\fP\^; -.LP -Status XGetTransientForHint\^(\^\fIdisplay\fP, \fIw\fP, \fIprop_window_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - Window *\fIprop_window_return\fP\^; +.HP +int XSetTransientForHint\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, +Window \fIprop_window\fP\^); +.HP +Status XGetTransientForHint\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, +Window *\fIprop_window_return\fP\^); .SH ARGUMENTS .IP \fIdisplay\fP 1i Specifies the connection to the X server. diff --git a/man/XSetWMClientMachine.man b/man/XSetWMClientMachine.man index 7556318..b9d9673 100644 --- a/man/XSetWMClientMachine.man +++ b/man/XSetWMClientMachine.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSeWMCMac.man,v 1.2 2001/01/27 18:20:05 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XSeWMCMac.man,v 1.3 2003/04/28 22:17:57 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,21 +144,12 @@ .SH NAME XSetWMClientMachine, XGetWMClientMachine \- set or read a window's WM_CLIENT_MACHINE property .SH SYNTAX -void XSetWMClientMachine\^(\^\fIdisplay\fP, \fIw\fP, \fItext_prop\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - XTextProperty *\fItext_prop\fP\^; -.LP -Status XGetWMClientMachine\^(\^\fIdisplay\fP, \fIw\fP, \fItext_prop_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - XTextProperty *\fItext_prop_return\fP\^; +.HP +void XSetWMClientMachine\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, +XTextProperty *\fItext_prop\fP\^); +.HP +Status XGetWMClientMachine\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, +XTextProperty *\fItext_prop_return\fP\^); .SH ARGUMENTS .IP \fIdisplay\fP 1i Specifies the connection to the X server. diff --git a/man/XSetWMColormapWindows.man b/man/XSetWMColormapWindows.man index 0386b05..a392ed7 100644 --- a/man/XSetWMColormapWindows.man +++ b/man/XSetWMColormapWindows.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSeWMCWin.man,v 1.3 2001/02/09 03:47:46 tsi Exp $ +.\" $XFree86: xc/doc/man/X11/XSeWMCWin.man,v 1.4 2003/04/28 22:17:57 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,27 +144,12 @@ .SH NAME XSetWMColormapWindows, XGetWMColormapWindows \- set or read a window's WM_COLORMAP_WINDOWS property .SH SYNTAX -Status XSetWMColormapWindows\^(\^\fIdisplay\fP, \fIw\fP, -\fIcolormap_windows\fP, \fIcount\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - Window *\fIcolormap_windows\fP\^; -.br - int \fIcount\fP\^; -.LP -Status XGetWMColormapWindows\^(\^\fIdisplay\fP, \fIw\fP, -\fIcolormap_windows_return\fP, \fIcount_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - Window **\fIcolormap_windows_return\fP\^; -.br - int *\fIcount_return\fP\^; +.HP +Status XSetWMColormapWindows\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, +Window *\fIcolormap_windows\fP\^, int \fIcount\fP\^); +.HP +Status XGetWMColormapWindows\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, +Window **\fIcolormap_windows_return\fP\^, int *\fIcount_return\fP\^); .SH ARGUMENTS .IP \fIdisplay\fP 1i Specifies the connection to the X server. diff --git a/man/XSetWMIconName.man b/man/XSetWMIconName.man index e91dc0b..24ba870 100644 --- a/man/XSetWMIconName.man +++ b/man/XSetWMIconName.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSeWMINam.man,v 1.2 2001/01/27 18:20:05 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XSeWMINam.man,v 1.3 2003/04/28 22:17:57 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,37 +144,18 @@ .SH NAME XSetWMIconName, XGetWMIconName, XSetIconName, XGetIconName \- set or read a window's WM_ICON_NAME property .SH SYNTAX -void XSetWMIconName\^(\^\fIdisplay\fP, \fIw\fP, \fItext_prop\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - XTextProperty *\fItext_prop\fP\^; -.LP -Status XGetWMIconName\^(\^\fIdisplay\fP, \fIw\fP, \fItext_prop_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - XTextProperty *\fItext_prop_return\fP\^; -.LP -XSetIconName\^(\^\fIdisplay\fP, \fIw\fP\^, \fIicon_name\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - char *\fIicon_name\fP\^; -.LP -Status XGetIconName\^(\^\fIdisplay\fP, \fIw\fP\^, \fIicon_name_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - char **\fIicon_name_return\fP\^; +.HP +void XSetWMIconName\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, +XTextProperty *\fItext_prop\fP\^); +.HP +Status XGetWMIconName\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, +XTextProperty *\fItext_prop_return\fP\^); +.HP +int XSetIconName\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, char +*\fIicon_name\fP\^); +.HP +Status XGetIconName\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, char +**\fIicon_name_return\fP\^); .SH ARGUMENTS .IP \fIdisplay\fP 1i Specifies the connection to the X server. diff --git a/man/XSetWMName.man b/man/XSetWMName.man index 1d81344..0192d73 100644 --- a/man/XSetWMName.man +++ b/man/XSetWMName.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSeWMName.man,v 1.2 2001/01/27 18:20:05 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XSeWMName.man,v 1.3 2003/04/28 22:17:57 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,37 +144,18 @@ .SH NAME XSetWMName, XGetWMName, XStoreName, XFetchName \- set or read a window's WM_NAME property .SH SYNTAX -void XSetWMName\^(\^\fIdisplay\fP, \fIw\fP, \fItext_prop\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - XTextProperty *\fItext_prop\fP\^; -.LP -Status XGetWMName\^(\^\fIdisplay\fP, \fIw\fP, \fItext_prop_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - XTextProperty *\fItext_prop_return\fP\^; -.LP -XStoreName\^(\^\fIdisplay\fP, \fIw\fP\^, \fIwindow_name\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - char *\fIwindow_name\fP\^; -.LP -Status XFetchName\^(\^\fIdisplay\fP, \fIw\fP\^, \fIwindow_name_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - char **\fIwindow_name_return\fP\^; +.HP +void XSetWMName\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, XTextProperty +*\fItext_prop\fP\^); +.HP +Status XGetWMName\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, +XTextProperty *\fItext_prop_return\fP\^); +.HP +int XStoreName\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, char +*\fIwindow_name\fP\^); +.HP +Status XFetchName\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, char +**\fIwindow_name_return\fP\^); .SH ARGUMENTS .IP \fIdisplay\fP 1i Specifies the connection to the X server. diff --git a/man/XSetWMProperties.man b/man/XSetWMProperties.man index 1e18da7..743586e 100644 --- a/man/XSetWMProperties.man +++ b/man/XSetWMProperties.man @@ -41,7 +41,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSeWMProp.man,v 1.4 2001/02/09 03:47:46 tsi Exp $ +.\" $XFree86: xc/doc/man/X11/XSeWMProp.man,v 1.5 2003/04/28 22:17:57 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -145,71 +145,21 @@ .SH NAME XSetWMProperties, XmbSetWMProperties, Xutf8SetWMProperties \- set standard window properties .SH SYNTAX -void XSetWMProperties\^(\^\fIdisplay\fP, \fIw\fP, \fIwindow_name\fP, -\fIicon_name\fP, \fIargv\fP, \fIargc\fP, \fInormal_hints\fP, \fIwm_hints\fP, -\fIclass_hints\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - XTextProperty *\fIwindow_name\fP\^; -.br - XTextProperty *\fIicon_name\fP\^; -.br - char **\fIargv\fP\^; -.br - int \fIargc\fP\^; -.br - XSizeHints *\fInormal_hints\fP\^; -.br - XWMHints *\fIwm_hints\fP\^; -.br - XClassHint *\fIclass_hints\fP\^; -.LP -void XmbSetWMProperties\^(\^\fIdisplay\fP\^, \fIw\fP\^, \fIwindow_name\fP\^, \fIicon_name\fP\^, \fIargv\fP\^, \fIargc\fP\^, -.br - \fInormal_hints\fP\^, \fIwm_hints\fP\^, \fIclass_hints\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - char *\fIwindow_name\fP\^; -.br - char *\fIicon_name\fP\^; -.br - char *\fIargv\fP\^[]; -.br - int \fIargc\fP\^; -.br - XSizeHints *\fInormal_hints\fP\^; -.br - XWMHints *\fIwm_hints\fP\^; -.br - XClassHint *\fIclass_hints\fP\^; -.LP -void Xutf8SetWMProperties\^(\^\fIdisplay\fP\^, \fIw\fP\^, \fIwindow_name\fP\^, \fIicon_name\fP\^, \fIargv\fP\^, \fIargc\fP\^, -.br - \fInormal_hints\fP\^, \fIwm_hints\fP\^, \fIclass_hints\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - char *\fIwindow_name\fP\^; -.br - char *\fIicon_name\fP\^; -.br - char *\fIargv\fP\^[]; -.br - int \fIargc\fP\^; -.br - XSizeHints *\fInormal_hints\fP\^; -.br - XWMHints *\fIwm_hints\fP\^; -.br - XClassHint *\fIclass_hints\fP\^; +.HP +void XSetWMProperties\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, +XTextProperty *\fIwindow_name\fP\^, XTextProperty *\fIicon_name\fP\^, char +**\fIargv\fP\^, int \fIargc\fP\^, XSizeHints *\fInormal_hints\fP\^, XWMHints +*\fIwm_hints\fP\^, XClassHint *\fIclass_hints\fP\^); +.HP +void XmbSetWMProperties\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, char +*\fIwindow_name\fP\^, char *\fIicon_name\fP\^, char *\fIargv\fP\^[], int +\fIargc\fP\^, XSizeHints *\fInormal_hints\fP\^, XWMHints *\fIwm_hints\fP\^, +XClassHint *\fIclass_hints\fP\^); +.HP +void Xutf8SetWMProperties\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, char +*\fIwindow_name\fP\^, char *\fIicon_name\fP\^, char *\fIargv\fP\^[], int +\fIargc\fP\^, XSizeHints *\fInormal_hints\fP\^, XWMHints *\fIwm_hints\fP\^, +XClassHint *\fIclass_hints\fP\^); .SH ARGUMENTS .IP \fIargc\fP 1i Specifies the number of arguments. diff --git a/man/XSetWMProtocols.man b/man/XSetWMProtocols.man index f04661c..7d2a2c0 100644 --- a/man/XSetWMProtocols.man +++ b/man/XSetWMProtocols.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSeWMProt.man,v 1.3 2001/02/09 03:47:46 tsi Exp $ +.\" $XFree86: xc/doc/man/X11/XSeWMProt.man,v 1.5 2003/07/16 00:38:42 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -142,29 +142,14 @@ .ny0 .TH XSetWMProtocols 3X11 __xorgversion__ "XLIB FUNCTIONS" .SH NAME -XSetWMProtocols, XGetWMProtocols \- set or read a window's WM__PROTOCOLS property +XSetWMProtocols, XGetWMProtocols \- set or read a window's WM_PROTOCOLS property .SH SYNTAX -Status XSetWMProtocols\^(\^\fIdisplay\fP, \fIw\fP, \fIprotocols\fP, -\fIcount\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - Atom *\fIprotocols\fP\^; -.br - int \fIcount\fP\^; -.LP -Status XGetWMProtocols\^(\^\fIdisplay\fP, \fIw\fP, \fIprotocols_return\fP, -\fIcount_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.br - Atom **\fIprotocols_return\fP\^; -.br - int *\fIcount_return\fP\^; +.HP +Status XSetWMProtocols\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, Atom +*\fIprotocols\fP\^, int \fIcount\fP\^); +.HP +Status XGetWMProtocols\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, Atom +**\fIprotocols_return\fP\^, int *\fIcount_return\fP\^); .SH ARGUMENTS .IP \fIdisplay\fP 1i Specifies the connection to the X server. diff --git a/man/XStoreBytes.man b/man/XStoreBytes.man index f1880bf..9507f0b 100644 --- a/man/XStoreBytes.man +++ b/man/XStoreBytes.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XStBytes.man,v 1.3 2001/02/09 03:47:46 tsi Exp $ +.\" $XFree86: xc/doc/man/X11/XStBytes.man,v 1.4 2003/04/28 22:17:57 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,44 +144,19 @@ .SH NAME XStoreBytes, XStoreBuffer, XFetchBytes, XFetchBuffer, XRotateBuffers \- manipulate cut and paste buffers .SH SYNTAX -XStoreBytes\^(\^\fIdisplay\fP, \fIbytes\fP\^, \fInbytes\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - char *\fIbytes\fP\^; -.br - int \^\fInbytes\fP\^; -.br -.LP -XStoreBuffer\^(\^\fIdisplay\fP, \fIbytes\fP\^, \fInbytes\fP\^, \fIbuffer\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - char *\fIbytes\fP\^; -.br - int \^\fInbytes\fP\^; -.br - int \fIbuffer\fP\^; -.LP -char *XFetchBytes\^(\^\fIdisplay\fP, \fInbytes_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - int *\fInbytes_return\fP\^; -.LP -char *XFetchBuffer\^(\^\fIdisplay\fP, \fInbytes_return\fP\^, \fIbuffer\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - int *\fInbytes_return\fP\^; -.br - int \fIbuffer\fP\^; -.LP -XRotateBuffers\^(\^\fIdisplay\fP, \fIrotate\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - int \fIrotate\fP\^; +.HP +int XStoreBytes\^(\^Display *\fIdisplay\fP\^, char *\fIbytes\fP\^, int +\^\fInbytes\fP\^); +.HP +int XStoreBuffer\^(\^Display *\fIdisplay\fP\^, char *\fIbytes\fP\^, int +\^\fInbytes\fP\^, int \fIbuffer\fP\^); +.HP +char *XFetchBytes\^(\^Display *\fIdisplay\fP\^, int *\fInbytes_return\fP\^); +.HP +char *XFetchBuffer\^(\^Display *\fIdisplay\fP\^, int *\fInbytes_return\fP\^, +int \fIbuffer\fP\^); +.HP +int XRotateBuffers\^(\^Display *\fIdisplay\fP\^, int \fIrotate\fP\^); .SH ARGUMENTS .ds Fn in which you want to store the bytes or from which you want the stored data returned diff --git a/man/XStoreColors.man b/man/XStoreColors.man index c98f051..a40fe65 100644 --- a/man/XStoreColors.man +++ b/man/XStoreColors.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XStColors.man,v 1.2 2001/01/27 18:20:05 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XStColors.man,v 1.3 2003/04/28 22:17:57 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,35 +144,15 @@ .SH NAME XStoreColors, XStoreColor, XStoreNamedColor \- set colors .SH SYNTAX -XStoreColors\^(\^\fIdisplay\fP, \fIcolormap\fP\^, \fIcolor\fP\^, \fIncolors\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Colormap \fIcolormap\fP\^; -.br - XColor \fIcolor\fP\^[\^]\^; -.br - int \fIncolors\fP\^; -.LP -XStoreColor\^(\^\fIdisplay\fP, \fIcolormap\fP\^, \fIcolor\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Colormap \fIcolormap\fP\^; -.br - XColor *\fIcolor\fP\^; -.LP -XStoreNamedColor\^(\^\fIdisplay\fP, \fIcolormap\fP\^, \fIcolor\fP\^, \fIpixel\fP\^, \fIflags\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Colormap \fIcolormap\fP\^; -.br - char *\^\fIcolor\fP\^; -.br - unsigned long \fIpixel\fP\^; -.br - int \fIflags\fP\^; +.HP +int XStoreColors\^(\^Display *\fIdisplay\fP\^, Colormap \fIcolormap\fP\^, +XColor \fIcolor\fP\^[\^]\^, int \fIncolors\fP\^); +.HP +int XStoreColor\^(\^Display *\fIdisplay\fP\^, Colormap \fIcolormap\fP\^, +XColor *\fIcolor\fP\^); +.HP +int XStoreNamedColor\^(\^Display *\fIdisplay\fP\^, Colormap \fIcolormap\fP\^, +char *\^\fIcolor\fP\^, unsigned long \fIpixel\fP\^, int \fIflags\fP\^); .SH ARGUMENTS .ds Co pixel and RGB values or the color name string (for example, red) .IP \fIcolor\fP 1i diff --git a/man/XStringListToTextProperty.man b/man/XStringListToTextProperty.man index 880bd65..185fa8d 100644 --- a/man/XStringListToTextProperty.man +++ b/man/XStringListToTextProperty.man @@ -41,7 +41,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSLTTProp.man,v 1.4 2001/02/09 03:47:46 tsi Exp $ +.\" $XFree86: xc/doc/man/X11/XSLTTProp.man,v 1.5 2003/04/28 22:17:56 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -145,27 +145,14 @@ .SH NAME XStringListToTextProperty, XTextPropertyToStringList, XFreeStringList, XTextProperty \- convert string lists and text property structure .SH SYNTAX -Status XStringListToTextProperty\^(\^\fIlist\fP, \fIcount\fP, -\fItext_prop_return\fP\^) -.br - char **\fIlist\fP\^; -.br - int \fIcount\fP\^; -.br - XTextProperty *\fItext_prop_return\fP\^; -.LP -Status XTextPropertyToStringList\^(\^\fItext_prop\fP, \fIlist_return\fP, -\fIcount_return\fP\^) -.br - XTextProperty *\fItext_prop\fP\^; -.br - char ***\fIlist_return\fP\^; -.br - int *\fIcount_return\fP\^; -.LP -void XFreeStringList\^(\^\fIlist\fP\^) -.br - char **\fIlist\fP\^; +.HP +Status XStringListToTextProperty\^(\^char **\fIlist\fP\^, int \fIcount\fP\^, +XTextProperty *\fItext_prop_return\fP\^); +.HP +Status XTextPropertyToStringList\^(\^XTextProperty *\fItext_prop\fP\^, char +***\fIlist_return\fP\^, int *\fIcount_return\fP\^); +.HP +void XFreeStringList\^(\^char **\fIlist\fP\^); .SH ARGUMENTS .ds Cn strings .IP \fIcount\fP 1i diff --git a/man/XStringToKeysym.man b/man/XStringToKeysym.man index ce51290..78a18dd 100644 --- a/man/XStringToKeysym.man +++ b/man/XStringToKeysym.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XStTKsym.man,v 1.2 2001/01/27 18:20:05 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XStTKsym.man,v 1.3 2003/04/28 22:17:57 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,35 +144,18 @@ .SH NAME XStringToKeysym, XKeysymToString, XKeycodeToKeysym, XKeysymToKeycode, XConvertCase \- convert keysyms .SH SYNTAX -KeySym XStringToKeysym\^(\^\fIstring\fP\^) -.br - char *\fIstring\fP\^; -.LP -char *XKeysymToString\^(\^\fIkeysym\fP\^) -.br - KeySym \fIkeysym\fP\^; -.LP -KeySym XKeycodeToKeysym\^(\^\fIdisplay\fP, \fIkeycode\fP, \fIindex\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - KeyCode \fIkeycode\fP\^; -.br - int \fIindex\fP\^; -.LP -KeyCode XKeysymToKeycode\^(\^\fIdisplay\fP, \fIkeysym\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - KeySym \fIkeysym\fP\^; -.LP -void XConvertCase(\^\fIkeysym\fP, \fIlower_return\fP, \fIupper_return\fP\^) -.br - KeySym \fIkeysym\fP\^; -.br - KeySym *\fIlower_return\fP\^; -.br - KeySym *\fIupper_return\fP\^; +.HP +KeySym XStringToKeysym\^(\^char *\fIstring\fP\^); +.HP +char *XKeysymToString\^(\^KeySym \fIkeysym\fP\^); +.HP +KeySym XKeycodeToKeysym\^(\^Display *\fIdisplay\fP\^, KeyCode \fIkeycode\fP\^, +int \fIindex\fP\^); +.HP +KeyCode XKeysymToKeycode\^(\^Display *\fIdisplay\fP\^, KeySym \fIkeysym\fP\^); +.HP +void XConvertCase(\^KeySym \fIkeysym\fP\^, KeySym *\fIlower_return\fP\^, +KeySym *\fIupper_return\fP\^); .SH ARGUMENTS .IP \fIdisplay\fP 1i Specifies the connection to the X server. diff --git a/man/XSupportsLocale.man b/man/XSupportsLocale.man index 8fdfcfa..1fead30 100644 --- a/man/XSupportsLocale.man +++ b/man/XSupportsLocale.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSupLoc.man,v 1.2 2001/01/27 18:20:05 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XSupLoc.man,v 1.3 2003/04/28 22:17:57 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,11 +144,10 @@ .SH NAME XSupportsLocale, XSetLocaleModifiers \- determine locale support and configure locale modifiers .SH SYNTAX -Bool XSupportsLocale\^(\|) -.LP -char *XSetLocaleModifiers\^(\^\fImodifier_list\fP\^) -.br - char *\fImodifier_list\fP\^; +.HP +Bool XSupportsLocale\^(void); +.HP +char *XSetLocaleModifiers\^(\^char *\fImodifier_list\fP\^); .SH ARGUMENTS .IP \fImodifier_list\fP 1i Specifies the modifiers. diff --git a/man/XSynchronize.man b/man/XSynchronize.man index cca18fd..8e0a4f4 100644 --- a/man/XSynchronize.man +++ b/man/XSynchronize.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSync.man,v 1.2 2001/01/27 18:20:05 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XSync.man,v 1.3 2003/04/28 22:17:57 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,17 +144,11 @@ .SH NAME XSynchronize, XSetAfterFunction \- enable or disable synchronization .SH SYNTAX -int (*XSynchronize\^(\^\fIdisplay\fP, \fIonoff\fP\^)\^)() -.br - Display *\fIdisplay\fP\^; -.br - Bool \fIonoff\fP\^; -.LP -int (*XSetAfterFunction\^(\^\fIdisplay\fP, \fIprocedure\fP\^))() -.br - Display *\fIdisplay\fP\^; -.br - int (\^*\^\fIprocedure\fP\^)\^(); +.HP +int (*XSynchronize\^(\^Display *\fIdisplay\fP\^, Bool \fIonoff\fP\^))(); +.HP +int (*XSetAfterFunction\^(\^Display *\fIdisplay\fP\^, int +(\^*\^\fIprocedure\fP\^)\^()))(); .SH ARGUMENTS .IP \fIdisplay\fP 1i Specifies the connection to the X server. diff --git a/man/XTextExtents.man b/man/XTextExtents.man index 15f3096..9355219 100644 --- a/man/XTextExtents.man +++ b/man/XTextExtents.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XTextExt.man,v 1.3 2001/02/09 03:47:47 tsi Exp $ +.\" $XFree86: xc/doc/man/X11/XTextExt.man,v 1.4 2003/04/28 22:17:57 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,79 +144,26 @@ .SH NAME XTextExtents, XTextExtents16, XQueryTextExtents, XQueryTextExtents16 \- compute or query text extents .SH SYNTAX -XTextExtents\^(\^\fIfont_struct\fP\^, \fIstring\fP\^, \fInchars\fP\^, -\fIdirection_return\fP, \fIfont_ascent_return\fP, -.br - \fIfont_descent_return\fP, \fIoverall_return\fP\^) -.br - XFontStruct *\fIfont_struct\fP\^; -.br - char *\fIstring\fP\^; -.br - int \fInchars\fP\^; -.br - int *\fIdirection_return\fP\^; -.br - int *\fIfont_ascent_return\fP, *\fIfont_descent_return\fP\^; -.br - XCharStruct *\fIoverall_return\fP\^; - -.LP -XTextExtents16\^(\^\fIfont_struct\fP\^, \fIstring\fP\^, \fInchars\fP\^, -\fIdirection_return\fP, \fIfont_ascent_return\fP, -.br - \fIfont_descent_return\fP, \fIoverall_return\fP\^) -.br - XFontStruct *\fIfont_struct\fP\^; -.br - XChar2b *\fIstring\fP\^; -.br - int \fInchars\fP\^; -.br - int *\fIdirection_return\fP\^; -.br - int *\fIfont_ascent_return\fP, *\fIfont_descent_return\fP\^; -.br - XCharStruct *\fIoverall_return\fP\^; - -.LP -XQueryTextExtents\^(\^\fIdisplay\fP, \fIfont_ID\fP, \fIstring\fP, -\fInchars\fP, \fIdirection_return\fP, \fIfont_ascent_return\fP, -.br - \fIfont_descent_return\fP, \fIoverall_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - XID \fIfont_ID\fP\^; -.br - char *\fIstring\fP\^; -.br - int \fInchars\fP\^; -.br - int *\fIdirection_return\fP\^; -.br - int *\fIfont_ascent_return\fP, *\fIfont_descent_return\fP\^; -.br - XCharStruct *\fIoverall_return\fP\^; -.LP -XQueryTextExtents16\^(\^\fIdisplay\fP, \fIfont_ID\fP, \fIstring\fP, -\fInchars\fP, \fIdirection_return\fP, \fIfont_ascent_return\fP, -.br - \fIfont_descent_return\fP, \fIoverall_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - XID \fIfont_ID\fP\^; -.br - XChar2b *\fIstring\fP\^; -.br - int \fInchars\fP\^; -.br - int *\fIdirection_return\fP\^; -.br - int *\fIfont_ascent_return\fP, *\fIfont_descent_return\fP\^; -.br - XCharStruct *\fIoverall_return\fP\^; +.HP +int XTextExtents\^(\^XFontStruct *\fIfont_struct\fP\^, char *\fIstring\fP\^, +int \fInchars\fP\^, int *\fIdirection_return\fP\^, int +*\fIfont_ascent_return\fP, int *\fIfont_descent_return\fP\^, XCharStruct +*\fIoverall_return\fP\^); +.HP +int XTextExtents16\^(\^XFontStruct *\fIfont_struct\fP\^, XChar2b +*\fIstring\fP\^, int \fInchars\fP\^, int *\fIdirection_return\fP\^, int +*\fIfont_ascent_return\fP, int *\fIfont_descent_return\fP\^, XCharStruct +*\fIoverall_return\fP\^); +.HP +int XQueryTextExtents\^(\^Display *\fIdisplay\fP\^, XID \fIfont_ID\fP\^, char +*\fIstring\fP\^, int \fInchars\fP\^, int *\fIdirection_return\fP\^, int +*\fIfont_ascent_return\fP, int *\fIfont_descent_return\fP\^, XCharStruct +*\fIoverall_return\fP\^); +.HP +int XQueryTextExtents16\^(\^Display *\fIdisplay\fP\^, XID \fIfont_ID\fP\^, +XChar2b *\fIstring\fP\^, int \fInchars\fP\^, int *\fIdirection_return\fP\^, +int *\fIfont_ascent_return\fP, int *\fIfont_descent_return\fP\^, XCharStruct +*\fIoverall_return\fP\^); .SH ARGUMENTS .IP \fIdirection_return\fP 1i Returns the value of the direction hint diff --git a/man/XTextWidth.man b/man/XTextWidth.man index 0716707..33a0f6c 100644 --- a/man/XTextWidth.man +++ b/man/XTextWidth.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XTextWid.man,v 1.2 2001/01/27 18:20:06 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XTextWid.man,v 1.3 2003/04/28 22:17:57 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,21 +144,12 @@ .SH NAME XTextWidth, XTextWidth16 \- compute text width .SH SYNTAX -int XTextWidth\^(\^\fIfont_struct\fP\^, \fIstring\fP, \fIcount\fP\^) -.br - XFontStruct *\fIfont_struct\fP\^; -.br - char *\fIstring\fP\^; -.br - int \fIcount\fP\^; -.LP -int XTextWidth16\^(\^\fIfont_struct\fP\^, \fIstring\fP, \fIcount\fP\^) -.br - XFontStruct *\fIfont_struct\fP\^; -.br - XChar2b *\fIstring\fP\^; -.br - int \fIcount\fP\^; +.HP +int XTextWidth\^(\^XFontStruct *\fIfont_struct\fP\^, char *\fIstring\fP\^, +int \fIcount\fP\^); +.HP +int XTextWidth16\^(\^XFontStruct *\fIfont_struct\fP\^, XChar2b +*\fIstring\fP\^, int \fIcount\fP\^); .SH ARGUMENTS .IP \fIcount\fP 1i Specifies the character count in the specified string. diff --git a/man/XTranslateCoordinates.man b/man/XTranslateCoordinates.man index a6cd6d9..3ff8bb9 100644 --- a/man/XTranslateCoordinates.man +++ b/man/XTranslateCoordinates.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XTranWCo.man,v 1.2 2001/01/27 18:20:06 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XTranWCo.man,v 1.3 2003/04/28 22:17:57 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,19 +144,11 @@ .SH NAME XTranslateCoordinates \- translate window coordinates .SH SYNTAX -Bool XTranslateCoordinates\^(\^\fIdisplay\fP, \fIsrc_w\fP\^, \fIdest_w\fP\^, \fIsrc_x\fP\^, \fIsrc_y\fP\^, \fIdest_x_return\fP\^, -.br - \fIdest_y_return\fP\^, \fIchild_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIsrc_w\fP\^, \fIdest_w\fP\^; -.br - int \fIsrc_x\fP\^, \fIsrc_y\fP\^; -.br - int *\fIdest_x_return\fP\^, *\fIdest_y_return\fP\^; -.br - Window *\fIchild_return\fP\^; +.HP +Bool XTranslateCoordinates\^(\^Display *\fIdisplay\fP\^, Window \fIsrc_w\fP\^, +\fIdest_w\fP\^, int \fIsrc_x\fP\^, int \fIsrc_y\fP\^, int +*\fIdest_x_return\fP\^, int *\fIdest_y_return\fP\^, Window +*\fIchild_return\fP\^); .SH ARGUMENTS .IP \fIchild_return\fP 1i Returns the child if the coordinates are contained in a mapped child of the diff --git a/man/XUnmapWindow.man b/man/XUnmapWindow.man index 33d58e0..6ce9fc2 100644 --- a/man/XUnmapWindow.man +++ b/man/XUnmapWindow.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XUnmapWin.man,v 1.2 2001/01/27 18:20:06 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XUnmapWin.man,v 1.3 2003/04/28 22:17:57 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,17 +144,10 @@ .SH NAME XUnmapWindow, XUnmapSubwindows \- unmap windows .SH SYNTAX -XUnmapWindow\^(\^\fIdisplay\fP, \fIw\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; -.LP -XUnmapSubwindows\^(\^\fIdisplay\fP, \fIw\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIw\fP\^; +.HP +int XUnmapWindow\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^); +.HP +int XUnmapSubwindows\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^); .SH ARGUMENTS .IP \fIdisplay\fP 1i Specifies the connection to the X server. diff --git a/man/XVaCreateNestedList.man b/man/XVaCreateNestedList.man index c979a29..10dc96e 100644 --- a/man/XVaCreateNestedList.man +++ b/man/XVaCreateNestedList.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XVCNList.man,v 1.2 2001/01/27 18:20:06 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XVCNList.man,v 1.3 2003/04/28 22:17:57 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -145,10 +145,8 @@ XVaCreateNestedList \- allocate a nested variable argument list .SH SYNTAX typedef void * XVaNestedList; - -XVaNestedList XVaCreateNestedList\^(\^\fIdummy\fP\^, ...) -.br - int \fIdummy\fP\^; +.HP +XVaNestedList XVaCreateNestedList\^(\^int \fIdummy\fP\^, ...\^); .SH ARGUMENTS .IP \fIdummy\fP 1i Specifies an unused argument (required by ANSI C). diff --git a/man/XWarpPointer.man b/man/XWarpPointer.man index 5ce6499..d9724e2 100644 --- a/man/XWarpPointer.man +++ b/man/XWarpPointer.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XWarpPntr.man,v 1.2 2001/01/27 18:20:06 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XWarpPntr.man,v 1.3 2003/04/28 22:17:57 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,19 +144,11 @@ .SH NAME XWarpPointer \- move pointer .SH SYNTAX -XWarpPointer\^(\^\fIdisplay\fP, \fIsrc_w\fP\^, \fIdest_w\fP\^, \fIsrc_x\fP\^, \fIsrc_y\fP\^, \fIsrc_width\fP\^, \fIsrc_height\fP\^, \fIdest_x\fP\^, -.br - \fIdest_y\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Window \fIsrc_w\fP\^, \fIdest_w\fP\^; -.br - int \fIsrc_x\fP\^, \fIsrc_y\fP\^; -.br - unsigned int \fIsrc_width\fP\^, \fIsrc_height\fP\^; -.br - int \fIdest_x\fP\^, \fIdest_y\fP\^; +.HP +int XWarpPointer\^(\^Display *\fIdisplay\fP\^, Window \fIsrc_w\fP\^, Window +\fIdest_w\fP\^, int \fIsrc_x\fP\^, int \fIsrc_y\fP\^, unsigned int +\fIsrc_width\fP\^, unsigned int \fIsrc_height\fP\^, int \fIdest_x\fP\^, int +\fIdest_y\fP\^); .SH ARGUMENTS .IP \fIdest_w\fP 1i Specifies the destination window or diff --git a/man/XcmsAllocColor.man b/man/XcmsAllocColor.man index 25b4f5f..668e01e 100644 --- a/man/XcmsAllocColor.man +++ b/man/XcmsAllocColor.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XcmsAClr.man,v 3.3 2001/01/27 18:20:06 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XcmsAClr.man,v 3.4 2003/04/28 22:17:57 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,31 +144,13 @@ .SH NAME XcmsAllocColor, XcmsAllocNamedColor \- allocate colors .SH SYNTAX -Status XcmsAllocColor\^(\^\fIdisplay\fP\^, \fIcolormap\fP\^, \fIcolor_in_out\fP\^, \fIresult_format\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Colormap \fIcolormap\fP\^; -.br - XcmsColor *\fIcolor_in_out\fP\^; -.br - XcmsColorFormat \fIresult_format\fP\^; -.LP -Status XcmsAllocNamedColor\^(\^\fIdisplay\fP\^, \fIcolormap\fP\^, \fIcolor_string\fP\^, \fIcolor_screen_return\fP\^, \fIcolor_exact_return\fP\^, -.br - \fIresult_format\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Colormap \fIcolormap\fP\^; -.br - char *\fIcolor_string\fP\^; -.br - XcmsColor *\fIcolor_screen_return\fP\^; -.br - XcmsColor *\fIcolor_exact_return\fP\^; -.br - XcmsColorFormat \fIresult_format\fP\^; +.HP +Status XcmsAllocColor\^(\^Display *\fIdisplay\fP\^, Colormap \fIcolormap\fP\^, +XcmsColor *\fIcolor_in_out\fP\^, XcmsColorFormat \fIresult_format\fP\^); +.HP +Status XcmsAllocNamedColor\^(\^Display *\fIdisplay\fP\^, Colormap +\fIcolormap\fP\^, char *\fIcolor_string\fP\^, XcmsColor +*\fIcolor_screen_return\fP\^, XcmsColor *\fIcolor_exact_return\fP\^, XcmsColorFormat \fIresult_format\fP\^); .SH ARGUMENTS .IP \fIdisplay\fP 1i Specifies the connection to the X server. diff --git a/man/XcmsCCCOfColormap.man b/man/XcmsCCCOfColormap.man index ebd4198..d572ab5 100644 --- a/man/XcmsCCCOfColormap.man +++ b/man/XcmsCCCOfColormap.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/Xcms3CoC.man,v 1.2 2001/01/27 18:20:06 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/Xcms3CoC.man,v 1.3 2003/04/28 22:17:57 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,19 +144,12 @@ .SH NAME XcmsCCCOfColormap, XcmsSetCCCOfColormap \- query and modify CCC of a colormap .SH SYNTAX -XcmsCCC XcmsCCCOfColormap\^(\^\fIdisplay\fP, \fIcolormap\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Colormap \fIcolormap\fP\^; -.LP -XcmsCCC XcmsSetCCCOfColormap\^(\^\fIdisplay\fP, \fIcolormap\fP\^, \fIccc\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Colormap \fIcolormap\fP\^; -.br - XcmsCCC \fIccc\fP\^; +.HP +XcmsCCC XcmsCCCOfColormap\^(\^Display *\fIdisplay\fP\^, Colormap +\fIcolormap\fP\^); +.HP +XcmsCCC XcmsSetCCCOfColormap\^(\^Display *\fIdisplay\fP\^, Colormap +\fIcolormap\fP\^, XcmsCCC \fIccc\fP\^); .SH ARGUMENTS .IP \fIdisplay\fP 1i Specifies the connection to the X server. diff --git a/man/XcmsCIELabQueryMaxC.man b/man/XcmsCIELabQueryMaxC.man index 6f7de98..fadadfe 100644 --- a/man/XcmsCIELabQueryMaxC.man +++ b/man/XcmsCIELabQueryMaxC.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XcmsLaQMC.man,v 1.3 2001/02/09 03:47:47 tsi Exp $ +.\" $XFree86: xc/doc/man/X11/XcmsLaQMC.man,v 1.4 2003/04/28 22:17:58 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,43 +144,18 @@ .SH NAME XcmsCIELabQueryMaxC, XcmsCIELabQueryMaxL, XcmsCIELabQueryMaxLC, XcmsCIELabQueryMinL \- obtain the CIE L*a*b* coordinates .SH SYNTAX -Status XcmsCIELabQueryMaxC\^(\^\fIccc\fP\^, \fIhue_angle\fP\^, \fIL_star\fP\^, \fIcolor_return\fP\^) -.br - XcmsCCC \fIccc\fP\^; -.br - XcmsFloat \fIhue_angle\fP\^; -.br - XcmsFloat \fIL_star\fP\^; -.br - XcmsColor *\fIcolor_return\fP\^; -.LP -Status XcmsCIELabQueryMaxL\^(\^\fIccc\fP\^, \fIhue_angle\fP\^, \fIchroma\fP\^, \fIcolor_return\fP\^) -.br - XcmsCCC \fIccc\fP\^; -.br - XcmsFloat \fIhue_angle\fP\^; -.br - XcmsFloat \fIchroma\fP\^; -.br - XcmsColor *\fIcolor_return\fP\^; -.LP -Status XcmsCIELabQueryMaxLC\^(\^\fIccc\fP\^, \fIhue_angle\fP\^, \fIcolor_return\fP\^) -.br - XcmsCCC \fIccc\fP\^; -.br - XcmsFloat \fIhue_angle\fP\^; -.br - XcmsColor *\fIcolor_return\fP\^; -.LP -Status XcmsCIELabQueryMinL\^(\^\fIccc\fP\^, \fIhue_angle\fP\^, \fIchroma\fP\^, \fIcolor_return\fP\^) -.br - XcmsCCC \fIccc\fP\^; -.br - XcmsFloat \fIhue_angle\fP\^; -.br - XcmsFloat \fIchroma\fP\^; -.br - XcmsColor *\fIcolor_return\fP\^; +.HP +Status XcmsCIELabQueryMaxC\^(\^XcmsCCC \fIccc\fP\^, XcmsFloat +\fIhue_angle\fP\^, XcmsFloat \fIL_star\fP\^, XcmsColor *\fIcolor_return\fP\^); +.HP +Status XcmsCIELabQueryMaxL\^(\^XcmsCCC \fIccc\fP\^, XcmsFloat +\fIhue_angle\fP\^, XcmsFloat \fIchroma\fP\^, XcmsColor *\fIcolor_return\fP\^); +.HP +Status XcmsCIELabQueryMaxLC\^(\^XcmsCCC \fIccc\fP\^, XcmsFloat +\fIhue_angle\fP\^, XcmsColor *\fIcolor_return\fP\^); +.HP +Status XcmsCIELabQueryMinL\^(\^XcmsCCC \fIccc\fP\^, XcmsFloat +\fIhue_angle\fP\^, XcmsFloat \fIchroma\fP\^, XcmsColor *\fIcolor_return\fP\^); .SH ARGUMENTS .IP \fIccc\fP 1i Specifies the CCC. diff --git a/man/XcmsCIELuvQueryMaxC.man b/man/XcmsCIELuvQueryMaxC.man index f813d77..1ace3c2 100644 --- a/man/XcmsCIELuvQueryMaxC.man +++ b/man/XcmsCIELuvQueryMaxC.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XcmsLuQMC.man,v 1.3 2001/02/09 03:47:47 tsi Exp $ +.\" $XFree86: xc/doc/man/X11/XcmsLuQMC.man,v 1.4 2003/04/28 22:17:58 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,43 +144,18 @@ .SH NAME XcmsCIELuvQueryMaxC, XcmsCIELuvQueryMaxL, XcmsCIELuvQueryMaxLC, XcmsCIELuvQueryMinL \- obtain the CIE L*u*v* coordinates .SH SYNTAX -Status XcmsCIELuvQueryMaxC\^(\^\fIccc\fP\^, \fIhue_angle\fP\^, \fIL_star\fP\^, \fIcolor_return\fP\^) -.br - XcmsCCC \fIccc\fP\^; -.br - XcmsFloat \fIhue_angle\fP\^; -.br - XcmsFloat \fIL_star\fP\^; -.br - XcmsColor *\fIcolor_return\fP\^; -.LP -Status XcmsCIELuvQueryMaxL\^(\^\fIccc\fP\^, \fIhue_angle\fP\^, \fIchroma\fP\^, \fIcolor_return\fP\^) -.br - XcmsCCC \fIccc\fP\^; -.br - XcmsFloat \fIhue_angle\fP\^; -.br - XcmsFloat \fIchroma\fP\^; -.br - XcmsColor *\fIcolor_return\fP\^; -.LP -Status XcmsCIELuvQueryMaxLC\^(\^\fIccc\fP\^, \fIhue_angle\fP\^, \fIcolor_return\fP\^) -.br - XcmsCCC \fIccc\fP\^; -.br - XcmsFloat \fIhue_angle\fP\^; -.br - XcmsColor *\fIcolor_return\fP\^; -.LP -Status XcmsCIELuvQueryMinL\^(\^\fIccc\fP\^, \fIhue_angle\fP\^, \fIchroma\fP\^, \fIcolor_return\fP\^) -.br - XcmsCCC \fIccc\fP\^; -.br - XcmsFloat \fIhue_angle\fP\^; -.br - XcmsFloat \fIchroma\fP\^; -.br - XcmsColor *\fIcolor_return\fP\^; +.HP +Status XcmsCIELuvQueryMaxC\^(\^XcmsCCC \fIccc\fP\^, XcmsFloat +\fIhue_angle\fP\^, XcmsFloat \fIL_star\fP\^, XcmsColor *\fIcolor_return\fP\^); +.HP +Status XcmsCIELuvQueryMaxL\^(\^XcmsCCC \fIccc\fP\^, XcmsFloat +\fIhue_angle\fP\^, XcmsFloat \fIchroma\fP\^, XcmsColor *\fIcolor_return\fP\^); +.HP +Status XcmsCIELuvQueryMaxLC\^(\^XcmsCCC \fIccc\fP\^, XcmsFloat +\fIhue_angle\fP\^, XcmsColor *\fIcolor_return\fP\^); +.HP +Status XcmsCIELuvQueryMinL\^(\^XcmsCCC \fIccc\fP\^, XcmsFloat +\fIhue_angle\fP\^, XcmsFloat \fIchroma\fP\^, XcmsColor *\fIcolor_return\fP\^); .SH ARGUMENTS .IP \fIccc\fP 1i Specifies the CCC. diff --git a/man/XcmsConvertColors.man b/man/XcmsConvertColors.man index 1b5f833..763db5c 100644 --- a/man/XcmsConvertColors.man +++ b/man/XcmsConvertColors.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XcmsCClrs.man,v 1.2 2001/01/27 18:20:06 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XcmsCClrs.man,v 1.3 2003/04/28 22:17:58 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,17 +144,10 @@ .SH NAME XcmsConvertColors \- convert CCC color specifications .SH SYNTAX -Status XcmsConvertColors\^(\^\fIccc\fP\^, \fIcolors_in_out\fP\^, \fIncolors\fP\^, \fItarget_format\fP\^, \fIcompression_flags_return\fP\^) -.br - XcmsCCC \fIccc\fP\^; -.br - XcmsColor \fIcolors_in_out\fP\^[\^]\^; -.br - unsigned int \fIncolors\fP\^; -.br - XcmsColorFormat \fItarget_format\fP\^; -.br - Bool \fIcompression_flags_return\fP\^[\^]\^; +.HP +Status XcmsConvertColors\^(\^XcmsCCC \fIccc\fP\^, XcmsColor +\fIcolors_in_out\fP\^[\^]\^, unsigned int \fIncolors\fP\^, XcmsColorFormat +\fItarget_format\fP\^, Bool \fIcompression_flags_return\fP\^[\^]\^); .SH ARGUMENTS .IP \fIccc\fP 1i Specifies the CCC. diff --git a/man/XcmsCreateCCC.man b/man/XcmsCreateCCC.man index 7af3c39..ebe7001 100644 --- a/man/XcmsCreateCCC.man +++ b/man/XcmsCreateCCC.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XcmsCre3C.man,v 1.2 2001/01/27 18:20:07 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XcmsCre3C.man,v 1.3 2003/04/28 22:17:58 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,29 +144,14 @@ .SH NAME XcmsCreateCCC, XcmsFreeCCC \- creating and destroying CCCs .SH SYNTAX -XcmsCCC XcmsCreateCCC\^(\^\fIdisplay\fP, \fIscreen_number\fP\^, \fIvisual\fP\^, \fIclient_white_point\fP\^, \fIcompression_proc\fP\^, -.br - \fIcompression_client_data\fP\^, \fIwhite_adjust_proc\fP\^, \fIwhite_adjust_client_data\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - int \fIscreen_number\fP\^; -.br - Visual *\fIvisual\fP\^; -.br - XcmsColor *\fIclient_white_point\fP\^; -.br - XcmsCompressionProc \fIcompression_proc\fP\^; -.br - XPointer \fIcompression_client_data\fP\^; -.br - XcmsWhiteAdjustProc \fIwhite_adjust_proc\fP\^; -.br - XPointer \fIwhite_adjust_client_data\fP\^; +.HP +XcmsCCC XcmsCreateCCC\^(\^Display *\fIdisplay\fP\^, int \fIscreen_number\fP\^, +Visual *\fIvisual\fP\^, XcmsColor *\fIclient_white_point\fP\^, +XcmsCompressionProc \fIcompression_proc\fP\^, XPointer +\fIcompression_client_data\fP\^, XcmsWhiteAdjustProc +\fIwhite_adjust_proc\fP\^, XPointer \fIwhite_adjust_client_data\fP\^); .LP -void XcmsFreeCCC\^(\^\fIccc\fP\^) -.br - XcmsCCC \fIccc\fP\^; +void XcmsFreeCCC\^(\^XcmsCCC \fIccc\fP\^); .SH ARGUMENTS .IP \fIdisplay\fP 1i Specifies the connection to the X server. diff --git a/man/XcmsDefaultCCC.man b/man/XcmsDefaultCCC.man index 413e534..578ae80 100644 --- a/man/XcmsDefaultCCC.man +++ b/man/XcmsDefaultCCC.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XcmsD3C.man,v 1.2 2001/01/27 18:20:07 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XcmsD3C.man,v 1.3 2003/04/28 22:17:58 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,11 +144,9 @@ .SH NAME XcmsDefaultCCC \- obtain the default CCC for a screen .SH SYNTAX -XcmsCCC XcmsDefaultCCC\^(\^\fIdisplay\fP, \fIscreen_number\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - int \fIscreen_number\fP\^; +.HP +XcmsCCC XcmsDefaultCCC\^(\^Display *\fIdisplay\fP\^, int +\fIscreen_number\fP\^); .SH ARGUMENTS .IP \fIdisplay\fP 1i Specifies the connection to the X server. diff --git a/man/XcmsQueryBlack.man b/man/XcmsQueryBlack.man index e9269f7..4ae7bd1 100644 --- a/man/XcmsQueryBlack.man +++ b/man/XcmsQueryBlack.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XcmsQBlk.man,v 1.2 2001/01/27 18:20:07 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XcmsQBlk.man,v 1.3 2003/04/28 22:17:58 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,45 +144,21 @@ .SH NAME XcmsQueryBlack, XcmsQueryBlue, XcmsQueryGreen, XcmsQueryRed, XcmsQueryWhite \- obtain black, blue, green, red, and white CCC color specifications .SH SYNTAX -Status XcmsQueryBlack\^(\^\fIccc\fP\^, \fItarget_format\fP\^, \fIcolor_return\fP\^) -.br - XcmsCCC \fIccc\fP\^; -.br - XcmsColorFormat \fItarget_format\fP\^; -.br - XcmsColor *\fIcolor_return\fP\^; -.LP -Status XcmsQueryBlue\^(\^\fIccc\fP\^, \fItarget_format\fP\^, \fIcolor_return\fP\^) -.br - XcmsCCC \fIccc\fP\^; -.br - XcmsColorFormat \fItarget_format\fP\^; -.br - XcmsColor *\fIcolor_return\fP\^; -.LP -Status XcmsQueryGreen\^(\^\fIccc\fP\^, \fItarget_format\fP\^, \fIcolor_return\fP\^) -.br - XcmsCCC \fIccc\fP\^; -.br - XcmsColorFormat \fItarget_format\fP\^; -.br - XcmsColor *\fIcolor_return\fP\^; -.LP -Status XcmsQueryRed\^(\^\fIccc\fP\^, \fItarget_format\fP\^, \fIcolor_return\fP\^) -.br - XcmsCCC \fIccc\fP\^; -.br - XcmsColorFormat \fItarget_format\fP\^; -.br - XcmsColor *\fIcolor_return\fP\^; -.LP -Status XcmsQueryWhite\^(\^\fIccc\fP\^, \fItarget_format\fP\^, \fIcolor_return\fP\^) -.br - XcmsCCC \fIccc\fP\^; -.br - XcmsColorFormat \fItarget_format\fP\^; -.br - XcmsColor *\fIcolor_return\fP\^; +.HP +Status XcmsQueryBlack\^(\^XcmsCCC \fIccc\fP\^, XcmsColorFormat +\fItarget_format\fP\^, XcmsColor *\fIcolor_return\fP\^); +.HP +Status XcmsQueryBlue\^(\^XcmsCCC \fIccc\fP\^, XcmsColorFormat +\fItarget_format\fP\^, XcmsColor *\fIcolor_return\fP\^); +.HP +Status XcmsQueryGreen\^(\^XcmsCCC \fIccc\fP\^, XcmsColorFormat +\fItarget_format\fP\^, XcmsColor *\fIcolor_return\fP\^); +.HP +Status XcmsQueryRed\^(\^XcmsCCC \fIccc\fP\^, XcmsColorFormat +\fItarget_format\fP\^, XcmsColor *\fIcolor_return\fP\^); +.HP +Status XcmsQueryWhite\^(\^XcmsCCC \fIccc\fP\^, XcmsColorFormat +\fItarget_format\fP\^, XcmsColor *\fIcolor_return\fP\^); .SH ARGUMENTS .IP \fIccc\fP 1i Specifies the CCC. diff --git a/man/XcmsQueryColor.man b/man/XcmsQueryColor.man index c510875..28f7342 100644 --- a/man/XcmsQueryColor.man +++ b/man/XcmsQueryColor.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XcmsQClr.man,v 3.3 2001/01/27 18:20:07 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XcmsQClr.man,v 3.4 2003/04/28 22:17:58 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,41 +144,18 @@ .SH NAME XcmsQueryColor, XcmsQueryColors, XcmsLookupColor \- obtain color values .SH SYNTAX -Status XcmsQueryColor\^(\^\fIdisplay\fP, \fIcolormap\fP\^, \fIcolor_in_out\fP\^, \fIresult_format\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Colormap \fIcolormap\fP\^; -.br - XcmsColor *\fIcolor_in_out\fP\^; -.br - XcmsColorFormat \fIresult_format\fP\^; -.LP -Status XcmsQueryColors\^(\^\fIdisplay\fP, \fIcolormap\fP\^, \fIcolors_in_out\fP\^, \fIncolors\fP\^, \fIresult_format\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Colormap \fIcolormap\fP\^; -.br - XcmsColor \fIcolors_in_out\fP\^[\^]\^; -.br - unsigned int \fIncolors\fP\^; -.br - XcmsColorFormat \fIresult_format\fP\^; -.LP -Status XcmsLookupColor\^(\^\fIdisplay\fP, \fIcolormap\fP\^, \fIcolor_string\fP\^, \fIcolor_exact_return\fP\^, \fIcolor_screen_return\fP\^, -.br - \fIresult_format\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Colormap \fIcolormap\fP\^; -.br - char *\fIcolor_string\fP\^; -.br - XcmsColor *\fIcolor_exact_return\fP\^, *\fIcolor_screen_return\fP\^; -.br - XcmsColorFormat \fIresult_format\fP\^; +.HP +Status XcmsQueryColor\^(\^Display *\fIdisplay\fP\^, Colormap \fIcolormap\fP\^, +XcmsColor *\fIcolor_in_out\fP\^, XcmsColorFormat \fIresult_format\fP\^); +.HP +Status XcmsQueryColors\^(\^Display *\fIdisplay\fP\^, Colormap +\fIcolormap\fP\^, XcmsColor \fIcolors_in_out\fP\^[\^]\^, unsigned int +\fIncolors\fP\^, XcmsColorFormat \fIresult_format\fP\^); +.HP +Status XcmsLookupColor\^(\^Display *\fIdisplay\fP\^, Colormap +\fIcolormap\fP\^, char *\fIcolor_string\fP\^, XcmsColor +*\fIcolor_exact_return\fP\^, XcmsColor *\fIcolor_screen_return\fP\^, +XcmsColorFormat \fIresult_format\fP\^); .SH ARGUMENTS .IP \fIdisplay\fP 1i Specifies the connection to the X server. diff --git a/man/XcmsSetWhitePoint.man b/man/XcmsSetWhitePoint.man index bbb35d4..88121ca 100644 --- a/man/XcmsSetWhitePoint.man +++ b/man/XcmsSetWhitePoint.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XcmsSWP.man,v 1.2 2001/01/27 18:20:07 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XcmsSWP.man,v 1.3 2003/04/28 22:17:58 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,19 +144,11 @@ .SH NAME XcmsSetWhitePoint, XcmsSetWhiteAdjustProc \- modifying CCC attributes .SH SYNTAX -Status XcmsSetWhitePoint\^(\^\fIccc\fP\^, \fIcolor\fP\^) -.br - XcmsCCC \fIccc\fP\^; -.br - XcmsColor *\fIcolor\fP\^; -.LP -XcmsWhiteAdjustProc XcmsSetWhiteAdjustProc\^(\^\fIccc\fP\^, \fIwhite_adjust_proc\fP\^, \fIclient_data\fP\^) -.br - XcmsCCC \fIccc\fP\^; -.br - XcmsWhiteAdjustProc \fIwhite_adjust_proc\fP\^; -.br - XPointer \fIclient_data\fP\^; +.HP +Status XcmsSetWhitePoint\^(\^XcmsCCC \fIccc\fP\^, XcmsColor *\fIcolor\fP\^); +.HP +XcmsWhiteAdjustProc XcmsSetWhiteAdjustProc\^(\^XcmsCCC \fIccc\fP\^, +XcmsWhiteAdjustProc \fIwhite_adjust_proc\fP\^, XPointer \fIclient_data\fP\^); .SH ARGUMENTS .IP \fIccc\fP 1i Specifies the CCC. diff --git a/man/XcmsStoreColor.man b/man/XcmsStoreColor.man index f231ff0..bef466a 100644 --- a/man/XcmsStoreColor.man +++ b/man/XcmsStoreColor.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XcmsSClr.man,v 1.2 2001/01/27 18:20:07 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XcmsSClr.man,v 1.3 2003/04/28 22:17:58 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,25 +144,13 @@ .SH NAME XcmsStoreColor, XcmsStoreColors \- set colors .SH SYNTAX -Status XcmsStoreColor\^(\^\fIdisplay\fP, \fIcolormap\fP\^, \fIcolor\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Colormap \fIcolormap\fP\^; -.br - XcmsColor *\fIcolor\fP\^; -.LP -Status XcmsStoreColors\^(\^\fIdisplay\fP, \fIcolormap\fP\^, \fIcolors\fP\^, \fIncolors\fP\^, \fIcompression_flags_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Colormap \fIcolormap\fP\^; -.br - XcmsColor \fIcolors\fP\^[\^]\^; -.br - int \fIncolors\fP\^; -.br - Bool \fIcompression_flags_return\fP\^[\^]\^; +.HP +Status XcmsStoreColor\^(\^Display *\fIdisplay\fP\^, Colormap \fIcolormap\fP\^, +XcmsColor *\fIcolor\fP\^); +.HP +Status XcmsStoreColors\^(\^Display *\fIdisplay\fP\^, Colormap +\fIcolormap\fP\^, XcmsColor \fIcolors\fP\^[\^]\^, int \fIncolors\fP\^, Bool +\fIcompression_flags_return\fP\^[\^]\^); .SH ARGUMENTS .IP \fIdisplay\fP 1i Specifies the connection to the X server. diff --git a/man/XcmsTekHVCQueryMaxC.man b/man/XcmsTekHVCQueryMaxC.man index cdd84b9..d3f2eec 100644 --- a/man/XcmsTekHVCQueryMaxC.man +++ b/man/XcmsTekHVCQueryMaxC.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XcmsTQMC.man,v 1.3 2001/02/09 03:47:47 tsi Exp $ +.\" $XFree86: xc/doc/man/X11/XcmsTQMC.man,v 1.4 2003/04/28 22:17:58 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,53 +144,22 @@ .SH NAME XcmsTekHVCQueryMaxC, XcmsTekHVCQueryMaxV, XcmsTekHVCQueryMaxVC, XcmsTekHVCQueryMaxVSamples, XcmsTekHVCQueryMinV \- obtain the TekHVC coordinates .SH SYNTAX -Status XcmsTekHVCQueryMaxC\^(\^\fIccc\fP\^, \fIhue\fP\^, \fIvalue\fP\^, \fIcolor_return\fP\^) -.br - XcmsCCC \fIccc\fP\^; -.br - XcmsFloat \fIhue\fP\^; -.br - XcmsFloat \fIvalue\fP\^; -.br - XcmsColor *\fIcolor_return\fP\^; -.LP -Status XcmsTekHVCQueryMaxV\^(\^\fIccc\fP\^, \fIhue\fP\^, \fIchroma\fP\^, \fIcolor_return\fP\^) -.br - XcmsCCC \fIccc\fP\^; -.br - XcmsFloat \fIhue\fP\^; -.br - XcmsFloat \fIchroma\fP\^; -.br - XcmsColor *\fIcolor_return\fP\^; -.LP -Status XcmsTekHVCQueryMaxVC\^(\^\fIccc\fP\^, \fIhue\fP\^, \fIcolor_return\fP\^) -.br - XcmsCCC \fIccc\fP\^; -.br - XcmsFloat \fIhue\fP\^; -.br - XcmsColor *\fIcolor_return\fP\^; -.LP -Status XcmsTekHVCQueryMaxVSamples\^(\^\fIccc\fP\^, \fIhue\fP\^, \fIcolors_return\fP\^, \fInsamples\fP\^) -.br - XcmsCCC \fIccc\fP\^; -.br - XcmsFloat \fIhue\fP\^; -.br - XcmsColor \fIcolors_return[]\fP\^; -.br - unsigned int \fInsamples\fP\^; -.LP -Status XcmsTekHVCQueryMinV\^(\^\fIccc\fP\^, \fIhue\fP\^, \fIchroma\fP\^, \fIcolor_return\fP\^) -.br - XcmsCCC \fIccc\fP\^; -.br - XcmsFloat \fIhue\fP\^; -.br - XcmsFloat \fIchroma\fP\^; -.br - XcmsColor *\fIcolor_return\fP\^; +.HP +Status XcmsTekHVCQueryMaxC\^(\^XcmsCCC \fIccc\fP\^, XcmsFloat \fIhue\fP\^, +XcmsFloat \fIvalue\fP\^, XcmsColor *\fIcolor_return\fP\^); +.HP +Status XcmsTekHVCQueryMaxV\^(\^XcmsCCC \fIccc\fP\^, XcmsFloat \fIhue\fP\^, +XcmsFloat \fIchroma\fP\^, XcmsColor *\fIcolor_return\fP\^); +.HP +Status XcmsTekHVCQueryMaxVC\^(\^XcmsCCC \fIccc\fP\^, XcmsFloat \fIhue\fP\^, +XcmsColor *\fIcolor_return\fP\^); +.HP +Status XcmsTekHVCQueryMaxVSamples\^(\^XcmsCCC \fIccc\fP\^, XcmsFloat +\fIhue\fP\^, XcmsColor \fIcolors_return[]\fP\^, unsigned int +\fInsamples\fP\^); +.HP +Status XcmsTekHVCQueryMinV\^(\^XcmsCCC \fIccc\fP\^, XcmsFloat \fIhue\fP\^, +XcmsFloat \fIchroma\fP\^, XcmsColor *\fIcolor_return\fP\^); .SH ARGUMENTS .IP \fIccc\fP 1i Specifies the CCC. diff --git a/man/XmbDrawImageString.man b/man/XmbDrawImageString.man index 997c703..80725e9 100644 --- a/man/XmbDrawImageString.man +++ b/man/XmbDrawImageString.man @@ -41,7 +41,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XmbDIStr.man,v 1.3 2001/01/27 18:20:07 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XmbDIStr.man,v 1.4 2003/04/28 22:17:58 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -145,53 +145,18 @@ .SH NAME XmbDrawImageString, XwcDrawImageString, Xutf8DrawImageString \- draw image text using a single font set .SH SYNTAX -void XmbDrawImageString\^(\^\fIdisplay\fP\^, \fId\fP\^, \fIfont_set\fP\^, \fIgc\fP\^, \fIx\fP\^, \fIy\fP\^, \fIstring\fP\^, \fInum_bytes\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Drawable \fId\fP\^; -.br - XFontSet \fIfont_set\fP\^; -.br - GC \fIgc\fP\^; -.br - int \fIx\fP\^, \fIy\fP\^; -.br - char *\fIstring\fP\^; -.br - int \fInum_bytes\fP\^; -.LP -void XwcDrawImageString\^(\^\fIdisplay\fP\^, \fId\fP\^, \fIfont_set\fP\^, \fIgc\fP\^, \fIx\fP\^, \fIy\fP\^, \fIstring\fP\^, \fInum_wchars\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Drawable \fId\fP\^; -.br - XFontSet \fIfont_set\fP\^; -.br - GC \fIgc\fP\^; -.br - int \fIx\fP\^, \fIy\fP\^; -.br - wchar_t *\fIstring\fP\^; -.br - int \fInum_wchars\fP\^; -.LP -void Xutf8DrawImageString\^(\^\fIdisplay\fP\^, \fId\fP\^, \fIfont_set\fP\^, \fIgc\fP\^, \fIx\fP\^, \fIy\fP\^, \fIstring\fP\^, \fInum_bytes\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Drawable \fId\fP\^; -.br - XFontSet \fIfont_set\fP\^; -.br - GC \fIgc\fP\^; -.br - int \fIx\fP\^, \fIy\fP\^; -.br - char *\fIstring\fP\^; -.br - int \fInum_bytes\fP\^; +.HP +void XmbDrawImageString\^(\^Display *\fIdisplay\fP\^, Drawable \fId\fP\^, +XFontSet \fIfont_set\fP\^, GC \fIgc\fP\^, int \fIx\fP\^, int \fIy\fP\^, char +*\fIstring\fP\^, int \fInum_bytes\fP\^); +.HP +void XwcDrawImageString\^(\^Display *\fIdisplay\fP\^, Drawable \fId\fP\^, +XFontSet \fIfont_set\fP\^, GC \fIgc\fP\^, int \fIx\fP\^, int \fIy\fP\^, +wchar_t *\fIstring\fP\^, int \fInum_wchars\fP\^); +.HP +void Xutf8DrawImageString\^(\^Display *\fIdisplay\fP\^, Drawable \fId\fP\^, +XFontSet \fIfont_set\fP\^, GC \fIgc\fP\^, int \fIx\fP\^, int \fIy\fP\^, char +*\fIstring\fP\^, int \fInum_bytes\fP\^); .SH ARGUMENTS .IP \fId\fP 1i Specifies the drawable. diff --git a/man/XmbDrawString.man b/man/XmbDrawString.man index c02047b..f3e5263 100644 --- a/man/XmbDrawString.man +++ b/man/XmbDrawString.man @@ -41,7 +41,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XmbDStr.man,v 1.4 2002/04/30 16:45:02 tsi Exp $ +.\" $XFree86: xc/doc/man/X11/XmbDStr.man,v 1.5 2003/04/28 22:17:58 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -145,53 +145,18 @@ .SH NAME XmbDrawString, XwcDrawString, Xutf8DrawString \- draw text using a single font set .SH SYNTAX -void XmbDrawString\^(\^\fIdisplay\fP\^, \fId\fP\^, \fIfont_set\fP\^, \fIgc\fP\^, \fIx\fP\^, \fIy\fP\^, \fIstring\fP\^, \fInum_bytes\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Drawable \fId\fP\^; -.br - XFontSet \fIfont_set\fP\^; -.br - GC \fIgc\fP\^; -.br - int \fIx\fP\^, \fIy\fP\^; -.br - char *\fIstring\fP\^; -.br - int \fInum_bytes\fP\^; -.LP -void XwcDrawString\^(\^\fIdisplay\fP\^, \fId\fP\^, \fIfont_set\fP\^, \fIgc\fP\^, \fIx\fP\^, \fIy\fP\^, \fIstring\fP\^, \fInum_wchars\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Drawable \fId\fP\^; -.br - XFontSet \fIfont_set\fP\^; -.br - GC \fIgc\fP\^; -.br - int \fIx\fP\^, \fIy\fP\^; -.br - wchar_t *\fIstring\fP\^; -.br - int \fInum_wchars\fP\^; -.LP -void Xutf8DrawString\^(\^\fIdisplay\fP\^, \fId\fP\^, \fIfont_set\fP\^, \fIgc\fP\^, \fIx\fP\^, \fIy\fP\^, \fIstring\fP\^, \fInum_bytes\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Drawable \fId\fP\^; -.br - XFontSet \fIfont_set\fP\^; -.br - GC \fIgc\fP\^; -.br - int \fIx\fP\^, \fIy\fP\^; -.br - char *\fIstring\fP\^; -.br - int \fInum_bytes\fP\^; +.HP +void XmbDrawString\^(\^Display *\fIdisplay\fP\^, Drawable \fId\fP\^, XFontSet +\fIfont_set\fP\^, GC \fIgc\fP\^, int \fIx\fP\^, int \fIy\fP\^, char +*\fIstring\fP\^, int \fInum_bytes\fP\^); +.HP +void XwcDrawString\^(\^Display *\fIdisplay\fP\^, Drawable \fId\fP\^, XFontSet +\fIfont_set\fP\^, GC \fIgc\fP\^, int \fIx\fP\^, int \fIy\fP\^, wchar_t +*\fIstring\fP\^, int \fInum_wchars\fP\^); +.HP +void Xutf8DrawString\^(\^Display *\fIdisplay\fP\^, Drawable \fId\fP\^, +XFontSet \fIfont_set\fP\^, GC \fIgc\fP\^, int \fIx\fP\^, int \fIy\fP\^, char +*\fIstring\fP\^, int \fInum_bytes\fP\^); .SH ARGUMENTS .IP \fId\fP 1i Specifies the drawable. diff --git a/man/XmbDrawText.man b/man/XmbDrawText.man index 3eef7c0..eaeb8f0 100644 --- a/man/XmbDrawText.man +++ b/man/XmbDrawText.man @@ -41,7 +41,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XmbDTxt.man,v 1.3 2001/01/27 18:20:07 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XmbDTxt.man,v 1.4 2003/04/28 22:17:58 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -145,47 +145,17 @@ .SH NAME XmbDrawText, XwcDrawText, Xutf8DrawText \- draw text using multiple font sets .SH SYNTAX -void XmbDrawText\^(\^\fIdisplay\fP\^, \fId\fP\^, \fIgc\fP\^, \fIx\fP\^, \fIy\fP\^, \fIitems\fP\^, \fInitems\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Drawable \fId\fP\^; -.br - GC \fIgc\fP\^; -.br - int \fIx\fP\^, \fIy\fP\^; -.br - XmbTextItem *\fIitems\fP\^; -.br - int \fInitems\fP\^; -.LP -void XwcDrawText\^(\^\fIdisplay\fP\^, \fId\fP\^, \fIgc\fP\^, \fIx\fP\^, \fIy\fP\^, \fIitems\fP\^, \fInitems\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Drawable \fId\fP\^; -.br - GC \fIgc\fP\^; -.br - int \fIx\fP\^, \fIy\fP\^; -.br - XwcTextItem *\fIitems\fP\^; -.br - int \fInitems\fP\^; -.LP -void Xutf8DrawText\^(\^\fIdisplay\fP\^, \fId\fP\^, \fIgc\fP\^, \fIx\fP\^, \fIy\fP\^, \fIitems\fP\^, \fInitems\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - Drawable \fId\fP\^; -.br - GC \fIgc\fP\^; -.br - int \fIx\fP\^, \fIy\fP\^; -.br - XmbTextItem *\fIitems\fP\^; -.br - int \fInitems\fP\^; +.HP +void XmbDrawText\^(\^Display *\fIdisplay\fP\^, Drawable \fId\fP\^, GC +\fIgc\fP\^, int \fIx\fP\^, int \fIy\fP\^, XmbTextItem *\fIitems\fP\^, int +\fInitems\fP\^); +.HP +void XwcDrawText\^(\^Display *\fIdisplay\fP\^, Drawable \fId\fP\^, GC +\fIgc\fP\^, int \fIx\fP\^, int \fIy\fP\^, XwcTextItem *\fIitems\fP\^, int +\fInitems\fP\^); +.HP +void Xutf8DrawText\^(\^Display *\fIdisplay\fP\^, Drawable \fId\fP\^, GC +\fIgc\fP\^, int \fIx\fP\^, int \fIy\fP\^, XmbTextItem *\fIitems\fP\^, int \fInitems\fP\^); .SH ARGUMENTS .IP \fId\fP 1i Specifies the drawable. diff --git a/man/XmbLookupString.man b/man/XmbLookupString.man index 13beedd..32b0918 100644 --- a/man/XmbLookupString.man +++ b/man/XmbLookupString.man @@ -42,7 +42,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XmbLStr.man,v 1.3 2001/01/27 18:20:08 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XmbLStr.man,v 1.4 2003/04/28 22:17:58 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -147,47 +147,18 @@ .SH NAME XmbLookupString, XwcLookupString, Xutf8LookupString \- obtain composed input from an input method .SH SYNTAX -int XmbLookupString\^(\^\fIic\fP\^, \fIevent\fP\^, \fIbuffer_return\fP\^, \fIbytes_buffer\fP\^, \fIkeysym_return\fP\^, \fIstatus_return\fP\^) -.br - XIC \fIic\fP\^; -.br - XKeyPressedEvent *\fIevent\fP; -.br - char *\fIbuffer_return\fP\^; -.br - int \fIbytes_buffer\fP\^; -.br - KeySym *\fIkeysym_return\fP\^; -.br - Status *\fIstatus_return\fP\^; -.LP -int XwcLookupString\^(\^\fIic\fP\^, \fIevent\fP\^, \fIbuffer_return\fP\^, \fIbytes_buffer\fP\^, \fIkeysym_return\fP\^, \fIstatus_return\fP\^) -.br - XIC \fIic\fP\^; -.br - XKeyPressedEvent *\fIevent\fP\^; -.br - wchar_t *\fIbuffer_return\fP\^; -.br - int \fIwchars_buffer\fP\^; -.br - KeySym *\fIkeysym_return\fP\^; -.br - Status *\fIstatus_return\fP\^; -.LP -int Xutf8LookupString\^(\^\fIic\fP\^, \fIevent\fP\^, \fIbuffer_return\fP\^, \fIbytes_buffer\fP\^, \fIkeysym_return\fP\^, \fIstatus_return\fP\^) -.br - XIC \fIic\fP\^; -.br - XKeyPressedEvent *\fIevent\fP; -.br - char *\fIbuffer_return\fP\^; -.br - int \fIbytes_buffer\fP\^; -.br - KeySym *\fIkeysym_return\fP\^; -.br - Status *\fIstatus_return\fP\^; +.HP +int XmbLookupString\^(\^XIC \fIic\fP\^, XKeyPressedEvent *\fIevent\fP, char +*\fIbuffer_return\fP\^, int \fIbytes_buffer\fP\^, KeySym +*\fIkeysym_return\fP\^, Status *\fIstatus_return\fP\^); +.HP +int XwcLookupString\^(\^XIC \fIic\fP\^, XKeyPressedEvent *\fIevent\fP\^, +wchar_t *\fIbuffer_return\fP\^, int \fIwchars_buffer\fP\^, KeySym +*\fIkeysym_return\fP\^, Status *\fIstatus_return\fP\^); +.HP +int Xutf8LookupString\^(\^XIC \fIic\fP\^, XKeyPressedEvent *\fIevent\fP, char +*\fIbuffer_return\fP\^, int \fIbytes_buffer\fP\^, KeySym +*\fIkeysym_return\fP\^, Status *\fIstatus_return\fP\^); .SH ARGUMENTS .IP \fIbuffer_return\fP 1i Returns a multibyte string or wide character string (if any) diff --git a/man/XmbResetIC.man b/man/XmbResetIC.man index 71912fb..cb249e1 100644 --- a/man/XmbResetIC.man +++ b/man/XmbResetIC.man @@ -41,7 +41,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XmbRIC.man,v 1.3 2001/01/27 18:20:08 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XmbRIC.man,v 1.4 2003/04/28 22:17:58 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -145,17 +145,12 @@ .SH NAME XmbResetIC, XwcResetIC, Xutf8ResetIC \- reset the state of an input context .SH SYNTAX -char * XmbResetIC\^(\^\fIic\fP\^) -.br - XIC \fIic\fP\^; -.LP -wchar_t * XwcResetIC\^(\^\fIic\fP\^) -.br - XIC \fIic\fP\^; -.LP -char * Xutf8ResetIC\^(\^\fIic\fP\^) -.br - XIC \fIic\fP\^; +.HP +char *XmbResetIC\^(\^XIC \fIic\fP\^); +.HP +wchar_t *XwcResetIC\^(\^XIC \fIic\fP\^); +.HP +char *Xutf8ResetIC\^(\^XIC \fIic\fP\^); .SH ARGUMENTS .IP \fIic\fP 1i Specifies the input context. diff --git a/man/XmbTextEscapement.man b/man/XmbTextEscapement.man index cb0adca..61d1256 100644 --- a/man/XmbTextEscapement.man +++ b/man/XmbTextEscapement.man @@ -41,7 +41,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XmbTEsc.man,v 1.3 2001/01/27 18:20:08 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XmbTEsc.man,v 1.4 2003/04/28 22:17:58 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -145,29 +145,15 @@ .SH NAME XmbTextEscapement, XwcTextEscapement, Xutf8TextEscapement \- obtain the escapement of text .SH SYNTAX -int XmbTextEscapement\^(\^\fIfont_set\fP\^, \fIstring\fP\^, \fInum_bytes\fP\^) -.br - XFontSet \fIfont_set\fP\^; -.br - char *\fIstring\fP\^; -.br - int \fInum_bytes\fP\^; -.LP -int XwcTextEscapement\^(\^\fIfont_set\fP\^, \fIstring\fP\^, \fInum_wchars\fP\^) -.br - XFontSet \fIfont_set\fP\^; -.br - wchar_t *\fIstring\fP\^; -.br - int \fInum_wchars\fP\^; -.LP -int Xutf8TextEscapement\^(\^\fIfont_set\fP\^, \fIstring\fP\^, \fInum_bytes\fP\^) -.br - XFontSet \fIfont_set\fP\^; -.br - char *\fIstring\fP\^; -.br - int \fInum_bytes\fP\^; +.HP +int XmbTextEscapement\^(\^XFontSet \fIfont_set\fP\^, char *\fIstring\fP\^, int +\fInum_bytes\fP\^); +.HP +int XwcTextEscapement\^(\^XFontSet \fIfont_set\fP\^, wchar_t *\fIstring\fP\^, +int \fInum_wchars\fP\^); +.HP +int Xutf8TextEscapement\^(\^XFontSet \fIfont_set\fP\^, char *\fIstring\fP\^, +int \fInum_bytes\fP\^); .SH ARGUMENTS .IP \fIfont_set\fP 1i Specifies the font set. diff --git a/man/XmbTextExtents.man b/man/XmbTextExtents.man index b30067f..d329148 100644 --- a/man/XmbTextExtents.man +++ b/man/XmbTextExtents.man @@ -41,7 +41,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XmbTExt.man,v 1.4 2001/01/27 18:20:08 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XmbTExt.man,v 1.5 2003/04/28 22:17:58 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -145,41 +145,18 @@ .SH NAME XmbTextExtents, XwcTextExtents, Xutf8TextExtents \- compute text extents .SH SYNTAX -int XmbTextExtents\^(\^\fIfont_set\fP\^, \fIstring\fP\^, \fInum_bytes\fP\^, \fIoverall_ink_return\fP\^, \fIoverall_logical_return\fP\^) -.br - XFontSet \fIfont_set\fP\^; -.br - char *\fIstring\fP\^; -.br - int \fInum_bytes\fP\^; -.br - XRectangle *\fIoverall_ink_return\fP\^; -.br - XRectangle *\fIoverall_logical_return\fP\^; -.LP -int XwcTextExtents\^(\^\fIfont_set\fP\^, \fIstring\fP\^, \fInum_wchars\fP\^, \fIoverall_ink_return\fP\^, \fIoverall_logical_return\fP\^) -.br - XFontSet \fIfont_set\fP\^; -.br - wchar_t *\fIstring\fP\^; -.br - int \fInum_wchars\fP\^; -.br - XRectangle *\fIoverall_ink_return\fP\^; -.br - XRectangle *\fIoverall_logical_return\fP\^; -.LP -int Xutf8TextExtents\^(\^\fIfont_set\fP\^, \fIstring\fP\^, \fInum_bytes\fP\^, \fIoverall_ink_return\fP\^, \fIoverall_logical_return\fP\^) -.br - XFontSet \fIfont_set\fP\^; -.br - char *\fIstring\fP\^; -.br - int \fInum_bytes\fP\^; -.br - XRectangle *\fIoverall_ink_return\fP\^; -.br - XRectangle *\fIoverall_logical_return\fP\^; +.HP +int XmbTextExtents\^(\^XFontSet \fIfont_set\fP\^, char *\fIstring\fP\^, int +\fInum_bytes\fP\^, XRectangle *\fIoverall_ink_return\fP\^, XRectangle +*\fIoverall_logical_return\fP\^); +.HP +int XwcTextExtents\^(\^XFontSet \fIfont_set\fP\^, wchar_t *\fIstring\fP\^, int +\fInum_wchars\fP\^, XRectangle *\fIoverall_ink_return\fP\^, XRectangle +*\fIoverall_logical_return\fP\^); +.HP +int Xutf8TextExtents\^(\^XFontSet \fIfont_set\fP\^, char *\fIstring\fP\^, int +\fInum_bytes\fP\^, XRectangle *\fIoverall_ink_return\fP\^, XRectangle +*\fIoverall_logical_return\fP\^); .SH ARGUMENTS .IP \fIfont_set\fP 1i Specifies the font set. diff --git a/man/XmbTextListToTextProperty.man b/man/XmbTextListToTextProperty.man index c16edd0..8959ca6 100644 --- a/man/XmbTextListToTextProperty.man +++ b/man/XmbTextListToTextProperty.man @@ -42,7 +42,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XTLTTProp.man,v 1.5 2001/02/09 03:47:46 tsi Exp $ +.\" $XFree86: xc/doc/man/X11/XTLTTProp.man,v 1.6 2003/04/28 22:17:57 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -147,77 +147,32 @@ .SH NAME XmbTextListToTextProperty, XwcTextListToTextProperty, Xutf8TextListToTextProperty, XmbTextPropertyToTextList, XwcTextPropertyToTextList, Xutf8TextPropertyToTextList, XwcFreeStringList, XDefaultString \- convert text lists and text property structures .SH SYNTAX -int XmbTextListToTextProperty\^(\^\fIdisplay\fP\^, \fIlist\fP\^, \fIcount\fP\^, \fIstyle\fP\^, \fItext_prop_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - char **\fIlist\fP\^; -.br - int \fIcount\fP\^; -.br - XICCEncodingStyle \fIstyle\fP\^; -.br - XTextProperty *\fItext_prop_return\fP\^; -.LP -int XwcTextListToTextProperty\^(\^\fIdisplay\fP\^, \fIlist\fP\^, \fIcount\fP\^, \fIstyle\fP\^, \fItext_prop_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - wchar_t **\fIlist\fP\^; -.br - int \fIcount\fP\^; -.br - XICCEncodingStyle \fIstyle\fP\^; -.br - XTextProperty *\fItext_prop_return\fP\^; -.LP -int Xutf8TextListToTextProperty\^(\^\fIdisplay\fP\^, \fIlist\fP\^, \fIcount\fP\^, \fIstyle\fP\^, \fItext_prop_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - char **\fIlist\fP\^; -.br - int \fIcount\fP\^; -.br - XICCEncodingStyle \fIstyle\fP\^; -.br - XTextProperty *\fItext_prop_return\fP\^; -.LP -int XmbTextPropertyToTextList\^(\^\fIdisplay\fP\^, \fItext_prop\fP\^, \fIlist_return\fP\^, \fIcount_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - XTextProperty *\fItext_prop\fP\^; -.br - char ***\fIlist_return\fP\^; -.br - int *\fIcount_return\fP\^; -.LP -int XwcTextPropertyToTextList\^(\^\fIdisplay\fP\^, \fItext_prop\fP\^, \fIlist_return\fP\^, \fIcount_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - XTextProperty *\fItext_prop\fP\^; -.br - wchar_t ***\fIlist_return\fP\^; -.br - int *\fIcount_return\fP\^; -.LP -int Xutf8TextPropertyToTextList\^(\^\fIdisplay\fP\^, \fItext_prop\fP\^, \fIlist_return\fP\^, \fIcount_return\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - XTextProperty *\fItext_prop\fP\^; -.br - char ***\fIlist_return\fP\^; -.br - int *\fIcount_return\fP\^; -.LP -void XwcFreeStringList\^(\^\fIlist\fP\^) -.br - wchar_t **\fIlist\fP\^; -.LP -char *XDefaultString\^(\|) +.HP +int XmbTextListToTextProperty\^(\^Display *\fIdisplay\fP\^, char +**\fIlist\fP\^, int \fIcount\fP\^, XICCEncodingStyle \fIstyle\fP\^, +XTextProperty *\fItext_prop_return\fP\^); +.HP +int XwcTextListToTextProperty\^(\^Display *\fIdisplay\fP\^, wchar_t +**\fIlist\fP\^, int \fIcount\fP\^, XICCEncodingStyle \fIstyle\fP\^, +XTextProperty *\fItext_prop_return\fP\^); +.HP +int Xutf8TextListToTextProperty\^(\^Display *\fIdisplay\fP\^, char +**\fIlist\fP\^, int \fIcount\fP\^, XICCEncodingStyle \fIstyle\fP\^, +XTextProperty *\fItext_prop_return\fP\^); +.HP +int XmbTextPropertyToTextList\^(\^Display *\fIdisplay\fP\^, XTextProperty +*\fItext_prop\fP\^, char ***\fIlist_return\fP\^, int *\fIcount_return\fP\^); +.HP +int XwcTextPropertyToTextList\^(\^Display *\fIdisplay\fP\^, XTextProperty +*\fItext_prop\fP\^, wchar_t ***\fIlist_return\fP\^, int +*\fIcount_return\fP\^); +.HP +int Xutf8TextPropertyToTextList\^(\^Display *\fIdisplay\fP\^, XTextProperty +*\fItext_prop\fP\^, char ***\fIlist_return\fP\^, int *\fIcount_return\fP\^); +.HP +void XwcFreeStringList\^(\^wchar_t **\fIlist\fP\^); +.HP +char *XDefaultString\^(void) .SH ARGUMENTS .IP \fIdisplay\fP 1i Specifies the connection to the X server. diff --git a/man/XmbTextPerCharExtents.man b/man/XmbTextPerCharExtents.man index acb2354..084da3e 100644 --- a/man/XmbTextPerCharExtents.man +++ b/man/XmbTextPerCharExtents.man @@ -41,7 +41,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XmbTPCEx.man,v 1.4 2001/01/27 18:20:08 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XmbTPCEx.man,v 1.5 2003/04/28 22:17:58 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -145,71 +145,24 @@ .SH NAME XmbTextPerCharExtents, XwcTextPerCharExtents, Xutf8TextPerCharExtents \- obtain per-character information for a text string .SH SYNTAX -Status XmbTextPerCharExtents\^(\^\fIfont_set\fP\^, \fIstring\fP\^, \fInum_bytes\fP\^, \fIink_array_return\fP\^, -.br - \fIlogical_array_return\fP\^, \fIarray_size\fP\^, \fInum_chars_return\fP\^, \fIoverall_ink_return\fP\^, \fIoverall_logical_return\fP\^) -.br - XFontSet \fIfont_set\fP\^; -.br - char *\fIstring\fP\^; -.br - int \fInum_bytes\fP\^; -.br - XRectangle *\fIink_array_return\fP\^; -.br - XRectangle *\fIlogical_array_return\fP\^; -.br - int \fIarray_size\fP\^; -.br - int *\fInum_chars_return\fP\^; -.br - XRectangle *\fIoverall_ink_return\fP\^; -.br - XRectangle *\fIoverall_logical_return\fP\^; -.LP -Status XwcTextPerCharExtents\^(\^\fIfont_set\fP\^, \fIstring\fP\^, \fInum_wchars\fP\^, \fIink_array_return\fP\^, -.br - \fIlogical_array_return\fP\^, \fIarray_size\fP\^, \fInum_chars_return\fP\^, \fIoverall_ink_return\fP\^, \fIoverall_logical_return\fP\^) -.br - XFontSet \fIfont_set\fP\^; -.br - wchar_t *\fIstring\fP\^; -.br - int \fInum_wchars\fP\^; -.br - XRectangle *\fIink_array_return\fP\^; -.br - XRectangle *\fIlogical_array_return\fP; -.br - int \fIarray_size\fP\^; -.br - int *\fInum_chars_return\fP\^; -.br - XRectangle *\fIoverall_ink_return\fP\^; -.br - XRectangle *\fIoverall_logical_return\fP\^; -.LP -Status Xutf8TextPerCharExtents\^(\^\fIfont_set\fP\^, \fIstring\fP\^, \fInum_bytes\fP\^, \fIink_array_return\fP\^, -.br - \fIlogical_array_return\fP\^, \fIarray_size\fP\^, \fInum_chars_return\fP\^, \fIoverall_ink_return\fP\^, \fIoverall_logical_return\fP\^) -.br - XFontSet \fIfont_set\fP\^; -.br - char *\fIstring\fP\^; -.br - int \fInum_bytes\fP\^; -.br - XRectangle *\fIink_array_return\fP\^; -.br - XRectangle *\fIlogical_array_return\fP\^; -.br - int \fIarray_size\fP\^; -.br - int *\fInum_chars_return\fP\^; -.br - XRectangle *\fIoverall_ink_return\fP\^; -.br - XRectangle *\fIoverall_logical_return\fP\^; +.HP +Status XmbTextPerCharExtents\^(\^XFontSet \fIfont_set\fP\^, char +*\fIstring\fP\^, int \fInum_bytes\fP\^, XRectangle *\fIink_array_return\fP\^, +XRectangle *\fIlogical_array_return\fP\^, int \fIarray_size\fP\^, int +*\fInum_chars_return\fP\^, XRectangle *\fIoverall_ink_return\fP\^, XRectangle +*\fIoverall_logical_return\fP\^); +.HP +Status XwcTextPerCharExtents\^(\^XFontSet \fIfont_set\fP\^, wchar_t +*\fIstring\fP\^, int \fInum_wchars\fP\^, XRectangle +*\fIink_array_return\fP\^, XRectangle *\fIlogical_array_return\fP, int +\fIarray_size\fP\^, int *\fInum_chars_return\fP\^, XRectangle +*\fIoverall_ink_return\fP\^, XRectangle *\fIoverall_logical_return\fP\^); +.HP +Status Xutf8TextPerCharExtents\^(\^XFontSet \fIfont_set\fP\^, char +*\fIstring\fP\^, int \fInum_bytes\fP\^, XRectangle *\fIink_array_return\fP\^, +XRectangle *\fIlogical_array_return\fP\^, int \fIarray_size\fP\^, int +*\fInum_chars_return\fP\^, XRectangle *\fIoverall_ink_return\fP\^, XRectangle +*\fIoverall_logical_return\fP\^); .SH ARGUMENTS .IP \fIarray_size\fP 1i Specifies the size of ink_array_return and logical_array_return. diff --git a/man/XrmEnumerateDatabase.man b/man/XrmEnumerateDatabase.man index 24e17ba..c72014c 100644 --- a/man/XrmEnumerateDatabase.man +++ b/man/XrmEnumerateDatabase.man @@ -41,7 +41,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XEnumDB.man,v 1.3 2001/02/07 22:35:20 tsi Exp $ +.\" $XFree86: xc/doc/man/X11/XEnumDB.man,v 1.5 2003/05/29 21:48:04 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -163,20 +163,10 @@ T} T{ 1 T} .TE -.FD 0 -Bool XrmEnumerateDatabase\^(\^\fIdatabase\fP, \fIname_prefix\fP, \fIclass_prefix\fP, \fImode\fP, \fIproc\fP, \fIarg\fP\^) -.br - XrmDatabase \fIdatabase\fP\^; -.br - XrmNameList \fIname_prefix\fP\^; -.br - XrmClassList \fIclass_prefix\fP\^; -.br - int \fImode\fP\^; -.br - Bool (\^*\fIproc\fP\^)\^(\^)\^; -.br - XPointer \fIarg\fP\^; +.HP +Bool XrmEnumerateDatabase\^(\^XrmDatabase \fIdatabase\fP\^, XrmNameList +\fIname_prefix\fP\^, XrmClassList \fIclass_prefix\fP\^, int \fImode\fP\^, Bool +(\^*\fIproc\fP\^)\^(\^)\^, XPointer \fIarg\fP\^); .SH ARGUMENTS .IP \fIdatabase\fP 1i Specifies the resource database. @@ -233,7 +223,7 @@ The bindings and quarks lists are terminated by Note that pointers to the database and type are passed, but these values should not be modified. .LP -The procedure must not modifiy the database. +The procedure must not modify the database. If Xlib has been initialized for threads, the procedure is called with the database locked and the result of a call by the procedure to any Xlib function using the same database is not defined. diff --git a/man/XrmGetFileDatabase.man b/man/XrmGetFileDatabase.man index 7b0c654..197f9e6 100644 --- a/man/XrmGetFileDatabase.man +++ b/man/XrmGetFileDatabase.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XGFDBase.man,v 1.2 2001/01/27 18:19:59 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XGFDBase.man,v 1.3 2003/04/28 22:17:54 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,37 +144,22 @@ .SH NAME XrmGetFileDatabase, XrmPutFileDatabase, XrmGetStringDatabase, XrmLocaleOfDatabase, XrmGetDatabase, XrmSetDatabase, XrmDestroyDatabase \- retrieve and store resource databases .SH SYNTAX -XrmDatabase XrmGetFileDatabase\^(\^\fIfilename\fP\^) -.br - char *\fIfilename\fP\^; -.LP -void XrmPutFileDatabase\^(\^\fIdatabase\fP, \fIstored_db\fP\^) -.br - XrmDatabase \fIdatabase\fP\^; -.br - char *\fIstored_db\fP\^; -.LP -XrmDatabase XrmGetStringDatabase\^(\^\fIdata\fP\^) -.br - char *\fIdata\fP\^; -.LP -char *XrmLocaleOfDatabase\^(\^\fIdatabase\fP\^) -.br - XrmDatabase \fIdatabase\fP\^; -.LP -XrmDatabase XrmGetDatabase\^(\^\fIdisplay\fP\^) -.br - Display *\fIdisplay\fP\^; -.LP -void XrmSetDatabase\^(\^\fIdisplay\fP\^, \fIdatabase\fP\^) -.br - Display *\fIdisplay\fP\^; -.br - XrmDatabase \fIdatabase\fP\^; -.LP -void XrmDestroyDatabase\^(\^\fIdatabase\fP\^) -.br - XrmDatabase \fIdatabase\fP\^; +.HP +XrmDatabase XrmGetFileDatabase\^(\^char *\fIfilename\fP\^); +.HP +void XrmPutFileDatabase\^(\^XrmDatabase \fIdatabase\fP\^, char +*\fIstored_db\fP\^); +.HP +XrmDatabase XrmGetStringDatabase\^(\^char *\fIdata\fP\^, +.HP +char *XrmLocaleOfDatabase\^(\^XrmDatabase \fIdatabase\fP\^); +.HP +XrmDatabase XrmGetDatabase\^(\^Display *\fIdisplay\fP\^); +.HP +void XrmSetDatabase\^(\^Display *\fIdisplay\fP\^, XrmDatabase +\fIdatabase\fP\^); +.HP +void XrmDestroyDatabase\^(\^XrmDatabase \fIdatabase\fP\^); .SH ARGUMENTS .IP \fIfilename\fP 1i Specifies the resource database file name. diff --git a/man/XrmGetResource.man b/man/XrmGetResource.man index c4e5f45..e681692 100644 --- a/man/XrmGetResource.man +++ b/man/XrmGetResource.man @@ -41,7 +41,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XGetRes.man,v 1.3 2001/02/09 03:47:45 tsi Exp $ +.\" $XFree86: xc/doc/man/X11/XGetRes.man,v 1.4 2003/04/28 22:17:54 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -146,59 +146,24 @@ .SH NAME XrmGetResource, XrmQGetResource, XrmQGetSearchList, XrmQGetSearchResource \- retrieve database resources and search lists .SH SYNTAX -Bool XrmGetResource\^(\^\fIdatabase\fP, \fIstr_name\fP, \fIstr_class\fP, -\fIstr_type_return\fP, \fIvalue_return\fP\^) -.br - XrmDatabase \fIdatabase\fP\^; -.br - char *\fIstr_name\fP\^; -.br - char *\fIstr_class\fP\^; -.br - char **\fIstr_type_return\fP\^; -.br - XrmValue *\fIvalue_return\fP\^; -.LP -Bool XrmQGetResource\^(\^\fIdatabase\fP, \fIquark_name\fP, \fIquark_class\fP, -\fIquark_type_return\fP, \fIvalue_return\fP\^) -.br - XrmDatabase \fIdatabase\fP\^; -.br - XrmNameList \fIquark_name\fP\^; -.br - XrmClassList \fIquark_class\fP\^; -.br - XrmRepresentation *\fIquark_type_return\fP\^; -.br - XrmValue *\fIvalue_return\fP\^; -.LP +.HP +Bool XrmGetResource\^(\^XrmDatabase \fIdatabase\fP\^, char *\fIstr_name\fP\^, +char *\fIstr_class\fP\^, char **\fIstr_type_return\fP\^, XrmValue +*\fIvalue_return\fP\^); +.HP +Bool XrmQGetResource\^(\^XrmDatabase \fIdatabase\fP\^, XrmNameList +\fIquark_name\fP\^, XrmClassList \fIquark_class\fP\^, XrmRepresentation +*\fIquark_type_return\fP\^, XrmValue *\fIvalue_return\fP\^); +.HP typedef XrmHashTable *XrmSearchList; .sp -Bool XrmQGetSearchList\^(\^\fIdatabase\fP, \fInames\fP, \fIclasses\fP, -\fIlist_return\fP, \fIlist_length\fP\^) -.br - XrmDatabase \fIdatabase\fP\^; -.br - XrmNameList \fInames\fP\^; -.br - XrmClassList \fIclasses\fP\^; -.br - XrmSearchList \fIlist_return\fP\^; -.br - int \fIlist_length\fP\^; -.LP -Bool XrmQGetSearchResource\^(\^\fIlist\fP, \fIname\fP, \fIclass\fP, -\fItype_return\fP, \fIvalue_return\fP\^) -.br - XrmSearchList \fIlist\fP\^; -.br - XrmName \fIname\fP\^; -.br - XrmClass \fIclass\fP\^; -.br - XrmRepresentation *\fItype_return\fP\^; -.br - XrmValue *\fIvalue_return\fP\^; +Bool XrmQGetSearchList\^(\^XrmDatabase \fIdatabase\fP\^, XrmNameList +\fInames\fP\^, XrmClassList \fIclasses\fP\^, XrmSearchList +\fIlist_return\fP\^, int \fIlist_length\fP\^); +.HP +Bool XrmQGetSearchResource\^(\^XrmSearchList \fIlist\fP\^, XrmName +\fIname\fP\^, XrmClass \fIclass\fP\^, XrmRepresentation *\fItype_return\fP\^, +XrmValue *\fIvalue_return\fP\^); .SH ARGUMENTS .IP \fIclass\fP 1i Specifies the resource class. diff --git a/man/XrmInitialize.man b/man/XrmInitialize.man index ba59fc2..d5b79b6 100644 --- a/man/XrmInitialize.man +++ b/man/XrmInitialize.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XInitial.man,v 1.3 2001/02/09 03:47:45 tsi Exp $ +.\" $XFree86: xc/doc/man/X11/XInitial.man,v 1.4 2003/04/28 22:17:55 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,22 +144,12 @@ .SH NAME XrmInitialize, XrmParseCommand, XrmValue, XrmOptionKind, XrmOptionDescRec \- initialize the Resource Manager, Resource Manager structures, and parse the command line .SH SYNTAX -void XrmInitialize\^(\|); -.LP -void XrmParseCommand\^(\^\fIdatabase\fP\^, \^\fItable\fP\^, \^\fItable_count\fP\^, -\^\fIname\fP\^, \^\fIargc_in_out\fP\^, \^\fIargv_in_out\fP\^) -.br - XrmDatabase *\fIdatabase\fP\^; -.br - XrmOptionDescList \fItable\fP\^; -.br - int \fItable_count\fP\^; -.br - char *\fIname\fP\^; -.br - int *\fIargc_in_out\fP\^; -.br - char **\fIargv_in_out\fP\^; +.HP +void XrmInitialize\^(void\^); +.HP +void XrmParseCommand\^(\^XrmDatabase *\fIdatabase\fP\^, XrmOptionDescList +\fItable\fP\^, int \fItable_count\fP\^, char *\fIname\fP\^, int +*\fIargc_in_out\fP\^, char **\fIargv_in_out\fP\^); .SH ARGUMENTS .IP \fIargc_in_out\fP 1i Specifies the number of arguments and returns the number of remaining arguments. diff --git a/man/XrmMergeDatabases.man b/man/XrmMergeDatabases.man index 8538e62..72965f0 100644 --- a/man/XrmMergeDatabases.man +++ b/man/XrmMergeDatabases.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XMDBases.man,v 1.2 2001/01/27 18:20:01 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XMDBases.man,v 1.3 2003/04/28 22:17:55 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,23 +144,14 @@ .SH NAME XrmMergeDatabases, XrmCombineDatabase, XrmCombineFileDatabase \- merge resource databases .SH SYNTAX -void XrmMergeDatabases(\^\fIsource_db\fP, \fItarget_db\fP\^) -.br - XrmDatabase \fIsource_db\fP, *\fItarget_db\fP\^; -.LP -void XrmCombineDatabase(\^\fIsource_db\fP, \fItarget_db\fP, \fIoverride\fP\^) -.br - XrmDatabase \fIsource_db\fP, *\fItarget_db\fP\^; -.br - Bool \fIoverride\fP; -.LP -Status XrmCombineFileDatabase(\^\fIfilename\fP, \fItarget_db\fP, \fIoverride\fP\^) -.br - char *\fIfilename\fP; -.br - XrmDatabase *\fItarget_db\fP\^; -.br - Bool \fIoverride\fP; +.HP +void XrmMergeDatabases(\^XrmDatabase \fIsource_db\fP, *\fItarget_db\fP\^); +.HP +void XrmCombineDatabase(\^XrmDatabase \fIsource_db\fP, XrmDatabase +*\fItarget_db\fP\^); +.HP +Status XrmCombineFileDatabase(\^char *\fIfilename\fP, XrmDatabase +*\fItarget_db\fP\^, Bool \fIoverride\fP); .SH ARGUMENTS .IP \fIsource_db\fP 1i Specifies the resource database that is to be merged into the target database. diff --git a/man/XrmPutResource.man b/man/XrmPutResource.man index 28d9230..80bdbb5 100644 --- a/man/XrmPutResource.man +++ b/man/XrmPutResource.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XPutRes.man,v 1.3 2001/02/09 03:47:46 tsi Exp $ +.\" $XFree86: xc/doc/man/X11/XPutRes.man,v 1.5 2003/08/04 10:32:20 eich Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,53 +144,22 @@ .SH NAME XrmPutResource, XrmQPutResource, XrmPutStringResource, XrmQPutStringResource, XrmPutLineResource \- store database resources .SH SYNTAX -void XrmPutResource\^(\^\fIdatabase\fP, \fIspecifier\fP, \fItype\fP, \fIvalue\fP\^) -.br - XrmDatabase *\fIdatabase\fP\^; -.br - char *\fIspecifier\fP\^; -.br - char *\fItype\fP\^; -.br - XrmValue *\fIvalue\fP\^; -.LP -void XrmQPutResource\^(\^\fIdatabase\fP, \fIbindings\fP, \fIquarks\fP, -\fItype\fP, \fIvalue\fP\^) -.br - XrmDatabase *\fIdatabase\fP\^; -.br - XrmBindingList \fIbindings\fP\^; -.br - XrmQuarkList \fIquarks\fP\^; -.br - XrmRepresentation \fItype\fP\^; -.br - XrmValue *\fIvalue\fP\^; -.LP -void XrmPutStringResource\^(\^\fIdatabase\fP, \fIspecifier\fP, \fIvalue\fP\^) -.br - XrmDatabase *\fIdatabase\fP\^; -.br - char *\fIspecifier\fP\^; -.br - char *\fIvalue\fP\^; -.LP -void XrmQPutStringResource\^(\^\fIdatabase\fP, \fIbindings\fP, \fIquarks\fP, -\fIvalue\fP\^) -.br - XrmDatabase *\fIdatabase\fP\^; -.br - XrmBindingList \fIbindings\fP\^; -.br - XrmQuarkList \fIquarks\fP\^; -.br - char *\fIvalue\fP\^; -.LP -void XrmPutLineResource\^(\^\fIdatabase\fP, \fIline\fP\^) -.br - XrmDatabase *\fIdatabase\fP\^; -.br - char *\fIline\fP\^; +.HP +void XrmPutResource\^(\^XrmDatabase *\fIdatabase\fP\^, char +*\fIspecifier\fP\^, char *\fItype\fP\^, XrmValue *\fIvalue\fP\^); +.HP +void XrmQPutResource\^(\^XrmDatabase *\fIdatabase\fP\^, XrmBindingList +\fIbindings\fP\^, XrmQuarkList \fIquarks\fP\^, XrmRepresentation \fItype\fP\^, +XrmValue *\fIvalue\fP\^); +.HP +void XrmPutStringResource\^(\^XrmDatabase *\fIdatabase\fP\^, char +*\fIspecifier\fP\^, char *\fIvalue\fP\^); +.HP +void XrmQPutStringResource\^(\^XrmDatabase *\fIdatabase\fP\^, XrmBindingList +\fIbindings\fP\^, XrmQuarkList \fIquarks\fP\^, char *\fIvalue\fP\^); +.HP +void XrmPutLineResource\^(\^XrmDatabase *\fIdatabase\fP\^, char +*\fIline\fP\^); .SH ARGUMENTS .IP \fIbindings\fP 1i Specifies a list of bindings. @@ -218,6 +187,7 @@ followed by: .Ds XrmQPutResource(database, bindings, quarks, XrmStringToQuark(type), value) .De +.LP If the specifier and type are not in the Host Portable Character Encoding, the result is implementation-dependent. The value is stored in the database without modification. diff --git a/man/XrmUniqueQuark.man b/man/XrmUniqueQuark.man index 736193d..b627651 100644 --- a/man/XrmUniqueQuark.man +++ b/man/XrmUniqueQuark.man @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XUQuark.man,v 1.4 2001/02/09 03:47:47 tsi Exp $ +.\" $XFree86: xc/doc/man/X11/XUQuark.man,v 1.5 2003/04/28 22:17:57 herrb Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -144,57 +144,47 @@ .SH NAME XrmUniqueQuark, XrmStringToQuark, XrmPermStringToQuark, XrmQuarkToString, XrmStringToQuarkList, XrmStringToBindingQuarkList \- manipulate resource quarks .SH SYNTAX -XrmQuark XrmUniqueQuark\^(\|) +.HP +XrmQuark XrmUniqueQuark\^(void); .LP \&#define XrmStringToName(string) XrmStringToQuark(string) -\&#define XrmStringToClass(string) XrmStringToQuark(string) -\&#define XrmStringToRepresentation(string) XrmStringToQuark(string) -.sp -XrmQuark XrmStringToQuark\^(\^\fIstring\fP\^) .br - char *\fIstring\fP\^; -.sp -XrmQuark XrmPermStringToQuark\^(\^\fIstring\fP\^) +\&#define XrmStringToClass(string) XrmStringToQuark(string) .br - char *\fIstring\fP\^; +\&#define XrmStringToRepresentation(string) XrmStringToQuark(string) +.HP +int XrmQuark XrmStringToQuark\^(\^char *\fIstring\fP\^); +.HP +XrmQuark XrmPermStringToQuark\^(\^char *\fIstring\fP\^); .LP \&#define XrmStringToName(string) XrmStringToQuark(string) -\&#define XrmStringToClass(string) XrmStringToQuark(string) -\&#define XrmStringToRepresentation(string) XrmStringToQuark(string) -.sp -XrmQuark XrmStringToQuark\^(\^\fIstring\fP\^) .br - char *\fIstring\fP\^; -.sp -XrmQuark XrmPermStringToQuark\^(\^\fIstring\fP\^) +\&#define XrmStringToClass(string) XrmStringToQuark(string) .br - char *\fIstring\fP\^; +\&#define XrmStringToRepresentation(string) XrmStringToQuark(string) +.HP +XrmQuark XrmStringToQuark\^(\^char *\fIstring\fP\^); +.HP +XrmQuark XrmPermStringToQuark\^(\^char *\fIstring\fP\^); .LP \&#define XrmNameToString(name) XrmQuarkToString(name) +.br \&#define XrmClassToString(class) XrmQuarkToString(class) -\&#define XrmRepresentationToString(type) XrmQuarkToString(type) -.sp -char *XrmQuarkToString\^(\^\fIquark\fP\^) .br - XrmQuark \fIquark\fP\^; +\&#define XrmRepresentationToString(type) XrmQuarkToString(type) +.HP +char *XrmQuarkToString\^(\^XrmQuark \fIquark\fP\^); .LP \&#define XrmStringToNameList(str, name) XrmStringToQuarkList((str), (name)) +.br \&#define XrmStringToClassList(str,class) XrmStringToQuarkList((str), (class)) .sp -void XrmStringToQuarkList\^(\^\fIstring\fP, \fIquarks_return\fP\^) -.br - char *\fIstring\fP\^; -.br - XrmQuarkList \fIquarks_return\fP\^; -.LP -XrmStringToBindingQuarkList\^(\^\fIstring\fP, \fIbindings_return\fP, -\fIquarks_return\fP\^) -.br - char *\fIstring\fP\^; -.br - XrmBindingList \fIbindings_return\fP\^; -.br - XrmQuarkList \fIquarks_return\fP\^; +.HP +void XrmStringToQuarkList\^(\^char *\fIstring\fP\^, XrmQuarkList +\fIquarks_return\fP\^); +.HP +XrmStringToBindingQuarkList\^(\^char *\fIstring\fP\^, XrmBindingList +\fIbindings_return\fP\^, XrmQuarkList \fIquarks_return\fP\^); .SH ARGUMENTS .IP \fIbindings_return\fP 1i Returns the binding list. diff --git a/modules/im/ximcp/imCallbk.c b/modules/im/ximcp/imCallbk.c index e6ffb13..65e8f0f 100644 --- a/modules/im/ximcp/imCallbk.c +++ b/modules/im/ximcp/imCallbk.c @@ -32,12 +32,16 @@ PERFORMANCE OF THIS SOFTWARE. makoto@sm.sony.co.jp ***********************************************************************/ -/* $XFree86: xc/lib/X11/imCallbk.c,v 3.8 2002/12/15 01:20:56 dawes Exp $ */ +/* $XFree86: xc/lib/X11/imCallbk.c,v 3.10 2003/11/17 22:20:11 dawes Exp $ */ #include "Xlibint.h" #include "Xlcint.h" #include "Ximint.h" #include "XlcPubI.h" +#ifdef X_LOCALE +#define mblen(a,b) _Xmblen(a,b) +extern int _Xmblen (); +#endif #define sz_CARD8 1 #define sz_INT8 1 @@ -72,9 +76,7 @@ typedef enum { } XimCbStatus; typedef XimCbStatus (*XimCb)( -#if NeedFunctionPrototypes Xim, Xic, char*, int -#endif ); #define PACKET_TO_MAJOROPCODE(p) (*(CARD8*)((CARD8*)(p))) @@ -89,7 +91,6 @@ typedef XimCbStatus (*XimCb)( (im->private.proto.read((im),(XPointer)(buf),(buf_len),&(len))) #define _XimFlushData(im) im->private.proto.flush((im)) -#if NeedFunctionPrototypes Private XimCbStatus _XimGeometryCallback(Xim, Xic, char*, int); Private XimCbStatus _XimStrConversionCallback(Xim, Xic, char*, int); Private XimCbStatus _XimPreeditStartCallback(Xim, Xic, char*, int); @@ -101,20 +102,6 @@ Private XimCbStatus _XimStatusStartCallback(Xim, Xic, char*, int); Private XimCbStatus _XimStatusDoneCallback(Xim, Xic, char*, int); Private XimCbStatus _XimStatusDrawCallback(Xim, Xic, char*, int); Private XimCbStatus _XimPreeditStateNotifyCallback(Xim, Xic, char *, int); -#else -Public Bool _XimCbDispatch(); -Private XimCbStatus _XimGeometryCallback(); -Private XimCbStatus _XimStrConversionCallback(); -Private XimCbStatus _XimPreeditStartCallback(); -Private XimCbStatus _XimPreeditDoneCallback(); -Private void _free_memory_for_text(); -Private XimCbStatus _XimPreeditDrawCallback(); -Private XimCbStatus _XimPreeditCaretCallback(); -Private XimCbStatus _XimStatusStartCallback(); -Private XimCbStatus _XimStatusDoneCallback(); -Private XimCbStatus _XimStatusDrawCallback(); -Private XimCbStatus _XimPreeditStateNotifyCallback(); -#endif /* NeedFunctionPrototypes */ #if defined(__STDC__) && ((defined(sun) && defined(SVR4)) || defined(WIN32)) #define RConst /**/ @@ -151,23 +138,13 @@ static RConst XimCb callback_table[] = { Private Bool -#if NeedFunctionPrototypes _XimIsReadyForProcess(Xic ic) -#else -_XimIsReadyForProcess(ic) - Xic ic; -#endif { return(!ic->private.proto.waitCallback); /* check HM */ } Private void -#if NeedFunctionPrototypes _XimProcessPendingCallbacks(Xic ic) -#else -_XimProcessPendingCallbacks(ic) - Xic ic; -#endif { XimPendingCallback pcbq; @@ -184,13 +161,7 @@ _XimProcessPendingCallbacks(ic) } Private void -#if NeedFunctionPrototypes _XimPutCbIntoQueue(Xic ic, XimPendingCallback call_data) -#else -_XimPutCbIntoQueue(ic, call_data) - Xic ic; - XimPendingCallback call_data; -#endif { XimPendingCallback pcbq = ic->private.proto.pend_cb_que; @@ -211,18 +182,10 @@ _XimPutCbIntoQueue(ic, call_data) } Public Bool -#if NeedFunctionPrototypes _XimCbDispatch(Xim xim, INT16 len, XPointer data, XPointer call_data) -#else -_XimCbDispatch(xim, len, data, call_data) - Xim xim; - INT16 len; - XPointer data; - XPointer call_data; -#endif { /* `data' points to the beginning of the packet defined in IM Protocol doc. */ @@ -296,18 +259,10 @@ _XimCbDispatch(xim, len, data, call_data) } Private XimCbStatus -#if NeedFunctionPrototypes _XimGeometryCallback(Xim im, Xic ic, char* proto, int len) -#else -_XimGeometryCallback(im, ic, proto, len) - Xim im; - Xic ic; - char* proto; - int len; -#endif { XICCallback* cb = &ic->core.geometry_callback; @@ -327,18 +282,10 @@ _XimGeometryCallback(im, ic, proto, len) } Private XimCbStatus -#if NeedFunctionPrototypes _XimStrConversionCallback(Xim im, Xic ic, char* proto, int len) -#else -_XimStrConversionCallback(im, ic, proto, len) - Xim im; - Xic ic; - char* proto; - int len; -#endif { XICCallback* cb = &ic->core.string_conversion_callback; /* check HM */ XIMStringConversionCallbackStruct cbrec; @@ -418,18 +365,10 @@ _XimStrConversionCallback(im, ic, proto, len) } Private XimCbStatus -#if NeedFunctionPrototypes _XimPreeditStartCallback(Xim im, Xic ic, char* proto, int len) -#else -_XimPreeditStartCallback(im, ic, proto, len) - Xim im; - Xic ic; - char* proto; - int len; -#endif { XICCallback* cb = &ic->core.preedit_attr.start_callback; int ret; @@ -475,18 +414,10 @@ _XimPreeditStartCallback(im, ic, proto, len) } Private XimCbStatus -#if NeedFunctionPrototypes _XimPreeditDoneCallback(Xim im, Xic ic, char* proto, int len) -#else -_XimPreeditDoneCallback(im, ic, proto, len) - Xim im; - Xic ic; - char* proto; - int len; -#endif { XICCallback* cb = &ic->core.preedit_attr.done_callback; @@ -506,16 +437,9 @@ _XimPreeditDoneCallback(im, ic, proto, len) } Private void -#if NeedFunctionPrototypes _read_text_from_packet(Xim im, char* buf, XIMText** text_ptr) -#else -_read_text_from_packet(im, buf, text_ptr) - Xim im; - char* buf; - XIMText** text_ptr; -#endif { int status; XIMText* text; @@ -628,12 +552,7 @@ _read_text_from_packet(im, buf, text_ptr) } Private void -#if NeedFunctionPrototypes _free_memory_for_text(XIMText* text) -#else -_free_memory_for_text(text) - XIMText* text; -#endif { if (text) { if (text->string.multi_byte) @@ -645,18 +564,10 @@ _free_memory_for_text(text) } Private XimCbStatus -#if NeedFunctionPrototypes _XimPreeditDrawCallback(Xim im, Xic ic, char* proto, int len) -#else -_XimPreeditDrawCallback(im, ic, proto, len) - Xim im; - Xic ic; - char* proto; - int len; -#endif { XICCallback* cb = &ic->core.preedit_attr.draw_callback; XIMPreeditDrawCallbackStruct cbs; @@ -684,18 +595,10 @@ _XimPreeditDrawCallback(im, ic, proto, len) } Private XimCbStatus -#if NeedFunctionPrototypes _XimPreeditCaretCallback(Xim im, Xic ic, char* proto, int len) -#else -_XimPreeditCaretCallback(im, ic, proto, len) - Xim im; - Xic ic; - char* proto; - int len; -#endif { XICCallback* cb = &ic->core.preedit_attr.caret_callback; XIMPreeditCaretCallbackStruct cbs; @@ -744,18 +647,10 @@ _XimPreeditCaretCallback(im, ic, proto, len) } Private XimCbStatus -#if NeedFunctionPrototypes _XimStatusStartCallback(Xim im, Xic ic, char* proto, int len) -#else -_XimStatusStartCallback(im, ic, proto, len) - Xim im; - Xic ic; - char* proto; - int len; -#endif { XICCallback* cb = &ic->core.status_attr.start_callback; @@ -775,18 +670,10 @@ _XimStatusStartCallback(im, ic, proto, len) } Private XimCbStatus -#if NeedFunctionPrototypes _XimStatusDoneCallback(Xim im, Xic ic, char* proto, int len) -#else -_XimStatusDoneCallback(im, ic, proto, len) - Xim im; - Xic ic; - char* proto; - int len; -#endif { XICCallback* cb = &ic->core.status_attr.done_callback; @@ -806,18 +693,10 @@ _XimStatusDoneCallback(im, ic, proto, len) } Private XimCbStatus -#if NeedFunctionPrototypes _XimStatusDrawCallback(Xim im, Xic ic, char* proto, int len) -#else -_XimStatusDrawCallback(im, ic, proto, len) - Xim im; - Xic ic; - char* proto; - int len; -#endif { XICCallback* cb = &ic->core.status_attr.draw_callback; XIMStatusDrawCallbackStruct cbs; @@ -849,15 +728,7 @@ _XimStatusDrawCallback(im, ic, proto, len) } Private XimCbStatus -#if NeedFunctionPrototypes _XimPreeditStateNotifyCallback( Xim im, Xic ic, char* proto, int len ) -#else -_XimPreeditStateNotifyCallback( im, ic, proto, len ) - Xim im; - Xic ic; - char *proto; - int len; -#endif { XICCallback *cb = &ic->core.preedit_attr.state_notify_callback; diff --git a/modules/im/ximcp/imDefFlt.c b/modules/im/ximcp/imDefFlt.c index 19a67cf..27e7973 100644 --- a/modules/im/ximcp/imDefFlt.c +++ b/modules/im/ximcp/imDefFlt.c @@ -26,7 +26,7 @@ PERFORMANCE OF THIS SOFTWARE. fujiwara@a80.tech.yk.fujitsu.co.jp ******************************************************************/ -/* $XFree86: xc/lib/X11/imDefFlt.c,v 1.4 2001/01/17 19:41:51 dawes Exp $ */ +/* $XFree86: xc/lib/X11/imDefFlt.c,v 1.5 2003/04/13 19:22:20 dawes Exp $ */ #include <X11/Xatom.h> #define NEED_EVENTS @@ -36,11 +36,11 @@ PERFORMANCE OF THIS SOFTWARE. #include "Ximint.h" Private long -_XimTriggerCheck(im, ev, len, keylist) - Xim im; - XKeyEvent *ev; - INT32 len; - CARD32 *keylist; +_XimTriggerCheck( + Xim im, + XKeyEvent *ev, + INT32 len, + CARD32 *keylist) { register long i; KeySym keysym; @@ -67,27 +67,27 @@ _XimTriggerCheck(im, ev, len, keylist) } Private long -_XimTriggerOnCheck(im, ev) - Xim im; - XKeyEvent *ev; +_XimTriggerOnCheck( + Xim im, + XKeyEvent *ev) { return _XimTriggerCheck(im, ev, (INT32)im->private.proto.im_onkeylist[0], &im->private.proto.im_onkeylist[1]); } Private long -_XimTriggerOffCheck(im, ev) - Xim im; - XKeyEvent *ev; +_XimTriggerOffCheck( + Xim im, + XKeyEvent *ev) { return _XimTriggerCheck(im, ev, (INT32)im->private.proto.im_offkeylist[0], &im->private.proto.im_offkeylist[1]); } Private Bool -_XimOnKeysCheck(ic, ev) - Xic ic; - XKeyEvent *ev; +_XimOnKeysCheck( + Xic ic, + XKeyEvent *ev) { Xim im = (Xim)ic->core.im; long idx; @@ -104,9 +104,9 @@ _XimOnKeysCheck(ic, ev) } Private Bool -_XimOffKeysCheck(ic, ev) - Xic ic; - XKeyEvent *ev; +_XimOffKeysCheck( + Xic ic, + XKeyEvent *ev) { Xim im = (Xim)ic->core.im; long idx; @@ -123,8 +123,8 @@ _XimOffKeysCheck(ic, ev) } Private void -_XimPendingFilter(ic) - Xic ic; +_XimPendingFilter( + Xic ic) { Xim im = (Xim)ic->core.im; @@ -136,9 +136,9 @@ _XimPendingFilter(ic) } Private Bool -_XimProtoKeypressFilter(ic, ev) - Xic ic; - XKeyEvent *ev; +_XimProtoKeypressFilter( + Xic ic, + XKeyEvent *ev) { #ifdef XIM_CONNECTABLE Xim im = (Xim)ic->core.im; @@ -189,19 +189,19 @@ _XimProtoKeypressFilter(ic, ev) } Private Bool -_XimFilterKeypress (d, w, ev, client_data) - Display *d; - Window w; - XEvent *ev; - XPointer client_data; +_XimFilterKeypress( + Display *d, + Window w, + XEvent *ev, + XPointer client_data) { return _XimProtoKeypressFilter((Xic)client_data, (XKeyEvent *)ev ); } Private Bool -_XimProtoKeyreleaseFilter( ic, ev ) - Xic ic; - XKeyEvent *ev; +_XimProtoKeyreleaseFilter( + Xic ic, + XKeyEvent *ev) { #ifdef XIM_CONNECTABLE Xim im = (Xim)ic->core.im; @@ -252,18 +252,18 @@ _XimProtoKeyreleaseFilter( ic, ev ) } Private Bool -_XimFilterKeyrelease (d, w, ev, client_data) - Display *d; - Window w; - XEvent *ev; - XPointer client_data; +_XimFilterKeyrelease( + Display *d, + Window w, + XEvent *ev, + XPointer client_data) { return _XimProtoKeyreleaseFilter((Xic)client_data, (XKeyEvent *)ev); } Private void -_XimRegisterKeyPressFilter(ic) - Xic ic ; +_XimRegisterKeyPressFilter( + Xic ic) { if (ic->core.focus_window) { if (!(ic->private.proto.registed_filter_event & KEYPRESS_MASK)) { @@ -279,8 +279,8 @@ _XimRegisterKeyPressFilter(ic) } Private void -_XimRegisterKeyReleaseFilter(ic) - Xic ic ; +_XimRegisterKeyReleaseFilter( + Xic ic) { if (ic->core.focus_window) { if (!(ic->private.proto.registed_filter_event & KEYRELEASE_MASK)) { @@ -296,8 +296,8 @@ _XimRegisterKeyReleaseFilter(ic) } Private void -_XimUnregisterKeyPressFilter(ic) - Xic ic ; +_XimUnregisterKeyPressFilter( + Xic ic) { if (ic->core.focus_window) { if (ic->private.proto.registed_filter_event & KEYPRESS_MASK) { @@ -312,8 +312,8 @@ _XimUnregisterKeyPressFilter(ic) } Private void -_XimUnregisterKeyReleaseFilter(ic) - Xic ic ; +_XimUnregisterKeyReleaseFilter( + Xic ic) { if (ic->core.focus_window) { if (ic->private.proto.registed_filter_event & KEYRELEASE_MASK) { @@ -328,8 +328,8 @@ _XimUnregisterKeyReleaseFilter(ic) } Public void -_XimRegisterFilter(ic) - Xic ic; +_XimRegisterFilter( + Xic ic) { _XimRegisterKeyPressFilter(ic); if (IS_FORWARD_EVENT(ic, KeyReleaseMask)) @@ -338,8 +338,8 @@ _XimRegisterFilter(ic) } Public void -_XimUnregisterFilter(ic) - Xic ic; +_XimUnregisterFilter( + Xic ic) { _XimUnregisterKeyPressFilter(ic); _XimUnregisterKeyReleaseFilter(ic); @@ -347,8 +347,8 @@ _XimUnregisterFilter(ic) } Public void -_XimReregisterFilter(ic) - Xic ic; +_XimReregisterFilter( + Xic ic) { if (IS_FORWARD_EVENT(ic, KeyReleaseMask)) _XimRegisterKeyReleaseFilter(ic); @@ -359,11 +359,11 @@ _XimReregisterFilter(ic) } Private Bool -_XimFilterServerDestroy (d, w, ev, client_data) - Display *d; - Window w; - XEvent *ev; - XPointer client_data; +_XimFilterServerDestroy( + Display *d, + Window w, + XEvent *ev, + XPointer client_data) { Xim im = (Xim)client_data; @@ -381,8 +381,8 @@ _XimFilterServerDestroy (d, w, ev, client_data) } Public void -_XimRegisterServerFilter(im) - Xim im ; +_XimRegisterServerFilter( + Xim im) { if (im->private.proto.im_window) { if (!(im->private.proto.registed_filter_event & DESTROYNOTIFY_MASK)) { @@ -400,8 +400,8 @@ _XimRegisterServerFilter(im) } Public void -_XimUnregisterServerFilter(im) - Xim im ; +_XimUnregisterServerFilter( + Xim im) { if (im->private.proto.im_window) { if (im->private.proto.registed_filter_event & DESTROYNOTIFY_MASK) { diff --git a/modules/im/ximcp/imDefIc.c b/modules/im/ximcp/imDefIc.c index 69a492d..7d3a5cc 100644 --- a/modules/im/ximcp/imDefIc.c +++ b/modules/im/ximcp/imDefIc.c @@ -28,31 +28,18 @@ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. fujiwara@a80.tech.yk.fujitsu.co.jp ******************************************************************/ -/* $XFree86: xc/lib/X11/imDefIc.c,v 3.8 2001/01/17 19:41:51 dawes Exp $ */ +/* $XFree86: xc/lib/X11/imDefIc.c,v 3.10 2003/11/17 22:20:11 dawes Exp $ */ #include "Xlibint.h" #include "Xlcint.h" #include "Ximint.h" -/* EXTERNS */ - -/* imRm.c */ -extern Bool _XimCheckCreateICValues(); - Private Bool -#if NeedFunctionPrototypes _XimCreateICCheck( Xim im, INT16 len, XPointer data, XPointer arg) -#else -_XimCreateICCheck(im, len, data, arg) - Xim im; - INT16 len; - XPointer data; - XPointer arg; -#endif { CARD16 *buf_s = (CARD16 *)((CARD8 *)data + XIM_HEADER_SIZE); CARD8 major_opcode = *((CARD8 *)data); @@ -251,19 +238,11 @@ _XimDelayModeGetICValues(ic, arg) #endif /* XIM_CONNECTABLE */ Private Bool -#if NeedFunctionPrototypes _XimGetICValuesCheck( Xim im, INT16 len, XPointer data, XPointer arg) -#else -_XimGetICValuesCheck(im, len, data, arg) - Xim im; - INT16 len; - XPointer data; - XPointer arg; -#endif { Xic ic = (Xic)arg; CARD16 *buf_s = (CARD16 *)((CARD8 *)data + XIM_HEADER_SIZE); @@ -288,9 +267,9 @@ _XimGetICValuesCheck(im, len, data, arg) } Private char * -_XimProtoGetICValues(xic, arg) - XIC xic ; - XIMArg *arg ; +_XimProtoGetICValues( + XIC xic, + XIMArg *arg) { Xic ic = (Xic)xic; Xim im = (Xim)ic->core.im; @@ -628,19 +607,11 @@ _XimDelayModeSetICValues(ic, arg) #endif /* XIM_CONNECTABLE */ Private Bool -#if NeedFunctionPrototypes _XimSetICValuesCheck( Xim im, INT16 len, XPointer data, XPointer arg) -#else -_XimSetICValuesCheck(im, len, data, arg) - Xim im; - INT16 len; - XPointer data; - XPointer arg; -#endif { Xic ic = (Xic)arg; CARD16 *buf_s = (CARD16 *)((CARD8 *)data + XIM_HEADER_SIZE); @@ -665,9 +636,9 @@ _XimSetICValuesCheck(im, len, data, arg) } Private char * -_XimProtoSetICValues(xic, arg) - XIC xic; - XIMArg *arg; +_XimProtoSetICValues( + XIC xic, + XIMArg *arg) { Xic ic = (Xic)xic; Xim im = (Xim)ic->core.im; @@ -815,19 +786,11 @@ _XimProtoSetICValues(xic, arg) } Private Bool -#if NeedFunctionPrototypes _XimDestroyICCheck( Xim im, INT16 len, XPointer data, XPointer arg) -#else -_XimDestroyICCheck(im, len, data, arg) - Xim im; - INT16 len; - XPointer data; - XPointer arg; -#endif { Xic ic = (Xic)arg; CARD16 *buf_s = (CARD16 *)((CARD8 *)data + XIM_HEADER_SIZE); @@ -853,8 +816,8 @@ _XimDestroyICCheck(im, len, data, arg) } Private void -_XimProtoICFree(ic) - Xic ic; +_XimProtoICFree( + Xic ic) { #ifdef XIM_CONNECTABLE Xim im = (Xim)ic->core.im; @@ -900,8 +863,8 @@ _XimProtoICFree(ic) } Private void -_XimProtoDestroyIC(xic) - XIC xic; +_XimProtoDestroyIC( + XIC xic) { Xic ic = (Xic)xic; Xim im = (Xim)ic->core.im; @@ -943,8 +906,8 @@ _XimProtoDestroyIC(xic) } Private void -_XimProtoSetFocus(xic) - XIC xic; +_XimProtoSetFocus( + XIC xic) { Xic ic = (Xic)xic; Xim im = (Xim)ic->core.im; @@ -988,8 +951,8 @@ _XimProtoSetFocus(xic) } Private void -_XimProtoUnsetFocus(xic) - XIC xic; +_XimProtoUnsetFocus( + XIC xic) { Xic ic = (Xic)xic; Xim im = (Xim)ic->core.im; @@ -1033,19 +996,11 @@ _XimProtoUnsetFocus(xic) } Private Bool -#if NeedFunctionPrototypes _XimResetICCheck( Xim im, INT16 len, XPointer data, XPointer arg) -#else -_XimResetICCheck(im, len, data, arg) - Xim im; - INT16 len; - XPointer data; - XPointer arg; -#endif { Xic ic = (Xic)arg; CARD16 *buf_s = (CARD16 *)((CARD8 *)data + XIM_HEADER_SIZE); @@ -1070,9 +1025,9 @@ _XimResetICCheck(im, len, data, arg) } Private char * -_XimProtoReset(xic, retfunc) - XIC xic; - char * (*retfunc) (Xim im, Xic ic, XPointer buf); +_XimProtoReset( + XIC xic, + char * (*retfunc) (Xim im, Xic ic, XPointer buf) ) { Xic ic = (Xic)xic; Xim im = (Xim)ic->core.im; @@ -1141,10 +1096,10 @@ _XimProtoReset(xic, retfunc) } Private char * -_XimCommitedMbString(im, ic, buf) - Xim im; - Xic ic; - XPointer buf; +_XimCommitedMbString( + Xim im, + Xic ic, + XPointer buf) { CARD16 *buf_s = (CARD16 *)buf; XimCommitInfo info; @@ -1191,17 +1146,17 @@ Error_On_Reset: } Private char * -_XimProtoMbReset(xic) - XIC xic; +_XimProtoMbReset( + XIC xic) { return _XimProtoReset(xic, _XimCommitedMbString); } Private wchar_t * -_XimCommitedWcString(im, ic, buf) - Xim im; - Xic ic; - XPointer buf; +_XimCommitedWcString( + Xim im, + Xic ic, + XPointer buf) { CARD16 *buf_s = (CARD16 *)buf; XimCommitInfo info; @@ -1249,18 +1204,18 @@ Error_On_Reset: } Private wchar_t * -_XimProtoWcReset(xic) - XIC xic; +_XimProtoWcReset( + XIC xic) { return (wchar_t *) _XimProtoReset(xic, (char * (*) (Xim, Xic, XPointer)) _XimCommitedWcString); } Private char * -_XimCommitedUtf8String(im, ic, buf) - Xim im; - Xic ic; - XPointer buf; +_XimCommitedUtf8String( + Xim im, + Xic ic, + XPointer buf) { CARD16 *buf_s = (CARD16 *)buf; XimCommitInfo info; @@ -1307,8 +1262,8 @@ Error_On_Reset: } Private char * -_XimProtoUtf8Reset(xic) - XIC xic; +_XimProtoUtf8Reset( + XIC xic) { return _XimProtoReset(xic, _XimCommitedUtf8String); } @@ -1328,9 +1283,9 @@ Private XICMethodsRec ic_methods = { }; Private Bool -_XimGetInputStyle(arg, input_style) - XIMArg *arg; - XIMStyle *input_style; +_XimGetInputStyle( + XIMArg *arg, + XIMStyle *input_style) { register XIMArg *p; @@ -1345,11 +1300,11 @@ _XimGetInputStyle(arg, input_style) #ifdef XIM_CONNECTABLE Private Bool -_XimDelayModeCreateIC(ic, values, res, num) - Xic ic; - XIMArg *values; - XIMResourceList res; - unsigned int num; +_XimDelayModeCreateIC( + Xic ic, + XIMArg *values, + XIMResourceList res, + unsigned int num) { Xim im = (Xim)ic->core.im; XimDefICValues ic_values; @@ -1406,9 +1361,9 @@ _XimReconnectModeCreateIC(ic) #endif /* XIM_CONNECTABLE */ Public XIC -_XimProtoCreateIC(xim, arg) - XIM xim; - XIMArg *arg; +_XimProtoCreateIC( + XIM xim, + XIMArg *arg) { Xim im = (Xim)xim; Xic ic; diff --git a/modules/im/ximcp/imDefIm.c b/modules/im/ximcp/imDefIm.c index e420be1..a2f81ee 100644 --- a/modules/im/ximcp/imDefIm.c +++ b/modules/im/ximcp/imDefIm.c @@ -31,7 +31,7 @@ OF THIS SOFTWARE. makoto@sm.sony.co.jp ******************************************************************/ -/* $XFree86: xc/lib/X11/imDefIm.c,v 1.11 2002/12/14 01:53:56 dawes Exp $ */ +/* $XFree86: xc/lib/X11/imDefIm.c,v 1.16 2003/11/17 22:20:11 dawes Exp $ */ #include <X11/Xatom.h> #define NEED_EVENTS @@ -43,14 +43,10 @@ OF THIS SOFTWARE. #include "Ximint.h" -/* EXTERNS */ -/* imTransR.c */ -extern Bool _XimRegisterDispatcher(); - Public int -_XimCheckDataSize(buf, len) - XPointer buf; - int len; +_XimCheckDataSize( + XPointer buf, + int len) { CARD16 *buf_s = (CARD16 *)buf; @@ -60,20 +56,12 @@ _XimCheckDataSize(buf, len) } Public void -#if NeedFunctionPrototypes _XimSetHeader( XPointer buf, CARD8 major_opcode, CARD8 minor_opcode, INT16 *len ) -#else -_XimSetHeader(buf, major_opcode, minor_opcode, len) - XPointer buf; - CARD8 major_opcode; - CARD8 minor_opcode; - INT16 *len; -#endif /* NeedFunctionPrototypes */ { CARD8 *buf_b = (CARD8 *)buf; CARD16 *buf_s = (CARD16 *)buf; @@ -86,7 +74,7 @@ _XimSetHeader(buf, major_opcode, minor_opcode, len) } Private char -_XimGetMyEndian() +_XimGetMyEndian(void) { CARD16 test_card = 1; @@ -97,9 +85,9 @@ _XimGetMyEndian() } Private Bool -_XimCheckServerName(im, str) - Xim im; - char *str; +_XimCheckServerName( + Xim im, + char *str) { char *server_name = im->core.im_name; int len; @@ -135,12 +123,12 @@ _XimCheckServerName(im, str) } Private char * -_XimCheckLocaleName(im, address, address_len, locale_name, len) - Xim im; - char *address; - int address_len; - char *locale_name[]; - int len; +_XimCheckLocaleName( + Xim im, + char *address, + int address_len, + char *locale_name[], + int len) { int category_len; char *pp; @@ -175,12 +163,12 @@ _XimCheckLocaleName(im, address, address_len, locale_name, len) } Private Bool -_XimCheckTransport(address, address_len, transport, len, trans_addr) - char *address; - int address_len; - char *transport; - int len; - char **trans_addr; +_XimCheckTransport( + char *address, + int address_len, + char *transport, + int len, + char **trans_addr) { int category_len = strlen(XIM_TRANSPORT_CATEGORY); char *pp; @@ -219,10 +207,10 @@ _XimCheckTransport(address, address_len, transport, len, trans_addr) } Private Bool -_CheckSNEvent(display, xevent, arg) - Display *display; - XEvent *xevent; - XPointer arg; +_CheckSNEvent( + Display *display, + XEvent *xevent, + XPointer arg) { XSelectionEvent *event = (XSelectionEvent *)xevent; Window window = *(Window*)arg; @@ -233,11 +221,11 @@ _CheckSNEvent(display, xevent, arg) } Private Bool -_XimGetSelectionNotify(display, window, target, ret_address) - Display *display; - Window window; - Atom target; - char **ret_address; +_XimGetSelectionNotify( + Display *display, + Window window, + Atom target, + char **ret_address) { XEvent event; XSelectionEvent *ev = (XSelectionEvent *)&event; @@ -262,9 +250,9 @@ _XimGetSelectionNotify(display, window, target, ret_address) } Private Bool -_XimPreConnectionIM(im, selection) - Xim im; - Atom selection; +_XimPreConnectionIM( + Xim im, + Atom selection) { Display *display = im->core.display; Atom locales, transport; @@ -380,8 +368,8 @@ Error: } Private Bool -_XimPreConnect(im) - Xim im; +_XimPreConnect( + Xim im) { Display *display = im->core.display; Atom imserver; @@ -427,11 +415,11 @@ _XimPreConnect(im) } Private Bool -_XimGetAuthProtocolNames(im, buf, num, len) - Xim im; - CARD16 *buf; - CARD8 *num; - INT16 *len; +_XimGetAuthProtocolNames( + Xim im, + CARD16 *buf, + CARD8 *num, + INT16 *len) { if (!IS_USE_AUTHORIZATION_FUNC(im)) { *num = 0; @@ -445,10 +433,10 @@ _XimGetAuthProtocolNames(im, buf, num, len) } Private Bool -_XimSetAuthReplyData(im, buf, len) - Xim im; - XPointer buf; - INT16 *len; +_XimSetAuthReplyData( + Xim im, + XPointer buf, + INT16 *len) { /* * Not yet @@ -458,10 +446,10 @@ _XimSetAuthReplyData(im, buf, len) } Private Bool -_XimSetAuthNextData(im, buf, len) - Xim im; - XPointer buf; - INT16 *len; +_XimSetAuthNextData( + Xim im, + XPointer buf, + INT16 *len) { /* * Not yet @@ -471,10 +459,10 @@ _XimSetAuthNextData(im, buf, len) } Private Bool -_XimSetAuthRequiredData(im, buf, len) - Xim im; - XPointer buf; - INT16 *len; +_XimSetAuthRequiredData( + Xim im, + XPointer buf, + INT16 *len) { /* * Not yet @@ -484,9 +472,9 @@ _XimSetAuthRequiredData(im, buf, len) } Private Bool -_XimCheckAuthSetupData(im, buf) - Xim im; - XPointer buf; +_XimCheckAuthSetupData( + Xim im, + XPointer buf) { /* * Not yet @@ -495,9 +483,9 @@ _XimCheckAuthSetupData(im, buf) } Private Bool -_XimCheckAuthNextData(im, buf) - Xim im; - XPointer buf; +_XimCheckAuthNextData( + Xim im, + XPointer buf) { /* * Not yet @@ -510,9 +498,9 @@ _XimCheckAuthNextData(im, buf) #define BAD_AUTH 0 Private int -_XimClientAuthCheck(im, buf) - Xim im; - XPointer buf; +_XimClientAuthCheck( + Xim im, + XPointer buf) { /* * Not yet @@ -521,8 +509,8 @@ _XimClientAuthCheck(im, buf) } Private void -_XimAuthNG(im) - Xim im; +_XimAuthNG( + Xim im) { CARD32 buf32[BUFSIZE/4]; CARD8 *buf = (CARD8 *)buf32; @@ -535,19 +523,11 @@ _XimAuthNG(im) } Private Bool -#if NeedFunctionPrototypes _XimAllRecv( Xim im, INT16 len, XPointer data, XPointer arg) -#else -_XimAllRecv(im, len, data, arg) - Xim im; - INT16 len; - XPointer data; - XPointer arg; -#endif { return True; } @@ -556,8 +536,8 @@ _XimAllRecv(im, len, data, arg) #define CLIENT_WAIT2 2 Private Bool -_XimConnection(im) - Xim im; +_XimConnection( + Xim im) { CARD32 buf32[BUFSIZE/4]; CARD8 *buf = (CARD8 *)buf32; @@ -717,19 +697,11 @@ _XimConnection(im) } Private Bool -#if NeedFunctionPrototypes _XimDisconnectCheck( Xim im, INT16 len, XPointer data, XPointer arg) -#else -_XimDisconnectCheck(im, len, data, arg) - Xim im; - INT16 len; - XPointer data; - XPointer arg; -#endif { CARD8 major_opcode = *((CARD8 *)data); CARD8 minor_opcode = *((CARD8 *)data + 1); @@ -744,8 +716,8 @@ _XimDisconnectCheck(im, len, data, arg) } Private Bool -_XimDisconnect(im) - Xim im; +_XimDisconnect( + Xim im) { CARD32 buf32[BUFSIZE/4]; CARD8 *buf = (CARD8 *)buf32; @@ -784,19 +756,11 @@ _XimDisconnect(im) } Private Bool -#if NeedFunctionPrototypes _XimOpenCheck( Xim im, INT16 len, XPointer data, XPointer arg) -#else -_XimOpenCheck(im, len, data, arg) - Xim im; - INT16 len; - XPointer data; - XPointer arg; -#endif { CARD8 major_opcode = *((CARD8 *)data); CARD8 minor_opcode = *((CARD8 *)data + 1); @@ -811,8 +775,8 @@ _XimOpenCheck(im, len, data, arg) } Private Bool -_XimOpen(im) - Xim im; +_XimOpen( + Xim im) { CARD32 buf32[BUFSIZE/4]; CARD8 *buf = (CARD8 *)buf32; @@ -907,19 +871,11 @@ _XimOpen(im) } Private Bool -#if NeedFunctionPrototypes _XimCloseCheck( Xim im, INT16 len, XPointer data, XPointer arg) -#else -_XimCloseCheck(im, len, data, arg) - Xim im; - INT16 len; - XPointer data; - XPointer arg; -#endif { CARD16 *buf_s = (CARD16 *)((CARD8 *)data + XIM_HEADER_SIZE); CARD8 major_opcode = *((CARD8 *)data); @@ -939,8 +895,8 @@ _XimCloseCheck(im, len, data, arg) } Private Bool -_XimClose(im) - Xim im; +_XimClose( + Xim im) { CARD32 buf32[BUFSIZE/4]; CARD8 *buf = (CARD8 *)buf32; @@ -997,8 +953,8 @@ _XimClose(im) } Public void -_XimProtoIMFree(im) - Xim im; +_XimProtoIMFree( + Xim im) { /* XIMPrivateRec */ if (im->private.proto.im_onkeylist) { @@ -1115,8 +1071,8 @@ _XimProtoIMFree(im) } Private Status -_XimProtoCloseIM(xim) - XIM xim; +_XimProtoCloseIM( + XIM xim) { Xim im = (Xim)xim; XIC ic; @@ -1161,11 +1117,12 @@ _XimProtoCloseIM(xim) return status; } +#ifdef XIM_CONNECTABLE Private Bool -_XimCheckIMQuarkList(quark_list, num_quark, quark) - XrmQuark *quark_list; - int num_quark; - XrmQuark quark; +_XimCheckIMQuarkList( + XrmQuark *quark_list, + int num_quark, + XrmQuark quark) { register int i; @@ -1177,11 +1134,10 @@ _XimCheckIMQuarkList(quark_list, num_quark, quark) return False; } -#ifdef XIM_CONNECTABLE Private Bool -_XimSaveIMValues(im, arg) - Xim im; - XIMArg *arg; +_XimSaveIMValues( + Xim im, + XIMArg *arg) { register XIMArg *p; register int n; @@ -1228,9 +1184,9 @@ _XimSaveIMValues(im, arg) } Private char * -_XimDelayModeSetIMValues(im, arg) - Xim im; - XIMArg *arg; +_XimDelayModeSetIMValues( + Xim im, + XIMArg *arg) { XimDefIMValues im_values; char *name; @@ -1246,19 +1202,11 @@ _XimDelayModeSetIMValues(im, arg) #endif /* XIM_CONNECTABLE */ Private Bool -#if NeedFunctionPrototypes _XimSetIMValuesCheck( Xim im, INT16 len, XPointer data, XPointer arg) -#else -_XimSetIMValuesCheck(im, len, data, arg) - Xim im; - INT16 len; - XPointer data; - XPointer arg; -#endif { CARD16 *buf_s = (CARD16 *)((CARD8 *)data + XIM_HEADER_SIZE); CARD8 major_opcode = *((CARD8 *)data); @@ -1278,9 +1226,9 @@ _XimSetIMValuesCheck(im, len, data, arg) } Private char * -_XimProtoSetIMValues(xim, arg) - XIM xim; - XIMArg *arg; +_XimProtoSetIMValues( + XIM xim, + XIMArg *arg) { Xim im = (Xim)xim; XimDefIMValues im_values; @@ -1410,9 +1358,9 @@ _XimProtoSetIMValues(xim, arg) #ifdef XIM_CONNECTABLE Private char * -_XimDelayModeGetIMValues(im, arg) - Xim im; - XIMArg *arg; +_XimDelayModeGetIMValues( + Xim im, + XIMArg *arg) { XimDefIMValues im_values; @@ -1423,19 +1371,11 @@ _XimDelayModeGetIMValues(im, arg) #endif /* XIM_CONNECTABLE */ Private Bool -#if NeedFunctionPrototypes _XimGetIMValuesCheck( Xim im, INT16 len, XPointer data, XPointer arg) -#else -_XimGetIMValuesCheck(im, len, data, arg) - Xim im; - INT16 len; - XPointer data; - XPointer arg; -#endif { CARD16 *buf_s = (CARD16 *)((CARD8 *)data + XIM_HEADER_SIZE); CARD8 major_opcode = *((CARD8 *)data); @@ -1455,9 +1395,9 @@ _XimGetIMValuesCheck(im, len, data, arg) } Private char * -_XimProtoGetIMValues(xim, arg) - XIM xim; - XIMArg *arg; +_XimProtoGetIMValues( + XIM xim, + XIMArg *arg) { Xim im = (Xim)xim; register XIMArg *p; @@ -1577,10 +1517,10 @@ Private XIMMethodsRec im_methods = { }; Private Bool -_XimSetEncodingByName(im, buf, len) - Xim im; - char **buf; - int *len; +_XimSetEncodingByName( + Xim im, + char **buf, + int *len) { char *encoding = (char *)NULL; int encoding_len; @@ -1610,10 +1550,10 @@ _XimSetEncodingByName(im, buf, len) } Private Bool -_XimSetEncodingByDetail(im, buf, len) - Xim im; - char **buf; - int *len; +_XimSetEncodingByDetail( + Xim im, + char **buf, + int *len) { *len = 0; *buf = NULL; @@ -1621,13 +1561,13 @@ _XimSetEncodingByDetail(im, buf, len) } Private Bool -_XimGetEncoding(im, buf, name, name_len, detail, detail_len) - Xim im; - CARD16 *buf; - char *name; - int name_len; - char *detail; - int detail_len; +_XimGetEncoding( + Xim im, + CARD16 *buf, + char *name, + int name_len, + char *detail, + int detail_len) { XLCd lcd = im->core.lcd; CARD16 category = buf[0]; @@ -1710,19 +1650,11 @@ _XimGetEncoding(im, buf, name, name_len, detail, detail_len) } Private Bool -#if NeedFunctionPrototypes _XimEncodingNegoCheck( Xim im, INT16 len, XPointer data, XPointer arg) -#else -_XimEncodingNegoCheck(im, len, data, arg) - Xim im; - INT16 len; - XPointer data; - XPointer arg; -#endif { CARD16 *buf_s = (CARD16 *)((CARD8 *)data + XIM_HEADER_SIZE); CARD8 major_opcode = *((CARD8 *)data); @@ -1742,8 +1674,8 @@ _XimEncodingNegoCheck(im, len, data, arg) } Private Bool -_XimEncodingNegotiation(im) - Xim im; +_XimEncodingNegotiation( + Xim im) { char *name_ptr = 0; int name_len = 0; @@ -1849,8 +1781,8 @@ _XimEncodingNegotiation(im) #ifdef XIM_CONNECTABLE Private Bool -_XimSendSavedIMValues(im) - Xim im; +_XimSendSavedIMValues( + Xim im) { XimDefIMValues im_values; INT16 len; @@ -1959,8 +1891,8 @@ _XimSendSavedIMValues(im) } Private void -_XimDelayModeIMFree(im) - Xim im; +_XimDelayModeIMFree( + Xim im) { if (im->core.im_resources) { Xfree(im->core.im_resources); @@ -1982,8 +1914,8 @@ _XimDelayModeIMFree(im) } Public Bool -_XimConnectServer(im) - Xim im; +_XimConnectServer( + Xim im) { Xim save_im; @@ -2006,8 +1938,8 @@ _XimConnectServer(im) } Public Bool -_XimDelayModeSetAttr(im) - Xim im; +_XimDelayModeSetAttr( + Xim im) { XimDefIMValues im_values; @@ -2038,8 +1970,8 @@ _XimDelayModeSetAttr(im) } Private Bool -_XimReconnectModeSetAttr(im) - Xim im; +_XimReconnectModeSetAttr( + Xim im) { XimDefIMValues im_values; @@ -2065,8 +1997,8 @@ _XimReconnectModeSetAttr(im) #endif /* XIM_CONNECTABLE */ Public Bool -_XimProtoOpenIM(im) - Xim im; +_XimProtoOpenIM( + Xim im) { _XimInitialResourceInfo(); @@ -2081,6 +2013,7 @@ _XimProtoOpenIM(im) _XimRegisterServerFilter(im); return True; } + _XimShutdown(im); #ifdef XIM_CONNECTABLE } else if (IS_DELAYBINDABLE(im)) { if (_XimDelayModeSetAttr(im)) diff --git a/modules/im/ximcp/imDefLkup.c b/modules/im/ximcp/imDefLkup.c index f4f25b0..fda84cb 100644 --- a/modules/im/ximcp/imDefLkup.c +++ b/modules/im/ximcp/imDefLkup.c @@ -26,7 +26,7 @@ PERFORMANCE OF THIS SOFTWARE. fujiwara@a80.tech.yk.fujitsu.co.jp ******************************************************************/ -/* $XFree86: xc/lib/X11/imDefLkup.c,v 3.9 2001/08/13 21:46:46 dawes Exp $ */ +/* $XFree86: xc/lib/X11/imDefLkup.c,v 3.12 2003/11/17 22:20:11 dawes Exp $ */ #include <X11/Xatom.h> #define NEED_EVENTS @@ -35,15 +35,9 @@ PERFORMANCE OF THIS SOFTWARE. #include "Ximint.h" Public Xic -#if NeedFunctionPrototypes _XimICOfXICID( Xim im, XICID icid) -#else -_XimICOfXICID(im, icid) - Xim im; - XICID icid; -#endif /* NeedFunctionPrototypes */ { Xic pic; @@ -55,9 +49,9 @@ _XimICOfXICID(im, icid) } Private void -_XimProcIMSetEventMask(im, buf) - Xim im; - XPointer buf; +_XimProcIMSetEventMask( + Xim im, + XPointer buf) { EVENTMASK *buf_l = (EVENTMASK *)buf; @@ -67,9 +61,9 @@ _XimProcIMSetEventMask(im, buf) } Private void -_XimProcICSetEventMask(ic, buf) - Xic ic; - XPointer buf; +_XimProcICSetEventMask( + Xic ic, + XPointer buf) { EVENTMASK *buf_l = (EVENTMASK *)buf; @@ -80,19 +74,11 @@ _XimProcICSetEventMask(ic, buf) } Public Bool -#if NeedFunctionPrototypes _XimSetEventMaskCallback( Xim xim, INT16 len, XPointer data, XPointer call_data) -#else -_XimSetEventMaskCallback(xim, len, data, call_data) - Xim xim; - INT16 len; - XPointer data; - XPointer call_data; -#endif /* NeedFunctionPrototypes */ { CARD16 *buf_s = (CARD16 *)((CARD8 *)data + XIM_HEADER_SIZE); XIMID imid = buf_s[0]; @@ -113,19 +99,11 @@ _XimSetEventMaskCallback(xim, len, data, call_data) } Private Bool -#if NeedFunctionPrototypes _XimSyncCheck( Xim im, INT16 len, XPointer data, XPointer arg) -#else -_XimSyncCheck(im, len, data, arg) - Xim im; - INT16 len; - XPointer data; - XPointer arg; -#endif { Xic ic = (Xic)arg; CARD16 *buf_s = (CARD16 *)((CARD8 *)data + XIM_HEADER_SIZE); @@ -150,9 +128,9 @@ _XimSyncCheck(im, len, data, arg) } Public Bool -_XimSync(im, ic) - Xim im; - Xic ic; +_XimSync( + Xim im, + Xic ic) { CARD32 buf32[BUFSIZE/4]; CARD8 *buf = (CARD8 *)buf32; @@ -208,9 +186,9 @@ _XimSync(im, ic) } Public Bool -_XimProcSyncReply(im, ic) - Xim im; - Xic ic; +_XimProcSyncReply( + Xim im, + Xic ic) { CARD32 buf32[BUFSIZE/4]; CARD8 *buf = (CARD8 *)buf32; @@ -231,9 +209,9 @@ _XimProcSyncReply(im, ic) } Public Bool -_XimRespSyncReply(ic, mode) - Xic ic; - BITMASK16 mode; +_XimRespSyncReply( + Xic ic, + BITMASK16 mode) { if (mode & XimSYNCHRONUS) /* SYNC Request */ MARK_NEED_SYNC_REPLY(ic); @@ -241,19 +219,11 @@ _XimRespSyncReply(ic, mode) } Public Bool -#if NeedFunctionPrototypes _XimSyncCallback( Xim xim, INT16 len, XPointer data, XPointer call_data) -#else -_XimSyncCallback(xim, len, data, call_data) - Xim xim; - INT16 len; - XPointer data; - XPointer call_data; -#endif /* NeedFunctionPrototypes */ { CARD16 *buf_s = (CARD16 *)((CARD8 *)data + XIM_HEADER_SIZE); XIMID imid = buf_s[0]; @@ -270,9 +240,9 @@ _XimSyncCallback(xim, len, data, call_data) } Private INT16 -_XimSetEventToWire(ev, event) - XEvent *ev; - xEvent *event; +_XimSetEventToWire( + XEvent *ev, + xEvent *event) { if (!(_XimProtoEventToWire(ev, event, False))) return 0; @@ -282,10 +252,10 @@ _XimSetEventToWire(ev, event) } Private Bool -_XimForwardEventCore(ic, ev, sync) - Xic ic; - XEvent *ev; - Bool sync; +_XimForwardEventCore( + Xic ic, + XEvent *ev, + Bool sync) { Xim im = (Xim)ic->core.im; CARD32 buf32[BUFSIZE/4]; @@ -354,10 +324,10 @@ _XimForwardEventCore(ic, ev, sync) } Public Bool -_XimForwardEvent(ic, ev, sync) - Xic ic; - XEvent *ev; - Bool sync; +_XimForwardEvent( + Xic ic, + XEvent *ev, + Bool sync) { #ifdef EXT_FORWARD if (((ev->type == KeyPress) || (ev->type == KeyRelease))) @@ -368,11 +338,11 @@ _XimForwardEvent(ic, ev, sync) } Private void -_XimProcEvent(d, ic, ev, buf) - Display *d; - Xic ic; - XEvent *ev; - CARD16 *buf; +_XimProcEvent( + Display *d, + Xic ic, + XEvent *ev, + CARD16 *buf) { INT16 serial = buf[0]; xEvent *xev = (xEvent *)&buf[1]; @@ -386,10 +356,10 @@ _XimProcEvent(d, ic, ev, buf) } Private Bool -_XimForwardEventRecv(im, ic, buf) - Xim im; - Xic ic; - XPointer buf; +_XimForwardEventRecv( + Xim im, + Xic ic, + XPointer buf) { CARD16 *buf_s = (CARD16 *)buf; Display *d = im->core.display; @@ -405,19 +375,11 @@ _XimForwardEventRecv(im, ic, buf) } Public Bool -#if NeedFunctionPrototypes _XimForwardEventCallback( Xim xim, INT16 len, XPointer data, XPointer call_data) -#else -_XimForwardEventCallback(xim, len, data, call_data) - Xim xim; - INT16 len; - XPointer data; - XPointer call_data; -#endif /* NeedFunctionPrototypes */ { CARD16 *buf_s = (CARD16 *)((CARD8 *)data + XIM_HEADER_SIZE); XIMID imid = buf_s[0]; @@ -434,9 +396,9 @@ _XimForwardEventCallback(xim, len, data, call_data) } Private Bool -_XimRegisterTriggerkey(im, buf) - Xim im; - XPointer buf; +_XimRegisterTriggerkey( + Xim im, + XPointer buf) { CARD32 *buf_l = (CARD32 *)buf; CARD32 len; @@ -481,19 +443,11 @@ _XimRegisterTriggerkey(im, buf) } Public Bool -#if NeedFunctionPrototypes _XimRegisterTriggerKeysCallback( Xim xim, INT16 len, XPointer data, XPointer call_data) -#else -_XimRegisterTriggerKeysCallback(xim, len, data, call_data) - Xim xim; - INT16 len; - XPointer data; - XPointer call_data; -#endif /* NeedFunctionPrototypes */ { CARD16 *buf_s = (CARD16 *)((CARD8 *)data + XIM_HEADER_SIZE); Xim im = (Xim)call_data; @@ -503,8 +457,8 @@ _XimRegisterTriggerKeysCallback(xim, len, data, call_data) } Public EVENTMASK -_XimGetWindowEventmask(ic) - Xic ic; +_XimGetWindowEventmask( + Xic ic) { Xim im = (Xim )ic->core.im; XWindowAttributes atr; @@ -516,19 +470,11 @@ _XimGetWindowEventmask(ic) Private Bool -#if NeedFunctionPrototypes _XimTriggerNotifyCheck( Xim im, INT16 len, XPointer data, XPointer arg) -#else -_XimTriggerNotifyCheck(im, len, data, arg) - Xim im; - INT16 len; - XPointer data; - XPointer arg; -#endif { Xic ic = (Xic)arg; CARD16 *buf_s = (CARD16 *)((CARD8 *)data + XIM_HEADER_SIZE); @@ -553,11 +499,11 @@ _XimTriggerNotifyCheck(im, len, data, arg) } Public Bool -_XimTriggerNotify(im, ic, mode, idx) - Xim im; - Xic ic; - int mode; - CARD32 idx; +_XimTriggerNotify( + Xim im, + Xic ic, + int mode, + CARD32 idx) { CARD32 buf32[BUFSIZE/4]; CARD8 *buf = (CARD8 *)buf32; @@ -621,12 +567,12 @@ _XimTriggerNotify(im, ic, mode, idx) } Private Bool -_XimRegCommitInfo(ic, string, string_len, keysym, keysym_len) - Xic ic; - char *string; - int string_len; - KeySym *keysym; - int keysym_len; +_XimRegCommitInfo( + Xic ic, + char *string, + int string_len, + KeySym *keysym, + int keysym_len) { XimCommitInfo info; @@ -642,8 +588,8 @@ _XimRegCommitInfo(ic, string, string_len, keysym, keysym_len) } Private void -_XimUnregCommitInfo(ic) - Xic ic; +_XimUnregCommitInfo( + Xic ic) { XimCommitInfo info; @@ -660,8 +606,8 @@ _XimUnregCommitInfo(ic) } Public void -_XimFreeCommitInfo(ic) - Xic ic; +_XimFreeCommitInfo( + Xic ic) { while (ic->private.proto.commit_info) _XimUnregCommitInfo(ic); @@ -669,11 +615,11 @@ _XimFreeCommitInfo(ic) } Private Bool -_XimProcKeySym(ic, sym, xim_keysym, xim_keysym_len) - Xic ic; - CARD32 sym; - KeySym **xim_keysym; - int *xim_keysym_len; +_XimProcKeySym( + Xic ic, + CARD32 sym, + KeySym **xim_keysym, + int *xim_keysym_len) { Xim im = (Xim)ic->core.im; @@ -689,12 +635,12 @@ _XimProcKeySym(ic, sym, xim_keysym, xim_keysym_len) } Private Bool -_XimProcCommit(ic, buf, len, xim_string, xim_string_len) - Xic ic; - BYTE *buf; - int len; - char **xim_string; - int *xim_string_len; +_XimProcCommit( + Xic ic, + BYTE *buf, + int len, + char **xim_string, + int *xim_string_len) { Xim im = (Xim)ic->core.im; char *string; @@ -713,10 +659,10 @@ _XimProcCommit(ic, buf, len, xim_string, xim_string_len) } Private Bool -_XimCommitRecv(im, ic, buf) - Xim im; - Xic ic; - XPointer buf; +_XimCommitRecv( + Xim im, + Xic ic, + XPointer buf) { CARD16 *buf_s = (CARD16 *)buf; BITMASK16 flag = buf_s[0]; @@ -770,19 +716,11 @@ _XimCommitRecv(im, ic, buf) } Public Bool -#if NeedFunctionPrototypes _XimCommitCallback( Xim xim, INT16 len, XPointer data, XPointer call_data) -#else -_XimCommitCallback(xim, len, data, call_data) - Xim xim; - INT16 len; - XPointer data; - XPointer call_data; -#endif /* NeedFunctionPrototypes */ { CARD16 *buf_s = (CARD16 *)((CARD8 *)data + XIM_HEADER_SIZE); XIMID imid = buf_s[0]; @@ -799,28 +737,20 @@ _XimCommitCallback(xim, len, data, call_data) } Public void -_XimProcError(im, ic, data) - Xim im; - Xic ic; - XPointer data; +_XimProcError( + Xim im, + Xic ic, + XPointer data) { return; } Public Bool -#if NeedFunctionPrototypes _XimErrorCallback( Xim xim, INT16 len, XPointer data, XPointer call_data) -#else -_XimErrorCallback(xim, len, data, call_data) - Xim xim; - INT16 len; - XPointer data; - XPointer call_data; -#endif /* NeedFunctionPrototypes */ { CARD16 *buf_s = (CARD16 *)((CARD8 *)data + XIM_HEADER_SIZE); BITMASK16 flag = buf_s[2]; @@ -845,7 +775,6 @@ _XimErrorCallback(xim, len, data, call_data) } Public Bool -#if NeedFunctionPrototypes _XimError( Xim im, Xic ic, @@ -853,15 +782,6 @@ _XimError( INT16 detail_length, CARD16 type, char *detail) -#else -_XimError(im, ic, error_code, detail_length, type, detail) - Xim im; - Xic ic; - CARD16 error_code; - INT16 detail_length; - CARD16 type; - char *detail; -#endif /* NeedFunctionPrototypes */ { CARD32 buf32[BUFSIZE/4]; CARD8 *buf = (CARD8 *)buf32; @@ -899,13 +819,13 @@ _XimError(im, ic, error_code, detail_length, type, detail) } Private int -_Ximctsconvert(conv, from, from_len, to, to_len, state) - XlcConv conv; - char *from; - int from_len; - char *to; - int to_len; - Status *state; +_Ximctsconvert( + XlcConv conv, + char *from, + int from_len, + char *to, + int to_len, + Status *state) { int from_left; int to_left; @@ -930,59 +850,37 @@ _Ximctsconvert(conv, from, from_len, to, to_len, state) initial state. */ _XlcResetConverter(conv); - if (to && to_len) { - from_left = from_len; - to_left = to_len; - from_cnvlen = 0; - to_cnvlen = 0; - for (;;) { - from_savelen = from_left; - to_savelen = to_left; - from_buf = &from[from_cnvlen]; - to_buf = &to[to_cnvlen]; - if (_XlcConvert(conv, (XPointer *)&from_buf, &from_left, - (XPointer *)&to_buf, &to_left, NULL, 0) < 0) { - *state = XLookupNone; - return 0; - } - from_cnvlen += (from_savelen - from_left); - to_cnvlen += (to_savelen - to_left); - if (from_left == 0) { - if (to_cnvlen > 0) { - *state = XLookupChars; - } else { - *state = XLookupNone; - } - return to_cnvlen; - } - if (to_left == 0) - break; - } - } - from_left = from_len; + to_left = BUFSIZ; from_cnvlen = 0; to_cnvlen = 0; for (;;) { - from_savelen = from_left; - to_buf = scratchbuf; - to_left = BUFSIZ; from_buf = &from[from_cnvlen]; + from_savelen = from_left; + to_buf = &scratchbuf[to_cnvlen]; + to_savelen = to_left; if (_XlcConvert(conv, (XPointer *)&from_buf, &from_left, (XPointer *)&to_buf, &to_left, NULL, 0) < 0) { *state = XLookupNone; return 0; } from_cnvlen += (from_savelen - from_left); - to_cnvlen += (BUFSIZ - to_left); + to_cnvlen += (to_savelen - to_left); if (from_left == 0) { - if (to_cnvlen > 0) - *state = XBufferOverflow; - else + if (!to_cnvlen) { *state = XLookupNone; - break; + return 0; + } + break; } } + + if (!to || !to_len || (to_len < to_cnvlen)) { + *state = XBufferOverflow; + } else { + memcpy(to, scratchbuf, to_cnvlen); + *state = XLookupChars; + } return to_cnvlen; } @@ -1000,13 +898,13 @@ _Ximctstombs(xim, from, from_len, to, to_len, state) } Public int -_Ximctstowcs(xim, from, from_len, to, to_len, state) - XIM xim; - char *from; - int from_len; - wchar_t *to; - int to_len; - Status *state; +_Ximctstowcs( + XIM xim, + char *from, + int from_len, + wchar_t *to, + int to_len, + Status *state) { Xim im = (Xim)xim; XlcConv conv = im->private.proto.ctow_conv; @@ -1032,84 +930,62 @@ _Ximctstowcs(xim, from, from_len, to, to_len, state) /* Reset the converter. The CompoundText at 'from' starts in initial state. */ _XlcResetConverter(conv); - - if (to && to_len) { - from_left = from_len; - to_left = to_len; - from_cnvlen = 0; - to_cnvlen = 0; - for (;;) { - from_savelen = from_left; - to_savelen = to_left; - from_buf = &from[from_cnvlen]; - to_buf = &to[to_cnvlen]; - if (_XlcConvert(conv, (XPointer *)&from_buf, &from_left, - (XPointer *)&to_buf, &to_left, NULL, 0) < 0) { - *state = XLookupNone; - return 0; - } - from_cnvlen += (from_savelen - from_left); - to_cnvlen += (to_savelen - to_left); - if (from_left == 0) { - if (to_cnvlen > 0) { - *state = XLookupChars; - } else { - *state = XLookupNone; - } - return to_cnvlen; - } - if (to_left == 0) - break; - } - } from_left = from_len; + to_left = BUFSIZ; from_cnvlen = 0; to_cnvlen = 0; for (;;) { - from_savelen = from_left; - to_buf = scratchbuf; - to_left = BUFSIZ * sizeof(wchar_t); from_buf = &from[from_cnvlen]; + from_savelen = from_left; + to_buf = &scratchbuf[to_cnvlen]; + to_savelen = to_left; if (_XlcConvert(conv, (XPointer *)&from_buf, &from_left, (XPointer *)&to_buf, &to_left, NULL, 0) < 0) { *state = XLookupNone; return 0; } from_cnvlen += (from_savelen - from_left); - to_cnvlen += (BUFSIZ * sizeof(wchar_t) - to_left); + to_cnvlen += (to_savelen - to_left); if (from_left == 0) { - if (to_cnvlen > 0) - *state = XBufferOverflow; - else + if (!to_cnvlen){ *state = XLookupNone; + return 0; + } break; } } + + if (!to || !to_len || (to_len < to_cnvlen)) { + *state = XBufferOverflow; + } else { + memcpy(to, scratchbuf, to_cnvlen * sizeof(wchar_t)); + *state = XLookupChars; + } return to_cnvlen; } Public int -_Ximctstoutf8(xim, from, from_len, to, to_len, state) - XIM xim; - char *from; - int from_len; - char *to; - int to_len; - Status *state; +_Ximctstoutf8( + XIM xim, + char *from, + int from_len, + char *to, + int to_len, + Status *state) { return _Ximctsconvert(((Xim)xim)->private.proto.ctoutf8_conv, from, from_len, to, to_len, state); } Public int -_XimProtoMbLookupString(xic, ev, buffer, bytes, keysym, state) - XIC xic; - XKeyEvent *ev; - char *buffer; - int bytes; - KeySym *keysym; - Status *state; +_XimProtoMbLookupString( + XIC xic, + XKeyEvent *ev, + char *buffer, + int bytes, + KeySym *keysym, + Status *state) { Xic ic = (Xic)xic; Xim im = (Xim)ic->core.im; @@ -1125,15 +1001,14 @@ _XimProtoMbLookupString(xic, ev, buffer, bytes, keysym, state) if ((ev->type == KeyPress) && (ev->keycode == 0)) { /* Filter function */ if (!(info = ic->private.proto.commit_info)) { - if (state) - *state = XLookupNone; + *state = XLookupNone; return 0; } ret = im->methods->ctstombs((XIM)im, info->string, info->string_len, buffer, bytes, state); if (*state == XBufferOverflow) - return 0; + return ret; if (keysym && (info->keysym && *(info->keysym))) { *keysym = *(info->keysym); if (*state == XLookupChars) @@ -1146,7 +1021,9 @@ _XimProtoMbLookupString(xic, ev, buffer, bytes, keysym, state) } else if (ev->type == KeyPress) { ret = _XimLookupMBText(ic, ev, buffer, bytes, keysym, NULL); if (ret > 0) { - if (keysym && *keysym != NoSymbol) + if (ret > bytes) + *state = XBufferOverflow; + else if (keysym && *keysym != NoSymbol) *state = XLookupBoth; else *state = XLookupChars; @@ -1165,13 +1042,13 @@ _XimProtoMbLookupString(xic, ev, buffer, bytes, keysym, state) } Public int -_XimProtoWcLookupString(xic, ev, buffer, bytes, keysym, state) - XIC xic; - XKeyEvent *ev; - wchar_t *buffer; - int bytes; - KeySym *keysym; - Status *state; +_XimProtoWcLookupString( + XIC xic, + XKeyEvent *ev, + wchar_t *buffer, + int bytes, + KeySym *keysym, + Status *state) { Xic ic = (Xic)xic; Xim im = (Xim)ic->core.im; @@ -1187,15 +1064,14 @@ _XimProtoWcLookupString(xic, ev, buffer, bytes, keysym, state) if (ev->type == KeyPress && ev->keycode == 0) { /* Filter function */ if (!(info = ic->private.proto.commit_info)) { - if (state) - *state = XLookupNone; + *state = XLookupNone; return 0; } ret = im->methods->ctstowcs((XIM)im, info->string, info->string_len, buffer, bytes, state); if (*state == XBufferOverflow) - return 0; + return ret; if (keysym && (info->keysym && *(info->keysym))) { *keysym = *(info->keysym); if (*state == XLookupChars) @@ -1208,7 +1084,9 @@ _XimProtoWcLookupString(xic, ev, buffer, bytes, keysym, state) } else if (ev->type == KeyPress) { ret = _XimLookupWCText(ic, ev, buffer, bytes, keysym, NULL); if (ret > 0) { - if (keysym && *keysym != NoSymbol) + if (ret > bytes) + *state = XBufferOverflow; + else if (keysym && *keysym != NoSymbol) *state = XLookupBoth; else *state = XLookupChars; @@ -1227,13 +1105,13 @@ _XimProtoWcLookupString(xic, ev, buffer, bytes, keysym, state) } Public int -_XimProtoUtf8LookupString(xic, ev, buffer, bytes, keysym, state) - XIC xic; - XKeyEvent *ev; - char *buffer; - int bytes; - KeySym *keysym; - Status *state; +_XimProtoUtf8LookupString( + XIC xic, + XKeyEvent *ev, + char *buffer, + int bytes, + KeySym *keysym, + Status *state) { Xic ic = (Xic)xic; Xim im = (Xim)ic->core.im; @@ -1249,15 +1127,14 @@ _XimProtoUtf8LookupString(xic, ev, buffer, bytes, keysym, state) if (ev->type == KeyPress && ev->keycode == 0) { /* Filter function */ if (!(info = ic->private.proto.commit_info)) { - if (state) - *state = XLookupNone; + *state = XLookupNone; return 0; } ret = im->methods->ctstoutf8((XIM)im, info->string, info->string_len, buffer, bytes, state); if (*state == XBufferOverflow) - return 0; + return ret; if (keysym && (info->keysym && *(info->keysym))) { *keysym = *(info->keysym); if (*state == XLookupChars) @@ -1270,7 +1147,9 @@ _XimProtoUtf8LookupString(xic, ev, buffer, bytes, keysym, state) } else if (ev->type == KeyPress) { ret = _XimLookupUTF8Text(ic, ev, buffer, bytes, keysym, NULL); if (ret > 0) { - if (keysym && *keysym != NoSymbol) + if (ret > bytes) + *state = XBufferOverflow; + else if (keysym && *keysym != NoSymbol) *state = XLookupBoth; else *state = XLookupChars; diff --git a/modules/im/ximcp/imDispch.c b/modules/im/ximcp/imDispch.c index 830b8b5..8b42948 100644 --- a/modules/im/ximcp/imDispch.c +++ b/modules/im/ximcp/imDispch.c @@ -26,7 +26,7 @@ PERFORMANCE OF THIS SOFTWARE. fujiwara@a80.tech.yk.fujitsu.co.jp ******************************************************************/ -/* $XFree86: xc/lib/X11/imDispch.c,v 1.3 2001/01/17 19:41:51 dawes Exp $ */ +/* $XFree86: xc/lib/X11/imDispch.c,v 1.5 2003/11/17 22:20:11 dawes Exp $ */ #include <X11/Xlib.h> #include "Xlibint.h" @@ -34,31 +34,17 @@ PERFORMANCE OF THIS SOFTWARE. #include "Xlcint.h" #include "Ximint.h" -/* EXTERNS */ -/* imTransR.c */ -extern Bool _XimRegisterDispatcher(); Public Bool -#if NeedFunctionPrototypes _XimRegProtoIntrCallback( Xim im, CARD16 major_code, CARD16 minor_code, Bool (*proc)( -#if NeedNestedPrototypes Xim, INT16, XPointer, XPointer -#endif ), XPointer call_data) -#else -_XimRegProtoIntrCallback(im, major_code, minor_code, proc, call_data) - Xim im; - CARD16 major_code; - CARD16 minor_code; - Bool (*proc)(); - XPointer call_data; -#endif /* NeedFunctionPrototypes */ { XimProtoIntrRec *rec; @@ -89,19 +75,11 @@ _XimFreeProtoIntrCallback(im) } Private Bool -#if NeedFunctionPrototypes _XimTransportIntr( Xim im, INT16 len, XPointer data, XPointer call_data) -#else -_XimTransportIntr(im, len, data, call_data) - Xim im; - INT16 len; - XPointer data; - XPointer call_data; -#endif { Xim call_im = (Xim)call_data; XimProtoIntrRec *rec = call_im->private.proto.intrproto; diff --git a/modules/im/ximcp/imEvToWire.c b/modules/im/ximcp/imEvToWire.c index 1bbf74e..6ca08a9 100644 --- a/modules/im/ximcp/imEvToWire.c +++ b/modules/im/ximcp/imEvToWire.c @@ -21,11 +21,14 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ +/* $XFree86: xc/lib/X11/imEvToWire.c,v 1.2 2003/04/13 19:22:20 dawes Exp $ */ #define NEED_EVENTS #include <X11/Xlibint.h> #include <X11/Xlib.h> #undef NEED_EVENTS +#include "Ximint.h" + #define sw16(n, s) ((s) ? \ (((n) << 8 & 0xff00) | \ @@ -40,10 +43,10 @@ SOFTWARE. ) : n) Status -_XimProtoEventToWire(re, event, sw) -register XEvent *re; /* pointer to where event should be reformatted */ -register xEvent *event; /* wire protocol event */ -Bool sw; /* swap byte? */ +_XimProtoEventToWire( + register XEvent *re, /* pointer to where event should be reformatted */ + register xEvent *event, /* wire protocol event */ + Bool sw) /* swap byte? */ { switch (event->u.u.type = re->type) { case KeyPress: @@ -417,10 +420,10 @@ Bool sw; /* swap byte? */ * reformat a wire event into an XEvent structure of the right type. */ Bool -_XimProtoWireToEvent(re, event, sw) -register XEvent *re; /* pointer to where event should be reformatted */ -register xEvent *event; /* wire protocol event */ -Bool sw; /* swap byte? */ +_XimProtoWireToEvent( + register XEvent *re, /* pointer to where event should be reformatted */ + register xEvent *event, /* wire protocol event */ + Bool sw) /* swap byte? */ { re->type = event->u.u.type & 0x7f; diff --git a/modules/im/ximcp/imExten.c b/modules/im/ximcp/imExten.c index 911d84d..c19b283 100644 --- a/modules/im/ximcp/imExten.c +++ b/modules/im/ximcp/imExten.c @@ -26,7 +26,7 @@ PERFORMANCE OF THIS SOFTWARE. fujiwara@a80.tech.yk.fujitsu.co.jp ******************************************************************/ -/* $XFree86: xc/lib/X11/imExten.c,v 1.3 2003/02/20 03:30:36 dawes Exp $ */ +/* $XFree86: xc/lib/X11/imExten.c,v 1.5 2003/11/17 22:20:11 dawes Exp $ */ #include <X11/Xatom.h> #define NEED_EVENTS @@ -69,8 +69,8 @@ Private XIM_QueryExtRec extensions[] = { }; Private int -_XimIsSupportExt(idx) - int idx; +_XimIsSupportExt( + int idx) { register int i; int n = XIMNumber(extensions) - 1; @@ -87,10 +87,10 @@ _XimIsSupportExt(idx) } Private Bool -_XimProcExtSetEventMask(im, ic, buf) - Xim im; - Xic ic; - XPointer buf; +_XimProcExtSetEventMask( + Xim im, + Xic ic, + XPointer buf) { EVENTMASK *buf_l = (EVENTMASK *)buf; EVENTMASK select_mask = _XimGetWindowEventmask(ic); @@ -114,19 +114,11 @@ _XimProcExtSetEventMask(im, ic, buf) } Private Bool -#if NeedFunctionPrototypes _XimExtSetEventMaskCallback( Xim xim, INT16 len, XPointer data, XPointer call_data) -#else -_XimExtSetEventMaskCallback(xim, len, data, call_data) - Xim xim; - INT16 len; - XPointer data; - XPointer call_data; -#endif /* NeedFunctionPrototypes */ { CARD16 *buf_s = (CARD16 *)((CARD8 *)data + XIM_HEADER_SIZE); XIMID imid = buf_s[0]; @@ -144,10 +136,10 @@ _XimExtSetEventMaskCallback(xim, len, data, call_data) #ifdef EXT_FORWARD Private Bool -_XimProcExtForwardKeyEvent(im, ic, buf) - Xim im; - Xic ic; - XPointer buf; +_XimProcExtForwardKeyEvent( + Xim im, + Xic ic, + XPointer buf) { CARD8 *buf_b = (CARD8 *)buf; CARD16 *buf_s = (CARD16 *)buf; @@ -173,19 +165,11 @@ _XimProcExtForwardKeyEvent(im, ic, buf) } Private Bool -#if NeedFunctionPrototypes _XimExtForwardKeyEventCallback( Xim xim, INT16 len, XPointer data, XPointer call_data) -#else -_XimExtForwardKeyEventCallback(xim, len, data, call_data) - Xim xim; - INT16 len; - XPointer data; - XPointer call_data; -#endif /* NeedFunctionPrototypes */ { CARD16 *buf_s = (CARD16 *)((CARD8 *)data + XIM_HEADER_SIZE); XIMID imid = buf_s[0]; @@ -202,19 +186,11 @@ _XimExtForwardKeyEventCallback(xim, len, data, call_data) } Private Bool -#if NeedFunctionPrototypes _XimExtForwardKeyEventCheck( Xim im, INT16 len, XPointer data, XPointer arg) -#else -_XimExtForwardKeyEventCheck(im, len, data, arg) - Xim im; - INT16 len; - XPointer data; - XPointer arg; -#endif { Xic ic = (Xic)arg; CARD16 *buf_s = (CARD16 *)((CARD8 *)data + XIM_HEADER_SIZE); @@ -238,10 +214,10 @@ _XimExtForwardKeyEventCheck(im, len, data, arg) } Public Bool -_XimExtForwardKeyEvent(ic, ev, sync) - Xic ic; - XKeyEvent *ev; - Bool sync; +_XimExtForwardKeyEvent( + Xic ic, + XKeyEvent *ev, + Bool sync) { Xim im = (Xim) ic->core.im; CARD32 buf32[BUFSIZE/4]; @@ -320,7 +296,7 @@ _XimExtForwardKeyEvent(ic, ev, sync) #endif /* EXT_FORWARD */ Private int -_XimCheckExtensionListSize() +_XimCheckExtensionListSize(void) { register int i; int len; @@ -337,8 +313,8 @@ _XimCheckExtensionListSize() } Private void -_XimSetExtensionList(buf) - CARD8 *buf; +_XimSetExtensionList( + CARD8 *buf) { register int i; int len; @@ -355,9 +331,9 @@ _XimSetExtensionList(buf) } Private unsigned int -_XimCountNumberOfExtension(total, ext) - INT16 total; - CARD8 *ext; +_XimCountNumberOfExtension( + INT16 total, + CARD8 *ext) { unsigned int n; INT16 len; @@ -377,9 +353,9 @@ _XimCountNumberOfExtension(total, ext) } Private Bool -_XimParseExtensionList(im, data) - Xim im; - CARD16 *data; +_XimParseExtensionList( + Xim im, + CARD16 *data) { int num = XIMNumber(extensions) - 1; unsigned int n; @@ -413,19 +389,11 @@ _XimParseExtensionList(im, data) } Private Bool -#if NeedFunctionPrototypes _XimQueryExtensionCheck( Xim im, INT16 len, XPointer data, XPointer arg) -#else -_XimQueryExtensionCheck(im, len, data, arg) - Xim im; - INT16 len; - XPointer data; - XPointer arg; -#endif { CARD16 *buf_s = (CARD16 *)((CARD8 *)data + XIM_HEADER_SIZE); CARD8 major_opcode = *((CARD8 *)data); @@ -445,8 +413,8 @@ _XimQueryExtensionCheck(im, len, data, arg) } Public Bool -_XimExtension(im) - Xim im; +_XimExtension( + Xim im) { CARD8 *buf; CARD16 *buf_s; @@ -551,11 +519,11 @@ _XimExtension(im) #define XIM_Xpoint_length 12 Private Bool -_XimExtMove(im, ic, x, y) - Xim im; - Xic ic; - CARD16 x; - CARD16 y; +_XimExtMove( + Xim im, + Xic ic, + CARD16 x, + CARD16 y) { CARD32 buf32[BUFSIZE/4]; CARD8 *buf = (CARD8 *)buf32; @@ -584,8 +552,8 @@ _XimExtMove(im, ic, x, y) } Public BITMASK32 -_XimExtenArgCheck(arg) - XIMArg *arg; +_XimExtenArgCheck( + XIMArg *arg) { CARD32 flag = 0L; if (!strcmp(arg->name, XNSpotLocation)) @@ -594,21 +562,12 @@ _XimExtenArgCheck(arg) } Public Bool -#if NeedFunctionPrototypes _XimExtenMove( Xim im, Xic ic, CARD32 flag, CARD16 *buf, INT16 length) -#else -_XimExtenMove(im, ic, flag, buf, length) - Xim im; - Xic ic; - CARD32 flag; - CARD16 *buf; - INT16 length; -#endif /* NeedFunctionPrototypes */ { if ((IS_EXT_XNSPOTLOCATION(flag)) && (length == XIM_Xpoint_length)) return _XimExtMove(im, ic, buf[4], buf[5]); diff --git a/modules/im/ximcp/imImSw.c b/modules/im/ximcp/imImSw.c index c6e5d81..42d66f4 100644 --- a/modules/im/ximcp/imImSw.c +++ b/modules/im/ximcp/imImSw.c @@ -32,7 +32,7 @@ THIS SOFTWARE. frankyling@hgrd01.enet.dec.com ******************************************************************/ -/* $XFree86: xc/lib/X11/imImSw.c,v 1.3 2001/01/17 19:41:51 dawes Exp $ */ +/* $XFree86: xc/lib/X11/imImSw.c,v 1.4 2003/04/13 19:22:21 dawes Exp $ */ #include "Xlibint.h" #include "Xlcint.h" @@ -40,8 +40,8 @@ THIS SOFTWARE. #include "XimImSw.h" Private Bool -_XimCheckIfDefault(im) - Xim im; +_XimCheckIfDefault( + Xim im) { return(True); } diff --git a/modules/im/ximcp/imInsClbk.c b/modules/im/ximcp/imInsClbk.c index ea28ff3..a6143f0 100644 --- a/modules/im/ximcp/imInsClbk.c +++ b/modules/im/ximcp/imInsClbk.c @@ -26,7 +26,7 @@ PERFORMANCE OF THIS SOFTWARE. makoto@sm.sony.co.jp ******************************************************************/ -/* $XFree86: xc/lib/X11/imInsClbk.c,v 3.1 2001/01/17 19:41:51 dawes Exp $ */ +/* $XFree86: xc/lib/X11/imInsClbk.c,v 3.4 2003/11/17 22:20:11 dawes Exp $ */ #include <X11/Xatom.h> #define NEED_EVENTS @@ -57,13 +57,7 @@ Private Bool lock = False; Private void -#if NeedFunctionPrototypes MakeLocale( XLCd lcd, char locale[] ) -#else -MakeLocale( lcd, locale ) - XLCd lcd; - char locale[]; -#endif { char *language, *territory, *codeset; @@ -83,24 +77,15 @@ MakeLocale( lcd, locale ) Private Bool -#if NeedFunctionPrototypes _XimFilterPropertyNotify( Display *display, Window window, XEvent *event, XPointer client_data) -#else -_XimFilterPropertyNotify( display, window, event, client_data ) - Display *display; - Window window; - XEvent *event; - XPointer client_data; -#endif { Atom ims, actual_type, *atoms; int actual_format; unsigned long nitems, bytes_after; - Window ims_window; int ii; XIM xim; Bool flag = False; @@ -124,7 +109,7 @@ _XimFilterPropertyNotify( display, window, event, client_data ) lock = True; for( ii = 0; ii < nitems; ii++, atoms ) { - if((ims_window = XGetSelectionOwner (display, atoms[ii]))) { + if(XGetSelectionOwner (display, atoms[ii])) { for( icb = callback_list; icb; icb = icb->next ) { if( !icb->call && !icb->destroy ) { xim = (*icb->lcd->methods->open_im)( icb->lcd, display, @@ -166,7 +151,6 @@ _XimFilterPropertyNotify( display, window, event, client_data ) Public Bool -#if NeedFunctionPrototypes _XimRegisterIMInstantiateCallback( XLCd lcd, Display *display, @@ -175,16 +159,6 @@ _XimRegisterIMInstantiateCallback( char *res_class, XIDProc callback, XPointer client_data) -#else -_XimRegisterIMInstantiateCallback( lcd, display, rdb, res_name, res_class, - callback, client_data ) - XLCd lcd; - Display *display; - XrmDatabase rdb; - char *res_name, *res_class; - XIDProc callback; - XPointer client_data; -#endif { XimInstCallback icb, tmp; XIM xim; @@ -240,7 +214,6 @@ _XimRegisterIMInstantiateCallback( lcd, display, rdb, res_name, res_class, Public Bool -#if NeedFunctionPrototypes _XimUnRegisterIMInstantiateCallback( XLCd lcd, Display *display, @@ -249,16 +222,6 @@ _XimUnRegisterIMInstantiateCallback( char *res_class, XIDProc callback, XPointer client_data) -#else -_XimUnRegisterIMInstantiateCallback( lcd, display, rdb, res_name, res_class, - callback, client_data ) - XLCd lcd; - Display *display; - XrmDatabase rdb; - char *res_name, *res_class; - XIDProc callback; - XPointer client_data; -#endif { char locale[XIM_MAXLCNAMELEN]; XimInstCallback icb, picb; @@ -280,8 +243,8 @@ _XimUnRegisterIMInstantiateCallback( lcd, display, rdb, res_name, res_class, ((res_class == NULL && icb->res_class == NULL) || (res_class != NULL && icb->res_class != NULL && !strcmp( res_class, icb->res_class ))) && - callback == icb->callback && - client_data == icb->client_data && /* XXXXX */ + (callback == icb->callback) && + (client_data == icb->client_data) && /* XXXXX */ !icb->destroy ) { if( lock ) icb->destroy = True; diff --git a/modules/im/ximcp/imInt.c b/modules/im/ximcp/imInt.c index b38abfb..62b1a8e 100644 --- a/modules/im/ximcp/imInt.c +++ b/modules/im/ximcp/imInt.c @@ -26,7 +26,7 @@ PERFORMANCE OF THIS SOFTWARE. fujiwara@a80.tech.yk.fujitsu.co.jp ******************************************************************/ -/* $XFree86: xc/lib/X11/imInt.c,v 3.10 2001/11/16 00:52:27 dawes Exp $ */ +/* $XFree86: xc/lib/X11/imInt.c,v 3.13 2003/11/17 22:20:11 dawes Exp $ */ #include <X11/Xatom.h> #include <X11/Xlib.h> @@ -40,13 +40,8 @@ Private Xim *_XimCurrentIMlist = (Xim *)NULL; Private int _XimCurrentIMcount = 0; Private Bool -#if NeedFunctionPrototypes _XimSetIMStructureList( Xim im) -#else -_XimSetIMStructureList(im) - Xim im; -#endif { register int i; Xim *xim; @@ -154,14 +149,9 @@ _XimServerReconectableDestroy() #endif /* XIM_CONNECTABLE */ Private char * -#if NeedFunctionPrototypes _XimStrstr( register char *src, register char *dest) -#else -_XimStrstr(src, dest) - register char *src, *dest; -#endif { int len; @@ -175,13 +165,8 @@ _XimStrstr(src, dest) } Private char * -#if NeedFunctionPrototypes _XimMakeImName( XLCd lcd) -#else -_XimMakeImName(lcd) - XLCd lcd; -#endif { char* begin = NULL; char* end = NULL; @@ -210,20 +195,12 @@ _XimMakeImName(lcd) } Public XIM -#if NeedFunctionPrototypes _XimOpenIM( XLCd lcd, Display *dpy, XrmDatabase rdb, char *res_name, char *res_class) -#else -_XimOpenIM(lcd, dpy, rdb, res_name, res_class) - XLCd lcd; - Display *dpy; - XrmDatabase rdb; - char *res_name, *res_class; -#endif { Xim im; register int i; diff --git a/modules/im/ximcp/imLcIc.c b/modules/im/ximcp/imLcIc.c index 740d22f..9a65d3d 100644 --- a/modules/im/ximcp/imLcIc.c +++ b/modules/im/ximcp/imLcIc.c @@ -26,7 +26,7 @@ PERFORMANCE OF THIS SOFTWARE. fujiwara@a80.tech.yk.fujitsu.co.jp ******************************************************************/ -/* $XFree86: xc/lib/X11/imLcIc.c,v 1.4 2001/01/17 19:41:52 dawes Exp $ */ +/* $XFree86: xc/lib/X11/imLcIc.c,v 1.5 2003/04/13 19:22:21 dawes Exp $ */ #include <stdio.h> #include <X11/Xlib.h> @@ -36,8 +36,8 @@ PERFORMANCE OF THIS SOFTWARE. #include "Ximint.h" Private void -_XimLocalUnSetFocus(xic) - XIC xic; +_XimLocalUnSetFocus( + XIC xic) { Xic ic = (Xic)xic; ((Xim)ic->core.im)->private.local.current_ic = (XIC)NULL; @@ -49,8 +49,8 @@ _XimLocalUnSetFocus(xic) } Private void -_XimLocalDestroyIC(xic) - XIC xic; +_XimLocalDestroyIC( + XIC xic) { Xic ic = (Xic)xic; @@ -68,8 +68,8 @@ _XimLocalDestroyIC(xic) } Private void -_XimLocalSetFocus(xic) - XIC xic; +_XimLocalSetFocus( + XIC xic) { Xic ic = (Xic)xic; XIC current_ic = ((Xim)ic->core.im)->private.local.current_ic; @@ -90,8 +90,8 @@ _XimLocalSetFocus(xic) } Private void -_XimLocalReset(xic) - XIC xic; +_XimLocalReset( + XIC xic) { Xic ic = (Xic)xic; ic->private.local.composed = (DefTree *)NULL; @@ -99,16 +99,16 @@ _XimLocalReset(xic) } Private char * -_XimLocalMbReset(xic) - XIC xic; +_XimLocalMbReset( + XIC xic) { _XimLocalReset(xic); return (char *)NULL; } Private wchar_t * -_XimLocalWcReset(xic) - XIC xic; +_XimLocalWcReset( + XIC xic) { _XimLocalReset(xic); return (wchar_t *)NULL; @@ -129,9 +129,9 @@ Private XICMethodsRec Local_ic_methods = { }; Public XIC -_XimLocalCreateIC(im, values) - XIM im; - XIMArg *values; +_XimLocalCreateIC( + XIM im, + XIMArg *values) { Xic ic; XimDefICValues ic_values; diff --git a/modules/im/ximcp/imLcIm.c b/modules/im/ximcp/imLcIm.c index 8c64cf8..2e622f6 100644 --- a/modules/im/ximcp/imLcIm.c +++ b/modules/im/ximcp/imLcIm.c @@ -32,7 +32,7 @@ THIS SOFTWARE. frankyling@hgrd01.enet.dec.com ******************************************************************/ -/* $XFree86: xc/lib/X11/imLcIm.c,v 1.10 2002/09/21 02:46:04 dawes Exp $ */ +/* $XFree86: xc/lib/X11/imLcIm.c,v 1.12 2003/09/06 14:06:32 pascal Exp $ */ #include <stdio.h> /* @@ -74,8 +74,8 @@ _XimCheckIfLocalProcessing(im) } Private void -XimFreeDefaultTree(top) - DefTree *top; +XimFreeDefaultTree( + DefTree *top) { if (!top) return; if (top->succession) XimFreeDefaultTree(top->succession); @@ -87,8 +87,8 @@ XimFreeDefaultTree(top) } Public void -_XimLocalIMFree(im) - Xim im; +_XimLocalIMFree( + Xim im) { XimFreeDefaultTree(im->private.local.top); if(im->core.im_resources) { @@ -159,8 +159,8 @@ _XimLocalIMFree(im) } Private Status -_XimLocalCloseIM(xim) - XIM xim; +_XimLocalCloseIM( + XIM xim) { Xim im = (Xim)xim; XIC ic; @@ -180,9 +180,9 @@ _XimLocalCloseIM(xim) } Public char * -_XimLocalGetIMValues(xim, values) - XIM xim; - XIMArg *values; +_XimLocalGetIMValues( + XIM xim, + XIMArg *values) { Xim im = (Xim)xim; XimDefIMValues im_values; @@ -193,9 +193,9 @@ _XimLocalGetIMValues(xim, values) } Public char * -_XimLocalSetIMValues(xim, values) - XIM xim; - XIMArg *values; +_XimLocalSetIMValues( + XIM xim, + XIMArg *values) { Xim im = (Xim)xim; XimDefIMValues im_values; @@ -209,20 +209,46 @@ _XimLocalSetIMValues(xim, values) } Private void -_XimCreateDefaultTree(im) - Xim im; +_XimCreateDefaultTree( + Xim im) { - FILE *fp; - char *name; - - name = _XlcFileName(im->core.lcd, COMPOSE_FILE); - if (name == (char *)NULL) - return; - fp = _XFopenFile (name, "r"); - Xfree(name); - if (fp == (FILE *)NULL) - return; - _XimParseStringFile(fp, &im->private.local.top); + FILE *fp = NULL; + char *name, *tmpname = NULL; + + name = getenv("XCOMPOSEFILE"); + + if (name == (char *) NULL) { + char *home = getenv("HOME"); + if (home != (char *) NULL) { + int hl = strlen(home); + tmpname = name = Xmalloc(hl + 10 + 1); + if (name != (char *) NULL) { + strcpy(name, home); + strcpy(name + hl, "/.XCompose"); + fp = _XFopenFile (name, "r"); + if (fp == (FILE *) NULL) { + Xfree(name); + name = tmpname = NULL; + } + } + } + } + + if (name == (char *) NULL) { + tmpname = name = _XlcFileName(im->core.lcd, COMPOSE_FILE); + } + + if (name == (char *) NULL) + return; + if (fp == (FILE *) NULL) { + fp = _XFopenFile (name, "r"); + } + if (tmpname != (char *) NULL) { + Xfree(tmpname); + } + if (fp == (FILE *) NULL) + return; + _XimParseStringFile(fp, im); fclose(fp); } @@ -237,8 +263,8 @@ Private XIMMethodsRec Xim_im_local_methods = { }; Public Bool -_XimLocalOpenIM(im) - Xim im; +_XimLocalOpenIM( + Xim im) { XLCd lcd = im->core.lcd; XlcConv conv; @@ -264,8 +290,6 @@ _XimLocalOpenIM(im) } _XimSetCurrentIMValues(im, &im_values); - _XimCreateDefaultTree(im); - if (!(conv = _XlcOpenConverter(lcd, XlcNCompoundText, lcd, XlcNMultiByte))) goto Open_Error; private->ctom_conv = conv; @@ -298,6 +322,8 @@ _XimLocalOpenIM(im) goto Open_Error; private->ucstoutf8_conv = conv; + _XimCreateDefaultTree(im); + im->methods = &Xim_im_local_methods; private->current_ic = (XIC)NULL; diff --git a/modules/im/ximcp/imLcLkup.c b/modules/im/ximcp/imLcLkup.c index 46ef857..f3399aa 100644 --- a/modules/im/ximcp/imLcLkup.c +++ b/modules/im/ximcp/imLcLkup.c @@ -29,7 +29,7 @@ PERFORMANCE OF THIS SOFTWARE. fujiwara@a80.tech.yk.fujitsu.co.jp ******************************************************************/ -/* $XFree86: xc/lib/X11/imLcLkup.c,v 3.6 2001/08/13 21:46:46 dawes Exp $ */ +/* $XFree86: xc/lib/X11/imLcLkup.c,v 3.9 2003/07/08 15:39:47 tsi Exp $ */ #include <stdio.h> #include <X11/Xatom.h> @@ -66,7 +66,7 @@ _XimLocalMbLookupString(xic, ev, buffer, bytes, keysym, status) memcpy(buffer, ic->private.local.composed->mb, ret); if(keysym) *keysym = ic->private.local.composed->ks; if (ret > 0) { - if(keysym && *keysym != NoSymbol) { + if (keysym && *keysym != NoSymbol) { if(status) *status = XLookupBoth; } else { if(status) *status = XLookupChars; @@ -82,7 +82,9 @@ _XimLocalMbLookupString(xic, ev, buffer, bytes, keysym, status) } else { /* Throughed Event */ ret = _XimLookupMBText(ic, ev, buffer, bytes, keysym, NULL); if(ret > 0) { - if(keysym && *keysym != NoSymbol) { + if (ret > bytes) { + if (status) *status = XBufferOverflow; + } else if (keysym && *keysym != NoSymbol) { if(status) *status = XLookupBoth; } else { if(status) *status = XLookupChars; @@ -124,7 +126,7 @@ _XimLocalWcLookupString(xic, ev, buffer, wlen, keysym, status) ret * sizeof(wchar_t)); if(keysym) *keysym = ic->private.local.composed->ks; if (ret > 0) { - if(keysym && *keysym != NoSymbol) { + if (keysym && *keysym != NoSymbol) { if(status) *status = XLookupBoth; } else { if(status) *status = XLookupChars; @@ -140,7 +142,9 @@ _XimLocalWcLookupString(xic, ev, buffer, wlen, keysym, status) } else { /* Throughed Event */ ret = _XimLookupWCText(ic, ev, buffer, wlen, keysym, NULL); if(ret > 0) { - if(keysym && *keysym != NoSymbol) { + if (ret > wlen) { + if (status) *status = XBufferOverflow; + } else if (keysym && *keysym != NoSymbol) { if(status) *status = XLookupBoth; } else { if(status) *status = XLookupChars; @@ -181,7 +185,7 @@ _XimLocalUtf8LookupString(xic, ev, buffer, bytes, keysym, status) memcpy(buffer, ic->private.local.composed->utf8, ret); if(keysym) *keysym = ic->private.local.composed->ks; if (ret > 0) { - if(keysym && *keysym != NoSymbol) { + if (keysym && *keysym != NoSymbol) { if(status) *status = XLookupBoth; } else { if(status) *status = XLookupChars; @@ -197,7 +201,9 @@ _XimLocalUtf8LookupString(xic, ev, buffer, bytes, keysym, status) } else { /* Throughed Event */ ret = _XimLookupUTF8Text(ic, ev, buffer, bytes, keysym, NULL); if(ret > 0) { - if(keysym && *keysym != NoSymbol) { + if (ret > bytes) { + if (status) *status = XBufferOverflow; + } else if (keysym && *keysym != NoSymbol) { if(status) *status = XLookupBoth; } else { if(status) *status = XLookupChars; @@ -214,13 +220,13 @@ _XimLocalUtf8LookupString(xic, ev, buffer, bytes, keysym, status) } Private int -_XimLcctsconvert(conv, from, from_len, to, to_len, state) - XlcConv conv; - char *from; - int from_len; - char *to; - int to_len; - Status *state; +_XimLcctsconvert( + XlcConv conv, + char *from, + int from_len, + char *to, + int to_len, + Status *state) { int from_left; int to_left; @@ -245,59 +251,37 @@ _XimLcctsconvert(conv, from, from_len, to, to_len, state) initial state. */ _XlcResetConverter(conv); - if (to && to_len) { - from_left = from_len; - to_left = to_len; - from_cnvlen = 0; - to_cnvlen = 0; - for (;;) { - from_savelen = from_left; - to_savelen = to_left; - from_buf = &from[from_cnvlen]; - to_buf = &to[to_cnvlen]; - if (_XlcConvert(conv, (XPointer *)&from_buf, &from_left, - (XPointer *)&to_buf, &to_left, NULL, 0) < 0) { - *state = XLookupNone; - return 0; - } - from_cnvlen += (from_savelen - from_left); - to_cnvlen += (to_savelen - to_left); - if (from_left == 0) { - if (to_cnvlen > 0) { - *state = XLookupChars; - } else { - *state = XLookupNone; - } - return to_cnvlen; - } - if (to_left == 0) - break; - } - } - from_left = from_len; + to_left = BUFSIZ; from_cnvlen = 0; to_cnvlen = 0; for (;;) { - from_savelen = from_left; - to_buf = scratchbuf; - to_left = BUFSIZ; from_buf = &from[from_cnvlen]; + from_savelen = from_left; + to_buf = &scratchbuf[to_cnvlen]; + to_savelen = to_left; if (_XlcConvert(conv, (XPointer *)&from_buf, &from_left, (XPointer *)&to_buf, &to_left, NULL, 0) < 0) { *state = XLookupNone; return 0; } from_cnvlen += (from_savelen - from_left); - to_cnvlen += (BUFSIZ - to_left); + to_cnvlen += (to_savelen - to_left); if (from_left == 0) { - if (to_cnvlen > 0) - *state = XBufferOverflow; - else + if (!to_cnvlen) { *state = XLookupNone; - break; + return 0; + } + break; } } + + if (!to || !to_len || (to_len < to_cnvlen)) { + *state = XBufferOverflow; + } else { + memcpy(to, scratchbuf, to_cnvlen); + *state = XLookupChars; + } return to_cnvlen; } @@ -347,60 +331,38 @@ _XimLcctstowcs(xim, from, from_len, to, to_len, state) /* Reset the converter. The CompoundText at 'from' starts in initial state. */ _XlcResetConverter(conv); - - if (to && to_len) { - from_left = from_len; - to_left = to_len; - from_cnvlen = 0; - to_cnvlen = 0; - for (;;) { - from_savelen = from_left; - to_savelen = to_left; - from_buf = &from[from_cnvlen]; - to_buf = &to[to_cnvlen]; - if (_XlcConvert(conv, (XPointer *)&from_buf, &from_left, - (XPointer *)&to_buf, &to_left, NULL, 0) < 0) { - *state = XLookupNone; - return 0; - } - from_cnvlen += (from_savelen - from_left); - to_cnvlen += (to_savelen - to_left); - if (from_left == 0) { - if (to_cnvlen > 0) { - *state = XLookupChars; - } else { - *state = XLookupNone; - } - return to_cnvlen; - } - if (to_left == 0) - break; - } - } from_left = from_len; + to_left = BUFSIZ; from_cnvlen = 0; to_cnvlen = 0; for (;;) { - from_savelen = from_left; - to_buf = scratchbuf; - to_left = BUFSIZ * sizeof(wchar_t); from_buf = &from[from_cnvlen]; + from_savelen = from_left; + to_buf = &scratchbuf[to_cnvlen]; + to_savelen = to_left; if (_XlcConvert(conv, (XPointer *)&from_buf, &from_left, (XPointer *)&to_buf, &to_left, NULL, 0) < 0) { *state = XLookupNone; return 0; } from_cnvlen += (from_savelen - from_left); - to_cnvlen += (BUFSIZ * sizeof(wchar_t) - to_left); + to_cnvlen += (to_savelen - to_left); if (from_left == 0) { - if (to_cnvlen > 0) - *state = XBufferOverflow; - else + if (!to_cnvlen){ *state = XLookupNone; + return 0; + } break; } } + + if (!to || !to_len || (to_len < to_cnvlen)) { + *state = XBufferOverflow; + } else { + memcpy(to, scratchbuf, to_cnvlen * sizeof(wchar_t)); + *state = XLookupChars; + } return to_cnvlen; } diff --git a/modules/im/ximcp/imLcPrs.c b/modules/im/ximcp/imLcPrs.c index 7cfa5a1..f00d074 100644 --- a/modules/im/ximcp/imLcPrs.c +++ b/modules/im/ximcp/imLcPrs.c @@ -30,7 +30,7 @@ OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/X11/imLcPrs.c,v 1.8 2003/01/15 02:59:33 dawes Exp $ */ +/* $XFree86: xc/lib/X11/imLcPrs.c,v 1.11 2003/11/17 22:20:12 dawes Exp $ */ #include <X11/Xlib.h> #include <X11/Xmd.h> @@ -42,19 +42,15 @@ OR PERFORMANCE OF THIS SOFTWARE. #include <stdio.h> extern int _Xmbstowcs( -#if NeedFunctionPrototypes wchar_t *wstr, char *str, int len -#endif ); extern int _Xmbstoutf8( -#if NeedFunctionPrototypes char *ustr, const char *str, int len -#endif ); /* @@ -80,9 +76,9 @@ extern int _Xmbstoutf8( */ static int -nextch(fp, lastch) - FILE *fp; - int *lastch; +nextch( + FILE *fp, + int *lastch) { int c; @@ -105,9 +101,9 @@ nextch(fp, lastch) } static void -putbackch(c, lastch) - int c; - int *lastch; +putbackch( + int c, + int *lastch) { *lastch = c; } @@ -131,10 +127,10 @@ putbackch(c, lastch) #endif static int -nexttoken(fp, tokenbuf, lastch) - FILE *fp; - char *tokenbuf; - int *lastch; +nexttoken( + FILE *fp, + char *tokenbuf, + int *lastch) { int c; int token; @@ -179,6 +175,15 @@ nexttoken(fp, tokenbuf, lastch) case '"': *p++ = c; break; + case 'n': + *p++ = '\n'; + break; + case 'r': + *p++ = '\r'; + break; + case 't': + *p++ = '\t'; + break; case '0': case '1': case '2': @@ -200,30 +205,27 @@ nexttoken(fp, tokenbuf, lastch) case 'X': case 'x': i = 0; - c = nextch(fp, lastch); -#define ishexch(c) (((c) >= '0' && (c) <= '9') || \ - ((c) >= 'A' && (c) <= 'F') || \ - ((c) >= 'a' && (c) <= 'f')) - for (j = 0; j < 2 && ishexch(c); j++) { - i <<= 4; + for (j = 0; j < 2; j++) { + c = nextch(fp, lastch); + i <<= 4; if (c >= '0' && c <= '9') { i += c - '0'; } else if (c >= 'A' && c <= 'F') { i += c - 'A' + 10; - } else { + } else if (c >= 'a' && c <= 'f') { i += c - 'a' + 10; - } - c = nextch(fp, lastch); + } else { + putbackch(c, lastch); + i >>= 4; + break; + } } if (j == 0) { token = ERROR; goto string_error; } - putbackch(c, lastch); *p++ = (char)i; -#undef ishexch break; - case '\n': case EOF: putbackch(c, lastch); token = ERROR; @@ -270,8 +272,8 @@ string_error: } static long -modmask(name) - char *name; +modmask( + char *name) { long mask; @@ -301,28 +303,134 @@ modmask(name) return(mask); } +static char* +TransFileName(Xim im, char *name) +{ + char *home = NULL, *lcCompose = NULL; + char *i = name, *ret, *j; + int l = 0; + + while (*i) { + if (*i == '%') { + i++; + switch (*i) { + case '%': + l++; + break; + case 'H': + home = getenv("HOME"); + if (home) + l += strlen(home); + break; + case 'L': + lcCompose = _XlcFileName(im->core.lcd, COMPOSE_FILE); + if (lcCompose) + l += strlen(lcCompose); + break; + } + } else { + l++; + } + i++; + } + + j = ret = Xmalloc(l+1); + if (ret == NULL) + return ret; + i = name; + while (*i) { + if (*i == '%') { + i++; + switch (*i) { + case '%': + *j++ = '%'; + break; + case 'H': + if (home) { + strcpy(j, home); + j += strlen(home); + } + break; + case 'L': + if (lcCompose) { + strcpy(j, lcCompose); + j += strlen(lcCompose); + Xfree(lcCompose); + } + break; + } + i++; + } else { + *j++ = *i++; + } + } + *j = '\0'; + return ret; +} + +#ifndef MB_LEN_MAX +#define MB_LEN_MAX 6 +#endif + +static int +get_mb_string (Xim im, char *buf, KeySym ks) +{ + XPointer from, to; + int from_len, to_len, len; + XPointer args[1]; + XlcCharSet charset; + char local_buf[MB_LEN_MAX]; + unsigned int ucs; + ucs = KeySymToUcs4(ks); + + from = (XPointer) &ucs; + to = (XPointer) local_buf; + from_len = 1; + to_len = MB_LEN_MAX; + args[0] = (XPointer) &charset; + if (_XlcConvert(im->private.local.ucstoc_conv, + &from, &from_len, &to, &to_len, args, 1 ) != 0) { + return 0; + } + + from = (XPointer) local_buf; + to = (XPointer) buf; + from_len = MB_LEN_MAX - to_len; + to_len = MB_LEN_MAX + 1; + args[0] = (XPointer) charset; + if (_XlcConvert(im->private.local.cstomb_conv, + &from, &from_len, &to, &to_len, args, 1 ) != 0) { + return 0; + } + len = MB_LEN_MAX + 1 - to_len; + buf[len] = '\0'; + return len; +} + #define AllMask (ShiftMask | LockMask | ControlMask | Mod1Mask) #define LOCAL_WC_BUFSIZE 128 #define LOCAL_UTF8_BUFSIZE 256 #define SEQUENCE_MAX 10 static int -parseline(fp, top, tokenbuf) - FILE *fp; - DefTree **top; - char* tokenbuf; +parseline( + FILE *fp, + Xim im, + char* tokenbuf) { int token; unsigned modifier_mask; unsigned modifier; unsigned tmp; KeySym keysym = NoSymbol; + DefTree **top = &im->private.local.top; DefTree *p = NULL; Bool exclam, tilde; KeySym rhs_keysym = 0; char *rhs_string_mb; int l; int lastch = 0; + char local_mb_buf[MB_LEN_MAX+1]; wchar_t local_wc_buf[LOCAL_WC_BUFSIZE], *rhs_string_wc; char local_utf8_buf[LOCAL_UTF8_BUFSIZE], *rhs_string_utf8; @@ -345,7 +453,21 @@ parseline(fp, top, tokenbuf) n = 0; do { - if ((token == KEY) && (strcmp("None", tokenbuf) == 0)) { + if ((token == KEY) && (strcmp("include", tokenbuf) == 0)) { + char *filename; + FILE *infp; + token = nexttoken(fp, tokenbuf, &lastch); + if (token != KEY && token != STRING) + goto error; + if ((filename = TransFileName(im, tokenbuf)) == NULL) + goto error; + infp = _XFopenFile(filename, "r"); + Xfree(filename); + if (infp == NULL) + goto error; + _XimParseStringFile(infp, im); + return (0); + } else if ((token == KEY) && (strcmp("None", tokenbuf) == 0)) { modifier = 0; modifier_mask = AllMask; token = nexttoken(fp, tokenbuf, &lastch); @@ -359,12 +481,11 @@ parseline(fp, top, tokenbuf) while (token == TILDE || token == KEY) { tilde = False; if (token == TILDE) { - token = nexttoken(fp, tokenbuf, &lastch); tilde = True; + token = nexttoken(fp, tokenbuf, &lastch); if (token != KEY) goto error; } - token = nexttoken(fp, tokenbuf, &lastch); tmp = modmask(tokenbuf); if (!tmp) { goto error; @@ -375,6 +496,7 @@ parseline(fp, top, tokenbuf) } else { modifier |= tmp; } + token = nexttoken(fp, tokenbuf, &lastch); } if (exclam) { modifier_mask = AllMask; @@ -436,11 +558,18 @@ parseline(fp, top, tokenbuf) if (token != ENDOFLINE && token != ENDOFFILE) { goto error; } - if( (rhs_string_mb = Xmalloc(1)) == NULL ) { - Xfree( rhs_string_mb ); + + l = get_mb_string(im, local_mb_buf, rhs_keysym); + if (l == 0) { + rhs_string_mb = Xmalloc(1); + } else { + rhs_string_mb = Xmalloc(l + 1); + } + if( rhs_string_mb == NULL ) { goto error; } - rhs_string_mb[0] = '\0'; + memcpy(rhs_string_mb, local_mb_buf, l); + rhs_string_mb[l] = '\0'; } else { goto error; } @@ -514,9 +643,9 @@ error: } void -_XimParseStringFile(fp, ptop) - FILE *fp; - DefTree **ptop; +_XimParseStringFile( + FILE *fp, + Xim im) { char tb[8192]; char* tbp; @@ -528,7 +657,7 @@ _XimParseStringFile(fp, ptop) else tbp = malloc (size); if (tbp != NULL) { - while (parseline(fp, ptop, tbp) >= 0) {} + while (parseline(fp, im, tbp) >= 0) {} if (tbp != tb) free (tbp); } } diff --git a/modules/im/ximcp/imRm.c b/modules/im/ximcp/imRm.c index 3af7c39..60c3b08 100644 --- a/modules/im/ximcp/imRm.c +++ b/modules/im/ximcp/imRm.c @@ -30,7 +30,7 @@ PERFORMANCE OF THIS SOFTWARE. makoto@sm.sony.co.jp ******************************************************************/ -/* $XFree86: xc/lib/X11/imRm.c,v 3.11 2001/01/22 21:32:32 dawes Exp $ */ +/* $XFree86: xc/lib/X11/imRm.c,v 3.13 2003/11/17 22:20:12 dawes Exp $ */ #include <stdio.h> #include <X11/Xlib.h> @@ -44,19 +44,13 @@ typedef struct _XimValueOffsetInfo { XrmQuark quark; unsigned int offset; Bool (*defaults)( -#if NeedNestedPrototypes struct _XimValueOffsetInfo *, XPointer, XPointer, unsigned long -#endif ); Bool (*encode)( -#if NeedNestedPrototypes struct _XimValueOffsetInfo *, XPointer, XPointer -#endif ); Bool (*decode)( -#if NeedNestedPrototypes struct _XimValueOffsetInfo *, XPointer, XPointer -#endif ); } XimValueOffsetInfoRec, *XimValueOffsetInfo; @@ -266,11 +260,11 @@ static XIMStyle const supported_local_styles[] = { }; Private Bool -_XimDefaultStyles(info, top, parm, mode) - XimValueOffsetInfo info; - XPointer top; - XPointer parm; /* unused */ - unsigned long mode; /* unused */ +_XimDefaultStyles( + XimValueOffsetInfo info, + XPointer top, + XPointer parm, /* unused */ + unsigned long mode) /* unused */ { XIMStyles *styles; XIMStyles **out; @@ -302,11 +296,11 @@ _XimDefaultStyles(info, top, parm, mode) } Private Bool -_XimDefaultIMValues(info, top, parm, mode) - XimValueOffsetInfo info; - XPointer top; - XPointer parm; /* unused */ - unsigned long mode; /* unused */ +_XimDefaultIMValues( + XimValueOffsetInfo info, + XPointer top, + XPointer parm, /* unused */ + unsigned long mode) /* unused */ { XIMValuesList *values_list; XIMValuesList **out; @@ -339,11 +333,11 @@ _XimDefaultIMValues(info, top, parm, mode) } Private Bool -_XimDefaultICValues(info, top, parm, mode) - XimValueOffsetInfo info; - XPointer top; - XPointer parm; /* unused */ - unsigned long mode; /* unused */ +_XimDefaultICValues( + XimValueOffsetInfo info, + XPointer top, + XPointer parm, /* unused */ + unsigned long mode) /* unused */ { XIMValuesList *values_list; XIMValuesList **out; @@ -376,11 +370,11 @@ _XimDefaultICValues(info, top, parm, mode) } Private Bool -_XimDefaultVisiblePos(info, top, parm, mode) - XimValueOffsetInfo info; - XPointer top; - XPointer parm; /* unused */ - unsigned long mode; /* unused */ +_XimDefaultVisiblePos( + XimValueOffsetInfo info, + XPointer top, + XPointer parm, /* unused */ + unsigned long mode) /* unused */ { Bool *out; @@ -390,11 +384,11 @@ _XimDefaultVisiblePos(info, top, parm, mode) } Private Bool -_XimDefaultFocusWindow(info, top, parm, mode) - XimValueOffsetInfo info; - XPointer top; - XPointer parm; - unsigned long mode; +_XimDefaultFocusWindow( + XimValueOffsetInfo info, + XPointer top, + XPointer parm, + unsigned long mode) { Xic ic = (Xic)parm; Window *out; @@ -409,11 +403,11 @@ _XimDefaultFocusWindow(info, top, parm, mode) } Private Bool -_XimDefaultResName(info, top, parm, mode) - XimValueOffsetInfo info; - XPointer top; - XPointer parm; - unsigned long mode; +_XimDefaultResName( + XimValueOffsetInfo info, + XPointer top, + XPointer parm, + unsigned long mode) { Xic ic = (Xic)parm; Xim im = (Xim)ic->core.im; @@ -429,11 +423,11 @@ _XimDefaultResName(info, top, parm, mode) } Private Bool -_XimDefaultResClass(info, top, parm, mode) - XimValueOffsetInfo info; - XPointer top; - XPointer parm; - unsigned long mode; +_XimDefaultResClass( + XimValueOffsetInfo info, + XPointer top, + XPointer parm, + unsigned long mode) { Xic ic = (Xic)parm; Xim im = (Xim)ic->core.im; @@ -449,11 +443,11 @@ _XimDefaultResClass(info, top, parm, mode) } Private Bool -_XimDefaultDestroyCB(info, top, parm, mode) - XimValueOffsetInfo info; - XPointer top; - XPointer parm; - unsigned long mode; +_XimDefaultDestroyCB( + XimValueOffsetInfo info, + XPointer top, + XPointer parm, + unsigned long mode) { Xic ic = (Xic)parm; Xim im = (Xim)ic->core.im; @@ -465,11 +459,11 @@ _XimDefaultDestroyCB(info, top, parm, mode) } Private Bool -_XimDefaultResetState(info, top, parm, mode) - XimValueOffsetInfo info; - XPointer top; - XPointer parm; - unsigned long mode; +_XimDefaultResetState( + XimValueOffsetInfo info, + XPointer top, + XPointer parm, + unsigned long mode) { XIMResetState *out; @@ -479,11 +473,11 @@ _XimDefaultResetState(info, top, parm, mode) } Private Bool -_XimDefaultHotKeyState(info, top, parm, mode) - XimValueOffsetInfo info; - XPointer top; - XPointer parm; - unsigned long mode; +_XimDefaultHotKeyState( + XimValueOffsetInfo info, + XPointer top, + XPointer parm, + unsigned long mode) { XIMHotKeyState *out; @@ -493,11 +487,11 @@ _XimDefaultHotKeyState(info, top, parm, mode) } Private Bool -_XimDefaultArea(info, top, parm, mode) - XimValueOffsetInfo info; - XPointer top; - XPointer parm; - unsigned long mode; +_XimDefaultArea( + XimValueOffsetInfo info, + XPointer top, + XPointer parm, + unsigned long mode) { Xic ic = (Xic)parm; Xim im = (Xim)ic->core.im; @@ -529,11 +523,11 @@ _XimDefaultArea(info, top, parm, mode) } Private Bool -_XimDefaultColormap(info, top, parm, mode) - XimValueOffsetInfo info; - XPointer top; - XPointer parm; - unsigned long mode; +_XimDefaultColormap( + XimValueOffsetInfo info, + XPointer top, + XPointer parm, + unsigned long mode) { Xic ic = (Xic)parm; Xim im = (Xim)ic->core.im; @@ -554,11 +548,11 @@ _XimDefaultColormap(info, top, parm, mode) } Private Bool -_XimDefaultStdColormap(info, top, parm, mode) - XimValueOffsetInfo info; - XPointer top; - XPointer parm; - unsigned long mode; +_XimDefaultStdColormap( + XimValueOffsetInfo info, + XPointer top, + XPointer parm, + unsigned long mode) { Atom *out; @@ -568,11 +562,11 @@ _XimDefaultStdColormap(info, top, parm, mode) } Private Bool -_XimDefaultFg(info, top, parm, mode) - XimValueOffsetInfo info; - XPointer top; - XPointer parm; - unsigned long mode; +_XimDefaultFg( + XimValueOffsetInfo info, + XPointer top, + XPointer parm, + unsigned long mode) { Xic ic = (Xic)parm; Xim im = (Xim)ic->core.im; @@ -586,11 +580,11 @@ _XimDefaultFg(info, top, parm, mode) } Private Bool -_XimDefaultBg(info, top, parm, mode) - XimValueOffsetInfo info; - XPointer top; - XPointer parm; - unsigned long mode; +_XimDefaultBg( + XimValueOffsetInfo info, + XPointer top, + XPointer parm, + unsigned long mode) { Xic ic = (Xic)parm; Xim im = (Xim)ic->core.im; @@ -604,11 +598,11 @@ _XimDefaultBg(info, top, parm, mode) } Private Bool -_XimDefaultBgPixmap(info, top, parm, mode) - XimValueOffsetInfo info; - XPointer top; - XPointer parm; - unsigned long mode; +_XimDefaultBgPixmap( + XimValueOffsetInfo info, + XPointer top, + XPointer parm, + unsigned long mode) { Pixmap *out; @@ -618,11 +612,11 @@ _XimDefaultBgPixmap(info, top, parm, mode) } Private Bool -_XimDefaultFontSet(info, top, parm, mode) - XimValueOffsetInfo info; - XPointer top; - XPointer parm; - unsigned long mode; +_XimDefaultFontSet( + XimValueOffsetInfo info, + XPointer top, + XPointer parm, + unsigned long mode) { XFontSet *out; @@ -632,11 +626,11 @@ _XimDefaultFontSet(info, top, parm, mode) } Private Bool -_XimDefaultLineSpace(info, top, parm, mode) - XimValueOffsetInfo info; - XPointer top; - XPointer parm; - unsigned long mode; +_XimDefaultLineSpace( + XimValueOffsetInfo info, + XPointer top, + XPointer parm, + unsigned long mode) { Xic ic = (Xic)parm; XFontSet fontset; @@ -661,11 +655,11 @@ _XimDefaultLineSpace(info, top, parm, mode) } Private Bool -_XimDefaultCursor(info, top, parm, mode) - XimValueOffsetInfo info; - XPointer top; - XPointer parm; - unsigned long mode; +_XimDefaultCursor( + XimValueOffsetInfo info, + XPointer top, + XPointer parm, + unsigned long mode) { Cursor *out; @@ -675,11 +669,11 @@ _XimDefaultCursor(info, top, parm, mode) } Private Bool -_XimDefaultPreeditState(info, top, parm, mode) - XimValueOffsetInfo info; - XPointer top; - XPointer parm; - unsigned long mode; +_XimDefaultPreeditState( + XimValueOffsetInfo info, + XPointer top, + XPointer parm, + unsigned long mode) { XIMPreeditState *out; @@ -689,20 +683,20 @@ _XimDefaultPreeditState(info, top, parm, mode) } Private Bool -_XimDefaultNest(info, top, parm, mode) - XimValueOffsetInfo info; - XPointer top; - XPointer parm; - unsigned long mode; +_XimDefaultNest( + XimValueOffsetInfo info, + XPointer top, + XPointer parm, + unsigned long mode) { return True; } Private Bool -_XimEncodeCallback(info, top, val) - XimValueOffsetInfo info; - XPointer top; - XPointer val; +_XimEncodeCallback( + XimValueOffsetInfo info, + XPointer top, + XPointer val) { XIMCallback *out; @@ -712,10 +706,10 @@ _XimEncodeCallback(info, top, val) } Private Bool -_XimEncodeString(info, top, val) - XimValueOffsetInfo info; - XPointer top; - XPointer val; +_XimEncodeString( + XimValueOffsetInfo info, + XPointer top, + XPointer val) { int len; char *string; @@ -740,10 +734,10 @@ _XimEncodeString(info, top, val) } Private Bool -_XimEncodeStyle(info, top, val) - XimValueOffsetInfo info; - XPointer top; - XPointer val; +_XimEncodeStyle( + XimValueOffsetInfo info, + XPointer top, + XPointer val) { XIMStyle *out; @@ -753,10 +747,10 @@ _XimEncodeStyle(info, top, val) } Private Bool -_XimEncodeWindow(info, top, val) - XimValueOffsetInfo info; - XPointer top; - XPointer val; +_XimEncodeWindow( + XimValueOffsetInfo info, + XPointer top, + XPointer val) { Window *out; @@ -766,10 +760,10 @@ _XimEncodeWindow(info, top, val) } Private Bool -_XimEncodeStringConv(info, top, val) - XimValueOffsetInfo info; - XPointer top; - XPointer val; +_XimEncodeStringConv( + XimValueOffsetInfo info, + XPointer top, + XPointer val) { /* * Not yet @@ -778,10 +772,10 @@ _XimEncodeStringConv(info, top, val) } Private Bool -_XimEncodeResetState(info, top, val) - XimValueOffsetInfo info; - XPointer top; - XPointer val; +_XimEncodeResetState( + XimValueOffsetInfo info, + XPointer top, + XPointer val) { XIMResetState *out; @@ -791,10 +785,10 @@ _XimEncodeResetState(info, top, val) } Private Bool -_XimEncodeHotKey(info, top, val) - XimValueOffsetInfo info; - XPointer top; - XPointer val; +_XimEncodeHotKey( + XimValueOffsetInfo info, + XPointer top, + XPointer val) { XIMHotKeyTriggers *hotkey = (XIMHotKeyTriggers *)val; XIMHotKeyTriggers **out; @@ -834,10 +828,10 @@ _XimEncodeHotKey(info, top, val) } Private Bool -_XimEncodeHotKetState(info, top, val) - XimValueOffsetInfo info; - XPointer top; - XPointer val; +_XimEncodeHotKetState( + XimValueOffsetInfo info, + XPointer top, + XPointer val) { XIMHotKeyState *out; @@ -847,10 +841,10 @@ _XimEncodeHotKetState(info, top, val) } Private Bool -_XimEncodeRectangle(info, top, val) - XimValueOffsetInfo info; - XPointer top; - XPointer val; +_XimEncodeRectangle( + XimValueOffsetInfo info, + XPointer top, + XPointer val) { XRectangle *out; @@ -860,10 +854,10 @@ _XimEncodeRectangle(info, top, val) } Private Bool -_XimEncodeSpot(info, top, val) - XimValueOffsetInfo info; - XPointer top; - XPointer val; +_XimEncodeSpot( + XimValueOffsetInfo info, + XPointer top, + XPointer val) { XPoint *out; @@ -873,10 +867,10 @@ _XimEncodeSpot(info, top, val) } Private Bool -_XimEncodeColormap(info, top, val) - XimValueOffsetInfo info; - XPointer top; - XPointer val; +_XimEncodeColormap( + XimValueOffsetInfo info, + XPointer top, + XPointer val) { Colormap *out; @@ -886,10 +880,10 @@ _XimEncodeColormap(info, top, val) } Private Bool -_XimEncodeStdColormap(info, top, val) - XimValueOffsetInfo info; - XPointer top; - XPointer val; +_XimEncodeStdColormap( + XimValueOffsetInfo info, + XPointer top, + XPointer val) { Atom *out; @@ -899,10 +893,10 @@ _XimEncodeStdColormap(info, top, val) } Private Bool -_XimEncodeLong(info, top, val) - XimValueOffsetInfo info; - XPointer top; - XPointer val; +_XimEncodeLong( + XimValueOffsetInfo info, + XPointer top, + XPointer val) { unsigned long *out; @@ -912,10 +906,10 @@ _XimEncodeLong(info, top, val) } Private Bool -_XimEncodeBgPixmap(info, top, val) - XimValueOffsetInfo info; - XPointer top; - XPointer val; +_XimEncodeBgPixmap( + XimValueOffsetInfo info, + XPointer top, + XPointer val) { Pixmap *out; @@ -925,10 +919,10 @@ _XimEncodeBgPixmap(info, top, val) } Private Bool -_XimEncodeFontSet(info, top, val) - XimValueOffsetInfo info; - XPointer top; - XPointer val; +_XimEncodeFontSet( + XimValueOffsetInfo info, + XPointer top, + XPointer val) { XFontSet *out; @@ -938,10 +932,10 @@ _XimEncodeFontSet(info, top, val) } Private Bool -_XimEncodeLineSpace(info, top, val) - XimValueOffsetInfo info; - XPointer top; - XPointer val; +_XimEncodeLineSpace( + XimValueOffsetInfo info, + XPointer top, + XPointer val) { int *out; @@ -951,10 +945,10 @@ _XimEncodeLineSpace(info, top, val) } Private Bool -_XimEncodeCursor(info, top, val) - XimValueOffsetInfo info; - XPointer top; - XPointer val; +_XimEncodeCursor( + XimValueOffsetInfo info, + XPointer top, + XPointer val) { Cursor *out; @@ -964,10 +958,10 @@ _XimEncodeCursor(info, top, val) } Private Bool -_XimEncodePreeditState(info, top, val) - XimValueOffsetInfo info; - XPointer top; - XPointer val; +_XimEncodePreeditState( + XimValueOffsetInfo info, + XPointer top, + XPointer val) { XIMPreeditState *out; @@ -977,19 +971,19 @@ _XimEncodePreeditState(info, top, val) } Private Bool -_XimEncodeNest(info, top, val) - XimValueOffsetInfo info; - XPointer top; - XPointer val; +_XimEncodeNest( + XimValueOffsetInfo info, + XPointer top, + XPointer val) { return True; } Private Bool -_XimDecodeStyles(info, top, val) - XimValueOffsetInfo info; - XPointer top; - XPointer val; +_XimDecodeStyles( + XimValueOffsetInfo info, + XPointer top, + XPointer val) { XIMStyles *styles; XIMStyles *out; @@ -1025,10 +1019,10 @@ _XimDecodeStyles(info, top, val) } Private Bool -_XimDecodeValues(info, top, val) - XimValueOffsetInfo info; - XPointer top; - XPointer val; +_XimDecodeValues( + XimValueOffsetInfo info, + XPointer top, + XPointer val) { XIMValuesList *values_list; XIMValuesList *out; @@ -1064,10 +1058,10 @@ _XimDecodeValues(info, top, val) } Private Bool -_XimDecodeCallback(info, top, val) - XimValueOffsetInfo info; - XPointer top; - XPointer val; +_XimDecodeCallback( + XimValueOffsetInfo info, + XPointer top, + XPointer val) { XIMCallback *in; XIMCallback *callback; @@ -1084,10 +1078,10 @@ _XimDecodeCallback(info, top, val) } Private Bool -_XimDecodeString(info, top, val) - XimValueOffsetInfo info; - XPointer top; - XPointer val; +_XimDecodeString( + XimValueOffsetInfo info, + XPointer top, + XPointer val) { int len = 0; char *in; @@ -1109,10 +1103,10 @@ _XimDecodeString(info, top, val) } Private Bool -_XimDecodeBool(info, top, val) - XimValueOffsetInfo info; - XPointer top; - XPointer val; +_XimDecodeBool( + XimValueOffsetInfo info, + XPointer top, + XPointer val) { Bool *in; @@ -1122,10 +1116,10 @@ _XimDecodeBool(info, top, val) } Private Bool -_XimDecodeStyle(info, top, val) - XimValueOffsetInfo info; - XPointer top; - XPointer val; +_XimDecodeStyle( + XimValueOffsetInfo info, + XPointer top, + XPointer val) { XIMStyle *in; @@ -1135,10 +1129,10 @@ _XimDecodeStyle(info, top, val) } Private Bool -_XimDecodeWindow(info, top, val) - XimValueOffsetInfo info; - XPointer top; - XPointer val; +_XimDecodeWindow( + XimValueOffsetInfo info, + XPointer top, + XPointer val) { Window *in; @@ -1148,10 +1142,10 @@ _XimDecodeWindow(info, top, val) } Private Bool -_XimDecodeStringConv(info, top, val) - XimValueOffsetInfo info; - XPointer top; - XPointer val; +_XimDecodeStringConv( + XimValueOffsetInfo info, + XPointer top, + XPointer val) { /* * Not yet @@ -1160,10 +1154,10 @@ _XimDecodeStringConv(info, top, val) } Private Bool -_XimDecodeResetState(info, top, val) - XimValueOffsetInfo info; - XPointer top; - XPointer val; +_XimDecodeResetState( + XimValueOffsetInfo info, + XPointer top, + XPointer val) { XIMResetState *in; @@ -1173,10 +1167,10 @@ _XimDecodeResetState(info, top, val) } Private Bool -_XimDecodeHotKey(info, top, val) - XimValueOffsetInfo info; - XPointer top; - XPointer val; +_XimDecodeHotKey( + XimValueOffsetInfo info, + XPointer top, + XPointer val) { XIMHotKeyTriggers *in; XIMHotKeyTriggers *hotkey; @@ -1207,10 +1201,10 @@ _XimDecodeHotKey(info, top, val) } Private Bool -_XimDecodeHotKetState(info, top, val) - XimValueOffsetInfo info; - XPointer top; - XPointer val; +_XimDecodeHotKetState( + XimValueOffsetInfo info, + XPointer top, + XPointer val) { XIMHotKeyState *in; @@ -1220,10 +1214,10 @@ _XimDecodeHotKetState(info, top, val) } Private Bool -_XimDecodeRectangle(info, top, val) - XimValueOffsetInfo info; - XPointer top; - XPointer val; +_XimDecodeRectangle( + XimValueOffsetInfo info, + XPointer top, + XPointer val) { XRectangle *in; XRectangle *rect; @@ -1238,10 +1232,10 @@ _XimDecodeRectangle(info, top, val) } Private Bool -_XimDecodeSpot(info, top, val) - XimValueOffsetInfo info; - XPointer top; - XPointer val; +_XimDecodeSpot( + XimValueOffsetInfo info, + XPointer top, + XPointer val) { XPoint *in; XPoint *spot; @@ -1256,10 +1250,10 @@ _XimDecodeSpot(info, top, val) } Private Bool -_XimDecodeColormap(info, top, val) - XimValueOffsetInfo info; - XPointer top; - XPointer val; +_XimDecodeColormap( + XimValueOffsetInfo info, + XPointer top, + XPointer val) { Colormap *in; @@ -1269,10 +1263,10 @@ _XimDecodeColormap(info, top, val) } Private Bool -_XimDecodeStdColormap(info, top, val) - XimValueOffsetInfo info; - XPointer top; - XPointer val; +_XimDecodeStdColormap( + XimValueOffsetInfo info, + XPointer top, + XPointer val) { Atom *in; @@ -1282,10 +1276,10 @@ _XimDecodeStdColormap(info, top, val) } Private Bool -_XimDecodeLong(info, top, val) - XimValueOffsetInfo info; - XPointer top; - XPointer val; +_XimDecodeLong( + XimValueOffsetInfo info, + XPointer top, + XPointer val) { unsigned long *in; @@ -1295,10 +1289,10 @@ _XimDecodeLong(info, top, val) } Private Bool -_XimDecodeBgPixmap(info, top, val) - XimValueOffsetInfo info; - XPointer top; - XPointer val; +_XimDecodeBgPixmap( + XimValueOffsetInfo info, + XPointer top, + XPointer val) { Pixmap *in; @@ -1308,10 +1302,10 @@ _XimDecodeBgPixmap(info, top, val) } Private Bool -_XimDecodeFontSet(info, top, val) - XimValueOffsetInfo info; - XPointer top; - XPointer val; +_XimDecodeFontSet( + XimValueOffsetInfo info, + XPointer top, + XPointer val) { XFontSet *in; @@ -1321,10 +1315,10 @@ _XimDecodeFontSet(info, top, val) } Private Bool -_XimDecodeLineSpace(info, top, val) - XimValueOffsetInfo info; - XPointer top; - XPointer val; +_XimDecodeLineSpace( + XimValueOffsetInfo info, + XPointer top, + XPointer val) { int *in; @@ -1334,10 +1328,10 @@ _XimDecodeLineSpace(info, top, val) } Private Bool -_XimDecodeCursor(info, top, val) - XimValueOffsetInfo info; - XPointer top; - XPointer val; +_XimDecodeCursor( + XimValueOffsetInfo info, + XPointer top, + XPointer val) { Cursor *in; @@ -1347,10 +1341,10 @@ _XimDecodeCursor(info, top, val) } Private Bool -_XimDecodePreeditState(info, top, val) - XimValueOffsetInfo info; - XPointer top; - XPointer val; +_XimDecodePreeditState( + XimValueOffsetInfo info, + XPointer top, + XPointer val) { XIMPreeditState *in; @@ -1360,10 +1354,10 @@ _XimDecodePreeditState(info, top, val) } Private Bool -_XimDecodeNest(info, top, val) - XimValueOffsetInfo info; - XPointer top; - XPointer val; +_XimDecodeNest( + XimValueOffsetInfo info, + XPointer top, + XPointer val) { return True; } @@ -2048,12 +2042,12 @@ static XimICMode ic_mode[] = { }; Private Bool -_XimSetResourceList(res_list, list_num, resource, num_resource, id) - XIMResourceList *res_list; - unsigned int *list_num; - XIMResourceList resource; - unsigned int num_resource; - unsigned short id; +_XimSetResourceList( + XIMResourceList *res_list, + unsigned int *list_num, + XIMResourceList resource, + unsigned int num_resource, + unsigned short id) { register int i; int len; @@ -2077,46 +2071,46 @@ _XimSetResourceList(res_list, list_num, resource, num_resource, id) } Public Bool -_XimSetIMResourceList(res_list, list_num) - XIMResourceList *res_list; - unsigned int *list_num; +_XimSetIMResourceList( + XIMResourceList *res_list, + unsigned int *list_num) { return _XimSetResourceList(res_list, list_num, im_resources, XIMNumber(im_resources), 100); } Public Bool -_XimSetICResourceList(res_list, list_num) - XIMResourceList *res_list; - unsigned int *list_num; +_XimSetICResourceList( + XIMResourceList *res_list, + unsigned int *list_num) { return _XimSetResourceList(res_list, list_num, ic_resources, XIMNumber(ic_resources), 200); } Public Bool -_XimSetInnerIMResourceList(res_list, list_num) - XIMResourceList *res_list; - unsigned int *list_num; +_XimSetInnerIMResourceList( + XIMResourceList *res_list, + unsigned int *list_num) { return _XimSetResourceList(res_list, list_num, im_inner_resources, XIMNumber(im_inner_resources), 100); } Public Bool -_XimSetInnerICResourceList(res_list, list_num) - XIMResourceList *res_list; - unsigned int *list_num; +_XimSetInnerICResourceList( + XIMResourceList *res_list, + unsigned int *list_num) { return _XimSetResourceList(res_list, list_num, ic_inner_resources, XIMNumber(ic_inner_resources), 200); } Private XIMResourceList -_XimGetResourceListRecByMode(res_list, list_num, mode) - XIMResourceList res_list; - unsigned int list_num; - unsigned short mode; +_XimGetResourceListRecByMode( + XIMResourceList res_list, + unsigned int list_num, + unsigned short mode) { register int i; @@ -2129,9 +2123,9 @@ _XimGetResourceListRecByMode(res_list, list_num, mode) } Public Bool -_XimCheckCreateICValues(res_list, list_num) - XIMResourceList res_list; - unsigned int list_num; +_XimCheckCreateICValues( + XIMResourceList res_list, + unsigned int list_num) { if (!_XimGetResourceListRecByMode(res_list, list_num, XIM_MODE_IC_CREATE)) { return True; @@ -2140,10 +2134,10 @@ _XimCheckCreateICValues(res_list, list_num) } Public XIMResourceList -_XimGetResourceListRecByQuark(res_list, list_num, quark) - XIMResourceList res_list; - unsigned int list_num; - XrmQuark quark; +_XimGetResourceListRecByQuark( + XIMResourceList res_list, + unsigned int list_num, + XrmQuark quark) { register int i; @@ -2156,10 +2150,10 @@ _XimGetResourceListRecByQuark(res_list, list_num, quark) } Public XIMResourceList -_XimGetResourceListRec(res_list, list_num, name) - XIMResourceList res_list; - unsigned int list_num; - char *name; +_XimGetResourceListRec( + XIMResourceList res_list, + unsigned int list_num, + char *name) { XrmQuark quark = XrmStringToQuark(name); @@ -2167,12 +2161,12 @@ _XimGetResourceListRec(res_list, list_num, name) } Public char * -_XimSetIMValueData(im, top, values, res_list, list_num) - Xim im; - XPointer top; - XIMArg *values; - XIMResourceList res_list; - unsigned int list_num; +_XimSetIMValueData( + Xim im, + XPointer top, + XIMArg *values, + XIMResourceList res_list, + unsigned int list_num) { register XIMArg *p; XIMResourceList res; @@ -2197,12 +2191,12 @@ _XimSetIMValueData(im, top, values, res_list, list_num) } Public char * -_XimGetIMValueData(im, top, values, res_list, list_num) - Xim im; - XPointer top; - XIMArg *values; - XIMResourceList res_list; - unsigned int list_num; +_XimGetIMValueData( + Xim im, + XPointer top, + XIMArg *values, + XIMResourceList res_list, + unsigned int list_num) { register XIMArg *p; XIMResourceList res; @@ -2227,9 +2221,9 @@ _XimGetIMValueData(im, top, values, res_list, list_num) } Public void -_XimSetIMMode(res_list, list_num) - XIMResourceList res_list; - unsigned int list_num; +_XimSetIMMode( + XIMResourceList res_list, + unsigned int list_num) { XIMResourceList res; unsigned int n = XIMNumber(im_mode); @@ -2246,8 +2240,8 @@ _XimSetIMMode(res_list, list_num) } Private int -_XimCheckSetIMDefaultsMode(res) - XIMResourceList res; +_XimCheckSetIMDefaultsMode( + XIMResourceList res) { if(res->mode & XIM_MODE_IM_DEFAULT) { return XIM_CHECK_VALID; @@ -2256,8 +2250,8 @@ _XimCheckSetIMDefaultsMode(res) } Private int -_XimCheckSetIMValuesMode(res) - XIMResourceList res; +_XimCheckSetIMValuesMode( + XIMResourceList res) { if(res->mode & XIM_MODE_IM_SET) { return XIM_CHECK_VALID; @@ -2266,8 +2260,8 @@ _XimCheckSetIMValuesMode(res) } Private int - _XimCheckGetIMValuesMode(res) - XIMResourceList res; + _XimCheckGetIMValuesMode( + XIMResourceList res) { if(res->mode & XIM_MODE_IM_GET) { return XIM_CHECK_VALID; @@ -2276,9 +2270,9 @@ Private int } Public int - _XimCheckIMMode(res, mode) - XIMResourceList res; - unsigned long mode; + _XimCheckIMMode( + XIMResourceList res, + unsigned long mode) { if(res->mode == 0) { return XIM_CHECK_INVALID; @@ -2340,9 +2334,9 @@ _XimSetICMode(res_list, list_num, style) } Private int -_XimCheckSetICDefaultsMode(res, mode) - XIMResourceList res; - unsigned long mode; +_XimCheckSetICDefaultsMode( + XIMResourceList res, + unsigned long mode) { if(mode & XIM_PREEDIT_ATTR) { if(!(res->mode & XIM_MODE_PRE_MASK)) { @@ -2383,9 +2377,9 @@ _XimCheckSetICDefaultsMode(res, mode) } Private int -_XimCheckCreateICMode(res, mode) - XIMResourceList res; - unsigned long mode; +_XimCheckCreateICMode( + XIMResourceList res, + unsigned long mode) { if(mode & XIM_PREEDIT_ATTR) { if(!(res->mode & XIM_MODE_PRE_MASK)) { @@ -2436,9 +2430,9 @@ _XimCheckCreateICMode(res, mode) } Private int -_XimCheckSetICValuesMode(res, mode) - XIMResourceList res; - unsigned long mode; +_XimCheckSetICValuesMode( + XIMResourceList res, + unsigned long mode) { if(mode & XIM_PREEDIT_ATTR) { if(!(res->mode & XIM_MODE_PRE_MASK)) { @@ -2477,9 +2471,9 @@ _XimCheckSetICValuesMode(res, mode) } Private int -_XimCheckGetICValuesMode(res, mode) - XIMResourceList res; - unsigned long mode; +_XimCheckGetICValuesMode( + XIMResourceList res, + unsigned long mode) { if(mode & XIM_PREEDIT_ATTR) { if(!(res->mode & XIM_MODE_PRE_MASK)) { @@ -2512,9 +2506,9 @@ _XimCheckGetICValuesMode(res, mode) } Public int - _XimCheckICMode(res, mode) - XIMResourceList res; - unsigned long mode; + _XimCheckICMode( + XIMResourceList res, + unsigned long mode) { if(mode &XIM_SETICDEFAULTS) { return _XimCheckSetICDefaultsMode(res, mode); @@ -2530,11 +2524,11 @@ Public int } Public Bool -_XimSetLocalIMDefaults(im, top, res_list, list_num) - Xim im; - XPointer top; - XIMResourceList res_list; - unsigned int list_num; +_XimSetLocalIMDefaults( + Xim im, + XPointer top, + XIMResourceList res_list, + unsigned int list_num) { XimValueOffsetInfo info; unsigned int num; @@ -2569,12 +2563,12 @@ _XimSetLocalIMDefaults(im, top, res_list, list_num) } Public Bool -_XimSetICDefaults(ic, top, mode, res_list, list_num) - Xic ic; - XPointer top; - unsigned long mode; - XIMResourceList res_list; - unsigned int list_num; +_XimSetICDefaults( + Xic ic, + XPointer top, + unsigned long mode, + XIMResourceList res_list, + unsigned int list_num) { unsigned int num; XimValueOffsetInfo info; @@ -2634,12 +2628,12 @@ _XimSetICDefaults(ic, top, mode, res_list, list_num) } Private Bool -_XimEncodeAttr(info, num, res, top, val) - XimValueOffsetInfo info; - unsigned int num; - XIMResourceList res; - XPointer top; - XPointer val; +_XimEncodeAttr( + XimValueOffsetInfo info, + unsigned int num, + XIMResourceList res, + XPointer top, + XPointer val) { register int i; @@ -2655,22 +2649,22 @@ _XimEncodeAttr(info, num, res, top, val) } Public Bool -_XimEncodeLocalIMAttr(res, top, val) - XIMResourceList res; - XPointer top; - XPointer val; +_XimEncodeLocalIMAttr( + XIMResourceList res, + XPointer top, + XPointer val) { return _XimEncodeAttr(im_attr_info, XIMNumber(im_attr_info), res, top, val); } Public Bool -_XimEncodeLocalICAttr(ic, res, top, arg, mode) - Xic ic; - XIMResourceList res; - XPointer top; - XIMArg *arg; - unsigned long mode; +_XimEncodeLocalICAttr( + Xic ic, + XIMResourceList res, + XPointer top, + XIMArg *arg, + unsigned long mode) { unsigned int num; XimValueOffsetInfo info; @@ -2690,11 +2684,11 @@ _XimEncodeLocalICAttr(ic, res, top, arg, mode) } Private Bool -_XimEncodeLocalTopValue(ic, res, val, flag) - Xic ic; - XIMResourceList res; - XPointer val; - Bool flag; +_XimEncodeLocalTopValue( + Xic ic, + XIMResourceList res, + XPointer val, + Bool flag) { XIMArg *p = (XIMArg *)val; @@ -2726,10 +2720,10 @@ _XimEncodeLocalTopValue(ic, res, val, flag) } Private Bool -_XimEncodeLocalPreeditValue(ic, res, val) - Xic ic; - XIMResourceList res; - XPointer val; +_XimEncodeLocalPreeditValue( + Xic ic, + XIMResourceList res, + XPointer val) { XIMArg *p = (XIMArg *)val; @@ -2746,10 +2740,10 @@ _XimEncodeLocalPreeditValue(ic, res, val) } Private Bool -_XimEncodeLocalStatusValue(ic, res, val) - Xic ic; - XIMResourceList res; - XPointer val; +_XimEncodeLocalStatusValue( + Xic ic, + XIMResourceList res, + XPointer val) { XIMArg *p = (XIMArg *)val; @@ -2766,14 +2760,14 @@ _XimEncodeLocalStatusValue(ic, res, val) } Public char * -_XimSetICValueData(ic, top, res_list, list_num, values, mode, flag) - Xic ic; - XPointer top; - XIMResourceList res_list; - unsigned int list_num; - XIMArg *values; - unsigned long mode; - Bool flag; +_XimSetICValueData( + Xic ic, + XPointer top, + XIMResourceList res_list, + unsigned int list_num, + XIMArg *values, + unsigned long mode, + Bool flag) { register XIMArg *p; XIMResourceList res; @@ -2831,9 +2825,9 @@ _XimSetICValueData(ic, top, res_list, list_num, values, mode, flag) } Private Bool -_XimCheckInputStyle(styles, style) - XIMStyles *styles; - XIMStyle style; +_XimCheckInputStyle( + XIMStyles *styles, + XIMStyle style) { int num = styles->count_styles; register int i; @@ -2847,13 +2841,13 @@ _XimCheckInputStyle(styles, style) } Public Bool -_XimCheckLocalInputStyle(ic, top, values, styles, res_list, list_num) - Xic ic; - XPointer top; - XIMArg *values; - XIMStyles *styles; - XIMResourceList res_list; - unsigned int list_num; +_XimCheckLocalInputStyle( + Xic ic, + XPointer top, + XIMArg *values, + XIMStyles *styles, + XIMResourceList res_list, + unsigned int list_num) { XrmQuark quark = XrmStringToQuark(XNInputStyle); register XIMArg *p; @@ -2878,12 +2872,12 @@ _XimCheckLocalInputStyle(ic, top, values, styles, res_list, list_num) } Private Bool -_XimDecodeAttr(info, num, res, top, val) - XimValueOffsetInfo info; - unsigned int num; - XIMResourceList res; - XPointer top; - XPointer val; +_XimDecodeAttr( + XimValueOffsetInfo info, + unsigned int num, + XIMResourceList res, + XPointer top, + XPointer val) { register int i; @@ -2899,21 +2893,21 @@ _XimDecodeAttr(info, num, res, top, val) } Public Bool -_XimDecodeLocalIMAttr(res, top, val) - XIMResourceList res; - XPointer top; - XPointer val; +_XimDecodeLocalIMAttr( + XIMResourceList res, + XPointer top, + XPointer val) { return _XimDecodeAttr(im_attr_info, XIMNumber(im_attr_info), res, top, val); } Public Bool -_XimDecodeLocalICAttr(res, top, val, mode) - XIMResourceList res; - XPointer top; - XPointer val; - unsigned long mode; +_XimDecodeLocalICAttr( + XIMResourceList res, + XPointer top, + XPointer val, + unsigned long mode) { unsigned int num; XimValueOffsetInfo info; @@ -3042,9 +3036,9 @@ _XimGetCurrentICValues(ic, ic_values) } Public void -_XimSetCurrentICValues(ic, ic_values) - Xic ic; - XimDefICValues *ic_values; +_XimSetCurrentICValues( + Xic ic, + XimDefICValues *ic_values) { ic->core.input_style = ic_values->input_style; ic->core.client_window = ic_values->client_window; @@ -3066,7 +3060,7 @@ _XimSetCurrentICValues(ic, ic_values) } Private void -_XimInitialIMOffsetInfo() +_XimInitialIMOffsetInfo(void) { unsigned int n = XIMNumber(im_attr_info); register int i; @@ -3077,7 +3071,7 @@ _XimInitialIMOffsetInfo() } Private void -_XimInitialICOffsetInfo() +_XimInitialICOffsetInfo(void) { unsigned int n; register int i; @@ -3099,7 +3093,7 @@ _XimInitialICOffsetInfo() } Private void -_XimInitialIMMode() +_XimInitialIMMode(void) { unsigned int n = XIMNumber(im_mode); register int i; @@ -3110,7 +3104,7 @@ _XimInitialIMMode() } Private void -_XimInitialICMode() +_XimInitialICMode(void) { unsigned int n = XIMNumber(ic_mode); register int i; @@ -3121,7 +3115,7 @@ _XimInitialICMode() } Public void -_XimInitialResourceInfo() +_XimInitialResourceInfo(void) { static Bool init_flag = False; diff --git a/modules/im/ximcp/imRmAttr.c b/modules/im/ximcp/imRmAttr.c index df05ecb..91f6b2d 100644 --- a/modules/im/ximcp/imRmAttr.c +++ b/modules/im/ximcp/imRmAttr.c @@ -26,25 +26,26 @@ PERFORMANCE OF THIS SOFTWARE. fujiwara@a80.tech.yk.fujitsu.co.jp ******************************************************************/ -/* $XFree86: xc/lib/X11/imRmAttr.c,v 1.6 2001/10/28 03:32:34 tsi Exp $ */ +/* $XFree86: xc/lib/X11/imRmAttr.c,v 1.8 2003/11/17 22:20:12 dawes Exp $ */ #include "Xlibint.h" #include "Xlcint.h" #include "Ximint.h" + Private XIMResourceList -_XimGetNestedListSeparator(res_list, res_num) - XIMResourceList res_list; /* LISTofIMATTR or IMATTR */ - unsigned int res_num; +_XimGetNestedListSeparator( + XIMResourceList res_list, /* LISTofIMATTR or IMATTR */ + unsigned int res_num) { return _XimGetResourceListRec(res_list, res_num, XNSeparatorofNestedList); } Private Bool -_XimCheckInnerIMAttributes(im, arg, mode) - Xim im; - XIMArg *arg; - unsigned long mode; +_XimCheckInnerIMAttributes( + Xim im, + XIMArg *arg, + unsigned long mode) { XIMResourceList res; int check; @@ -63,14 +64,14 @@ _XimCheckInnerIMAttributes(im, arg, mode) } Public char * -_XimMakeIMAttrIDList(im, res_list, res_num, arg, buf, len, mode) - Xim im; - XIMResourceList res_list; - unsigned int res_num; - XIMArg *arg; - CARD16 *buf; - INT16 *len; - unsigned long mode; +_XimMakeIMAttrIDList( + Xim im, + XIMResourceList res_list, + unsigned int res_num, + XIMArg *arg, + CARD16 *buf, + INT16 *len, + unsigned long mode) { register XIMArg *p; XIMResourceList res; @@ -101,10 +102,10 @@ _XimMakeIMAttrIDList(im, res_list, res_num, arg, buf, len, mode) } Private Bool -_XimCheckInnerICAttributes(ic, arg, mode) - Xic ic; - XIMArg *arg; - unsigned long mode; +_XimCheckInnerICAttributes( + Xic ic, + XIMArg *arg, + unsigned long mode) { XIMResourceList res; int check; @@ -123,14 +124,14 @@ _XimCheckInnerICAttributes(ic, arg, mode) } Public char * -_XimMakeICAttrIDList(ic, res_list, res_num, arg, buf, len, mode) - Xic ic; - XIMResourceList res_list; - unsigned int res_num; - XIMArg *arg; - CARD16 *buf; - INT16 *len; - unsigned long mode; +_XimMakeICAttrIDList( + Xic ic, + XIMResourceList res_list, + unsigned int res_num, + XIMArg *arg, + CARD16 *buf, + INT16 *len, + unsigned long mode) { register XIMArg *p; XIMResourceList res; @@ -205,13 +206,13 @@ _XimMakeICAttrIDList(ic, res_list, res_num, arg, buf, len, mode) } Private Bool -_XimAttributeToValue(ic, res, data, data_len, value, mode) - Xic ic; - XIMResourceList res; - CARD16 *data; - INT16 data_len; - XPointer value; - BITMASK32 mode; +_XimAttributeToValue( + Xic ic, + XIMResourceList res, + CARD16 *data, + INT16 data_len, + XPointer value, + BITMASK32 mode) { switch (res->resource_size) { case XimType_SeparatorOfNestedList: @@ -394,9 +395,9 @@ _XimAttributeToValue(ic, res, data, data_len, value, mode) } Private Bool -_XimDecodeInnerIMATTRIBUTE(im, arg) - Xim im; - XIMArg *arg; +_XimDecodeInnerIMATTRIBUTE( + Xim im, + XIMArg *arg) { XIMResourceList res; XimDefIMValues im_values; @@ -410,7 +411,6 @@ _XimDecodeInnerIMATTRIBUTE(im, arg) } Public char * -#if NeedFunctionPrototypes _XimDecodeIMATTRIBUTE( Xim im, XIMResourceList res_list, @@ -419,16 +419,6 @@ _XimDecodeIMATTRIBUTE( INT16 data_len, XIMArg *arg, BITMASK32 mode) -#else -_XimDecodeIMATTRIBUTE(im, res_list, res_num, data, data_len, arg, mode) - Xim im; - XIMResourceList res_list; - unsigned int res_num; - CARD16 *data; - INT16 data_len; - XIMArg *arg; - BITMASK32 mode; -#endif /* NeedFunctionPrototypes */ { register XIMArg *p; XIMResourceList res; @@ -474,10 +464,10 @@ _XimDecodeIMATTRIBUTE(im, res_list, res_num, data, data_len, arg, mode) } Private Bool -_XimDecodeInnerICATTRIBUTE(ic, arg, mode) - Xic ic; - XIMArg *arg; - unsigned long mode; +_XimDecodeInnerICATTRIBUTE( + Xic ic, + XIMArg *arg, + unsigned long mode) { XIMResourceList res; XimDefICValues ic_values; @@ -494,7 +484,6 @@ _XimDecodeInnerICATTRIBUTE(ic, arg, mode) } Public char * -#if NeedFunctionPrototypes _XimDecodeICATTRIBUTE( Xic ic, XIMResourceList res_list, @@ -503,16 +492,6 @@ _XimDecodeICATTRIBUTE( INT16 data_len, XIMArg *arg, BITMASK32 mode) -#else -_XimDecodeICATTRIBUTE(ic, res_list, res_num, data, data_len, arg, mode) - Xic ic; - XIMResourceList res_list; - unsigned int res_num; - CARD16 *data; - INT16 data_len; - XIMArg *arg; - BITMASK32 mode; -#endif /* NeedFunctionPrototypes */ { register XIMArg *p; XIMResourceList res; @@ -581,14 +560,14 @@ _XimDecodeICATTRIBUTE(ic, res_list, res_num, data, data_len, arg, mode) } Private Bool -_XimValueToAttribute(res, buf, buf_size, value, len, mode, param) - XIMResourceList res; - XPointer buf; - int buf_size; - XPointer value; - int *len; - unsigned long mode; - XPointer param; +_XimValueToAttribute( + XIMResourceList res, + XPointer buf, + int buf_size, + XPointer value, + int *len, + unsigned long mode, + XPointer param) { int ret_len; @@ -789,11 +768,11 @@ _XimValueToAttribute(res, buf, buf_size, value, len, mode, param) } Private Bool -_XimSetInnerIMAttributes(im, top, arg, mode) - Xim im; - XPointer top; - XIMArg *arg; - unsigned long mode; +_XimSetInnerIMAttributes( + Xim im, + XPointer top, + XIMArg *arg, + unsigned long mode) { XIMResourceList res; int check; @@ -812,17 +791,17 @@ _XimSetInnerIMAttributes(im, top, arg, mode) } Public char * -_XimEncodeIMATTRIBUTE(im, res_list, res_num, arg, arg_ret, buf, size, ret_len, top, mode) - Xim im; - XIMResourceList res_list; - unsigned int res_num; - XIMArg *arg; - XIMArg **arg_ret; - char *buf; - int size; - int *ret_len; - XPointer top; - unsigned long mode; +_XimEncodeIMATTRIBUTE( + Xim im, + XIMResourceList res_list, + unsigned int res_num, + XIMArg *arg, + XIMArg **arg_ret, + char *buf, + int size, + int *ret_len, + XPointer top, + unsigned long mode) { register XIMArg *p; XIMResourceList res; @@ -876,16 +855,16 @@ _XimEncodeIMATTRIBUTE(im, res_list, res_num, arg, arg_ret, buf, size, ret_len, #ifdef XIM_CONNECTABLE Public Bool -_XimEncodeSavedIMATTRIBUTE(im, res_list, res_num, idx, buf, size, ret_len, top, mode) - Xim im; - XIMResourceList res_list; - unsigned int res_num; - int *idx; - char *buf; - int size; - int *ret_len; - XPointer top; - unsigned long mode; +_XimEncodeSavedIMATTRIBUTE( + Xim im, + XIMResourceList res_list, + unsigned int res_num, + int *idx, + char *buf, + int size, + int *ret_len, + XPointer top, + unsigned long mode) { register int i; int num = im->private.proto.num_saved_imvalues; @@ -939,10 +918,10 @@ _XimEncodeSavedIMATTRIBUTE(im, res_list, res_num, idx, buf, size, ret_len, top, #endif /* XIM_CONNECTABLE */ Private Bool -_XimEncodeTopValue(ic, res, p) - Xic ic; - XIMResourceList res; - XIMArg *p; +_XimEncodeTopValue( + Xic ic, + XIMResourceList res, + XIMArg *p) { if (res->xrm_name == XrmStringToQuark(XNClientWindow)) { ic->core.client_window = (Window)p->value; @@ -962,10 +941,10 @@ _XimEncodeTopValue(ic, res, p) } Private Bool -_XimEncodePreeditValue(ic, res, p) - Xic ic; - XIMResourceList res; - XIMArg *p; +_XimEncodePreeditValue( + Xic ic, + XIMResourceList res, + XIMArg *p) { if (res->xrm_name == XrmStringToQuark(XNStdColormap)) { XStandardColormap *colormap_ret; @@ -1013,10 +992,10 @@ _XimEncodePreeditValue(ic, res, p) } Private Bool -_XimEncodeStatusValue(ic, res, p) - Xic ic; - XIMResourceList res; - XIMArg *p; +_XimEncodeStatusValue( + Xic ic, + XIMResourceList res, + XIMArg *p) { if (res->xrm_name == XrmStringToQuark(XNStdColormap)) { XStandardColormap *colormap_ret; @@ -1064,11 +1043,11 @@ _XimEncodeStatusValue(ic, res, p) } Private Bool -_XimSetInnerICAttributes(ic, top, arg, mode) - Xic ic; - XPointer top; - XIMArg *arg; - unsigned long mode; +_XimSetInnerICAttributes( + Xic ic, + XPointer top, + XIMArg *arg, + unsigned long mode) { XIMResourceList res; int check; @@ -1087,18 +1066,18 @@ _XimSetInnerICAttributes(ic, top, arg, mode) } Public char * -_XimEncodeICATTRIBUTE(ic, res_list, res_num, arg, arg_ret, buf, size, ret_len, top, flag, mode) - Xic ic; - XIMResourceList res_list; - unsigned int res_num; - XIMArg *arg; - XIMArg **arg_ret; - char *buf; - int size; - int *ret_len; - XPointer top; - BITMASK32 *flag; - unsigned long mode; +_XimEncodeICATTRIBUTE( + Xic ic, + XIMResourceList res_list, + unsigned int res_num, + XIMArg *arg, + XIMArg **arg_ret, + char *buf, + int size, + int *ret_len, + XPointer top, + BITMASK32 *flag, + unsigned long mode) { register XIMArg *p; XIMResourceList res; @@ -1199,10 +1178,10 @@ _XimEncodeICATTRIBUTE(ic, res_list, res_num, arg, arg_ret, buf, size, ret_len, t #ifdef XIM_CONNECTABLE Private Bool -_XimEncodeSavedPreeditValue(ic, res, value) - Xic ic; - XIMResourceList res; - XPointer value; +_XimEncodeSavedPreeditValue( + Xic ic, + XIMResourceList res, + XPointer value) { int list_ret; XFontStruct **struct_list; @@ -1241,10 +1220,10 @@ _XimEncodeSavedPreeditValue(ic, res, value) } Private Bool -_XimEncodeSavedStatusValue(ic, res, value) - Xic ic; - XIMResourceList res; - XPointer value; +_XimEncodeSavedStatusValue( + Xic ic, + XIMResourceList res, + XPointer value) { int list_ret; XFontStruct **struct_list; @@ -1283,16 +1262,16 @@ _XimEncodeSavedStatusValue(ic, res, value) } Public Bool -_XimEncodeSavedICATTRIBUTE(ic, res_list, res_num, idx, buf, size, ret_len, top, mode) - Xic ic; - XIMResourceList res_list; - unsigned int res_num; - int *idx; - char *buf; - int size; - int *ret_len; - XPointer top; - unsigned long mode; +_XimEncodeSavedICATTRIBUTE( + Xic ic, + XIMResourceList res_list, + unsigned int res_num, + int *idx, + char *buf, + int size, + int *ret_len, + XPointer top, + unsigned long mode) { int i; int num = ic->private.proto.num_saved_icvalues; @@ -1394,10 +1373,10 @@ _XimEncodeSavedICATTRIBUTE(ic, res_list, res_num, idx, buf, size, ret_len, top, #endif /* XIM_CONNECTABLE */ Private unsigned int -_XimCountNumberOfAttr(total, attr, names_len) - INT16 total; - CARD16 *attr; - int *names_len; +_XimCountNumberOfAttr( + INT16 total, + CARD16 *attr, + int *names_len) { unsigned int n; INT16 len; @@ -1419,9 +1398,9 @@ _XimCountNumberOfAttr(total, attr, names_len) } Public Bool -_XimGetAttributeID(im, buf) - Xim im; - CARD16 *buf; +_XimGetAttributeID( + Xim im, + CARD16 *buf) { unsigned int n; XIMResourceList res; diff --git a/modules/im/ximcp/imThaiFlt.c b/modules/im/ximcp/imThaiFlt.c index 5168de2..b674b0d 100644 --- a/modules/im/ximcp/imThaiFlt.c +++ b/modules/im/ximcp/imThaiFlt.c @@ -45,7 +45,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/X11/imThaiFlt.c,v 3.18 2003/02/21 03:13:30 dawes Exp $ */ +/* $XFree86: xc/lib/X11/imThaiFlt.c,v 3.21 2003/11/17 22:20:12 dawes Exp $ */ /* **++ @@ -73,30 +73,8 @@ SOFTWARE. #include "Xlcint.h" #include "Ximint.h" #include "XimThai.h" +#include "XlcPubI.h" -/* EXTERNS */ -/* KeyBind.c */ -extern int _XKeyInitialize(); - -/* lcStd.c */ -extern int _Xlcmbstowcs( - XLCd lcd, - wchar_t *wstr, - char *str, - int len -); -extern int _Xlcwcstombs( - XLCd lcd, - char *str, - wchar_t *wstr, - int len -); -extern int _Xlcmbstoutf8( - XLCd lcd, - char *ustr, - const char *str, - int len -); #define SPACE 32 @@ -247,12 +225,7 @@ char const thaicat_isc_lookup[CH_CLASSES][CH_CLASSES] = { /* returns classification of a char */ Private int -#if NeedFunctionPrototypes THAI_chtype (unsigned char ch) -#else -THAI_chtype (ch) - unsigned char ch; -#endif { return tactis_chtype[ch]; } @@ -260,12 +233,7 @@ THAI_chtype (ch) /* returns the display level */ Private int -#if NeedFunctionPrototypes THAI_chlevel (unsigned char ch) -#else -THAI_chlevel (ch) - unsigned char ch; -#endif { int chlevel; @@ -306,12 +274,7 @@ THAI_chlevel (ch) /* return True if char is non-spacing */ Private Bool -#if NeedFunctionPrototypes THAI_isdead (unsigned char ch) -#else -THAI_isdead (ch) - unsigned char ch; -#endif { return ((tactis_chtype[ch] == CTRL) || (tactis_chtype[ch] == BV1) || (tactis_chtype[ch] == BV2) || (tactis_chtype[ch] == BD) || @@ -324,12 +287,7 @@ THAI_isdead (ch) /* return True if char is consonant */ Private Bool -#if NeedFunctionPrototypes THAI_iscons (unsigned char ch) -#else -THAI_iscons (ch) - unsigned char ch; -#endif { return (tactis_chtype[ch] == CONS); } @@ -337,12 +295,7 @@ THAI_iscons (ch) /* return True if char is vowel */ Private Bool -#if NeedFunctionPrototypes THAI_isvowel (unsigned char ch) -#else -THAI_isvowel (ch) - unsigned char ch; -#endif { return ((tactis_chtype[ch] == LV) || (tactis_chtype[ch] == FV1) || (tactis_chtype[ch] == FV2) || (tactis_chtype[ch] == FV3) || @@ -354,27 +307,16 @@ THAI_isvowel (ch) /* return True if char is tonemark */ Private Bool -#if NeedFunctionPrototypes THAI_istone (unsigned char ch) -#else -THAI_istone (ch) - unsigned char ch; -#endif { return (tactis_chtype[ch] == TONE); } Private Bool -#if NeedFunctionPrototypes THAI_iscomposible ( unsigned char follow_ch, unsigned char lead_ch) -#else -THAI_iscomposible (follow_ch, lead_ch) - unsigned char follow_ch; - unsigned char lead_ch; -#endif {/* "Can follow_ch be put in the same display cell as lead_ch?" */ return (write_rules_lookup[THAI_chtype(lead_ch)][THAI_chtype(follow_ch)] @@ -382,17 +324,10 @@ THAI_iscomposible (follow_ch, lead_ch) } Private Bool -#if NeedFunctionPrototypes THAI_isaccepted ( unsigned char follow_ch, unsigned char lead_ch, unsigned char mode) -#else -THAI_isaccepted (follow_ch, lead_ch, mode) - unsigned char follow_ch; - unsigned char lead_ch; - unsigned char mode; -#endif { Bool iskeyvalid; /* means "Can follow_ch be keyed in after lead_ch?" */ @@ -420,19 +355,11 @@ THAI_isaccepted (follow_ch, lead_ch, mode) #if 0 Private void -#if NeedFunctionPrototypes THAI_apply_write_rules( unsigned char *instr, unsigned char *outstr, unsigned char insert_ch, int *num_insert_ch) -#else -THAI_apply_write_rules(instr, outstr, insert_ch, num_insert_ch) - unsigned char *instr; - unsigned char *outstr; - unsigned char insert_ch; - int *num_insert_ch; -#endif { /* Input parameters: @@ -474,15 +401,9 @@ Output parameters: } Private int -#if NeedFunctionPrototypes THAI_find_chtype ( unsigned char *instr, int chtype) -#else -THAI_find_chtype (instr, chtype) - unsigned char *instr; - int chtype; -#endif { /* Input parameters: @@ -509,21 +430,12 @@ Output parameters: #endif Private int -#if NeedFunctionPrototypes THAI_apply_scm( unsigned char *instr, unsigned char *outstr, unsigned char spec_ch, int num_sp, unsigned char insert_ch) -#else -THAI_apply_scm(instr, outstr, spec_ch, num_sp, insert_ch) - unsigned char *instr; - unsigned char *outstr; - unsigned char spec_ch; - int num_sp; - unsigned char insert_ch; -#endif { unsigned char *scan, *outch; int i, dead_count, found_count; @@ -555,9 +467,11 @@ THAI_apply_scm(instr, outstr, spec_ch, num_sp, insert_ch) #if 0 Private void ComputeMaskFromKeytrans(); #endif -Private int IsCancelComposeKey(); -Private void SetLed(); +Private int IsCancelComposeKey(KeySym *symbol, XKeyEvent *event); +Private void SetLed(Display *dpy, int num, int state); +#if 0 Private CARD8 FindKeyCode(); +#endif /* The following functions are specific to this module */ @@ -566,12 +480,28 @@ Private int XThaiTranslateKey(); Private int XThaiTranslateKeySym(); #endif -Private KeySym HexIMNormalKey(); -Private KeySym HexIMFirstComposeKey(); -Private KeySym HexIMSecondComposeKey(); -Private KeySym HexIMComposeSequence(); -Private void InitIscMode(); -Private Bool ThaiComposeConvert(); +#if 0 +Private KeySym HexIMNormalKey( + XicThaiPart *thai_part, + KeySym symbol, + XKeyEvent *event); +Private KeySym HexIMFirstComposeKey( + XicThaiPart *thai_part, + KeySym symbol, + XKeyEvent *event); +Private KeySym HexIMSecondComposeKey( + XicThaiPart *thai_part, + KeySym symbol + XKeyEvent *event); +#endif +Private KeySym HexIMComposeSequence(KeySym ks1, KeySym ks2); +#if 0 +Private void InitIscMode(Xic ic); +Private Bool ThaiComposeConvert( + Display *dpy, + KeySym insym, + KeySym *outsym, KeySym *lower, KeySym *upper); +#endif /* * Definitions @@ -605,13 +535,7 @@ Private Bool ThaiComposeConvert(); (IC_RealDeletePreviousChar(ic)) Private unsigned char -#if NeedFunctionPrototypes IC_RealGetPreviousChar(Xic ic, unsigned short pos) -#else -IC_RealGetPreviousChar(ic, pos) - Xic ic; - XIMStringConversionPosition pos; -#endif { XICCallback* cb = &ic->core.string_conversion_callback; @@ -653,12 +577,7 @@ IC_RealGetPreviousChar(ic, pos) } Private unsigned char -#if NeedFunctionPrototypes IC_RealDeletePreviousChar(Xic ic) -#else -IC_RealDeletePreviousChar(ic) - Xic ic; -#endif { XICCallback* cb = &ic->core.string_conversion_callback; @@ -726,7 +645,12 @@ IC_RealDeletePreviousChar(ic) #define COMPOSE_LED 2 -typedef KeySym (*StateProc)(); +#if 0 +typedef KeySym (*StateProc)( + XicThaiPart *thai_part, + KeySym symbol, + XKeyEvent *event); +#endif /* * macros to classify XKeyEvent state field @@ -797,10 +721,10 @@ struct _XKeytrans { /* Convert keysym to 'Thai Compose' keysym */ /* The current implementation use latin-1 keysyms */ Private Bool -ThaiComposeConvert(dpy, insym, outsym ,lower, upper) - Display *dpy; - KeySym insym; - KeySym *outsym,*lower,*upper; +ThaiComposeConvert( + Display *dpy, + KeySym insym, + KeySym *outsym, KeySym *lower, KeySym *upper) { struct _XMapThaiKey const *table_entry = ThaiComposeTable; @@ -818,13 +742,14 @@ ThaiComposeConvert(dpy, insym, outsym ,lower, upper) #if 0 Private int -XThaiTranslateKey(dpy, keycode, modifiers, modifiers_return, keysym_return, - lsym_return, usym_return) - register Display *dpy; - KeyCode keycode; - register unsigned int modifiers; - unsigned int *modifiers_return; - KeySym *keysym_return,*lsym_return,*usym_return; +XThaiTranslateKey( + register Display *dpy, + KeyCode keycode, + register unsigned int modifiers, + unsigned int *modifiers_return, + KeySym *keysym_return, + KeySym *lsym_return, + KeySym *usym_return) { int per; register KeySym *syms; @@ -902,12 +827,14 @@ XThaiTranslateKey(dpy, keycode, modifiers, modifiers_return, keysym_return, * standard. */ Private int -XThaiTranslateKeySym(dpy, symbol, lsym, usym, modifiers, buffer, nbytes) - Display *dpy; - register KeySym symbol, lsym, usym; - unsigned int modifiers; - unsigned char *buffer; - int nbytes; +XThaiTranslateKeySym( + Display *dpy, + register KeySym symbol, + register KeySym lsym, + register KeySym usym, + unsigned int modifiers, + unsigned char *buffer, + int nbytes) { KeySym ckey = 0; register struct _XKeytrans *p; @@ -1010,9 +937,9 @@ XThaiTranslateKeySym(dpy, symbol, lsym, usym, modifiers, buffer, nbytes) * given a KeySym, returns the first keycode containing it, if any. */ Private CARD8 -FindKeyCode(dpy, code) - register Display *dpy; - register KeySym code; +FindKeyCode( + register Display *dpy, + register KeySym code) { register KeySym *kmax = dpy->keysyms + @@ -1035,9 +962,9 @@ FindKeyCode(dpy, code) * can't map some keysym to a modifier. */ Private void -ComputeMaskFromKeytrans(dpy, p) - Display *dpy; - register struct _XKeytrans *p; +ComputeMaskFromKeytrans( + Display *dpy, + register struct _XKeytrans *p) { register int i; register CARD8 code; @@ -1076,11 +1003,10 @@ ComputeMaskFromKeytrans(dpy, p) #define SECOND_COMPOSE_KEY_STATE 2 Private -KeySym HexIMNormalKey (thai_part, symbol, event) - XicThaiPart *thai_part; - KeySym symbol; - XKeyEvent *event; - +KeySym HexIMNormalKey( + XicThaiPart *thai_part, + KeySym symbol, + XKeyEvent *event) { if (IsComposeKey (symbol, event)) /* start compose sequence */ { @@ -1093,11 +1019,10 @@ KeySym HexIMNormalKey (thai_part, symbol, event) Private -KeySym HexIMFirstComposeKey (thai_part, symbol, event) - XicThaiPart *thai_part; - KeySym symbol; - XKeyEvent *event; - +KeySym HexIMFirstComposeKey( + XicThaiPart *thai_part, + KeySym symbol, + XKeyEvent *event) { if (IsModifierKey (symbol)) return symbol; /* ignore shift etc. */ if (IsCancelComposeKey (&symbol, event)) /* cancel sequence */ @@ -1117,11 +1042,10 @@ KeySym HexIMFirstComposeKey (thai_part, symbol, event) } Private -KeySym HexIMSecondComposeKey (thai_part, symbol, event) - XicThaiPart *thai_part; - KeySym symbol; - XKeyEvent *event; - +KeySym HexIMSecondComposeKey( + XicThaiPart *thai_part, + KeySym symbol, + XKeyEvent *event) { if (IsModifierKey (symbol)) return symbol; /* ignore shift etc. */ if (IsComposeKey (symbol, event)) /* restart sequence ? */ @@ -1153,9 +1077,7 @@ KeySym HexIMSecondComposeKey (thai_part, symbol, event) */ Private -KeySym HexIMComposeSequence (ks1, ks2) - -KeySym ks1, ks2; +KeySym HexIMComposeSequence(KeySym ks1, KeySym ks2) { int hi_digit; int lo_digit; @@ -1192,9 +1114,9 @@ int tactis_code; */ Private -int IsCancelComposeKey(symbol, event) - KeySym *symbol; - XKeyEvent *event; +int IsCancelComposeKey( + KeySym *symbol, + XKeyEvent *event) { if (*symbol==XK_Delete && !IsControl(event->state) && !IsMod1(event->state)) { @@ -1224,10 +1146,10 @@ int IsCancelComposeKey(symbol, event) */ Private -void SetLed (dpy, num, state) - Display *dpy; - int num; - int state; +void SetLed( + Display *dpy, + int num, + int state) { XKeyboardControl led_control; @@ -1240,8 +1162,7 @@ void SetLed (dpy, num, state) /* * Initialize ISC mode from im modifier */ -Private void InitIscMode(ic) -Xic ic; +Private void InitIscMode(Xic ic) { Xim im; char *im_modifier_name; @@ -1275,14 +1196,7 @@ Xic ic; * Helper functions for _XimThaiFilter() */ Private Bool -#if NeedFunctionPrototypes ThaiFltAcceptInput(Xic ic, unsigned char new_char, KeySym symbol) -#else -ThaiFltAcceptInput(ic, new_char, symbol) - Xic ic; - unsigned char new_char; - KeySym symbol; -#endif { ic->private.local.composed->wc[0] = tis2ucs(new_char); ic->private.local.composed->wc[1] = '\0'; @@ -1296,13 +1210,7 @@ ThaiFltAcceptInput(ic, new_char, symbol) } Private Bool -#if NeedFunctionPrototypes ThaiFltReorderInput(Xic ic, unsigned char previous_char, unsigned char new_char) -#else -ThaiFltReorderInput(ic, previous_char, new_char) - Xic ic; - unsigned char previous_char, new_char; -#endif { if (!IC_DeletePreviousChar(ic)) return False; ic->private.local.composed->wc[0] = tis2ucs(new_char); @@ -1315,14 +1223,7 @@ ThaiFltReorderInput(ic, previous_char, new_char) } Private Bool -#if NeedFunctionPrototypes ThaiFltReplaceInput(Xic ic, unsigned char new_char, KeySym symbol) -#else -ThaiFltReplaceInput(ic, new_char, symbol) - Xic ic; - unsigned char new_char; - KeySym symbol; -#endif { if (!IC_DeletePreviousChar(ic)) return False; ic->private.local.composed->wc[0] = tis2ucs(new_char); @@ -1348,7 +1249,6 @@ XPointer client_data; { Xic ic = (Xic)client_data; KeySym symbol; - int wcount; int isc_mode; /* Thai Input Sequence Check mode */ unsigned char previous_char; /* Last inputted Thai char */ unsigned char new_char; @@ -1368,8 +1268,8 @@ XPointer client_data; if (!IC_IscMode(ic)) InitIscMode(ic); - wcount = XwcLookupString((XIC)ic, &ev->xkey, - wbuf, sizeof(wbuf)/sizeof(wbuf[0]), &symbol, NULL); + XwcLookupString((XIC)ic, &ev->xkey, wbuf, sizeof(wbuf) / sizeof(wbuf[0]), + &symbol, NULL); if ((ev->xkey.state & (AllMods & ~ShiftMask)) || ((symbol >> 8 == 0xFF) && diff --git a/modules/im/ximcp/imThaiIc.c b/modules/im/ximcp/imThaiIc.c index 711654f..b67e9c1 100644 --- a/modules/im/ximcp/imThaiIc.c +++ b/modules/im/ximcp/imThaiIc.c @@ -32,7 +32,7 @@ THIS SOFTWARE. frankyling@hgrd01.enet.dec.com ******************************************************************/ -/* $XFree86: xc/lib/X11/imThaiIc.c,v 1.4 2001/01/17 19:41:52 dawes Exp $ */ +/* $XFree86: xc/lib/X11/imThaiIc.c,v 1.5 2003/04/13 19:22:21 dawes Exp $ */ #include <stdio.h> #include <X11/Xlib.h> @@ -42,8 +42,8 @@ THIS SOFTWARE. #include "Ximint.h" Private void -_XimThaiUnSetFocus(xic) - XIC xic; +_XimThaiUnSetFocus( + XIC xic) { Xic ic = (Xic)xic; ((Xim)ic->core.im)->private.local.current_ic = (XIC)NULL; @@ -55,8 +55,8 @@ _XimThaiUnSetFocus(xic) } Private void -_XimThaiDestroyIC(xic) - XIC xic; +_XimThaiDestroyIC( + XIC xic) { Xic ic = (Xic)xic; if(((Xim)ic->core.im)->private.local.current_ic == (XIC)ic) { @@ -79,8 +79,8 @@ _XimThaiDestroyIC(xic) } Private void -_XimThaiSetFocus(xic) - XIC xic; +_XimThaiSetFocus( + XIC xic) { Xic ic = (Xic)xic; XIC current_ic = ((Xim)ic->core.im)->private.local.current_ic; @@ -100,8 +100,8 @@ _XimThaiSetFocus(xic) } Private void -_XimThaiReset(xic) - XIC xic; +_XimThaiReset( + XIC xic) { Xic ic = (Xic)xic; ic->private.local.thai.comp_state = 0; @@ -112,16 +112,16 @@ _XimThaiReset(xic) } Private char * -_XimThaiMbReset(xic) - XIC xic; +_XimThaiMbReset( + XIC xic) { _XimThaiReset(xic); return (char *)NULL; } Private wchar_t * -_XimThaiWcReset(xic) - XIC xic; +_XimThaiWcReset( + XIC xic) { _XimThaiReset(xic); return (wchar_t *)NULL; @@ -142,9 +142,9 @@ Private XICMethodsRec Thai_ic_methods = { }; XIC -_XimThaiCreateIC(im, values) - XIM im; - XIMArg *values; +_XimThaiCreateIC( + XIM im, + XIMArg *values) { Xic ic; XimDefICValues ic_values; diff --git a/modules/im/ximcp/imTrX.c b/modules/im/ximcp/imTrX.c index 9386d8f..38ac014 100644 --- a/modules/im/ximcp/imTrX.c +++ b/modules/im/ximcp/imTrX.c @@ -28,7 +28,7 @@ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. fujiwara@a80.tech.yk.fujitsu.co.jp ******************************************************************/ -/* $XFree86: xc/lib/X11/imTrX.c,v 1.2 2002/11/26 01:21:25 dawes Exp $ */ +/* $XFree86: xc/lib/X11/imTrX.c,v 1.4 2003/11/17 22:20:12 dawes Exp $ */ #include <string.h> #include <X11/Xatom.h> @@ -40,14 +40,12 @@ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "XimTrX.h" Private Bool -_XimXRegisterDispatcher(im, callback, call_data) - Xim im; +_XimXRegisterDispatcher( + Xim im, Bool (*callback)( -#if NeedNestedPrototypes Xim, INT16, XPointer, XPointer -#endif - ); - XPointer call_data; + ), + XPointer call_data) { XIntrCallbackPtr rec; XSpecRec *spec = (XSpecRec *)im->private.proto.spec; @@ -63,8 +61,8 @@ _XimXRegisterDispatcher(im, callback, call_data) } Private void -_XimXFreeIntrCallback(im) - Xim im; +_XimXFreeIntrCallback( + Xim im) { XSpecRec *spec = (XSpecRec *)im->private.proto.spec; register XIntrCallbackPtr rec, next; @@ -78,14 +76,7 @@ _XimXFreeIntrCallback(im) } Private Bool -#if NeedFunctionPrototypes _XimXCallDispatcher(Xim im, INT16 len, XPointer data) -#else -_XimXCallDispatcher(im, len, data) - Xim im; - INT16 len; - XPointer data; -#endif { register XIntrCallbackRec *rec; XSpecRec *spec = (XSpecRec *)im->private.proto.spec; @@ -98,11 +89,11 @@ _XimXCallDispatcher(im, len, data) } Private Bool -_XimXFilterWaitEvent(d, w, ev, arg) - Display *d; - Window w; - XEvent *ev; - XPointer arg; +_XimXFilterWaitEvent( + Display *d, + Window w, + XEvent *ev, + XPointer arg) { Xim im = (Xim)arg; XSpecRec *spec = (XSpecRec *)im->private.proto.spec; @@ -126,10 +117,10 @@ _XimXFilterWaitEvent(d, w, ev, arg) } Private Bool -_CheckConnect(display, event, xim) - Display *display; - XEvent *event; - XPointer xim; +_CheckConnect( + Display *display, + XEvent *event, + XPointer xim) { Xim im = (Xim)xim; XSpecRec *spec = (XSpecRec *)im->private.proto.spec; @@ -142,12 +133,7 @@ _CheckConnect(display, event, xim) } Private Bool -#if NeedFunctionPrototypes _XimXConnect(Xim im) -#else -_XimXConnect(im) - Xim im; -#endif { XEvent event; XSpecRec *spec = (XSpecRec *)im->private.proto.spec; @@ -216,12 +202,7 @@ _XimXConnect(im) } Private Bool -#if NeedFunctionPrototypes _XimXShutdown(Xim im) -#else -_XimXShutdown(im) - Xim im; -#endif { XSpecRec *spec = (XSpecRec *)im->private.proto.spec; @@ -241,8 +222,8 @@ _XimXShutdown(im) } Private char * -_NewAtom(atomName) - char *atomName; +_NewAtom( + char *atomName) { static int sequence = 0; @@ -252,14 +233,7 @@ _NewAtom(atomName) } Private Bool -#if NeedFunctionPrototypes _XimXWrite(Xim im, INT16 len, XPointer data) -#else -_XimXWrite(im, len, data) - Xim im; - INT16 len; - XPointer data; -#endif { Atom atom; char atomName[16]; @@ -320,12 +294,12 @@ _XimXWrite(im, len, data) } Private Bool -_XimXGetReadData(im, buf, buf_len, ret_len, event) - Xim im; - char *buf; - int buf_len; - int *ret_len; - XEvent *event; +_XimXGetReadData( + Xim im, + char *buf, + int buf_len, + int *ret_len, + XEvent *event) { char *data; int len; @@ -434,10 +408,10 @@ _XimXGetReadData(im, buf, buf_len, ret_len, event) } Private Bool -_CheckCMEvent(display, event, xim) - Display *display; - XEvent *event; - XPointer xim; +_CheckCMEvent( + Display *display, + XEvent *event, + XPointer xim) { Xim im = (Xim)xim; XSpecRec *spec = (XSpecRec *)im->private.proto.spec; @@ -455,15 +429,7 @@ _CheckCMEvent(display, event, xim) } Private Bool -#if NeedFunctionPrototypes _XimXRead(Xim im, XPointer recv_buf, int buf_len, int *ret_len) -#else -_XimXRead(im, recv_buf, buf_len, ret_len) - Xim im; - XPointer recv_buf; - int buf_len; - int *ret_len; -#endif { XEvent *ev; XEvent event; @@ -486,12 +452,7 @@ _XimXRead(im, recv_buf, buf_len, ret_len) } Private void -#if NeedFunctionPrototypes _XimXFlush(Xim im) -#else -_XimXFlush(im) - Xim im; -#endif { XFlush(im->core.display); return; diff --git a/modules/im/ximcp/imTrans.c b/modules/im/ximcp/imTrans.c index 53ca201..f1035d2 100644 --- a/modules/im/ximcp/imTrans.c +++ b/modules/im/ximcp/imTrans.c @@ -28,6 +28,7 @@ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. fujiwara@a80.tech.yk.fujitsu.co.jp ******************************************************************/ +/* $XFree86: xc/lib/X11/imTrans.c,v 1.4 2003/11/17 22:20:12 dawes Exp $ */ #include <stdio.h> #include <X11/Xatom.h> @@ -38,6 +39,7 @@ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "Xlcint.h" #include "Ximint.h" #include "XimTrans.h" +#include "XimTrInt.h" #ifndef XIM_CONNECTION_RETRIES @@ -46,8 +48,8 @@ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. Private Bool -_XimTransConnect(im) - Xim im; +_XimTransConnect( + Xim im) { TransSpecRec *spec = (TransSpecRec *)im->private.proto.spec; int connect_stat, retry; @@ -99,8 +101,8 @@ _XimTransConnect(im) Private Bool -_XimTransShutdown(im) - Xim im; +_XimTransShutdown( + Xim im) { TransSpecRec *spec = (TransSpecRec *)im->private.proto.spec; @@ -119,21 +121,12 @@ _XimTransShutdown(im) Public Bool -#if NeedFunctionPrototypes _XimTransRegisterDispatcher( Xim im, Bool (*callback)( -#if NeedNestedPrototypes Xim, INT16, XPointer, XPointer -#endif ), XPointer call_data) -#else -_XimTransRegisterDispatcher(im, callback, call_data) - Xim im; - Bool (*callback)(); - XPointer call_data; -#endif { TransSpecRec *spec = (TransSpecRec *)im->private.proto.spec; TransIntrCallbackPtr rec; @@ -150,8 +143,8 @@ _XimTransRegisterDispatcher(im, callback, call_data) Public void -_XimFreeTransIntrCallback(im) - Xim im; +_XimFreeTransIntrCallback( + Xim im) { TransSpecRec *spec = (TransSpecRec *)im->private.proto.spec; register TransIntrCallbackPtr rec, next; @@ -166,14 +159,7 @@ _XimFreeTransIntrCallback(im) Public Bool -#if NeedFunctionPrototypes _XimTransCallDispatcher(Xim im, INT16 len, XPointer data) -#else -_XimTransCallDispatcher(im, len, data) - Xim im; - INT16 len; - XPointer data; -#endif { TransSpecRec *spec = (TransSpecRec *)im->private.proto.spec; TransIntrCallbackRec *rec; @@ -187,11 +173,11 @@ _XimTransCallDispatcher(im, len, data) Public Bool -_XimTransFilterWaitEvent(d, w, ev, arg) - Display *d; - Window w; - XEvent *ev; - XPointer arg; +_XimTransFilterWaitEvent( + Display *d, + Window w, + XEvent *ev, + XPointer arg) { Xim im = (Xim)arg; TransSpecRec *spec = (TransSpecRec *)im->private.proto.spec; @@ -202,10 +188,10 @@ _XimTransFilterWaitEvent(d, w, ev, arg) Public void -_XimTransInternalConnection(d, fd, arg) - Display *d; - int fd; - XPointer arg; +_XimTransInternalConnection( + Display *d, + int fd, + XPointer arg) { Xim im = (Xim)arg; XEvent ev; @@ -228,14 +214,7 @@ _XimTransInternalConnection(d, fd, arg) Public Bool -#if NeedFunctionPrototypes _XimTransWrite(Xim im, INT16 len, XPointer data) -#else -_XimTransWrite(im, len, data) - Xim im; - INT16 len; - XPointer data; -#endif { TransSpecRec *spec = (TransSpecRec *)im->private.proto.spec; char *buf = (char *)data; @@ -252,11 +231,11 @@ _XimTransWrite(im, len, data) Public Bool -_XimTransRead(im, recv_buf, buf_len, ret_len) - Xim im; - XPointer recv_buf; - int buf_len; - int *ret_len; +_XimTransRead( + Xim im, + XPointer recv_buf, + int buf_len, + int *ret_len) { TransSpecRec *spec = (TransSpecRec *)im->private.proto.spec; int len; @@ -273,8 +252,8 @@ _XimTransRead(im, recv_buf, buf_len, ret_len) Public void -_XimTransFlush(im) - Xim im; +_XimTransFlush( + Xim im) { return; } @@ -282,9 +261,9 @@ _XimTransFlush(im) Public Bool -_XimTransConf(im, address) - Xim im; - char *address; +_XimTransConf( + Xim im, + char *address) { char *paddr; TransSpecRec *spec; diff --git a/modules/im/ximcp/imTransR.c b/modules/im/ximcp/imTransR.c index 016c5e4..f36f77e 100644 --- a/modules/im/ximcp/imTransR.c +++ b/modules/im/ximcp/imTransR.c @@ -28,7 +28,7 @@ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. fujiwara@a80.tech.yk.fujitsu.co.jp ******************************************************************/ -/* $XFree86: xc/lib/X11/imTransR.c,v 3.4 2001/01/17 19:41:52 dawes Exp $ */ +/* $XFree86: xc/lib/X11/imTransR.c,v 3.7 2003/11/17 22:20:12 dawes Exp $ */ #include "Xlibint.h" #include "Xlcint.h" @@ -50,7 +50,7 @@ Public TransportSW _XimTransportRec[] = { #ifdef STREAMSCONN { "streams", _XimTransConf }, /* use X transport lib */ #endif /* STREAMSCONN */ - { (char *)NULL, (Bool (*)())NULL }, + { (char *)NULL, (Bool (*)(Xim, char *))NULL }, }; Public Bool @@ -68,22 +68,15 @@ _XimShutdown(im) } Public Bool -#if NeedFunctionPrototypes _XimWrite(Xim im, INT16 len, XPointer data) -#else -_XimWrite(im, len, data) - Xim im; - INT16 len; - XPointer data; -#endif { return im->private.proto.write(im, len, data); } Private int -_CheckProtocolData(im, recv_buf) - Xim im; - char *recv_buf; +_CheckProtocolData( + Xim im, + char *recv_buf) { int data_len; @@ -92,11 +85,11 @@ _CheckProtocolData(im, recv_buf) } Private int -_XimReadData(im, len, buf, buf_size) - Xim im; - INT16 *len; - XPointer buf; - int buf_size; +_XimReadData( + Xim im, + INT16 *len, + XPointer buf, + int buf_size) { char *hold_buf; char *tmp; @@ -209,10 +202,10 @@ _XimReadData(im, len, buf, buf_size) } Private Bool -_XimCallDispatcher(im, len, data) - Xim im; - INT16 len; - XPointer data; +_XimCallDispatcher( + Xim im, + INT16 len, + XPointer data) { return im->private.proto.call_dispatcher(im, len, data); } @@ -224,9 +217,7 @@ _XimRead(im, len, buf, buf_size, predicate, arg) XPointer buf; int buf_size; Bool (*predicate)( -#if NeedNestedPrototypes Xim, INT16, XPointer, XPointer -#endif ); XPointer arg; { @@ -249,14 +240,12 @@ _XimRead(im, len, buf, buf_size, predicate, arg) } Public Bool -_XimRegisterDispatcher(im, callback, call_data) - Xim im; +_XimRegisterDispatcher( + Xim im, Bool (*callback)( -#if NeedNestedPrototypes Xim, INT16, XPointer, XPointer -#endif - ); - XPointer call_data; + ), + XPointer call_data) { return im->private.proto.register_dispatcher(im, callback, call_data); } diff --git a/modules/lc/gen/lcGenConv.c b/modules/lc/gen/lcGenConv.c index e8b1d16..bac71d4 100644 --- a/modules/lc/gen/lcGenConv.c +++ b/modules/lc/gen/lcGenConv.c @@ -35,7 +35,7 @@ * 2000 * Modifier: Ivan Pascal The XFree86 Project */ -/* $XFree86: xc/lib/X11/lcGenConv.c,v 3.27 2003/02/25 22:02:45 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcGenConv.c,v 3.28 2003/05/27 22:26:26 tsi Exp $ */ /* * A generic locale loader for all kinds of ISO-2022 based codesets. @@ -1125,7 +1125,7 @@ wcstocts( /* make encoding data */ ct_sequence = charset->ct_sequence; side = charset->side; - seq_len = strlen(charset->ct_sequence); + seq_len = strlen(ct_sequence); if (standard_flag) { name_len = 0; total_len = seq_len; @@ -1151,7 +1151,7 @@ wcstocts( } if (outbufptr) { - strcpy((char *)outbufptr, charset->ct_sequence); + strcpy((char *)outbufptr, ct_sequence); outbufptr += seq_len; if (!standard_flag) { diff --git a/modules/lc/xlocale/lcEuc.c b/modules/lc/xlocale/lcEuc.c index 5f1248c..26f93ac 100644 --- a/modules/lc/xlocale/lcEuc.c +++ b/modules/lc/xlocale/lcEuc.c @@ -30,7 +30,7 @@ OF THIS SOFTWARE. Yoshiyuki Segawa (segawa@ossi.com) *****************************************************************/ -/* $XFree86: xc/lib/X11/lcEuc.c,v 3.12 2003/01/20 04:05:30 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcEuc.c,v 3.13 2003/08/22 13:29:16 pascal Exp $ */ /* * An EUC locale. @@ -115,23 +115,18 @@ euc_mbstowcs( int cs0flg = False; int cs1flg = False; int length = 0; - int num_conv; int unconv_num = 0; Bool new_char; const char *inbufptr = *from; wchar_t *outbufptr = (wchar_t *) *to; - wchar_t *outbuf_base = outbufptr; CodeSet *codesets = XLC_GENERIC(lcd, codeset_list); int codeset_num = XLC_GENERIC(lcd, codeset_num); Ulong wc_shift = XLC_GENERIC(lcd, wc_shift_bits); - if (*from_left > *to_left) - *from_left = *to_left; - - for (new_char = True; *from_left > 0;) { + for (new_char = True; *from_left > 0 && *to_left > 0;) { ch = *inbufptr++; @@ -148,6 +143,7 @@ euc_mbstowcs( length = CS0->length; *outbufptr++ = (wchar_t)ch; (*from_left)--; + (*to_left)--; continue; } else if (ch == SS2) { /* CS2 */ @@ -221,6 +217,7 @@ euc_mbstowcs( if (--chr_len == 0) { wc_tmp |= wc_encode; *outbufptr++ = wc_tmp; + (*to_left)--; new_char = True; sshift = False; @@ -236,9 +233,6 @@ euc_mbstowcs( if (cs0flg == True || cs1flg == True) /* error check on last char */ unconv_num++; - if ((num_conv = (int)(outbufptr - outbuf_base)) > 0) - *to_left = (*to_left) - num_conv; - return unconv_num; } @@ -255,21 +249,16 @@ euc_wcstombs( { const wchar_t *inbufptr = (const wchar_t *) *from; XPointer outbufptr = *to; - XPointer outbuf_base = outbufptr; wchar_t wch; int length; Uchar tmp; - int num_conv; int unconv_num = 0; XLCd lcd = (XLCd)conv->state; CodeSet codeset; Ulong wc_shift = XLC_GENERIC(lcd, wc_shift_bits); - if (*from_left > *to_left) - *from_left = *to_left; - - for (; *from_left > 0 ; (*from_left)-- ) { + for (; *from_left > 0 && *to_left > 0; (*from_left)-- ) { wch = *inbufptr++; @@ -282,8 +271,19 @@ euc_wcstombs( length = codeset->length; wch ^= (wchar_t)codeset->wc_encoding; - if (codeset->parse_info) /* put out SS2 or SS3 */ + if (codeset->parse_info) { /* put out SS2 or SS3 */ + if (*to_left < length + 1) { + unconv_num++; + break; + } *outbufptr++ = *codeset->parse_info->encoding; + (*to_left)--; + } else { + if (*to_left < length) { + unconv_num++; + break; + } + } do { length--; @@ -293,14 +293,12 @@ euc_wcstombs( tmp = BIT8ON(tmp); *outbufptr++ = (Uchar)tmp; + (*to_left)--; } while (length); } *to = (XPointer)outbufptr; - if ((num_conv = (int)(outbufptr - outbuf_base)) > 0) - *to_left -= num_conv; - return unconv_num; } diff --git a/modules/om/generic/omDefault.c b/modules/om/generic/omDefault.c index 2701d86..806ad5c 100644 --- a/modules/om/generic/omDefault.c +++ b/modules/om/generic/omDefault.c @@ -28,7 +28,7 @@ * This is source code modified by FUJITSU LIMITED under the Joint * Development Agreement for the CDE/Motif PST. */ -/* $XFree86: xc/lib/X11/omDefault.c,v 1.5 2001/01/17 19:41:56 dawes Exp $ */ +/* $XFree86: xc/lib/X11/omDefault.c,v 1.7 2003/11/17 22:20:12 dawes Exp $ */ #include "Xlibint.h" #include "XomGeneric.h" @@ -41,11 +41,11 @@ #define FreeLocalBuf(ptr) if (ptr != local_buf) Xfree(ptr) static Bool -wcs_to_mbs(oc, to, from, length) - XOC oc; - char *to; - _Xconst wchar_t *from; - int length; +wcs_to_mbs( + XOC oc, + char *to, + _Xconst wchar_t *from, + int length) { XlcConv conv; int to_left, ret; @@ -64,11 +64,11 @@ wcs_to_mbs(oc, to, from, length) } static Bool -utf8_to_mbs(oc, to, from, length) - XOC oc; - char *to; - _Xconst char *from; - int length; +utf8_to_mbs( + XOC oc, + char *to, + _Xconst char *from, + int length) { XlcConv conv; int to_left, ret; @@ -87,27 +87,13 @@ utf8_to_mbs(oc, to, from, length) } int -#if NeedFunctionPrototypes _XmbDefaultTextEscapement(XOC oc, _Xconst char *text, int length) -#else -_XmbDefaultTextEscapement(oc, text, length) - XOC oc; - _Xconst char *text; - int length; -#endif { return XTextWidth(*oc->core.font_info.font_struct_list, text, length); } int -#if NeedFunctionPrototypes _XwcDefaultTextEscapement(XOC oc, _Xconst wchar_t *text, int length) -#else -_XwcDefaultTextEscapement(oc, text, length) - XOC oc; - _Xconst wchar_t *text; - int length; -#endif { DefineLocalBuf; char *buf = AllocLocalBuf(length); @@ -130,14 +116,7 @@ err: } int -#if NeedFunctionPrototypes _Xutf8DefaultTextEscapement(XOC oc, _Xconst char *text, int length) -#else -_Xutf8DefaultTextEscapement(oc, text, length) - XOC oc; - _Xconst char *text; - int length; -#endif { DefineLocalBuf; char *buf = AllocLocalBuf(length); @@ -160,17 +139,8 @@ err: } int -#if NeedFunctionPrototypes _XmbDefaultTextExtents(XOC oc, _Xconst char *text, int length, XRectangle *overall_ink, XRectangle *overall_logical) -#else -_XmbDefaultTextExtents(oc, text, length, overall_ink, overall_logical) - XOC oc; - _Xconst char *text; - int length; - XRectangle *overall_ink; - XRectangle *overall_logical; -#endif { int direction, logical_ascent, logical_descent; XCharStruct overall; @@ -196,17 +166,8 @@ _XmbDefaultTextExtents(oc, text, length, overall_ink, overall_logical) } int -#if NeedFunctionPrototypes _XwcDefaultTextExtents(XOC oc, _Xconst wchar_t *text, int length, XRectangle *overall_ink, XRectangle *overall_logical) -#else -_XwcDefaultTextExtents(oc, text, length, overall_ink, overall_logical) - XOC oc; - _Xconst wchar_t *text; - int length; - XRectangle *overall_ink; - XRectangle *overall_logical; -#endif { DefineLocalBuf; char *buf = AllocLocalBuf(length); @@ -229,17 +190,8 @@ err: } int -#if NeedFunctionPrototypes _Xutf8DefaultTextExtents(XOC oc, _Xconst char *text, int length, XRectangle *overall_ink, XRectangle *overall_logical) -#else -_Xutf8DefaultTextExtents(oc, text, length, overall_ink, overall_logical) - XOC oc; - _Xconst char *text; - int length; - XRectangle *overall_ink; - XRectangle *overall_logical; -#endif { DefineLocalBuf; char *buf = AllocLocalBuf(length); @@ -262,25 +214,11 @@ err: } Status -#if NeedFunctionPrototypes _XmbDefaultTextPerCharExtents(XOC oc, _Xconst char *text, int length, XRectangle *ink_buf, XRectangle *logical_buf, int buf_size, int *num_chars, XRectangle *overall_ink, XRectangle *overall_logical) -#else -_XmbDefaultTextPerCharExtents(oc, text, length, ink_buf, logical_buf, buf_size, - num_chars, overall_ink, overall_logical) - XOC oc; - _Xconst char *text; - int length; - XRectangle *ink_buf; - XRectangle *logical_buf; - int buf_size; - int *num_chars; - XRectangle *overall_ink; - XRectangle *overall_logical; -#endif { XFontStruct *font = *oc->core.font_info.font_struct_list; XCharStruct *def, *cs, overall; @@ -346,25 +284,11 @@ _XmbDefaultTextPerCharExtents(oc, text, length, ink_buf, logical_buf, buf_size, } Status -#if NeedFunctionPrototypes _XwcDefaultTextPerCharExtents(XOC oc, _Xconst wchar_t *text, int length, XRectangle *ink_buf, XRectangle *logical_buf, int buf_size, int *num_chars, XRectangle *overall_ink, XRectangle *overall_logical) -#else -_XwcDefaultTextPerCharExtents(oc, text, length, ink_buf, logical_buf, buf_size, - num_chars, overall_ink, overall_logical) - XOC oc; - _Xconst wchar_t *text; - int length; - XRectangle *ink_buf; - XRectangle *logical_buf; - int buf_size; - int *num_chars; - XRectangle *overall_ink; - XRectangle *overall_logical; -#endif { DefineLocalBuf; char *buf = AllocLocalBuf(length); @@ -389,26 +313,11 @@ err: } Status -#if NeedFunctionPrototypes _Xutf8DefaultTextPerCharExtents(XOC oc, _Xconst char *text, int length, XRectangle *ink_buf, XRectangle *logical_buf, int buf_size, int *num_chars, XRectangle *overall_ink, XRectangle *overall_logical) -#else -_Xutf8DefaultTextPerCharExtents(oc, text, length, ink_buf, logical_buf, - buf_size, num_chars, overall_ink, - overall_logical) - XOC oc; - _Xconst char *text; - int length; - XRectangle *ink_buf; - XRectangle *logical_buf; - int buf_size; - int *num_chars; - XRectangle *overall_ink; - XRectangle *overall_logical; -#endif { DefineLocalBuf; char *buf = AllocLocalBuf(length); @@ -433,19 +342,8 @@ err: } int -#if NeedFunctionPrototypes _XmbDefaultDrawString(Display *dpy, Drawable d, XOC oc, GC gc, int x, int y, _Xconst char *text, int length) -#else -_XmbDefaultDrawString(dpy, d, oc, gc, x, y, text, length) - Display *dpy; - Drawable d; - XOC oc; - GC gc; - int x, y; - _Xconst char *text; - int length; -#endif { XFontStruct *font = *oc->core.font_info.font_struct_list; @@ -456,19 +354,8 @@ _XmbDefaultDrawString(dpy, d, oc, gc, x, y, text, length) } int -#if NeedFunctionPrototypes _XwcDefaultDrawString(Display *dpy, Drawable d, XOC oc, GC gc, int x, int y, _Xconst wchar_t *text, int length) -#else -_XwcDefaultDrawString(dpy, d, oc, gc, x, y, text, length) - Display *dpy; - Drawable d; - XOC oc; - GC gc; - int x, y; - _Xconst wchar_t *text; - int length; -#endif { DefineLocalBuf; char *buf = AllocLocalBuf(length); @@ -491,19 +378,8 @@ err: } int -#if NeedFunctionPrototypes _Xutf8DefaultDrawString(Display *dpy, Drawable d, XOC oc, GC gc, int x, int y, _Xconst char *text, int length) -#else -_Xutf8DefaultDrawString(dpy, d, oc, gc, x, y, text, length) - Display *dpy; - Drawable d; - XOC oc; - GC gc; - int x, y; - _Xconst char *text; - int length; -#endif { DefineLocalBuf; char *buf = AllocLocalBuf(length); @@ -526,38 +402,16 @@ err: } void -#if NeedFunctionPrototypes _XmbDefaultDrawImageString(Display *dpy, Drawable d, XOC oc, GC gc, int x, int y, _Xconst char *text, int length) -#else -_XmbDefaultDrawImageString(dpy, d, oc, gc, x, y, text, length) - Display *dpy; - Drawable d; - XOC oc; - GC gc; - int x, y; - _Xconst char *text; - int length; -#endif { XSetFont(dpy, gc, (*oc->core.font_info.font_struct_list)->fid); XDrawImageString(dpy, d, gc, x, y, text, length); } void -#if NeedFunctionPrototypes _XwcDefaultDrawImageString(Display *dpy, Drawable d, XOC oc, GC gc, int x, int y, _Xconst wchar_t *text, int length) -#else -_XwcDefaultDrawImageString(dpy, d, oc, gc, x, y, text, length) - Display *dpy; - Drawable d; - XOC oc; - GC gc; - int x, y; - _Xconst wchar_t *text; - int length; -#endif { DefineLocalBuf; char *buf = AllocLocalBuf(length); @@ -575,19 +429,8 @@ err: } void -#if NeedFunctionPrototypes _Xutf8DefaultDrawImageString(Display *dpy, Drawable d, XOC oc, GC gc, int x, int y, _Xconst char *text, int length) -#else -_Xutf8DefaultDrawImageString(dpy, d, oc, gc, x, y, text, length) - Display *dpy; - Drawable d; - XOC oc; - GC gc; - int x, y; - _Xconst char *text; - int length; -#endif { DefineLocalBuf; char *buf = AllocLocalBuf(length); diff --git a/modules/om/generic/omGeneric.c b/modules/om/generic/omGeneric.c index 21986a2..331c2aa 100644 --- a/modules/om/generic/omGeneric.c +++ b/modules/om/generic/omGeneric.c @@ -32,7 +32,7 @@ * Modifier: Takanori Tateno FUJITSU LIMITED * */ -/* $XFree86: xc/lib/X11/omGeneric.c,v 3.25 2002/11/26 13:41:40 eich Exp $ */ +/* $XFree86: xc/lib/X11/omGeneric.c,v 3.28 2003/11/17 22:20:12 dawes Exp $ */ /* * Fixed the algorithms in parse_fontname() and parse_fontdata() @@ -51,6 +51,7 @@ #include "Xlibint.h" #include "XomGeneric.h" +#include "XlcGeneric.h" #include <X11/Xos.h> #include <X11/Xatom.h> #include <stdio.h> @@ -63,6 +64,7 @@ #define CHARSET_ENCODING_FIELD 14 #define XLFD_MAX_LEN 255 +#if 0 extern int _XmbDefaultTextEscapement(), _XwcDefaultTextEscapement(), _Xutf8DefaultTextEscapement(); extern int _XmbDefaultTextExtents(), _XwcDefaultTextExtents(), @@ -86,13 +88,14 @@ extern void _XmbGenericDrawImageString(), _XwcGenericDrawImageString(), _Xutf8GenericDrawImageString(); extern void _XlcDbg_printValue (const char *str, char **value, int num); +#endif /* For VW/UDC start */ static FontData -init_fontdata(font_data, font_data_count) - FontData font_data; - int font_data_count; +init_fontdata( + FontData font_data, + int font_data_count) { FontData fd; int i; @@ -109,12 +112,12 @@ init_fontdata(font_data, font_data_count) } static VRotate -init_vrotate(font_data, font_data_count, type, code_range, code_range_num) - FontData font_data; - int font_data_count; - int type; - CodeRange code_range; - int code_range_num; +init_vrotate( + FontData font_data, + int font_data_count, + int type, + CodeRange code_range, + int code_range_num) { VRotate vrotate; int i; @@ -140,8 +143,8 @@ init_vrotate(font_data, font_data_count, type, code_range, code_range_num) } static Bool -init_fontset(oc) - XOC oc; +init_fontset( + XOC oc) { XOCGenericPart *gen; FontSet font_set; @@ -210,9 +213,9 @@ err: /* For VW/UDC end */ static char * -get_prop_name(dpy, fs) - Display *dpy; - XFontStruct *fs; +get_prop_name( + Display *dpy, + XFontStruct *fs) { unsigned long fp; @@ -225,10 +228,10 @@ get_prop_name(dpy, fs) /* For VW/UDC start */ static Bool -load_fontdata(oc, font_data, font_data_num) - XOC oc; - FontData font_data; - int font_data_num; +load_fontdata( + XOC oc, + FontData font_data, + int font_data_num) { Display *dpy = oc->core.om->core.display; FontData fd = font_data; @@ -246,9 +249,9 @@ load_fontdata(oc, font_data, font_data_num) } static Bool -load_fontset_data(oc, font_set) - XOC oc; - FontSet font_set; +load_fontset_data( + XOC oc, + FontSet font_set) { Display *dpy = oc->core.om->core.display; @@ -268,8 +271,8 @@ load_fontset_data(oc, font_set) } static Bool -load_font(oc) - XOC oc; +load_font( + XOC oc) { XOCGenericPart *gen = XOC_GENERIC(oc); FontSet font_set = gen->font_set; @@ -314,8 +317,8 @@ load_font(oc) /* For VW/UDC end */ static Bool -load_font_info(oc) - XOC oc; +load_font_info( + XOC oc) { Display *dpy = oc->core.om->core.display; XOCGenericPart *gen = XOC_GENERIC(oc); @@ -343,10 +346,11 @@ load_font_info(oc) /* For Vertical Writing start */ static void -check_fontset_extents(overall, logical_ascent, logical_descent, font) - XCharStruct *overall; - int *logical_ascent, *logical_descent; - XFontStruct *font; +check_fontset_extents( + XCharStruct *overall, + int *logical_ascent, + int *logical_descent, + XFontStruct *font) { overall->lbearing = min(overall->lbearing, font->min_bounds.lbearing); overall->rbearing = max(overall->rbearing, font->max_bounds.rbearing); @@ -360,8 +364,8 @@ check_fontset_extents(overall, logical_ascent, logical_descent, font) /* For Vertical Writing end */ static void -set_fontset_extents(oc) - XOC oc; +set_fontset_extents( + XOC oc) { XRectangle *ink = &oc->core.font_set_extents.max_ink_extent; XRectangle *logical = &oc->core.font_set_extents.max_logical_extent; @@ -434,8 +438,8 @@ set_fontset_extents(oc) } static Bool -init_core_part(oc) - XOC oc; +init_core_part( + XOC oc) { XOCGenericPart *gen = XOC_GENERIC(oc); FontSet font_set; @@ -508,9 +512,9 @@ err: } static char * -get_font_name(oc, pattern) - XOC oc; - char *pattern; +get_font_name( + XOC oc, + char *pattern) { char **list, *name; int count = 0; @@ -531,8 +535,8 @@ get_font_name(oc, pattern) /* For VW/UDC start*/ static char * -get_rotate_fontname(font_name) - char *font_name; +get_rotate_fontname( + char *font_name) { char *pattern = NULL, *ptr = NULL; char *fields[CHARSET_ENCODING_FIELD]; @@ -618,9 +622,9 @@ get_rotate_fontname(font_name) } static Bool -is_match_charset(font_data, font_name) - FontData font_data; - char *font_name; +is_match_charset( + FontData font_data, + char *font_name) { char *last; int length, name_len; @@ -640,10 +644,10 @@ is_match_charset(font_data, font_name) #if 0 static char * -get_font_name_from_list(oc, pattern, font_data) - XOC oc; - char *pattern; - FontData font_data; +get_font_name_from_list( + XOC oc, + char *pattern, + FontData font_data) { char **list, *name = (char *)NULL, *fname; int count = 0, i; @@ -669,10 +673,10 @@ get_font_name_from_list(oc, pattern, font_data) #endif static int -parse_all_name(oc, font_data, pattern) - XOC oc; - FontData font_data; - char *pattern; +parse_all_name( + XOC oc, + FontData font_data, + char *pattern) { #ifdef OLDCODE @@ -727,10 +731,10 @@ parse_all_name(oc, font_data, pattern) } static int -parse_omit_name(oc, font_data, pattern) - XOC oc; - FontData font_data; - char *pattern; +parse_omit_name( + XOC oc, + FontData font_data, + char *pattern) { char* last = (char *) NULL; char* base_name; @@ -853,16 +857,15 @@ parse_omit_name(oc, font_data, pattern) typedef enum{C_PRIMARY, C_SUBSTITUTE, C_VMAP, C_VROTATE } ClassType; static int -parse_fontdata(oc, font_set, font_data, font_data_count, name_list, - name_list_count, class, font_data_return) - XOC oc; - FontSet font_set; - FontData font_data; - int font_data_count; - char **name_list; - int name_list_count; - ClassType class; - FontDataRec *font_data_return; +parse_fontdata( + XOC oc, + FontSet font_set, + FontData font_data, + int font_data_count, + char **name_list, + int name_list_count, + ClassType class, + FontDataRec *font_data_return) { char **cur_name_list = name_list; @@ -1066,11 +1069,11 @@ parse_fontdata(oc, font_set, font_data, font_data_count, name_list, static int -parse_vw(oc, font_set, name_list, count) - XOC oc; - FontSet font_set; - char **name_list; - int count; +parse_vw( + XOC oc, + FontSet font_set, + char **name_list, + int count) { FontData vmap = font_set->vmap; VRotate vrotate = font_set->vrotate; @@ -1131,8 +1134,8 @@ parse_vw(oc, font_set, name_list, count) } static int -parse_fontname(oc) - XOC oc; +parse_fontname( + XOC oc) { XOCGenericPart *gen = XOC_GENERIC(oc); FontSet font_set; @@ -1253,8 +1256,8 @@ err: /* For VW/UDC end*/ static Bool -set_missing_list(oc) - XOC oc; +set_missing_list( + XOC oc) { XOCGenericPart *gen = XOC_GENERIC(oc); FontSet font_set; @@ -1349,8 +1352,8 @@ set_missing_list(oc) } static Bool -create_fontset(oc) - XOC oc; +create_fontset( + XOC oc) { XOMGenericPart *gen = XOM_GENERIC(oc->core.om); int found_num; @@ -1384,10 +1387,10 @@ create_fontset(oc) /* For VW/UDC start */ static void -free_fontdataOC(dpy,font_data, font_data_count) - Display *dpy; - FontData font_data; - int font_data_count; +free_fontdataOC( + Display *dpy, + FontData font_data, + int font_data_count) { for( ; font_data_count-- ; font_data++) { if(font_data->xlfd_name){ @@ -1420,9 +1423,9 @@ free_fontdataOC(dpy,font_data, font_data_count) } } -void destroy_fontdata(gen,dpy) - XOCGenericPart *gen ; - Display *dpy ; +static void destroy_fontdata( + XOCGenericPart *gen, + Display *dpy) { FontSet font_set = (FontSet) NULL; int font_set_num = 0; @@ -1473,12 +1476,11 @@ void destroy_fontdata(gen,dpy) /* For VW/UDC end */ static void -destroy_oc(oc) - XOC oc; +destroy_oc( + XOC oc) { Display *dpy = oc->core.om->core.display; XOCGenericPart *gen = XOC_GENERIC(oc); - XFontStruct **font_list; if (gen->mbs_to_cs) _XlcCloseConverter(gen->mbs_to_cs); @@ -1501,7 +1503,7 @@ destroy_oc(oc) if (oc->core.font_info.font_name_list) XFreeStringList(oc->core.font_info.font_name_list); - if ((font_list = oc->core.font_info.font_struct_list)) { + if (oc->core.font_info.font_struct_list) { Xfree(oc->core.font_info.font_struct_list); } @@ -1519,10 +1521,10 @@ destroy_oc(oc) } static char * -set_oc_values(oc, args, num_args) - XOC oc; - XlcArgList args; - int num_args; +set_oc_values( + XOC oc, + XlcArgList args, + int num_args) { XOCGenericPart *gen = XOC_GENERIC(oc); FontSet font_set = gen->font_set; @@ -1555,10 +1557,10 @@ set_oc_values(oc, args, num_args) } static char * -get_oc_values(oc, args, num_args) - XOC oc; - XlcArgList args; - int num_args; +get_oc_values( + XOC oc, + XlcArgList args, + int num_args) { if (oc->core.resources == NULL) return NULL; @@ -1639,10 +1641,10 @@ static XlcResource oc_resources[] = { }; static XOC -create_oc(om, args, num_args) - XOM om; - XlcArgList args; - int num_args; +create_oc( + XOM om, + XlcArgList args, + int num_args) { XOC oc; XOMGenericPart *gen = XOM_GENERIC(om); @@ -1694,9 +1696,9 @@ err: } static void -free_fontdataOM(font_data, font_data_count) - FontData font_data; - int font_data_count; +free_fontdataOM( + FontData font_data, + int font_data_count) { for( ; font_data_count-- ; font_data++) { if(font_data->name){ @@ -1711,8 +1713,8 @@ free_fontdataOM(font_data, font_data_count) } static Status -close_om(om) - XOM om; +close_om( + XOM om) { XOMGenericPart *gen = XOM_GENERIC(om); OMData data; @@ -1784,10 +1786,10 @@ close_om(om) } static char * -set_om_values(om, args, num_args) - XOM om; - XlcArgList args; - int num_args; +set_om_values( + XOM om, + XlcArgList args, + int num_args) { if (om->core.resources == NULL) return NULL; @@ -1797,10 +1799,10 @@ set_om_values(om, args, num_args) } static char * -get_om_values(om, args, num_args) - XOM om; - XlcArgList args; - int num_args; +get_om_values( + XOM om, + XlcArgList args, + int num_args) { if (om->core.resources == NULL) return NULL; @@ -1828,12 +1830,12 @@ static XlcResource om_resources[] = { }; static XOM -create_om(lcd, dpy, rdb, res_name, res_class) - XLCd lcd; - Display *dpy; - XrmDatabase rdb; - char *res_name; - char *res_class; +create_om( + XLCd lcd, + Display *dpy, + XrmDatabase rdb, + _Xconst char *res_name, + _Xconst char *res_class) { XOM om; @@ -1874,8 +1876,8 @@ err: } static OMData -add_data(om) - XOM om; +add_data( + XOM om) { XOMGenericPart *gen = XOM_GENERIC(om); OMData new; @@ -1900,12 +1902,10 @@ add_data(om) /* For VW/UDC */ -extern FontScope _XlcParse_scopemaps(); - FontData -read_EncodingInfo(count, value) - int count; - char **value; +read_EncodingInfo( + int count, + char **value) { FontData font_data,ret; char *buf, *bufptr,*scp; @@ -1945,11 +1945,11 @@ read_EncodingInfo(count, value) return(ret); } -static CodeRange read_vrotate(count, value, type, vrotate_num) - int count; - char **value; - int *type; - int *vrotate_num; +static CodeRange read_vrotate( + int count, + char **value, + int *type, + int *vrotate_num) { CodeRange range; if(!strcmp(value[0],"all")){ @@ -1967,10 +1967,10 @@ static CodeRange read_vrotate(count, value, type, vrotate_num) } } -static void read_vw(lcd, font_set,num) - XLCd lcd; - OMData font_set; - int num; +static void read_vw( + XLCd lcd, + OMData font_set, + int num) { char **value, buf[BUFSIZ]; int count; @@ -1993,8 +1993,8 @@ static void read_vw(lcd, font_set,num) } /* VW/UDC end */ static Bool -init_om(om) - XOM om; +init_om( + XOM om) { XLCd lcd = om->core.lcd; XOMGenericPart *gen = XOM_GENERIC(om); @@ -2153,17 +2153,8 @@ init_om(om) } XOM -#if NeedFunctionPrototypes _XomGenericOpenOM(XLCd lcd, Display *dpy, XrmDatabase rdb, _Xconst char *res_name, _Xconst char *res_class) -#else -_XomGenericOpenOM(lcd, dpy, rdb, res_name, res_class) - XLCd lcd; - Display *dpy; - XrmDatabase rdb; - char *res_name; - char *res_class; -#endif { XOM om; @@ -2183,8 +2174,8 @@ err: } Bool -_XInitOM(lcd) - XLCd lcd; +_XInitOM( + XLCd lcd) { lcd->methods->open_om = _XomGenericOpenOM; diff --git a/modules/om/generic/omImText.c b/modules/om/generic/omImText.c index c25969f..3066786 100644 --- a/modules/om/generic/omImText.c +++ b/modules/om/generic/omImText.c @@ -23,26 +23,28 @@ * Author: Katsuhisa Yano TOSHIBA Corp. * mopi@osa.ilab.toshiba.co.jp */ -/* $XFree86: xc/lib/X11/omImText.c,v 1.4 2001/01/17 19:41:56 dawes Exp $ */ +/* $XFree86: xc/lib/X11/omImText.c,v 1.6 2003/11/17 22:20:12 dawes Exp $ */ #include "Xlibint.h" #include "XomGeneric.h" +#if 0 extern int _XomGenericTextExtents(), _XomGenericDrawString(); +#endif #define GET_VALUE_MASK (GCFunction | GCForeground | GCBackground | GCFillStyle) #define SET_VALUE_MASK (GCFunction | GCForeground | GCFillStyle) static void -_XomGenericDrawImageString(dpy, d, oc, gc, x, y, type, text, length) - Display *dpy; - Drawable d; - XOC oc; - GC gc; - int x, y; - XOMTextType type; - XPointer text; - int length; +_XomGenericDrawImageString( + Display *dpy, + Drawable d, + XOC oc, + GC gc, + int x, int y, + XOMTextType type, + XPointer text, + int length) { XGCValues values; XRectangle extent; @@ -63,57 +65,24 @@ _XomGenericDrawImageString(dpy, d, oc, gc, x, y, type, text, length) } void -#if NeedFunctionPrototypes _XmbGenericDrawImageString(Display *dpy, Drawable d, XOC oc, GC gc, int x, int y, _Xconst char *text, int length) -#else -_XmbGenericDrawImageString(dpy, d, oc, gc, x, y, text, length) - Display *dpy; - Drawable d; - XOC oc; - GC gc; - int x, y; - _Xconst char *text; - int length; -#endif { _XomGenericDrawImageString(dpy, d, oc, gc, x, y, XOMMultiByte, (XPointer) text, length); } void -#if NeedFunctionPrototypes _XwcGenericDrawImageString(Display *dpy, Drawable d, XOC oc, GC gc, int x, int y, _Xconst wchar_t *text, int length) -#else -_XwcGenericDrawImageString(dpy, d, oc, gc, x, y, text, length) - Display *dpy; - Drawable d; - XOC oc; - GC gc; - int x, y; - _Xconst wchar_t *text; - int length; -#endif { _XomGenericDrawImageString(dpy, d, oc, gc, x, y, XOMWideChar, (XPointer) text, length); } void -#if NeedFunctionPrototypes _Xutf8GenericDrawImageString(Display *dpy, Drawable d, XOC oc, GC gc, int x, int y, _Xconst char *text, int length) -#else -_Xutf8GenericDrawImageString(dpy, d, oc, gc, x, y, text, length) - Display *dpy; - Drawable d; - XOC oc; - GC gc; - int x, y; - _Xconst char *text; - int length; -#endif { _XomGenericDrawImageString(dpy, d, oc, gc, x, y, XOMUtf8String, (XPointer) text, length); diff --git a/modules/om/generic/omText.c b/modules/om/generic/omText.c index 52d4937..6d6c41f 100644 --- a/modules/om/generic/omText.c +++ b/modules/om/generic/omText.c @@ -23,7 +23,7 @@ * Author: Katsuhisa Yano TOSHIBA Corp. * mopi@osa.ilab.toshiba.co.jp */ -/* $XFree86: xc/lib/X11/omText.c,v 1.6 2002/09/16 18:05:23 eich Exp $ */ +/* $XFree86: xc/lib/X11/omText.c,v 1.10 2003/11/17 22:20:12 dawes Exp $ */ /* * Copyright 1995 by FUJITSU LIMITED * This is source code modified by FUJITSU LIMITED under the Joint @@ -40,9 +40,9 @@ /* For VW/UDC */ static int -is_rotate(oc, font) - XOC oc; - XFontStruct *font; +is_rotate( + XOC oc, + XFontStruct *font) { XOCGenericPart *gen = XOC_GENERIC(oc); FontSet font_set; @@ -65,9 +65,9 @@ is_rotate(oc, font) } static int -is_codemap(oc, font) - XOC oc; - XFontStruct *font; +is_codemap( + XOC oc, + XFontStruct *font) { XOCGenericPart *gen = XOC_GENERIC(oc); FontSet font_set; @@ -90,16 +90,16 @@ is_codemap(oc, font) } static int -draw_vertical(dpy, d, oc, gc, font, is_xchar2b, x, y, text, length) - Display *dpy; - Drawable d; - XOC oc; - GC gc; - XFontStruct *font; - Bool is_xchar2b; - int x, y; - XPointer text; - int length; +draw_vertical( + Display *dpy, + Drawable d, + XOC oc, + GC gc, + XFontStruct *font, + Bool is_xchar2b, + int x, int y, + XPointer text, + int length) { XChar2b *buf2b; char *buf; @@ -158,18 +158,16 @@ draw_vertical(dpy, d, oc, gc, font, is_xchar2b, x, y, text, length) #define VROTATE 1 #define FONTSCOPE 2 -extern FontData _XomGetFontDataFromFontSet(); - static int -DrawStringWithFontSet(dpy, d, oc, fs, gc, x, y, text, length) - Display *dpy; - Drawable d; - XOC oc; - FontSet fs; - GC gc; - int x, y; - XPointer text; - int length; +DrawStringWithFontSet( + Display *dpy, + Drawable d, + XOC oc, + FontSet fs, + GC gc, + int x, int y, + XPointer text, + int length) { XFontStruct *font; Bool is_xchar2b; @@ -183,7 +181,7 @@ DrawStringWithFontSet(dpy, d, oc, fs, gc, x, y, text, length) while (length > 0) { fd = _XomGetFontDataFromFontSet(fs, - (char *)ptr,length,&ptr_len,is_xchar2b,FONTSCOPE); + ptr,length,&ptr_len,is_xchar2b,FONTSCOPE); if(ptr_len <= 0) break; @@ -222,7 +220,7 @@ DrawStringWithFontSet(dpy, d, oc, fs, gc, x, y, text, length) case XOMOrientation_TTB_LTR: if(fs->font == font) { fd = _XomGetFontDataFromFontSet(fs, - (char *)ptr,length,&ptr_len,is_xchar2b,VMAP); + ptr,length,&ptr_len,is_xchar2b,VMAP); if(ptr_len <= 0) break; if(fd == (FontData) NULL || @@ -231,17 +229,13 @@ DrawStringWithFontSet(dpy, d, oc, fs, gc, x, y, text, length) if(is_codemap(oc, fd->font) == False) { fd = _XomGetFontDataFromFontSet(fs, - (char *)ptr,length,&ptr_len,is_xchar2b,VROTATE); + ptr,length,&ptr_len,is_xchar2b,VROTATE); if(ptr_len <= 0) break; if(fd == (FontData) NULL || (font = fd->font) == (XFontStruct *) NULL) break; } - - case XOMOrientation_Context: - /* never used? */ - break; } if(is_xchar2b) @@ -252,6 +246,10 @@ DrawStringWithFontSet(dpy, d, oc, fs, gc, x, y, text, length) y = draw_vertical(dpy, d, oc, gc, font, is_xchar2b, x, y, (char *)ptr, char_len); break; + + case XOMOrientation_Context: + /* never used? */ + break; } if(char_len <= 0) @@ -280,15 +278,15 @@ DrawStringWithFontSet(dpy, d, oc, fs, gc, x, y, text, length) /* For VW/UDC */ int -_XomGenericDrawString(dpy, d, oc, gc, x, y, type, text, length) - Display *dpy; - Drawable d; - XOC oc; - GC gc; - int x, y; - XOMTextType type; - XPointer text; - int length; +_XomGenericDrawString( + Display *dpy, + Drawable d, + XOC oc, + GC gc, + int x, int y, + XOMTextType type, + XPointer text, + int length) { XlcConv conv; XFontStruct *font; @@ -347,57 +345,24 @@ _XomGenericDrawString(dpy, d, oc, gc, x, y, type, text, length) } int -#if NeedFunctionPrototypes _XmbGenericDrawString(Display *dpy, Drawable d, XOC oc, GC gc, int x, int y, _Xconst char *text, int length) -#else -_XmbGenericDrawString(dpy, d, oc, gc, x, y, text, length) - Display *dpy; - Drawable d; - XOC oc; - GC gc; - int x, y; - _Xconst char *text; - int length; -#endif { return _XomGenericDrawString(dpy, d, oc, gc, x, y, XOMMultiByte, (XPointer) text, length); } int -#if NeedFunctionPrototypes _XwcGenericDrawString(Display *dpy, Drawable d, XOC oc, GC gc, int x, int y, _Xconst wchar_t *text, int length) -#else -_XwcGenericDrawString(dpy, d, oc, gc, x, y, text, length) - Display *dpy; - Drawable d; - XOC oc; - GC gc; - int x, y; - _Xconst wchar_t *text; - int length; -#endif { return _XomGenericDrawString(dpy, d, oc, gc, x, y, XOMWideChar, (XPointer) text, length); } int -#if NeedFunctionPrototypes _Xutf8GenericDrawString(Display *dpy, Drawable d, XOC oc, GC gc, int x, int y, _Xconst char *text, int length) -#else -_Xutf8GenericDrawString(dpy, d, oc, gc, x, y, text, length) - Display *dpy; - Drawable d; - XOC oc; - GC gc; - int x, y; - _Xconst char *text; - int length; -#endif { return _XomGenericDrawString(dpy, d, oc, gc, x, y, XOMUtf8String, (XPointer) text, length); diff --git a/modules/om/generic/omTextEsc.c b/modules/om/generic/omTextEsc.c index ad262ef..84ccbf3 100644 --- a/modules/om/generic/omTextEsc.c +++ b/modules/om/generic/omTextEsc.c @@ -23,7 +23,7 @@ * Author: Katsuhisa Yano TOSHIBA Corp. * mopi@osa.ilab.toshiba.co.jp */ -/* $XFree86: xc/lib/X11/omTextEsc.c,v 1.5 2001/01/17 19:41:56 dawes Exp $ */ +/* $XFree86: xc/lib/X11/omTextEsc.c,v 1.7 2003/11/17 22:20:12 dawes Exp $ */ /* * Copyright 1995 by FUJITSU LIMITED * This is source code modified by FUJITSU LIMITED under the Joint @@ -41,9 +41,9 @@ #define FONTSCOPE 2 static int -is_rotate(oc, font) - XOC oc; - XFontStruct *font; +is_rotate( + XOC oc, + XFontStruct *font) { XOCGenericPart *gen = XOC_GENERIC(oc); FontSet font_set; @@ -66,9 +66,9 @@ is_rotate(oc, font) } static int -is_codemap(oc, font) - XOC oc; - XFontStruct *font; +is_codemap( + XOC oc, + XFontStruct *font) { XOCGenericPart *gen = XOC_GENERIC(oc); FontSet font_set; @@ -91,12 +91,12 @@ is_codemap(oc, font) } static int -escapement_vertical(oc, font, is_xchar2b, text, length) - XOC oc; - XFontStruct *font; - Bool is_xchar2b; - XPointer text; - int length; +escapement_vertical( + XOC oc, + XFontStruct *font, + Bool is_xchar2b, + XPointer text, + int length) { XChar2b *buf2b; char *buf; @@ -125,14 +125,12 @@ escapement_vertical(oc, font, is_xchar2b, text, length) } -extern FontData _XomGetFontDataFromFontSet(); - static int -TextWidthWithFontSet(font_set, oc, text, length) - FontSet font_set; - XOC oc; - XPointer text; - int length; +TextWidthWithFontSet( + FontSet font_set, + XOC oc, + XPointer text, + int length) { FontData fd; XFontStruct *font; @@ -238,11 +236,11 @@ TextWidthWithFontSet(font_set, oc, text, length) /* For VW/UDC end */ static int -_XomGenericTextEscapement(oc, type, text, length) - XOC oc; - XOMTextType type; - XPointer text; - int length; +_XomGenericTextEscapement( + XOC oc, + XOMTextType type, + XPointer text, + int length) { XlcConv conv; XFontStruct *font; @@ -282,40 +280,19 @@ _XomGenericTextEscapement(oc, type, text, length) } int -#if NeedFunctionPrototypes _XmbGenericTextEscapement(XOC oc, _Xconst char *text, int length) -#else -_XmbGenericTextEscapement(oc, text, length) - XOC oc; - _Xconst char *text; - int length; -#endif { return _XomGenericTextEscapement(oc, XOMMultiByte, (XPointer) text, length); } int -#if NeedFunctionPrototypes _XwcGenericTextEscapement(XOC oc, _Xconst wchar_t *text, int length) -#else -_XwcGenericTextEscapement(oc, text, length) - XOC oc; - _Xconst wchar_t *text; - int length; -#endif { return _XomGenericTextEscapement(oc, XOMWideChar, (XPointer) text, length); } int -#if NeedFunctionPrototypes _Xutf8GenericTextEscapement(XOC oc, _Xconst char *text, int length) -#else -_Xutf8GenericTextEscapement(oc, text, length) - XOC oc; - _Xconst char *text; - int length; -#endif { return _XomGenericTextEscapement(oc, XOMUtf8String, (XPointer) text, length); diff --git a/modules/om/generic/omTextExt.c b/modules/om/generic/omTextExt.c index f4053df..275df91 100644 --- a/modules/om/generic/omTextExt.c +++ b/modules/om/generic/omTextExt.c @@ -23,21 +23,20 @@ * Author: Katsuhisa Yano TOSHIBA Corp. * mopi@osa.ilab.toshiba.co.jp */ -/* $XFree86: xc/lib/X11/omTextExt.c,v 1.4 2001/01/17 19:41:57 dawes Exp $ */ +/* $XFree86: xc/lib/X11/omTextExt.c,v 1.6 2003/11/17 22:20:12 dawes Exp $ */ #include "Xlibint.h" #include "XomGeneric.h" #include <stdio.h> int -_XomGenericTextExtents(oc, type, text, length, overall_ink, - overall_logical) - XOC oc; - XOMTextType type; - XPointer text; - int length; - XRectangle *overall_ink; - XRectangle *overall_logical; +_XomGenericTextExtents( + XOC oc, + XOMTextType type, + XPointer text, + int length, + XRectangle *overall_ink, + XRectangle *overall_logical) { XlcConv conv; XFontStruct *font; @@ -111,51 +110,24 @@ _XomGenericTextExtents(oc, type, text, length, overall_ink, } int -#if NeedFunctionPrototypes _XmbGenericTextExtents(XOC oc, _Xconst char *text, int length, XRectangle *overall_ink, XRectangle *overall_logical) -#else -_XmbGenericTextExtents(oc, text, length, overall_ink, overall_logical) - XOC oc; - _Xconst char *text; - int length; - XRectangle *overall_ink; - XRectangle *overall_logical; -#endif { return _XomGenericTextExtents(oc, XOMMultiByte, (XPointer) text, length, overall_ink, overall_logical); } int -#if NeedFunctionPrototypes _XwcGenericTextExtents(XOC oc, _Xconst wchar_t *text, int length, XRectangle *overall_ink, XRectangle *overall_logical) -#else -_XwcGenericTextExtents(oc, text, length, overall_ink, overall_logical) - XOC oc; - _Xconst wchar_t *text; - int length; - XRectangle *overall_ink; - XRectangle *overall_logical; -#endif { return _XomGenericTextExtents(oc, XOMWideChar, (XPointer) text, length, overall_ink, overall_logical); } int -#if NeedFunctionPrototypes _Xutf8GenericTextExtents(XOC oc, _Xconst char *text, int length, XRectangle *overall_ink, XRectangle *overall_logical) -#else -_Xutf8GenericTextExtents(oc, text, length, overall_ink, overall_logical) - XOC oc; - _Xconst char *text; - int length; - XRectangle *overall_ink; - XRectangle *overall_logical; -#endif { return _XomGenericTextExtents(oc, XOMUtf8String, (XPointer) text, length, overall_ink, overall_logical); diff --git a/modules/om/generic/omTextPer.c b/modules/om/generic/omTextPer.c index 0900be2..d6dec28 100644 --- a/modules/om/generic/omTextPer.c +++ b/modules/om/generic/omTextPer.c @@ -23,25 +23,24 @@ * Author: Katsuhisa Yano TOSHIBA Corp. * mopi@osa.ilab.toshiba.co.jp */ -/* $XFree86: xc/lib/X11/omTextPer.c,v 1.5 2001/10/28 03:32:35 tsi Exp $ */ +/* $XFree86: xc/lib/X11/omTextPer.c,v 1.7 2003/11/17 22:20:12 dawes Exp $ */ #include "Xlibint.h" #include "XomGeneric.h" #include <stdio.h> static Status -_XomGenericTextPerCharExtents(oc, type, text, length, ink_buf, logical_buf, - buf_size, num_chars, overall_ink, overall_logical) - XOC oc; - XOMTextType type; - XPointer text; - int length; - XRectangle *ink_buf; - XRectangle *logical_buf; - int buf_size; - int *num_chars; - XRectangle *overall_ink; - XRectangle *overall_logical; +_XomGenericTextPerCharExtents( + XOC oc, + XOMTextType type, + XPointer text, + int length, + XRectangle *ink_buf, + XRectangle *logical_buf, + int buf_size, + int *num_chars, + XRectangle *overall_ink, + XRectangle *overall_logical) { XlcConv conv; XFontStruct *font; @@ -163,25 +162,11 @@ _XomGenericTextPerCharExtents(oc, type, text, length, ink_buf, logical_buf, } Status -#if NeedFunctionPrototypes _XmbGenericTextPerCharExtents(XOC oc, _Xconst char *text, int length, XRectangle *ink_buf, XRectangle *logical_buf, int buf_size, int *num_chars, XRectangle *overall_ink, XRectangle *overall_logical) -#else -_XmbGenericTextPerCharExtents(oc, text, length, ink_buf, logical_buf, - buf_size, num_chars, overall_ink, overall_logical) - XOC oc; - _Xconst char *text; - int length; - XRectangle *ink_buf; - XRectangle *logical_buf; - int buf_size; - int *num_chars; - XRectangle *overall_ink; - XRectangle *overall_logical; -#endif { return _XomGenericTextPerCharExtents(oc, XOMMultiByte, (XPointer) text, length, ink_buf, logical_buf, buf_size, @@ -190,25 +175,11 @@ _XmbGenericTextPerCharExtents(oc, text, length, ink_buf, logical_buf, } Status -#if NeedFunctionPrototypes _XwcGenericTextPerCharExtents(XOC oc, _Xconst wchar_t *text, int length, XRectangle *ink_buf, XRectangle *logical_buf, int buf_size, int *num_chars, XRectangle *overall_ink, XRectangle *overall_logical) -#else -_XwcGenericTextPerCharExtents(oc, text, length, ink_buf, logical_buf, - buf_size, num_chars, overall_ink, overall_logical) - XOC oc; - _Xconst wchar_t *text; - int length; - XRectangle *ink_buf; - XRectangle *logical_buf; - int buf_size; - int *num_chars; - XRectangle *overall_ink; - XRectangle *overall_logical; -#endif { return _XomGenericTextPerCharExtents(oc, XOMWideChar, (XPointer) text, length, ink_buf, logical_buf, buf_size, @@ -217,26 +188,11 @@ _XwcGenericTextPerCharExtents(oc, text, length, ink_buf, logical_buf, } Status -#if NeedFunctionPrototypes _Xutf8GenericTextPerCharExtents(XOC oc, _Xconst char *text, int length, XRectangle *ink_buf, XRectangle *logical_buf, int buf_size, int *num_chars, XRectangle *overall_ink, XRectangle *overall_logical) -#else -_Xutf8GenericTextPerCharExtents(oc, text, length, ink_buf, logical_buf, - buf_size, num_chars, overall_ink, - overall_logical) - XOC oc; - _Xconst char *text; - int length; - XRectangle *ink_buf; - XRectangle *logical_buf; - int buf_size; - int *num_chars; - XRectangle *overall_ink; - XRectangle *overall_logical; -#endif { return _XomGenericTextPerCharExtents(oc, XOMUtf8String, (XPointer) text, length, ink_buf, logical_buf, buf_size, diff --git a/modules/om/generic/omXChar.c b/modules/om/generic/omXChar.c index ce7b328..8714806 100644 --- a/modules/om/generic/omXChar.c +++ b/modules/om/generic/omXChar.c @@ -34,7 +34,7 @@ /* * Modifiers: Jeff Walls, Paul Anderson (HEWLETT-PACKARD) */ -/* $XFree86: xc/lib/X11/omXChar.c,v 1.5 2001/01/17 19:41:57 dawes Exp $ */ +/* $XFree86: xc/lib/X11/omXChar.c,v 1.7 2003/05/27 22:26:27 tsi Exp $ */ #include "Xlibint.h" #include "XlcPublic.h" @@ -43,12 +43,12 @@ /* for VW/UDC start */ static Bool -ismatch_scopes(fontdata,value, is_shift) - FontData fontdata; - unsigned long *value; - Bool is_shift; +ismatch_scopes( + FontData fontdata, + unsigned long *value, + Bool is_shift) { - register int side, scopes_num = fontdata->scopes_num; + register int scopes_num = fontdata->scopes_num; FontScope scopes = fontdata->scopes; if (!scopes_num) return False; @@ -56,8 +56,6 @@ ismatch_scopes(fontdata,value, is_shift) if(fontdata->font == NULL) return False; - side = fontdata->side; - for(;scopes_num--;scopes++) if ((scopes->start <= (*value & 0x7f7f)) && ((scopes->end) >= (*value & 0x7f7f))){ @@ -77,8 +75,8 @@ ismatch_scopes(fontdata,value, is_shift) } static int -check_vertical_fonttype(name) - char *name; +check_vertical_fonttype( + char *name) { char *ptr; int type = 0; @@ -114,13 +112,13 @@ check_vertical_fonttype(name) #define FONTSCOPE 2 FontData -_XomGetFontDataFromFontSet(fs, str,len, len_ret, is2b, type) - FontSet fs; - unsigned char *str; - int len; - int *len_ret; - int is2b; - int type; /* VMAP , VROTATE , else */ +_XomGetFontDataFromFontSet( + FontSet fs, + unsigned char *str, + int len, + int *len_ret, + int is2b, + int type) /* VMAP , VROTATE , else */ { unsigned long value; int num,i,hit,csize; @@ -243,9 +241,9 @@ _XomGetFontDataFromFontSet(fs, str,len, len_ret, is2b, type) /* for VW/UDC end */ static FontSet -_XomGetFontSetFromCharSet(oc, charset) - XOC oc; - XlcCharSet charset; +_XomGetFontSetFromCharSet( + XOC oc, + XlcCharSet charset) { register FontSet font_set = XOC_GENERIC(oc)->font_set; register int num = XOC_GENERIC(oc)->font_set_num; @@ -265,10 +263,10 @@ _XomGetFontSetFromCharSet(oc, charset) #ifdef MUSTCOPY static void -cs_to_xchar2b(from, to, length) - register char *from; - register XChar2b *to; - register length; +cs_to_xchar2b( + register char *from, + register XChar2b *to, + register length) { while (length-- > 0) { to->byte1 = *from++; @@ -278,10 +276,10 @@ cs_to_xchar2b(from, to, length) } static void -cs_to_xchar2b_gl(from, to, length) - register char *from; - register XChar2b *to; - register length; +cs_to_xchar2b_gl( + register char *from, + register XChar2b *to, + register length) { while (length-- > 0) { to->byte1 = *from++ & 0x7f; @@ -291,10 +289,10 @@ cs_to_xchar2b_gl(from, to, length) } static void -cs_to_xchar2b_gr(from, to, length) - register char *from; - register XChar2b *to; - register length; +cs_to_xchar2b_gr( + register char *from, + register XChar2b *to, + register length) { while (length-- > 0) { to->byte1 = *from++ | 0x80; @@ -305,27 +303,27 @@ cs_to_xchar2b_gr(from, to, length) #endif static void -shift_to_gl(text, length) - register char *text; - register int length; +shift_to_gl( + register char *text, + register int length) { while (length-- > 0) *text++ &= 0x7f; } static void -shift_to_gr(text, length) - register char *text; - register int length; +shift_to_gr( + register char *text, + register int length) { while (length-- > 0) *text++ |= 0x80; } static Bool -load_font(oc, font_set) - XOC oc; - FontSet font_set; +load_font( + XOC oc, + FontSet font_set) { font_set->font = XLoadQueryFont(oc->core.om->core.display, oc->core.font_info.font_name_list[font_set->id]); @@ -345,15 +343,15 @@ load_font(oc, font_set) } int -_XomConvert(oc, conv, from, from_left, to, to_left, args, num_args) - XOC oc; - XlcConv conv; - XPointer *from; - int *from_left; - XPointer *to; - int *to_left; - XPointer *args; - int num_args; +_XomConvert( + XOC oc, + XlcConv conv, + XPointer *from, + int *from_left, + XPointer *to, + int *to_left, + XPointer *args, + int num_args) { XPointer cs, lc_args[1]; XlcCharSet charset; @@ -431,9 +429,9 @@ _XomConvert(oc, conv, from, from_left, to, to_left, args, num_args) } XlcConv -_XomInitConverter(oc, type) - XOC oc; - XOMTextType type; +_XomInitConverter( + XOC oc, + XOMTextType type) { XOCGenericPart *gen = XOC_GENERIC(oc); XlcConv *convp; diff --git a/nls/compose.dir.pre b/nls/compose.dir.pre index a67ea47..93cb220 100644 --- a/nls/compose.dir.pre +++ b/nls/compose.dir.pre @@ -4,7 +4,7 @@ XCOMM This file contains compose table file name. XCOMM The first word is the compose table file name and XCOMM the second word is full locale name. XCOMM -XCOMM $XFree86: xc/nls/compose.dir,v 1.23 2002/12/10 04:23:51 dawes Exp $ +XCOMM $XFree86: xc/nls/compose.dir,v 1.24 2003/08/06 14:04:00 eich Exp $ XCOMM iso8859-1/Compose: C iso8859-1/Compose: af_ZA.ISO8859-1 diff --git a/nls/en_US.UTF-8/Compose.pre b/nls/en_US.UTF-8/Compose.pre index 7be2e80..1ba8de7 100644 --- a/nls/en_US.UTF-8/Compose.pre +++ b/nls/en_US.UTF-8/Compose.pre @@ -1,7 +1,7 @@ XCOMM UTF-8 (Unicode) compose sequence XCOMM David.Monniaux@ens.fr XCOMM -XCOMM $XFree86: xc/nls/Compose/en_US.UTF-8,v 1.8 2003/02/25 04:38:32 dawes Exp $ +XCOMM $XFree86: xc/nls/Compose/en_US.UTF-8,v 1.9 2003/04/03 22:24:53 dawes Exp $ XCOMM Part 1 - Manual definitions @@ -23,7 +23,7 @@ XCOMM Spacing versions of dead accents <dead_abovedot> <space> : "˙" abovedot <dead_abovedot> <dead_abovedot> : "˙" abovedot <dead_diaeresis> <dead_diaeresis> : "¨" diaeresis -<dead_diaeresis> <space> : "¨" diaeresis +<dead_diaeresis> <space> : "\"" quotedbl <dead_doubleacute> <space> : "˝" U2dd <dead_doubleacute> <dead_doubleacute> : "˝" U2dd <dead_caron> <space> : "ˇ" caron @@ -55,6 +55,9 @@ XCOMM on some keyboards. <Multi_key> <grave> <space> : "`" grave <Multi_key> <space> <grave> : "`" grave +<Multi_key> <comma> <space> : "¸" cedilla +<Multi_key> <space> <comma> : "¸" cedilla + <Multi_key> <parenleft> <minus> : "{" braceleft <Multi_key> <minus> <parenleft> : "{" braceleft diff --git a/nls/ja_JP.UTF-8/XLC_LOCALE.pre b/nls/ja_JP.UTF-8/XLC_LOCALE.pre index fcf383f..74cc6a3 100644 --- a/nls/ja_JP.UTF-8/XLC_LOCALE.pre +++ b/nls/ja_JP.UTF-8/XLC_LOCALE.pre @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/nls/XLC_LOCALE/ja_JP.UTF-8,v 1.1 2002/10/17 01:12:57 dawes Exp $ +XCOMM $XFree86: xc/nls/XLC_LOCALE/ja_JP.UTF-8,v 1.2 2003/08/06 14:04:00 eich Exp $ XCOMM XCOMM @@ -32,23 +32,8 @@ fs1 { } } -XCOMM ISO10646-1 is put after iso8859-1 to make usually better-looking -XCOMM iso8859-x fonts are picked up before iso10646-1 fonts. -XCOMM Moreover, some iso10646-1 fonts don't have any glyph at all -XCOMM in ISO8859-X ranges. - -XCOMM fs2 class -fs2 { - charset { - name ISO10646-1 - } - font { - primary ISO10646-1 - } -} - -XCOMM fs3 class (Kanji) -fs3 { +XCOMM fs2 class (Kanji) +fs2 { charset { name JISX0208.1983-0:GL } @@ -57,8 +42,8 @@ fs3 { } } -XCOMM fs4 class (Korean Character) -fs4 { +XCOMM fs3 class (Korean Character) +fs3 { charset { name KSC5601.1987-0:GL } @@ -67,8 +52,8 @@ fs4 { } } -XCOMM fs5 class (Chinese Han Character) -fs5 { +XCOMM fs4 class (Chinese Han Character) +fs4 { charset { name GB2312.1980-0:GL } @@ -76,8 +61,8 @@ fs5 { primary GB2312.1980-0:GL } } -XCOMM fs6 class (Half Kana) -fs6 { +XCOMM fs5 class (Half Kana) +fs5 { charset { name JISX0201.1976-0:GR } @@ -86,6 +71,21 @@ fs6 { vertical_rotate all } } +XCOMM ISO10646-1 is put last to make usually better-looking +XCOMM other fonts are picked up before iso10646-1 fonts. +XCOMM Moreover, some iso10646-1 fonts don't have any glyph at all +XCOMM in ISO8859-X ranges. + +XCOMM fs6 class +fs6 { + charset { + name ISO10646-1 + } + font { + primary ISO10646-1 + } +} + END XLC_FONTSET XCOMM diff --git a/nls/ko_KR.UTF-8/XLC_LOCALE.pre b/nls/ko_KR.UTF-8/XLC_LOCALE.pre index a67b90e..ec5f93c 100644 --- a/nls/ko_KR.UTF-8/XLC_LOCALE.pre +++ b/nls/ko_KR.UTF-8/XLC_LOCALE.pre @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/nls/XLC_LOCALE/ko_KR.UTF-8,v 1.1 2002/10/17 01:12:57 dawes Exp $ +XCOMM $XFree86: xc/nls/XLC_LOCALE/ko_KR.UTF-8,v 1.2 2003/08/06 14:04:00 eich Exp $ XCOMM XCOMM XLC_FONTSET category @@ -31,24 +31,8 @@ fs1 { } } -XCOMM ISO10646-1 is put after iso8859-1 to make usually better-looking -XCOMM iso8859-x fonts are picked up before iso10646-1 fonts. -XCOMM Moreover, some iso10646-1 fonts don't have any glyph at all -XCOMM in ISO8859-X ranges. - -XCOMM fs2 class -fs2 { - charset { - name ISO10646-1 - } - font { - primary ISO10646-1 - } -} - - -XCOMM fs3 class (Korean Character) -fs3 { +XCOMM fs2 class (Korean Character) +fs2 { charset { name KSC5601.1987-0:GL } @@ -56,8 +40,8 @@ fs3 { primary KSC5601.1987-0:GL } } -XCOMM fs4 class (Kanji) -fs4 { +XCOMM fs3 class (Kanji) +fs3 { charset { name JISX0208.1983-0:GL } @@ -65,8 +49,8 @@ fs4 { primary JISX0208.1983-0:GL } } -XCOMM fs5 class (Chinese Han Character) -fs5 { +XCOMM fs4 class (Chinese Han Character) +fs4 { charset { name GB2312.1980-0:GL } @@ -74,8 +58,8 @@ fs5 { primary GB2312.1980-0:GL } } -XCOMM fs6 class (Half Kana) -fs6 { +XCOMM fs5 class (Half Kana) +fs5 { charset { name JISX0201.1976-0:GR } @@ -84,6 +68,22 @@ fs6 { vertical_rotate all } } + +XCOMM ISO10646-1 is put last to make usually better-looking +XCOMM other fonts are picked up before iso10646-1 fonts. +XCOMM Moreover, some iso10646-1 fonts don't have any glyph at all +XCOMM in ISO8859-X ranges. + +XCOMM fs6 class +fs6 { + charset { + name ISO10646-1 + } + font { + primary ISO10646-1 + } +} + END XLC_FONTSET XCOMM diff --git a/nls/locale.alias.pre b/nls/locale.alias.pre index 6892883..e33ea45 100644 --- a/nls/locale.alias.pre +++ b/nls/locale.alias.pre @@ -5,7 +5,7 @@ XCOMM Each alias name is described within one line. XCOMM The first word is the alias name (simplified locale name) XCOMM the second word is full locale name. XCOMM -XCOMM $XFree86: xc/nls/locale.alias,v 1.62 2003/02/13 02:52:42 dawes Exp $ +XCOMM $XFree86: xc/nls/locale.alias,v 1.63 2003/08/06 14:04:00 eich Exp $ XCOMM POSIX: C @@ -684,6 +684,7 @@ zh_CN.GBK: zh_CN.gbk zh_CN.big5: zh_TW.big5 zh_CN.euc: zh_CN.eucCN zh_CN.gb2312: zh_CN.eucCN +zh_CN.utf8: zh_CN.UTF-8 zh_HK: zh_HK.big5hkscs zh_HK.Big5hkscs: zh_HK.big5hkscs zh_HK.Big5-hkscs: zh_HK.big5hkscs diff --git a/nls/locale.dir.pre b/nls/locale.dir.pre index b30449c..d3db1b4 100644 --- a/nls/locale.dir.pre +++ b/nls/locale.dir.pre @@ -4,7 +4,7 @@ XCOMM This file contains locale database file names XCOMM The first word is the locale database file name and XCOMM the second word is the full locale name. XCOMM -XCOMM $XFree86: xc/nls/locale.dir,v 1.42 2003/01/15 03:59:46 dawes Exp $ +XCOMM $XFree86: xc/nls/locale.dir,v 1.43 2003/08/06 14:04:00 eich Exp $ XCOMM C/XLC_LOCALE: C @@ -220,6 +220,7 @@ microsoft-cp1255/XLC_LOCALE: yi_US.CP1255 zh_CN/XLC_LOCALE: zh_CN.eucCN zh_CN/XLC_LOCALE: zh_CN.GB2312 zh_CN.gbk/XLC_LOCALE: zh_CN.gbk +zh_CN.UTF-8/XLC_LOCALE: zh_CN.UTF-8 zh_HK.big5/XLC_LOCALE: zh_HK.big5 zh_HK.big5hkscs/XLC_LOCALE: zh_HK.big5-hkscs zh_HK.big5hkscs/XLC_LOCALE: zh_HK.Big5-HKSCS diff --git a/nls/zh_CN.UTF-8/XI18N_OBJS b/nls/zh_CN.UTF-8/XI18N_OBJS new file mode 100644 index 0000000..00f7b50 --- /dev/null +++ b/nls/zh_CN.UTF-8/XI18N_OBJS @@ -0,0 +1,9 @@ +# CATEGORY(XLC|XIM|OM) SHARED_LIBRARY_NAME FUNCTION_NAME +# +# XI18N objects table for zh_CN.UTF-8 locale +# +# $XFree86: xc/nls/XI18N_OBJS/zh_CN.UTF-8,v 1.2 2003/10/24 16:36:46 tsi Exp $ +# +XLC common/xlcUTF8Load _XlcUtf8Loader # XLC_open +XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister +XOM common/xomGeneric _XomGenericOpenOM # XOM_open diff --git a/nls/zh_CN.UTF-8/XLC_LOCALE.pre b/nls/zh_CN.UTF-8/XLC_LOCALE.pre new file mode 100644 index 0000000..c10fee2 --- /dev/null +++ b/nls/zh_CN.UTF-8/XLC_LOCALE.pre @@ -0,0 +1,127 @@ +XCOMM $XFree86: xc/nls/XLC_LOCALE/zh_CN.UTF-8,v 1.2 2003/10/24 16:36:46 tsi Exp $ + +# XLC_FONTSET category + +XLC_FONTSET + +on_demand_loading True + +object_name generic + +# We leave the legacy encodings in for the moment, because we don't +# have that many ISO10646 fonts yet. +# fs0 class (7 bit ASCII) +fs0 { + charset { + name ISO8859-1:GL + } + font { + primary ISO8859-1:GL + vertical_rotate all + } +} +fs1 { + charset { + name ISO8859-1:GR + } + font { + primary ISO8859-1:GR + } + +} +fs2 { + charset { + name GB2312.1980-0:GL + } + font { + primary GB2312.1980-0:GL + } +} +fs3 { + charset { + name JISX0208.1983-0:GL + } + font { + primary JISX0208.1983-0:GL + } +} +fs4 { + charset { + name KSC5601.1987-0:GL + } + font { + primary KSC5601.1987-0:GL + } +} +fs5 { + charset { + name BIG5-0:GLGR + } + font { + primary BIG5-0:GLGR + substitute BIG5-0:GLGR + } +} +fs6 { + charset { + name ISO10646-1 + } + font { + primary ISO10646-1 + + } +} +END XLC_FONTSET + + +# XLC_XLOCALE category + +XLC_XLOCALE + +encoding_name GB18030 +mb_cur_max 4 +state_depend_encoding False + +cs0 { + side GL:Default + length 1 + ct_encoding ISO8859-1:GL +} +cs1 { + side GR:Default + length 1 + ct_encoding ISO8859-1:GR +} +cs2 { + side GR + length 2 + ct_encoding GB2312.1980-0:GL; GB2312.1980-0:GR +} +cs3 { + side none + ct_encoding iso10646-1 +} +cs4 { + side GR + length 2 + ct_encoding JISX0208.19832-0:GL; JISX0208.1983-0:GR; JISX0208.1983-1:GL; JISX0208.1983-1:GR +} +cs5 { + side GL + length 2 + ct_encoding KSC5601.1987-0:GL; KSC5601.1987-0:GR; KSC5601.1987-1:GL; KSC5601.1987-1:GR +} +cs6 { + side none + length 2 + byte1 \xa1,\xf9 + byte2 \x40,\x7e;\xa1,\xfe + + wc_encoding \x00008000 + ct_encoding BIG5-0:GLGR:\x1b\x25\x2f\x32 + + mb_conversion [\xa140,\xf9fe]->\x2140 + ct_conversion [\x2140,\x79fe]->\xa140 +} + +END XLC_XLOCALE diff --git a/nls/zh_TW.UTF-8/XLC_LOCALE.pre b/nls/zh_TW.UTF-8/XLC_LOCALE.pre index fe40858..ca67187 100644 --- a/nls/zh_TW.UTF-8/XLC_LOCALE.pre +++ b/nls/zh_TW.UTF-8/XLC_LOCALE.pre @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/nls/XLC_LOCALE/zh_TW.UTF-8,v 1.1 2003/01/15 03:59:47 dawes Exp $ +XCOMM $XFree86: xc/nls/XLC_LOCALE/zh_TW.UTF-8,v 1.2 2003/08/06 14:04:00 eich Exp $ XCOMM XLocale Database Sample for zh_TW.UTF-8 XCOMM @@ -11,19 +11,10 @@ on_demand_loading True object_name generic -XCOMM fs0 class -fs0 { - charset { - name ISO10646-1 - } - font { - primary ISO10646-1 - } -} XCOMM We leave the legacy encodings in for the moment, because we don't XCOMM have that many ISO10646 fonts yet. -XCOMM fs1 class (7 bit ASCII) -fs1 { +XCOMM fs0 class (7 bit ASCII) +fs0 { charset { name ISO8859-1:GL } @@ -32,8 +23,8 @@ fs1 { vertical_rotate all } } -XCOMM fs2 class (ISO8859 families) -fs2 { +XCOMM fs1 class (ISO8859 families) +fs1 { charset { name ISO8859-1:GR } @@ -41,8 +32,8 @@ fs2 { primary ISO8859-1:GR } } -XCOMM fs3 class (Chinese Han Character (Traditional)) -fs3 { +XCOMM fs2 class (Chinese Han Character (Traditional)) +fs2 { charset { name BIG5-0:GLGR } @@ -51,8 +42,8 @@ fs3 { substitute BIG5-0:GLGR } } -XCOMM fs4 class (Kanji) -fs4 { +XCOMM fs3 class (Kanji) +fs3 { charset { name JISX0208.1983-0:GL } @@ -60,8 +51,8 @@ fs4 { primary JISX0208.1983-0:GL } } -XCOMM fs5 class (Korean Character) -fs5 { +XCOMM fs4 class (Korean Character) +fs4 { charset { name KSC5601.1987-0:GL } @@ -69,8 +60,8 @@ fs5 { primary KSC5601.1987-0:GL } } -XCOMM fs6 class (Chinese Han Character) -fs6 { +XCOMM fs5 class (Chinese Han Character) +fs5 { charset { name GB2312.1980-0:GL } @@ -78,8 +69,8 @@ fs6 { primary GB2312.1980-0:GL } } -XCOMM fs7 class (Half Kana) -fs7 { +XCOMM fs6 class (Half Kana) +fs6 { charset { name JISX0201.1976-0:GR } @@ -88,6 +79,15 @@ fs7 { vertical_rotate all } } +XCOMM fs7 class +fs7 { + charset { + name ISO10646-1 + } + font { + primary ISO10646-1 + } +} END XLC_FONTSET XCOMM @@ -24,13 +24,10 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/ChGC.c,v 1.4 2001/12/14 19:53:57 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ChGC.c,v 1.5 2003/04/13 19:22:14 dawes Exp $ */ #include "Xlibint.h" - -/* in ChGC.c */ -extern int _XUpdateGCCache(register GC gc, register unsigned long mask, - register XGCValues *attr); +#include "Cr.h" int XChangeGC (dpy, gc, valuemask, values) diff --git a/src/ChProp.c b/src/ChProp.c index 603dd8a..23bea2c 100644 --- a/src/ChProp.c +++ b/src/ChProp.c @@ -24,12 +24,11 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/ChProp.c,v 1.4 2001/12/14 19:53:57 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ChProp.c,v 1.5 2003/11/17 22:20:06 dawes Exp $ */ #include "Xlibint.h" int -#if NeedFunctionPrototypes XChangeProperty ( register Display *dpy, Window w, @@ -39,16 +38,6 @@ XChangeProperty ( int mode, /* PropModeReplace, PropModePrepend, PropModeAppend */ _Xconst unsigned char *data, int nelements) -#else -XChangeProperty (dpy, w, property, type, format, mode, data, nelements) - register Display *dpy; - Window w; - Atom property, type; - int format; /* 8, 16, or 32 */ - int mode; /* PropModeReplace, PropModePrepend, PropModeAppend */ - unsigned char *data; - int nelements; -#endif { register xChangePropertyReq *req; register long len; diff --git a/src/ChWAttrs.c b/src/ChWAttrs.c index ed88815..f2c498c 100644 --- a/src/ChWAttrs.c +++ b/src/ChWAttrs.c @@ -24,12 +24,10 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/ChWAttrs.c,v 1.4 2001/12/14 19:53:57 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ChWAttrs.c,v 1.5 2003/04/13 19:22:14 dawes Exp $ */ #include "Xlibint.h" -extern void _XProcessWindowAttributes(); - #define AllMaskBits (CWBackPixmap|CWBackPixel|CWBorderPixmap|\ CWBorderPixel|CWBitGravity|CWWinGravity|\ CWBackingStore|CWBackingPlanes|CWBackingPixel|\ diff --git a/src/ChkIfEv.c b/src/ChkIfEv.c index 24539e8..48d098a 100644 --- a/src/ChkIfEv.c +++ b/src/ChkIfEv.c @@ -24,6 +24,7 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/lib/X11/ChkIfEv.c,v 1.3 2003/11/17 22:20:06 dawes Exp $ */ #define NEED_EVENTS #include "Xlibint.h" @@ -37,11 +38,9 @@ in this Software without prior written authorization from The Open Group. Bool XCheckIfEvent (dpy, event, predicate, arg) register Display *dpy; Bool (*predicate)( -#if NeedNestedPrototypes Display* /* display */, XEvent* /* event */, char* /* arg */ -#endif ); /* function to call */ register XEvent *event; /* XEvent to be filled in. */ char *arg; diff --git a/src/ClDisplay.c b/src/ClDisplay.c index 223a4c2..e2a379a 100644 --- a/src/ClDisplay.c +++ b/src/ClDisplay.c @@ -27,14 +27,12 @@ other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/ClDisplay.c,v 1.4 2001/12/14 19:53:58 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ClDisplay.c,v 1.5 2003/04/13 19:22:14 dawes Exp $ */ +#include <X11/Xtrans.h> +#include "Xlib.h" #include "Xlibint.h" - -extern void _XFreeDisplayStructure(); - -/* ConnDis.c */ -extern int _XDisconnectDisplay(); +#include "Xintconn.h" /* * XCloseDisplay - XSync the connection to the X Server, close the connection, @@ -43,8 +41,8 @@ extern int _XDisconnectDisplay(); */ int -XCloseDisplay (dpy) - register Display *dpy; +XCloseDisplay ( + register Display *dpy) { register _XExtension *ext; register int i; diff --git a/src/Cmap.h b/src/Cmap.h new file mode 100644 index 0000000..709f25c --- /dev/null +++ b/src/Cmap.h @@ -0,0 +1,11 @@ +/* $XFree86: xc/lib/X11/Cmap.h,v 1.1 2003/04/13 19:22:14 dawes Exp $ */ + +#ifndef _CMAP_H_ +#define _CMAP_H_ + +extern void +_XcmsDeleteCmapRec( + Display *dpy, + Colormap cmap); + +#endif /* _CMAP_H_ */ diff --git a/src/ConnDis.c b/src/ConnDis.c index 548ace9..667214c 100644 --- a/src/ConnDis.c +++ b/src/ConnDis.c @@ -24,7 +24,7 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/ConnDis.c,v 3.24 2001/12/14 19:53:58 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ConnDis.c,v 3.27 2003/07/20 16:12:14 tsi Exp $ */ /* * This file contains operating system dependencies. @@ -54,11 +54,22 @@ in this Software without prior written authorization from The Open Group. #include <sys/utsname.h> #endif -static void GetAuthorization(); - -static char *copystring (src, len) - char *src; - int len; +#include "Xintconn.h" + +/* prototyes */ +static void GetAuthorization( + XtransConnInfo trans_conn, + int family, + char *saddr, + int saddrlen, + int idisplay, + char **auth_namep, + int *auth_namelenp, + char **auth_datap, + int *auth_datalenp); + +/* functions */ +static char *copystring (char *src, int len) { char *dst = Xmalloc (len + 1); @@ -78,7 +89,16 @@ static char *copystring (src, len) * * [protocol/] [hostname] : [:] displaynumber [.screennumber] * - * The second colon indicates a DECnet style name. No hostname is interpretted + * A string with exactly two colons seperating hostname from the display + * indicates a DECnet style name. Colons in the hostname may occur if an + * IPv6 numeric address is used as the hostname. An IPv6 numeric address + * may also end in a double colon, so three colons in a row indicates an + * IPv6 address ending in :: followed by :display. To make it easier for + * people to read, an IPv6 numeric address hostname may be surrounded by + * [ ] in a similar fashion to the IPv6 numeric address URL syntax defined + * by IETF RFC 2732. + * + * If no hostname and no protocol is specified, the string is interpreted * as the most efficient local connection to a server on the same machine. * This is usually: * @@ -94,16 +114,15 @@ static char *copystring (src, len) * */ XtransConnInfo -_X11TransConnectDisplay (display_name, fullnamep, dpynump, screenp, - auth_namep, auth_namelenp, auth_datap, auth_datalenp) - char *display_name; - char **fullnamep; /* RETURN */ - int *dpynump; /* RETURN */ - int *screenp; /* RETURN */ - char **auth_namep; /* RETURN */ - int *auth_namelenp; /* RETURN */ - char **auth_datap; /* RETURN */ - int *auth_datalenp; /* RETURN */ +_X11TransConnectDisplay ( + char *display_name, + char **fullnamep, /* RETURN */ + int *dpynump, /* RETURN */ + int *screenp, /* RETURN */ + char **auth_namep, /* RETURN */ + int *auth_namelenp, /* RETURN */ + char **auth_datap, /* RETURN */ + int *auth_datalenp) /* RETURN */ { int family; int saddrlen; @@ -154,7 +173,8 @@ _X11TransConnectDisplay (display_name, fullnamep, dpynump, screenp, /* * Step 1, find the hostname. This is delimited by either one colon, * or two colons in the case of DECnet (DECnet Phase V allows a single - * colon in the hostname). + * colon in the hostname). (See note above regarding IPv6 numeric + * addresses with triple colons or [] brackets.) */ lastp = p; @@ -165,7 +185,11 @@ _X11TransConnectDisplay (display_name, fullnamep, dpynump, screenp, if (!lastc) return NULL; /* must have a colon */ - if ((lastp != lastc) && (*(lastc - 1) == ':')) { + if ((lastp != lastc) && (*(lastc - 1) == ':') +#if defined(IPv6) && defined(AF_INET6) + && ( ((lastc - 1) == lastp) || (*(lastc - 2) != ':')) +#endif + ) { /* DECnet display specified */ #ifndef DNETCONN @@ -438,16 +462,15 @@ _X11TransConnectDisplay (display_name, fullnamep, dpynump, screenp, * */ -int _XConnectDisplay (display_name, fullnamep, dpynump, screenp, - auth_namep, auth_namelenp, auth_datap, auth_datalenp) - char *display_name; - char **fullnamep; /* RETURN */ - int *dpynump; /* RETURN */ - int *screenp; /* RETURN */ - char **auth_namep; /* RETURN */ - int *auth_namelenp; /* RETURN */ - char **auth_datap; /* RETURN */ - int *auth_datalenp; /* RETURN */ +int _XConnectDisplay ( + char *display_name, + char **fullnamep, /* RETURN */ + int *dpynump, /* RETURN */ + int *screenp, /* RETURN */ + char **auth_namep, /* RETURN */ + int *auth_namelenp, /* RETURN */ + char **auth_datap, /* RETURN */ + int *auth_datalenp) /* RETURN */ { XtransConnInfo trans_conn; @@ -692,7 +715,11 @@ auth_ezencode(servername, window, cred_out, len) AUTH *a; XDR xdr; +#if defined(SVR4) && defined(sun) + a = authdes_seccreate(servername, window, NULL, NULL); +#else a = (AUTH *)authdes_create(servername, window, NULL, NULL); +#endif if (a == (AUTH *)NULL) { perror("auth_create"); return 0; @@ -966,17 +993,16 @@ static int k5_clientauth(dpy, sprefix) #endif /* K5AUTH */ static void -GetAuthorization(trans_conn, family, saddr, saddrlen, idisplay, - auth_namep, auth_namelenp, auth_datap, auth_datalenp) - XtransConnInfo trans_conn; - int family; - int saddrlen; - int idisplay; - char *saddr; - char **auth_namep; /* RETURN */ - int *auth_namelenp; /* RETURN */ - char **auth_datap; /* RETURN */ - int *auth_datalenp; /* RETURN */ +GetAuthorization( + XtransConnInfo trans_conn, + int family, + char *saddr, + int saddrlen, + int idisplay, + char **auth_namep, /* RETURN */ + int *auth_namelenp, /* RETURN */ + char **auth_datap, /* RETURN */ + int *auth_datalenp) /* RETURN */ { #ifdef SECURE_RPC char rpc_cred[MAX_AUTH_BYTES]; diff --git a/src/Context.c b/src/Context.c index ddccbe9..8526b7a 100644 --- a/src/Context.c +++ b/src/Context.c @@ -50,7 +50,7 @@ other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/Context.c,v 1.5 2001/12/14 19:53:58 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Context.c,v 1.6 2003/11/17 22:20:06 dawes Exp $ */ /* This module implements a simple sparse array. @@ -155,19 +155,11 @@ static void _XFreeContextDB(Display *display) Possible errors are Out-of-memory. */ -#if NeedFunctionPrototypes int XSaveContext( Display *display, register XID rid, register XContext context, _Xconst char* data) -#else -int XSaveContext(display, rid, context, data) - Display *display; - register XID rid; - register XContext context; - XPointer data; -#endif { DB *pdb; register DB db; diff --git a/src/Cr.h b/src/Cr.h new file mode 100644 index 0000000..5ef13bf --- /dev/null +++ b/src/Cr.h @@ -0,0 +1,28 @@ +/* $XFree86: xc/lib/X11/Cr.h,v 1.1 2003/04/13 19:22:14 dawes Exp $ */ + +#ifndef _CR_H_ +#define _CR_H_ + +extern int _XUpdateGCCache( + register GC gc, + register unsigned long mask, + register XGCValues *attr); +extern void _XNoticeCreateBitmap( + Display *dpy, + Pixmap pid, + unsigned int width, + unsigned int height); +extern void _XNoticePutBitmap( + Display *dpy, + Drawable draw, + XImage *image); +extern Cursor _XTryShapeBitmapCursor( + Display *dpy, + Pixmap source, + Pixmap mask, + XColor *foreground, + XColor *background, + unsigned int x, + unsigned int y); + +#endif /* _CR_H_ */ diff --git a/src/CrBFData.c b/src/CrBFData.c index 70060a9..025f33e 100644 --- a/src/CrBFData.c +++ b/src/CrBFData.c @@ -24,6 +24,7 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/lib/X11/CrBFData.c,v 1.3 2003/11/17 22:20:06 dawes Exp $ */ #include "Xlib.h" @@ -44,20 +45,12 @@ in this Software without prior written authorization from The Open Group. * xoffset=0 * no extra bytes per line */ -#if NeedFunctionPrototypes Pixmap XCreateBitmapFromData( Display *display, Drawable d, _Xconst char *data, unsigned int width, unsigned int height) -#else -Pixmap XCreateBitmapFromData(display, d, data, width, height) - Display *display; - Drawable d; - char *data; - unsigned int width, height; -#endif { XImage ximage; GC gc; diff --git a/src/CrCmap.c b/src/CrCmap.c index b5d28d6..e956aa4 100644 --- a/src/CrCmap.c +++ b/src/CrCmap.c @@ -24,14 +24,11 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/CrCmap.c,v 1.4 2001/12/14 19:53:59 dawes Exp $ */ +/* $XFree86: xc/lib/X11/CrCmap.c,v 1.5 2003/04/13 19:22:14 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" -/* EXTERNS */ -/* cmsCmap.c */ -extern XcmsCmapRec * _XcmsAddCmapRec(); Colormap XCreateColormap(dpy, w, visual, alloc) register Display *dpy; @@ -24,9 +24,10 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/CrGC.c,v 3.6 2001/12/14 19:53:59 dawes Exp $ */ +/* $XFree86: xc/lib/X11/CrGC.c,v 3.7 2003/04/13 19:22:15 dawes Exp $ */ #include "Xlibint.h" +#include "Cr.h" static XGCValues const initial_GC = { GXcopy, /* function */ @@ -54,8 +55,10 @@ static XGCValues const initial_GC = { 4 /* dashes (list [4,4]) */ }; -static void _XGenerateGCList(); -int _XUpdateGCCache(); +static void _XGenerateGCList( + register Display *dpy, + GC gc, + xReq *req); GC XCreateGC (dpy, d, valuemask, values) register Display *dpy; @@ -103,10 +106,10 @@ GC XCreateGC (dpy, d, valuemask, values) */ static void -_XGenerateGCList (dpy, gc, req) - register Display *dpy; - xReq *req; - GC gc; +_XGenerateGCList ( + register Display *dpy, + GC gc, + xReq *req) { unsigned long values[32]; register unsigned long *value = values; diff --git a/src/CrGlCur.c b/src/CrGlCur.c index a0535f2..05e46a2 100644 --- a/src/CrGlCur.c +++ b/src/CrGlCur.c @@ -24,7 +24,7 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/CrGlCur.c,v 1.6 2002/09/05 18:17:31 keithp Exp $ */ +/* $XFree86: xc/lib/X11/CrGlCur.c,v 1.7 2003/04/13 19:22:15 dawes Exp $ */ #include "Xlibint.h" @@ -37,6 +37,7 @@ in this Software without prior written authorization from The Open Group. #else #include <dlfcn.h> #endif +#include "Cr.h" #if defined(hpux) typedef shl_dt XModuleType; @@ -151,7 +152,7 @@ static Bool _XcursorModuleTried; _XUnlockMutex (_Xglobal_lock); \ } -Cursor +static Cursor _XTryShapeCursor (Display *dpy, Font source_font, Font mask_font, diff --git a/src/DisName.c b/src/DisName.c index 17ebf35..1456f65 100644 --- a/src/DisName.c +++ b/src/DisName.c @@ -27,6 +27,7 @@ other dealings in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/lib/X11/DisName.c,v 1.3 2003/04/13 19:22:15 dawes Exp $ */ /* XDisplayName.c */ /* @@ -46,16 +47,16 @@ from The Open Group. /* Written at Waterloo - JMSellens */ #include <stdio.h> - -extern char *getenv(); +#include <stdlib.h> +#include "Xlib.h" char * -XDisplayName( display ) - char *display; +XDisplayName( + _Xconst char *display) { char *d; if ( display != (char *)NULL && *display != '\0' ) - return( display ); + return( (char *)display ); if ( (d = getenv( "DISPLAY" )) != (char *)NULL ) return( d ); return( "" ); diff --git a/src/ErrDes.c b/src/ErrDes.c index 9ea3f88..911a31b 100644 --- a/src/ErrDes.c +++ b/src/ErrDes.c @@ -48,7 +48,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/X11/ErrDes.c,v 3.10 2001/12/14 19:53:59 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ErrDes.c,v 3.12 2003/11/17 22:20:06 dawes Exp $ */ #include "Xlibint.h" #include <X11/Xos.h> @@ -122,7 +122,6 @@ XGetErrorText(dpy, code, buffer, nbytes) } int -#if NeedFunctionPrototypes /*ARGSUSED*/ XGetErrorDatabaseText( Display *dpy, @@ -131,15 +130,6 @@ XGetErrorDatabaseText( _Xconst char *defaultp, char *buffer, int nbytes) -#else -/*ARGSUSED*/ -XGetErrorDatabaseText(dpy, name, type, defaultp, buffer, nbytes) - Display *dpy; - register char *name, *type; - char *defaultp; - char *buffer; - int nbytes; -#endif { static XrmDatabase db = NULL; @@ -175,11 +165,19 @@ XGetErrorDatabaseText(dpy, name, type, defaultp, buffer, nbytes) if (db) { tlen = strlen (name) + strlen (type) + 2; - if (tlen <= BUFSIZE) tptr = temp; - else tptr = Xmalloc (tlen); - sprintf(tptr, "%s.%s", name, type); - XrmGetResource(db, tptr, "ErrorType.ErrorNumber", &type_str, &result); - if (tptr != temp) Xfree (tptr); + if (tlen <= BUFSIZE) + tptr = temp; + else + tptr = Xmalloc (tlen); + if (tptr) { + sprintf(tptr, "%s.%s", name, type); + XrmGetResource(db, tptr, "ErrorType.ErrorNumber", + &type_str, &result); + if (tptr != temp) + Xfree (tptr); + } else { + result.addr = (XPointer) NULL; + } } else result.addr = (XPointer)NULL; diff --git a/src/ErrHndlr.c b/src/ErrHndlr.c index 9ad0ba7..9db99e8 100644 --- a/src/ErrHndlr.c +++ b/src/ErrHndlr.c @@ -24,26 +24,20 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/ErrHndlr.c,v 1.5 2001/12/14 19:53:59 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ErrHndlr.c,v 1.7 2003/11/17 22:20:06 dawes Exp $ */ #include "Xlibint.h" -extern int _XDefaultError(); -extern int _XDefaultIOError(); /* * XErrorHandler - This procedure sets the X non-fatal error handler * (_XErrorFunction) to be the specified routine. If NULL is passed in * the original error handler is restored. */ -#if NeedFunctionPrototypes -XErrorHandler XSetErrorHandler(XErrorHandler handler) -#else -XErrorHandler XSetErrorHandler(handler) - register XErrorHandler handler; -#endif +XErrorHandler +XSetErrorHandler(XErrorHandler handler) { - int (*oldhandler)(); + int (*oldhandler)(Display *dpy, XErrorEvent *event); _XLockMutex(_Xglobal_lock); oldhandler = _XErrorFunction; @@ -68,14 +62,10 @@ XErrorHandler XSetErrorHandler(handler) * the original error handler is restored. */ -#if NeedFunctionPrototypes -XIOErrorHandler XSetIOErrorHandler(XIOErrorHandler handler) -#else -XIOErrorHandler XSetIOErrorHandler(handler) - register XIOErrorHandler handler; -#endif +XIOErrorHandler +XSetIOErrorHandler(XIOErrorHandler handler) { - int (*oldhandler)(); + int (*oldhandler)(Display *dpy); _XLockMutex(_Xglobal_lock); oldhandler = _XIOErrorFunction; diff --git a/src/FSWrap.c b/src/FSWrap.c index 98e02de..d16068e 100644 --- a/src/FSWrap.c +++ b/src/FSWrap.c @@ -56,7 +56,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/FSWrap.c,v 1.6 2001/12/14 19:54:00 dawes Exp $ */ +/* $XFree86: xc/lib/X11/FSWrap.c,v 1.9 2003/11/17 22:20:06 dawes Exp $ */ #include "Xlibint.h" #include "Xlcint.h" @@ -67,13 +67,13 @@ from The Open Group. #define XMAXLIST 256 char ** -_XParseBaseFontNameList(str, num) - char *str; - int *num; +_XParseBaseFontNameList( + char *str, + int *num) { char *plist[XMAXLIST]; char **list; - char *ptr; + char *ptr, *psave; *num = 0; if (!str || !*str) { @@ -89,6 +89,7 @@ _XParseBaseFontNameList(str, num) } strcpy(ptr, str); + psave = ptr; /* somebody who specifies more than XMAXLIST basefontnames will lose */ while (*num < (sizeof plist / sizeof plist[0])) { char *back; @@ -112,7 +113,7 @@ _XParseBaseFontNameList(str, num) break; } if (!(list = (char **) Xmalloc((unsigned)sizeof(char *) * (*num + 1)))) { - Xfree(ptr); + Xfree(psave); return (char **)NULL; } memcpy((char *)list, (char *)plist, sizeof(char *) * (*num)); @@ -122,9 +123,9 @@ _XParseBaseFontNameList(str, num) } static char ** -copy_string_list(string_list, list_count) - char **string_list; - int list_count; +copy_string_list( + char **string_list, + int list_count) { char **string_list_ret, **list_src, **list_dst, *dst; int length, count; @@ -159,7 +160,6 @@ copy_string_list(string_list, list_count) return string_list_ret; } -#if NeedFunctionPrototypes XFontSet XCreateFontSet ( Display *dpy, @@ -167,16 +167,6 @@ XCreateFontSet ( char ***missing_charset_list, int *missing_charset_count, char **def_string) -#else -XFontSet -XCreateFontSet (dpy, base_font_name_list, missing_charset_list, - missing_charset_count, def_string) - Display *dpy; - char *base_font_name_list; - char ***missing_charset_list; - int *missing_charset_count; - char **def_string; -#endif { XOM om; XOC oc; @@ -27,7 +27,7 @@ sale, use or other dealings in this Software without prior written authorization from the X Consortium and the XFree86 Project. */ -/* $XFree86: xc/lib/X11/Font.c,v 1.16 2002/12/14 01:55:57 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Font.c,v 1.18 2003/11/17 22:20:06 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" @@ -52,11 +52,9 @@ authorization from the X Consortium and the XFree86 Project. static XFontStruct *_XQueryFont( -#if NeedFunctionPrototypes Display* /* dpy */, Font /* fid */, unsigned long /* seq */ -#endif ); #ifdef USE_XF86BIGFONT @@ -72,38 +70,26 @@ typedef struct { #define CAP_VerifiedLocal 256 static XF86BigfontCodes *_XF86BigfontCodes( -#if NeedFunctionPrototypes Display* /* dpy */ -#endif ); static XFontStruct *_XF86BigfontQueryFont( -#if NeedFunctionPrototypes Display* /* dpy */, XF86BigfontCodes* /* extcodes */, Font /* fid */, unsigned long /* seq */ -#endif ); void _XF86BigfontFreeFontMetrics( -#if NeedFunctionPrototypes XFontStruct* /* fs */ -#endif ); #endif /* USE_XF86BIGFONT */ -#if NeedFunctionPrototypes XFontStruct *XLoadQueryFont( register Display *dpy, _Xconst char *name) -#else -XFontStruct *XLoadQueryFont(dpy, name) - register Display *dpy; - char *name; -#endif { XFontStruct *font_result; register long nbytes; @@ -338,8 +324,8 @@ _XQueryFont (dpy, fid, seq) static int XF86BigfontNumber = 1040697125; static int -_XF86BigfontFreeCodes (extension) - XExtData *extension; +_XF86BigfontFreeCodes ( + XExtData *extension) { /* Don't Xfree(extension->private_data) because it is on the same malloc chunk as extension. */ @@ -349,8 +335,8 @@ _XF86BigfontFreeCodes (extension) } static XF86BigfontCodes * -_XF86BigfontCodes (dpy) - register Display *dpy; +_XF86BigfontCodes ( + register Display *dpy) { XEDataObject dpy_union; XExtData *pData; @@ -434,8 +420,8 @@ _XF86BigfontCodes (dpy) } static int -_XF86BigfontFreeNop (extension) - XExtData *extension; +_XF86BigfontFreeNop ( + XExtData *extension) { return 0; } @@ -683,19 +669,11 @@ _XF86BigfontFreeFontMetrics (fs) #endif /* USE_XF86BIGFONT */ -#if NeedFunctionPrototypes int _XF86LoadQueryLocaleFont( Display *dpy, _Xconst char *name, XFontStruct **xfp, Font *fidp) -#else -int _XF86LoadQueryLocaleFont(dpy, name) - Display *dpy; - char *name; - XFontStruct **xfp; - Font *fidp; -#endif { int l; char *charset, *p; diff --git a/src/FontInfo.c b/src/FontInfo.c index bba8051..8437d8c 100644 --- a/src/FontInfo.c +++ b/src/FontInfo.c @@ -24,7 +24,7 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/FontInfo.c,v 1.6 2001/12/14 19:54:00 dawes Exp $ */ +/* $XFree86: xc/lib/X11/FontInfo.c,v 1.7 2003/11/17 22:20:06 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" @@ -34,27 +34,16 @@ in this Software without prior written authorization from The Open Group. #endif #ifdef USE_XF86BIGFONT extern void _XF86BigfontFreeFontMetrics( -#if NeedFunctionPrototypes XFontStruct* /* fs */ -#endif ); #endif -#if NeedFunctionPrototypes char **XListFontsWithInfo( register Display *dpy, _Xconst char *pattern, /* null-terminated */ int maxNames, int *actualCount, /* RETURN */ XFontStruct **info) /* RETURN */ -#else -char **XListFontsWithInfo(dpy, pattern, maxNames, actualCount, info) -register Display *dpy; -char *pattern; /* null-terminated */ -int maxNames; -int *actualCount; /* RETURN */ -XFontStruct **info; /* RETURN */ -#endif { register long nbytes; register int i; diff --git a/src/FontNames.c b/src/FontNames.c index ec4c309..adfd91e 100644 --- a/src/FontNames.c +++ b/src/FontNames.c @@ -25,24 +25,17 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/FontNames.c,v 1.6 2001/12/14 19:54:00 dawes Exp $ */ +/* $XFree86: xc/lib/X11/FontNames.c,v 1.7 2003/11/17 22:20:06 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" -#if NeedFunctionPrototypes -char **XListFonts( +char ** +XListFonts( register Display *dpy, _Xconst char *pattern, /* null-terminated */ int maxNames, int *actualCount) /* RETURN */ -#else -char **XListFonts(dpy, pattern, maxNames, actualCount) -register Display *dpy; -char *pattern; /* null-terminated */ -int maxNames; -int *actualCount; /* RETURN */ -#endif { register long nbytes; register unsigned i; diff --git a/src/FreeCmap.c b/src/FreeCmap.c index 4b83ba1..493c088 100644 --- a/src/FreeCmap.c +++ b/src/FreeCmap.c @@ -24,16 +24,16 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/FreeCmap.c,v 1.4 2001/12/14 19:54:00 dawes Exp $ */ +/* $XFree86: xc/lib/X11/FreeCmap.c,v 1.5 2003/04/13 19:22:16 dawes Exp $ */ +#include "Xlib.h" #include "Xlibint.h" - -extern void _XcmsDeleteCmapRec(); +#include "Cmap.h" int -XFreeColormap(dpy, cmap) -register Display *dpy; -Colormap cmap; +XFreeColormap( + register Display *dpy, + Colormap cmap) { register xResourceReq *req; @@ -27,6 +27,7 @@ other dealings in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/lib/X11/Geom.c,v 1.3 2003/11/17 22:20:06 dawes Exp $ */ #include "Xlibint.h" #include "Xutil.h" @@ -37,8 +38,8 @@ from The Open Group. * returns 0 if there was some problem, else the position bitmask. */ -#if NeedFunctionPrototypes -int XGeometry ( +int +XGeometry ( Display *dpy, /* user's display connection */ int screen, /* screen on which to do computation */ _Xconst char *pos, /* user provided geometry spec */ @@ -52,17 +53,6 @@ int XGeometry ( register int *y, /* always set on successful RETURN */ register int *width, /* always set on successful RETURN */ register int *height) /* always set on successful RETURN */ -#else -int XGeometry (dpy, screen, pos, def, bwidth, fwidth, fheight, xadd, yadd, x, y, width, height) - Display *dpy; /* user's display connection */ - int screen; /* screen on which to do computation */ - char *pos; /* user provided geometry spec */ - char *def; /* default geometry spec for window */ - unsigned int bwidth; /* border width */ - unsigned int fwidth, fheight; /* size of position units */ - int xadd, yadd; /* any additional interior space */ - register int *x, *y, *width, *height;/* always set on successful RETURN */ -#endif { int px, py; /* returned values from parse */ unsigned int pwidth, pheight; /* returned values from parse */ diff --git a/src/GetColor.c b/src/GetColor.c index 090f241..f374995 100644 --- a/src/GetColor.c +++ b/src/GetColor.c @@ -24,40 +24,20 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/GetColor.c,v 1.5 2002/12/04 23:18:32 paulo Exp $ */ +/* $XFree86: xc/lib/X11/GetColor.c,v 1.7 2003/11/17 22:20:06 dawes Exp $ */ #define NEED_REPLIES #include <stdio.h> #include "Xlibint.h" #include "Xcmsint.h" -extern void _XcmsRGB_to_XColor(); - -/* cmsColNm.c */ -extern Status _XcmsResolveColorString( -#if NeedFunctionPrototypes - XcmsCCC ccc, - _Xconst char **color_string, - XcmsColor *pColor_exact_return, - XcmsColorFormat result_format -#endif -); - -#if NeedFunctionPrototypes -Status XAllocNamedColor( +Status +XAllocNamedColor( register Display *dpy, Colormap cmap, _Xconst char *colorname, /* STRING8 */ XColor *hard_def, /* RETURN */ XColor *exact_def) /* RETURN */ -#else -Status XAllocNamedColor(dpy, cmap, colorname, hard_def, exact_def) -register Display *dpy; -Colormap cmap; -char *colorname; /* STRING8 */ -XColor *hard_def; /* RETURN */ -XColor *exact_def; /* RETURN */ -#endif { long nbytes; diff --git a/src/GetDflt.c b/src/GetDflt.c index 317ee4a..22ea3cc 100644 --- a/src/GetDflt.c +++ b/src/GetDflt.c @@ -46,7 +46,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/X11/GetDflt.c,v 3.21 2002/05/31 18:45:41 dawes Exp $ */ +/* $XFree86: xc/lib/X11/GetDflt.c,v 3.23 2003/11/17 22:20:07 dawes Exp $ */ #include "Xlibint.h" #include <X11/Xos.h> @@ -89,9 +89,10 @@ SOFTWARE. /*ARGSUSED*/ -static char *GetHomeDir (dest, len) - char *dest; - int len; +static char * +GetHomeDir( + char *dest, + int len) { #ifdef WIN32 register char *ptr1; @@ -140,8 +141,9 @@ static char *GetHomeDir (dest, len) } -static XrmDatabase InitDefaults (dpy) - Display *dpy; /* display for defaults.... */ +static XrmDatabase +InitDefaults( + Display *dpy) /* display for defaults.... */ { XrmDatabase userdb; XrmDatabase xdb; @@ -190,17 +192,11 @@ static XrmDatabase InitDefaults (dpy) #endif } -#if NeedFunctionPrototypes -char *XGetDefault( +char * +XGetDefault( Display *dpy, /* display for defaults.... */ char _Xconst *prog, /* name of program for option */ register _Xconst char *name) /* name of option program wants */ -#else -char *XGetDefault(dpy, prog, name) - Display *dpy; /* display for defaults.... */ - char *prog; /* name of program for option */ - register char *name; /* name of option program wants */ -#endif { /* to get, for example, "font" */ XrmName names[3]; XrmClass classes[3]; diff --git a/src/GetImage.c b/src/GetImage.c index 9ffef9e..8b1224a 100644 --- a/src/GetImage.c +++ b/src/GetImage.c @@ -24,20 +24,17 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/GetImage.c,v 1.4 2001/12/14 19:54:00 dawes Exp $ */ +/* $XFree86: xc/lib/X11/GetImage.c,v 1.5 2003/04/13 19:22:16 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" #include <X11/Xutil.h> /* for XDestroyImage */ - -/* ImUtil.c */ -extern int _XGetScanlinePad(); -extern int _XSetImage(); +#include "ImUtil.h" #define ROUNDUP(nbytes, pad) (((((nbytes) - 1) + (pad)) / (pad)) * (pad)) -static unsigned int Ones(mask) /* HACKMEM 169 */ - unsigned long mask; +static unsigned int Ones( /* HACKMEM 169 */ + unsigned long mask) { register unsigned long y; diff --git a/src/GetPntMap.c b/src/GetPntMap.c index 1f99314..28e5f4d 100644 --- a/src/GetPntMap.c +++ b/src/GetPntMap.c @@ -25,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/GetPntMap.c,v 1.6 2001/12/14 19:54:01 dawes Exp $ */ +/* $XFree86: xc/lib/X11/GetPntMap.c,v 1.7 2003/11/17 22:20:07 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" @@ -76,8 +76,8 @@ int XGetPointerMapping (dpy, map, nmaps) return ((int) rep.nElts); } -#if NeedFunctionPrototypes -KeySym *XGetKeyboardMapping (Display *dpy, +KeySym * +XGetKeyboardMapping (Display *dpy, #if NeedWidePrototypes unsigned int first_keycode, #else @@ -85,13 +85,6 @@ KeySym *XGetKeyboardMapping (Display *dpy, #endif int count, int *keysyms_per_keycode) -#else -KeySym *XGetKeyboardMapping (dpy, first_keycode, count, keysyms_per_keycode) - register Display *dpy; - KeyCode first_keycode; - int count; - int *keysyms_per_keycode; /* RETURN */ -#endif { long nbytes; unsigned long nkeysyms; diff --git a/src/GetWAttrs.c b/src/GetWAttrs.c index 7856b6f..e518925 100644 --- a/src/GetWAttrs.c +++ b/src/GetWAttrs.c @@ -24,6 +24,7 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/lib/X11/GetWAttrs.c,v 1.3 2003/04/13 19:22:16 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" @@ -35,12 +36,12 @@ typedef struct _WAttrsState { } _XWAttrsState; static Bool -_XWAttrsHandler(dpy, rep, buf, len, data) - register Display *dpy; - register xReply *rep; - char *buf; - int len; - XPointer data; +_XWAttrsHandler( + register Display *dpy, + register xReply *rep, + char *buf, + int len, + XPointer data) { register _XWAttrsState *state; xGetWindowAttributesReply replbuf; diff --git a/src/IfEvent.c b/src/IfEvent.c index 34b9e39..45d04ac 100644 --- a/src/IfEvent.c +++ b/src/IfEvent.c @@ -24,7 +24,7 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/IfEvent.c,v 1.4 2001/12/14 19:54:01 dawes Exp $ */ +/* $XFree86: xc/lib/X11/IfEvent.c,v 1.5 2003/11/17 22:20:07 dawes Exp $ */ #define NEED_EVENTS #include "Xlibint.h" @@ -38,11 +38,9 @@ int XIfEvent (dpy, event, predicate, arg) register Display *dpy; Bool (*predicate)( -#if NeedNestedPrototypes Display* /* display */, XEvent* /* event */, char* /* arg */ -#endif ); /* function to call */ register XEvent *event; char *arg; diff --git a/src/ImText.c b/src/ImText.c index c68f2c2..32ec8c8 100644 --- a/src/ImText.c +++ b/src/ImText.c @@ -24,13 +24,12 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/ImText.c,v 1.4 2001/12/14 19:54:02 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ImText.c,v 1.5 2003/11/17 22:20:07 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" int -#if NeedFunctionPrototypes XDrawImageString( register Display *dpy, Drawable d, @@ -39,15 +38,6 @@ XDrawImageString( int y, _Xconst char *string, int length) -#else -XDrawImageString(dpy, d, gc, x, y, string, length) - register Display *dpy; - Drawable d; - GC gc; - int x, y; - char *string; - int length; -#endif { register xImageText8Req *req; char *CharacterOffset = (char *)string; diff --git a/src/ImText16.c b/src/ImText16.c index 4d9338a..f3fbdbe 100644 --- a/src/ImText16.c +++ b/src/ImText16.c @@ -24,13 +24,12 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/ImText16.c,v 1.4 2001/12/14 19:54:02 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ImText16.c,v 1.5 2003/11/17 22:20:07 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" int -#if NeedFunctionPrototypes XDrawImageString16( register Display *dpy, Drawable d, @@ -39,15 +38,6 @@ XDrawImageString16( int y, _Xconst XChar2b *string, int length) -#else -XDrawImageString16(dpy, d, gc, x, y, string, length) - register Display *dpy; - Drawable d; - GC gc; - int x, y; - XChar2b *string; - int length; -#endif { register xImageText16Req *req; XChar2b *CharacterOffset = (XChar2b *)string; diff --git a/src/ImUtil.c b/src/ImUtil.c index 6cab3e2..92e031d 100644 --- a/src/ImUtil.c +++ b/src/ImUtil.c @@ -24,16 +24,13 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/ImUtil.c,v 3.10 2001/12/14 19:54:02 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ImUtil.c,v 3.13 2003/11/17 22:20:07 dawes Exp $ */ #include <X11/Xlibint.h> #include <X11/Xutil.h> #include <stdio.h> +#include "ImUtil.h" -/* PutImage.c */ -extern int _XReverse_Bytes(); - -#if NeedFunctionPrototypes static int _XDestroyImage(XImage *); static unsigned long _XGetPixel(XImage *, int, int); static unsigned long _XGetPixel1(XImage *, int, int); @@ -47,7 +44,6 @@ static int _XPutPixel16(XImage *, int, int, unsigned long); static int _XPutPixel32(XImage *, int, int, unsigned long); static XImage *_XSubImage(XImage *, int, int, unsigned int, unsigned int); static int _XAddPixel(XImage *, long); -#endif static unsigned char const _lomask[0x09] = { 0x00, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f, 0xff }; static unsigned char const _himask[0x09] = { 0xff, 0xfe, 0xfc, 0xf8, 0xf0, 0xe0, 0xc0, 0x80, 0x00 }; @@ -57,9 +53,9 @@ static unsigned char const _himask[0x09] = { 0xff, 0xfe, 0xfc, 0xf8, 0xf0, 0xe0, display. */ int -_XGetScanlinePad(dpy, depth) - Display *dpy; - int depth; +_XGetScanlinePad( + Display *dpy, + int depth) { register ScreenFormat *fmt = dpy->pixmap_format; register int i; @@ -72,9 +68,9 @@ _XGetScanlinePad(dpy, depth) } int -_XGetBitsPerPixel(dpy, depth) - Display *dpy; - int depth; +_XGetBitsPerPixel( + Display *dpy, + int depth) { register ScreenFormat *fmt = dpy->pixmap_format; register int i; @@ -121,9 +117,9 @@ _XGetBitsPerPixel(dpy, depth) * For XY formats, bitmap_unit is 8, 16, or 32 bits. * For Z format, bits_per_pixel is 1, 4, 8, 16, 24, or 32 bits. */ -static void _xynormalizeimagebits (bp, img) - register unsigned char *bp; - register XImage *img; +static void _xynormalizeimagebits ( + register unsigned char *bp, + register XImage *img) { register unsigned char c; @@ -150,9 +146,9 @@ static void _xynormalizeimagebits (bp, img) _XReverse_Bytes (bp, img->bitmap_unit >> 3); } -static void _znormalizeimagebits (bp, img) - register unsigned char *bp; - register XImage *img; +static void _znormalizeimagebits ( + register unsigned char *bp, + register XImage *img) { register unsigned char c; switch (img->bits_per_pixel) { @@ -184,11 +180,11 @@ static void _znormalizeimagebits (bp, img) } } -static void _putbits (src, dstoffset, numbits, dst) - register char *src; /* address of source bit string */ - int dstoffset; /* bit offset into destination; range is 0-31 */ - register int numbits;/* number of bits to copy to destination */ - register char *dst; /* address of destination bit string */ +static void _putbits( + register char *src, /* address of source bit string */ + int dstoffset, /* bit offset into destination; range is 0-31 */ + register int numbits,/* number of bits to copy to destination */ + register char *dst) /* address of destination bit string */ { register unsigned char chlo, chhi; int hibits; @@ -271,8 +267,8 @@ static void _putbits (src, dstoffset, numbits, dst) * routines always have to check to make sure the optimization is still * valid, and reinit the functions if not. */ -void _XInitImageFuncPtrs (image) - register XImage *image; +void _XInitImageFuncPtrs ( + register XImage *image) { image->f.create_image = XCreateImage; image->f.destroy_image = _XDestroyImage; @@ -917,12 +913,11 @@ static XImage *_XSubImage (ximage, x, y, width, height) * */ -int _XSetImage (srcimg, dstimg, x, y) - XImage *srcimg; - register XImage *dstimg; - register int x; - register int y; - +int _XSetImage( + XImage *srcimg, + register XImage *dstimg, + register int x, + register int y) { register unsigned long pixel; register int row, col; diff --git a/src/InitExt.c b/src/InitExt.c index 00b2c52..8031d21 100644 --- a/src/InitExt.c +++ b/src/InitExt.c @@ -26,7 +26,7 @@ other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/InitExt.c,v 1.7 2001/12/14 19:54:02 dawes Exp $ */ +/* $XFree86: xc/lib/X11/InitExt.c,v 1.8 2003/11/17 22:20:07 dawes Exp $ */ #include <X11/Xlibint.h> #include <X11/Xos.h> @@ -37,15 +37,9 @@ from The Open Group. * at appropriate times. */ -#if NeedFunctionPrototypes XExtCodes *XInitExtension ( Display *dpy, _Xconst char *name) -#else -XExtCodes *XInitExtension (dpy, name) - Display *dpy; - char *name; -#endif { XExtCodes codes; /* temp. place for extension information. */ register _XExtension *ext;/* need a place to build it all */ @@ -239,11 +233,9 @@ CloseDisplayType XESetCloseDisplay(dpy, extension, proc) } typedef Bool (*WireToEventType) ( -#if NeedFunctionPrototypes Display* /* display */, XEvent* /* re */, xEvent* /* event */ -#endif ); WireToEventType XESetWireToEvent(dpy, event_number, proc) @@ -261,11 +253,9 @@ WireToEventType XESetWireToEvent(dpy, event_number, proc) } typedef Status (*EventToWireType) ( -#if NeedFunctionPrototypes Display* /* display */, XEvent* /* re */, xEvent* /* event */ -#endif ); EventToWireType XESetEventToWire(dpy, event_number, proc) @@ -283,11 +273,9 @@ EventToWireType XESetEventToWire(dpy, event_number, proc) } typedef Bool (*WireToErrorType) ( -#if NeedFunctionPrototypes Display* /* display */, XErrorEvent* /* he */, xError* /* we */ -#endif ); WireToErrorType XESetWireToError(dpy, error_number, proc) diff --git a/src/IntAtom.c b/src/IntAtom.c index 237b670..106ce69 100644 --- a/src/IntAtom.c +++ b/src/IntAtom.c @@ -26,7 +26,7 @@ other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/IntAtom.c,v 1.6 2001/12/14 19:54:02 dawes Exp $ */ +/* $XFree86: xc/lib/X11/IntAtom.c,v 1.7 2003/11/17 22:20:07 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" @@ -159,17 +159,11 @@ _XUpdateAtomCache(dpy, name, atom, sig, idx, n) } } -#if NeedFunctionPrototypes -Atom XInternAtom ( +Atom +XInternAtom ( Display *dpy, const char *name, Bool onlyIfExists) -#else -Atom XInternAtom (dpy, name, onlyIfExists) - Display *dpy; - char *name; - Bool onlyIfExists; -#endif { Atom atom; unsigned long sig; diff --git a/src/Key.h b/src/Key.h new file mode 100644 index 0000000..2cfb82a --- /dev/null +++ b/src/Key.h @@ -0,0 +1,18 @@ +/* $XFree86: xc/lib/X11/Key.h,v 1.1 2003/04/13 19:22:16 dawes Exp $ */ + +#ifndef _KEY_H_ +#define _KEY_H_ + +#ifndef NEEDKTABLE +extern const unsigned char _XkeyTable[]; +#endif + +extern int +_XKeyInitialize( + Display *dpy); + +extern XrmDatabase +_XInitKeysymDB( + void); + +#endif /* _KEY_H_ */ diff --git a/src/KeyBind.c b/src/KeyBind.c index e3b4094..6f44f6b 100644 --- a/src/KeyBind.c +++ b/src/KeyBind.c @@ -24,7 +24,7 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/KeyBind.c,v 1.5 2001/12/14 19:54:02 dawes Exp $ */ +/* $XFree86: xc/lib/X11/KeyBind.c,v 1.9 2003/11/17 22:20:07 dawes Exp $ */ /* Beware, here be monsters (still under construction... - JG */ @@ -36,9 +36,13 @@ in this Software without prior written authorization from The Open Group. #define XK_LATIN2 #define XK_LATIN3 #define XK_LATIN4 +#define XK_LATIN8 +#define XK_LATIN9 #define XK_CYRILLIC #define XK_GREEK #define XK_ARMENIAN +#define XK_CAUCASUS +#define XK_VIETNAMESE #define XK_XKB_KEYS #include <X11/keysymdef.h> #include <stdio.h> @@ -47,9 +51,12 @@ in this Software without prior written authorization from The Open Group. #ifdef USE_OWN_COMPOSE #include "imComp.h" - #endif +#include "Xresource.h" +#include "XKBlibint.h" +#include "Key.h" + #ifdef XKB #define XKeycodeToKeysym _XKeycodeToKeysym #define XKeysymToKeycode _XKeysymToKeycode @@ -64,8 +71,10 @@ in this Software without prior written authorization from The Open Group. #define AllMods (ShiftMask|LockMask|ControlMask| \ Mod1Mask|Mod2Mask|Mod3Mask|Mod4Mask|Mod5Mask) -static void ComputeMaskFromKeytrans(); -int _XKeyInitialize(); +static void +ComputeMaskFromKeytrans( + Display *dpy, + register struct _XKeytrans *p); struct _XKeytrans { struct _XKeytrans *next;/* next on list */ @@ -78,14 +87,7 @@ struct _XKeytrans { }; static KeySym -#if NeedFunctionPrototypes KeyCodetoKeySym(register Display *dpy, KeyCode keycode, int col) -#else -KeyCodetoKeySym(dpy, keycode, col) - register Display *dpy; - KeyCode keycode; - int col; -#endif { register int per = dpy->keysyms_per_keycode; register KeySym *syms; @@ -116,7 +118,6 @@ KeyCodetoKeySym(dpy, keycode, col) return syms[col]; } -#if NeedFunctionPrototypes KeySym XKeycodeToKeysym(Display *dpy, #if NeedWidePrototypes @@ -125,13 +126,6 @@ XKeycodeToKeysym(Display *dpy, KeyCode kc, #endif int col) -#else -KeySym -XKeycodeToKeysym(dpy, kc, col) - Display *dpy; - KeyCode kc; - int col; -#endif { if ((! dpy->keysyms) && (! _XKeyInitialize(dpy))) return NoSymbol; @@ -167,8 +161,8 @@ XLookupKeysym(event, col) } static void -ResetModMap(dpy) - Display *dpy; +ResetModMap( + Display *dpy) { register XModifierKeymap *map; register int i, j, n; @@ -216,8 +210,8 @@ ResetModMap(dpy) } static int -InitModMap(dpy) - Display *dpy; +InitModMap( + Display *dpy) { register XModifierKeymap *map; @@ -265,8 +259,8 @@ XRefreshKeyboardMapping(event) } int -_XKeyInitialize(dpy) - Display *dpy; +_XKeyInitialize( + Display *dpy) { int per, n; KeySym *keysyms; @@ -295,14 +289,372 @@ _XKeyInitialize(dpy) return 1; } +static void +UCSConvertCase( register unsigned code, + KeySym *lower, + KeySym *upper ) +{ + /* Case conversion for UCS, as in Unicode Data version 4.0.0 */ + /* NB: Only converts simple one-to-one mappings. */ + + /* Tables are used where they take less space than */ + /* the code to work out the mappings. Zero values mean */ + /* undefined code points. */ + + static unsigned short const IPAExt_upper_mapping[] = { /* part only */ + 0x0181, 0x0186, 0x0255, 0x0189, 0x018A, + 0x0258, 0x018F, 0x025A, 0x0190, 0x025C, 0x025D, 0x025E, 0x025F, + 0x0193, 0x0261, 0x0262, 0x0194, 0x0264, 0x0265, 0x0266, 0x0267, + 0x0197, 0x0196, 0x026A, 0x026B, 0x026C, 0x026D, 0x026E, 0x019C, + 0x0270, 0x0271, 0x019D, 0x0273, 0x0274, 0x019F, 0x0276, 0x0277, + 0x0278, 0x0279, 0x027A, 0x027B, 0x027C, 0x027D, 0x027E, 0x027F, + 0x01A6, 0x0281, 0x0282, 0x01A9, 0x0284, 0x0285, 0x0286, 0x0287, + 0x01AE, 0x0289, 0x01B1, 0x01B2, 0x028C, 0x028D, 0x028E, 0x028F, + 0x0290, 0x0291, 0x01B7 + }; + + static unsigned short const LatinExtB_upper_mapping[] = { /* first part only */ + 0x0180, 0x0181, 0x0182, 0x0182, 0x0184, 0x0184, 0x0186, 0x0187, + 0x0187, 0x0189, 0x018A, 0x018B, 0x018B, 0x018D, 0x018E, 0x018F, + 0x0190, 0x0191, 0x0191, 0x0193, 0x0194, 0x01F6, 0x0196, 0x0197, + 0x0198, 0x0198, 0x019A, 0x019B, 0x019C, 0x019D, 0x0220, 0x019F, + 0x01A0, 0x01A0, 0x01A2, 0x01A2, 0x01A4, 0x01A4, 0x01A6, 0x01A7, + 0x01A7, 0x01A9, 0x01AA, 0x01AB, 0x01AC, 0x01AC, 0x01AE, 0x01AF, + 0x01AF, 0x01B1, 0x01B2, 0x01B3, 0x01B3, 0x01B5, 0x01B5, 0x01B7, + 0x01B8, 0x01B8, 0x01BA, 0x01BB, 0x01BC, 0x01BC, 0x01BE, 0x01F7, + 0x01C0, 0x01C1, 0x01C2, 0x01C3, 0x01C4, 0x01C4, 0x01C4, 0x01C7, + 0x01C7, 0x01C7, 0x01CA, 0x01CA, 0x01CA + }; + + static unsigned short const LatinExtB_lower_mapping[] = { /* first part only */ + 0x0180, 0x0253, 0x0183, 0x0183, 0x0185, 0x0185, 0x0254, 0x0188, + 0x0188, 0x0256, 0x0257, 0x018C, 0x018C, 0x018D, 0x01DD, 0x0259, + 0x025B, 0x0192, 0x0192, 0x0260, 0x0263, 0x0195, 0x0269, 0x0268, + 0x0199, 0x0199, 0x019A, 0x019B, 0x026F, 0x0272, 0x019E, 0x0275, + 0x01A1, 0x01A1, 0x01A3, 0x01A3, 0x01A5, 0x01A5, 0x0280, 0x01A8, + 0x01A8, 0x0283, 0x01AA, 0x01AB, 0x01AD, 0x01AD, 0x0288, 0x01B0, + 0x01B0, 0x028A, 0x028B, 0x01B4, 0x01B4, 0x01B6, 0x01B6, 0x0292, + 0x01B9, 0x01B9, 0x01BA, 0x01BB, 0x01BD, 0x01BD, 0x01BE, 0x01BF, + 0x01C0, 0x01C1, 0x01C2, 0x01C3, 0x01C6, 0x01C6, 0x01C6, 0x01C9, + 0x01C9, 0x01C9, 0x01CC, 0x01CC, 0x01CC + }; + + static unsigned short const Greek_upper_mapping[] = { + 0x0000, 0x0000, 0x0000, 0x0000, 0x0374, 0x0375, 0x0000, 0x0000, + 0x0000, 0x0000, 0x037A, 0x0000, 0x0000, 0x0000, 0x037E, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0384, 0x0385, 0x0386, 0x0387, + 0x0388, 0x0389, 0x038A, 0x0000, 0x038C, 0x0000, 0x038E, 0x038F, + 0x0390, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, + 0x0398, 0x0399, 0x039A, 0x039B, 0x039C, 0x039D, 0x039E, 0x039F, + 0x03A0, 0x03A1, 0x0000, 0x03A3, 0x03A4, 0x03A5, 0x03A6, 0x03A7, + 0x03A8, 0x03A9, 0x03AA, 0x03AB, 0x0386, 0x0388, 0x0389, 0x038A, + 0x03B0, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, + 0x0398, 0x0399, 0x039A, 0x039B, 0x039C, 0x039D, 0x039E, 0x039F, + 0x03A0, 0x03A1, 0x03A3, 0x03A3, 0x03A4, 0x03A5, 0x03A6, 0x03A7, + 0x03A8, 0x03A9, 0x03AA, 0x03AB, 0x038C, 0x038E, 0x038F, 0x0000, + 0x0392, 0x0398, 0x03D2, 0x03D3, 0x03D4, 0x03A6, 0x03A0, 0x03D7, + 0x03D8, 0x03D8, 0x03DA, 0x03DA, 0x03DC, 0x03DC, 0x03DE, 0x03DE, + 0x03E0, 0x03E0, 0x03E2, 0x03E2, 0x03E4, 0x03E4, 0x03E6, 0x03E6, + 0x03E8, 0x03E8, 0x03EA, 0x03EA, 0x03EC, 0x03EC, 0x03EE, 0x03EE, + 0x039A, 0x03A1, 0x03F9, 0x03F3, 0x03F4, 0x0395, 0x03F6, 0x03F7, + 0x03F7, 0x03F9, 0x03FA, 0x03FA, 0x0000, 0x0000, 0x0000, 0x0000 + }; + + static unsigned short const Greek_lower_mapping[] = { + 0x0000, 0x0000, 0x0000, 0x0000, 0x0374, 0x0375, 0x0000, 0x0000, + 0x0000, 0x0000, 0x037A, 0x0000, 0x0000, 0x0000, 0x037E, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0384, 0x0385, 0x03AC, 0x0387, + 0x03AD, 0x03AE, 0x03AF, 0x0000, 0x03CC, 0x0000, 0x03CD, 0x03CE, + 0x0390, 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03B6, 0x03B7, + 0x03B8, 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF, + 0x03C0, 0x03C1, 0x0000, 0x03C3, 0x03C4, 0x03C5, 0x03C6, 0x03C7, + 0x03C8, 0x03C9, 0x03CA, 0x03CB, 0x03AC, 0x03AD, 0x03AE, 0x03AF, + 0x03B0, 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03B6, 0x03B7, + 0x03B8, 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF, + 0x03C0, 0x03C1, 0x03C2, 0x03C3, 0x03C4, 0x03C5, 0x03C6, 0x03C7, + 0x03C8, 0x03C9, 0x03CA, 0x03CB, 0x03CC, 0x03CD, 0x03CE, 0x0000, + 0x03D0, 0x03D1, 0x03D2, 0x03D3, 0x03D4, 0x03D5, 0x03D6, 0x03D7, + 0x03D9, 0x03D9, 0x03DB, 0x03DB, 0x03DD, 0x03DD, 0x03DF, 0x03DF, + 0x03E1, 0x03E1, 0x03E3, 0x03E3, 0x03E5, 0x03E5, 0x03E7, 0x03E7, + 0x03E9, 0x03E9, 0x03EB, 0x03EB, 0x03ED, 0x03ED, 0x03EF, 0x03EF, + 0x03F0, 0x03F1, 0x03F2, 0x03F3, 0x03B8, 0x03F5, 0x03F6, 0x03F8, + 0x03F8, 0x03F2, 0x03FB, 0x03FB, 0x0000, 0x0000, 0x0000, 0x0000 + }; + + static unsigned short const GreekExt_lower_mapping[] = { + 0x1F00, 0x1F01, 0x1F02, 0x1F03, 0x1F04, 0x1F05, 0x1F06, 0x1F07, + 0x1F00, 0x1F01, 0x1F02, 0x1F03, 0x1F04, 0x1F05, 0x1F06, 0x1F07, + 0x1F10, 0x1F11, 0x1F12, 0x1F13, 0x1F14, 0x1F15, 0x0000, 0x0000, + 0x1F10, 0x1F11, 0x1F12, 0x1F13, 0x1F14, 0x1F15, 0x0000, 0x0000, + 0x1F20, 0x1F21, 0x1F22, 0x1F23, 0x1F24, 0x1F25, 0x1F26, 0x1F27, + 0x1F20, 0x1F21, 0x1F22, 0x1F23, 0x1F24, 0x1F25, 0x1F26, 0x1F27, + 0x1F30, 0x1F31, 0x1F32, 0x1F33, 0x1F34, 0x1F35, 0x1F36, 0x1F37, + 0x1F30, 0x1F31, 0x1F32, 0x1F33, 0x1F34, 0x1F35, 0x1F36, 0x1F37, + 0x1F40, 0x1F41, 0x1F42, 0x1F43, 0x1F44, 0x1F45, 0x0000, 0x0000, + 0x1F40, 0x1F41, 0x1F42, 0x1F43, 0x1F44, 0x1F45, 0x0000, 0x0000, + 0x1F50, 0x1F51, 0x1F52, 0x1F53, 0x1F54, 0x1F55, 0x1F56, 0x1F57, + 0x0000, 0x1F51, 0x0000, 0x1F53, 0x0000, 0x1F55, 0x0000, 0x1F57, + 0x1F60, 0x1F61, 0x1F62, 0x1F63, 0x1F64, 0x1F65, 0x1F66, 0x1F67, + 0x1F60, 0x1F61, 0x1F62, 0x1F63, 0x1F64, 0x1F65, 0x1F66, 0x1F67, + 0x1F70, 0x1F71, 0x1F72, 0x1F73, 0x1F74, 0x1F75, 0x1F76, 0x1F77, + 0x1F78, 0x1F79, 0x1F7A, 0x1F7B, 0x1F7C, 0x1F7D, 0x0000, 0x0000, + 0x1F80, 0x1F81, 0x1F82, 0x1F83, 0x1F84, 0x1F85, 0x1F86, 0x1F87, + 0x1F80, 0x1F81, 0x1F82, 0x1F83, 0x1F84, 0x1F85, 0x1F86, 0x1F87, + 0x1F90, 0x1F91, 0x1F92, 0x1F93, 0x1F94, 0x1F95, 0x1F96, 0x1F97, + 0x1F90, 0x1F91, 0x1F92, 0x1F93, 0x1F94, 0x1F95, 0x1F96, 0x1F97, + 0x1FA0, 0x1FA1, 0x1FA2, 0x1FA3, 0x1FA4, 0x1FA5, 0x1FA6, 0x1FA7, + 0x1FA0, 0x1FA1, 0x1FA2, 0x1FA3, 0x1FA4, 0x1FA5, 0x1FA6, 0x1FA7, + 0x1FB0, 0x1FB1, 0x1FB2, 0x1FB3, 0x1FB4, 0x0000, 0x1FB6, 0x1FB7, + 0x1FB0, 0x1FB1, 0x1F70, 0x1F71, 0x1FB3, 0x1FBD, 0x1FBE, 0x1FBF, + 0x1FC0, 0x1FC1, 0x1FC2, 0x1FC3, 0x1FC4, 0x0000, 0x1FC6, 0x1FC7, + 0x1F72, 0x1F73, 0x1F74, 0x1F75, 0x1FC3, 0x1FCD, 0x1FCE, 0x1FCF, + 0x1FD0, 0x1FD1, 0x1FD2, 0x1FD3, 0x0000, 0x0000, 0x1FD6, 0x1FD7, + 0x1FD0, 0x1FD1, 0x1F76, 0x1F77, 0x0000, 0x1FDD, 0x1FDE, 0x1FDF, + 0x1FE0, 0x1FE1, 0x1FE2, 0x1FE3, 0x1FE4, 0x1FE5, 0x1FE6, 0x1FE7, + 0x1FE0, 0x1FE1, 0x1F7A, 0x1F7B, 0x1FE5, 0x1FED, 0x1FEE, 0x1FEF, + 0x0000, 0x0000, 0x1FF2, 0x1FF3, 0x1FF4, 0x0000, 0x1FF6, 0x1FF7, + 0x1F78, 0x1F79, 0x1F7C, 0x1F7D, 0x1FF3, 0x1FFD, 0x1FFE, 0x0000 + }; + + static unsigned short const GreekExt_upper_mapping[] = { + 0x1F08, 0x1F09, 0x1F0A, 0x1F0B, 0x1F0C, 0x1F0D, 0x1F0E, 0x1F0F, + 0x1F08, 0x1F09, 0x1F0A, 0x1F0B, 0x1F0C, 0x1F0D, 0x1F0E, 0x1F0F, + 0x1F18, 0x1F19, 0x1F1A, 0x1F1B, 0x1F1C, 0x1F1D, 0x0000, 0x0000, + 0x1F18, 0x1F19, 0x1F1A, 0x1F1B, 0x1F1C, 0x1F1D, 0x0000, 0x0000, + 0x1F28, 0x1F29, 0x1F2A, 0x1F2B, 0x1F2C, 0x1F2D, 0x1F2E, 0x1F2F, + 0x1F28, 0x1F29, 0x1F2A, 0x1F2B, 0x1F2C, 0x1F2D, 0x1F2E, 0x1F2F, + 0x1F38, 0x1F39, 0x1F3A, 0x1F3B, 0x1F3C, 0x1F3D, 0x1F3E, 0x1F3F, + 0x1F38, 0x1F39, 0x1F3A, 0x1F3B, 0x1F3C, 0x1F3D, 0x1F3E, 0x1F3F, + 0x1F48, 0x1F49, 0x1F4A, 0x1F4B, 0x1F4C, 0x1F4D, 0x0000, 0x0000, + 0x1F48, 0x1F49, 0x1F4A, 0x1F4B, 0x1F4C, 0x1F4D, 0x0000, 0x0000, + 0x1F50, 0x1F59, 0x1F52, 0x1F5B, 0x1F54, 0x1F5D, 0x1F56, 0x1F5F, + 0x0000, 0x1F59, 0x0000, 0x1F5B, 0x0000, 0x1F5D, 0x0000, 0x1F5F, + 0x1F68, 0x1F69, 0x1F6A, 0x1F6B, 0x1F6C, 0x1F6D, 0x1F6E, 0x1F6F, + 0x1F68, 0x1F69, 0x1F6A, 0x1F6B, 0x1F6C, 0x1F6D, 0x1F6E, 0x1F6F, + 0x1FBA, 0x1FBB, 0x1FC8, 0x1FC9, 0x1FCA, 0x1FCB, 0x1FDA, 0x1FDB, + 0x1FF8, 0x1FF9, 0x1FEA, 0x1FEB, 0x1FFA, 0x1FFB, 0x0000, 0x0000, + 0x1F88, 0x1F89, 0x1F8A, 0x1F8B, 0x1F8C, 0x1F8D, 0x1F8E, 0x1F8F, + 0x1F88, 0x1F89, 0x1F8A, 0x1F8B, 0x1F8C, 0x1F8D, 0x1F8E, 0x1F8F, + 0x1F98, 0x1F99, 0x1F9A, 0x1F9B, 0x1F9C, 0x1F9D, 0x1F9E, 0x1F9F, + 0x1F98, 0x1F99, 0x1F9A, 0x1F9B, 0x1F9C, 0x1F9D, 0x1F9E, 0x1F9F, + 0x1FA8, 0x1FA9, 0x1FAA, 0x1FAB, 0x1FAC, 0x1FAD, 0x1FAE, 0x1FAF, + 0x1FA8, 0x1FA9, 0x1FAA, 0x1FAB, 0x1FAC, 0x1FAD, 0x1FAE, 0x1FAF, + 0x1FB8, 0x1FB9, 0x1FB2, 0x1FBC, 0x1FB4, 0x0000, 0x1FB6, 0x1FB7, + 0x1FB8, 0x1FB9, 0x1FBA, 0x1FBB, 0x1FBC, 0x1FBD, 0x0399, 0x1FBF, + 0x1FC0, 0x1FC1, 0x1FC2, 0x1FCC, 0x1FC4, 0x0000, 0x1FC6, 0x1FC7, + 0x1FC8, 0x1FC9, 0x1FCA, 0x1FCB, 0x1FCC, 0x1FCD, 0x1FCE, 0x1FCF, + 0x1FD8, 0x1FD9, 0x1FD2, 0x1FD3, 0x0000, 0x0000, 0x1FD6, 0x1FD7, + 0x1FD8, 0x1FD9, 0x1FDA, 0x1FDB, 0x0000, 0x1FDD, 0x1FDE, 0x1FDF, + 0x1FE8, 0x1FE9, 0x1FE2, 0x1FE3, 0x1FE4, 0x1FEC, 0x1FE6, 0x1FE7, + 0x1FE8, 0x1FE9, 0x1FEA, 0x1FEB, 0x1FEC, 0x1FED, 0x1FEE, 0x1FEF, + 0x0000, 0x0000, 0x1FF2, 0x1FFC, 0x1FF4, 0x0000, 0x1FF6, 0x1FF7, + 0x1FF8, 0x1FF9, 0x1FFA, 0x1FFB, 0x1FFC, 0x1FFD, 0x1FFE, 0x0000 + }; + + *lower = code; + *upper = code; + + /* Basic Latin and Latin-1 Supplement, U+0000 to U+00FF */ + if (code <= 0x00ff) { + if (code >= 0x0041 && code <= 0x005a) + *lower += 0x20; + else if (code >= 0x0061 && code <= 0x007a) + *upper -= 0x20; + else if ( (code >= 0x00c0 && code <= 0x00d6) || + (code >= 0x00d8 && code <= 0x00de) ) + *lower += 0x20; + else if ( (code >= 0x00e0 && code <= 0x00f6) || + (code >= 0x00f8 && code <= 0x00fe) ) + *upper -= 0x20; + else if (code == 0x00ff) + *upper = 0x0178; + else if (code == 0x00b5) + *upper = 0x039c; + } + + /* Latin Extended-A, U+0100 to U+017F */ + if (code >= 0x0100 && code <= 0x017f) { + if ( (code >= 0x0100 && code <= 0x012f) || + (code >= 0x0132 && code <= 0x0137) || + (code >= 0x014a && code <= 0x0177) ) { + *upper = code & ~1; + *lower = code | 1; + } + else if ( (code >= 0x0139 && code <= 0x0148) || + (code >= 0x0179 && code <= 0x017e) ) { + if (code & 1) + *lower += 1; + else + *upper -= 1; + } + else if (code == 0x0130) + *lower = 0x0069; + else if (code == 0x0131) + *upper = 0x0049; + else if (code == 0x0178) + *lower = 0x00ff; + else if (code == 0x017f) + *upper = 0x0053; + } + + /* Latin Extended-B, U+0180 to U+024F */ + if (code >= 0x0180 && code <= 0x024f) { + if (code >= 0x01cd && code <= 0x01dc) { + if (code & 1) + *lower += 1; + else + *upper -= 1; + } + else if ( (code >= 0x01de && code <= 0x01ef) || + (code >= 0x01f4 && code <= 0x01f5) || + (code >= 0x01f8 && code <= 0x021f) || + (code >= 0x0222 && code <= 0x0233) ) { + *lower |= 1; + *upper &= ~1; + } + else if (code >= 0x0180 && code <= 0x01cc) { + *lower = LatinExtB_lower_mapping[code - 0x0180]; + *upper = LatinExtB_upper_mapping[code - 0x0180]; + } + else if (code == 0x01dd) + *upper = 0x018e; + else if (code == 0x01f1 || code == 0x01f2) { + *lower = 0x01f3; + *upper = 0x01f1; + } + else if (code == 0x01f3) + *upper = 0x01f1; + else if (code == 0x01f6) + *lower = 0x0195; + else if (code == 0x01f7) + *lower = 0x01bf; + else if (code == 0x0220) + *lower = 0x019e; + } + + /* IPA Extensions, U+0250 to U+02AF */ + if (code >= 0x0253 && code <= 0x0292) { + *upper = IPAExt_upper_mapping[code - 0x0253]; + } + + /* Combining Diacritical Marks, U+0300 to U+036F */ + if (code == 0x0345) { + *upper = 0x0399; + } + + /* Greek and Coptic, U+0370 to U+03FF */ + if (code >= 0x0370 && code <= 0x03ff) { + *lower = Greek_lower_mapping[code - 0x0370]; + *upper = Greek_upper_mapping[code - 0x0370]; + if (*upper == 0) + *upper = code; + if (*lower == 0) + *lower = code; + } + + /* Cyrillic and Cyrillic Supplementary, U+0400 to U+052F */ + if ( (code >= 0x0400 && code <= 0x04ff) || + (code >= 0x0500 && code <= 0x052f) ) { + if (code >= 0x0400 && code <= 0x040f) + *lower += 0x50; + else if (code >= 0x0410 && code <= 0x042f) + *lower += 0x20; + else if (code >= 0x0430 && code <= 0x044f) + *upper -= 0x20; + else if (code >= 0x0450 && code <= 0x045f) + *upper -= 0x50; + else if ( (code >= 0x0460 && code <= 0x0481) || + (code >= 0x048a && code <= 0x04bf) || + (code >= 0x04d0 && code <= 0x04f5) || + (code >= 0x04f8 && code <= 0x04f9) || + (code >= 0x0500 && code <= 0x050f) ) { + *upper &= ~1; + *lower |= 1; + } + else if (code >= 0x04c1 && code <= 0x04ce) { + if (code & 1) + *lower += 1; + else + *upper -= 1; + } + } + + /* Armenian, U+0530 to U+058F */ + if (code >= 0x0530 && code <= 0x058f) { + if (code >= 0x0531 && code <= 0x0556) + *lower += 0x30; + else if (code >=0x0561 && code <= 0x0586) + *upper -= 0x30; + } + + /* Latin Extended Additional, U+1E00 to U+1EFF */ + if (code >= 0x1e00 && code <= 0x1eff) { + if ( (code >= 0x1e00 && code <= 0x1e95) || + (code >= 0x1ea0 && code <= 0x1ef9) ) { + *upper &= ~1; + *lower |= 1; + } + else if (code == 0x1e9b) + *upper = 0x1e60; + } + + /* Greek Extended, U+1F00 to U+1FFF */ + if (code >= 0x1f00 && code <= 0x1fff) { + *lower = GreekExt_lower_mapping[code - 0x1f00]; + *upper = GreekExt_upper_mapping[code - 0x1f00]; + if (*upper == 0) + *upper = code; + if (*lower == 0) + *lower = code; + } + + /* Letterlike Symbols, U+2100 to U+214F */ + if (code >= 0x2100 && code <= 0x214f) { + switch (code) { + case 0x2126: *lower = 0x03c9; break; + case 0x212a: *lower = 0x006b; break; + case 0x212b: *lower = 0x00e5; break; + } + } + /* Number Forms, U+2150 to U+218F */ + else if (code >= 0x2160 && code <= 0x216f) + *lower += 0x10; + else if (code >= 0x2170 && code <= 0x217f) + *upper -= 0x10; + /* Enclosed Alphanumerics, U+2460 to U+24FF */ + else if (code >= 0x24b6 && code <= 0x24cf) + *lower += 0x1a; + else if (code >= 0x24d0 && code <= 0x24e9) + *upper -= 0x1a; + /* Halfwidth and Fullwidth Forms, U+FF00 to U+FFEF */ + else if (code >= 0xff21 && code <= 0xff3a) + *lower += 0x20; + else if (code >= 0xff41 && code <= 0xff5a) + *upper -= 0x20; + /* Deseret, U+10400 to U+104FF */ + else if (code >= 0x10400 && code <= 0x10427) + *lower += 0x28; + else if (code >= 0x10428 && code <= 0x1044f) + *upper -= 0x28; +} + void XConvertCase(sym, lower, upper) register KeySym sym; KeySym *lower; KeySym *upper; { + /* Unicode keysym */ + if ((sym & 0xff000000) == 0x01000000) { + UCSConvertCase((sym & 0x00ffffff), lower, upper); + *upper |= 0x01000000; + *lower |= 0x01000000; + return; + } + *lower = sym; *upper = sym; + switch(sym >> 8) { case 0: /* Latin 1 */ if ((sym >= XK_A) && (sym <= XK_Z)) @@ -317,6 +669,8 @@ XConvertCase(sym, lower, upper) *lower += (XK_oslash - XK_Ooblique); else if ((sym >= XK_oslash) && (sym <= XK_thorn)) *upper -= (XK_oslash - XK_Ooblique); + else if (sym == XK_ydiaeresis) + *upper = XK_Ydiaeresis; /* actually a Latin 9 character */ break; case 1: /* Latin 2 */ /* Assume the KeySym is a legal value (ignore discontinuities) */ @@ -396,30 +750,119 @@ XConvertCase(sym, lower, upper) sym != XK_Greek_finalsmallsigma) *upper -= (XK_Greek_alpha - XK_Greek_ALPHA); break; + case 0x12: /* Latin 8 */ + /* No neat pattern to the values */ + switch (sym) { + case XK_Babovedot: + *lower = XK_babovedot; break; + case XK_babovedot: + *upper = XK_Babovedot; break; + case XK_Dabovedot: + *lower = XK_dabovedot; break; + case XK_Wgrave: + *lower = XK_wgrave; break; + case XK_Wacute: + *lower = XK_wacute; break; + case XK_dabovedot: + *upper = XK_Dabovedot; break; + case XK_Ygrave: + *lower = XK_ygrave; break; + case XK_Fabovedot: + *lower = XK_fabovedot; break; + case XK_fabovedot: + *upper = XK_Fabovedot; break; + case XK_Mabovedot: + *lower = XK_mabovedot; break; + case XK_mabovedot: + *upper = XK_Mabovedot; break; + case XK_Pabovedot: + *lower = XK_pabovedot; break; + case XK_wgrave: + *upper = XK_Wgrave; break; + case XK_pabovedot: + *upper = XK_Pabovedot; break; + case XK_wacute: + *upper = XK_Wacute; break; + case XK_Sabovedot: + *lower = XK_sabovedot; break; + case XK_ygrave: + *upper = XK_Ygrave; break; + case XK_Wdiaeresis: + *lower = XK_wdiaeresis; break; + case XK_wdiaeresis: + *upper = XK_Wdiaeresis; break; + case XK_sabovedot: + *upper = XK_Sabovedot; break; + case XK_Wcircumflex: + *lower = XK_wcircumflex; break; + case XK_Tabovedot: + *lower = XK_tabovedot; break; + case XK_Ycircumflex: + *lower = XK_ycircumflex; break; + case XK_wcircumflex: + *upper = XK_Wcircumflex; break; + case XK_tabovedot: + *upper = XK_Tabovedot; break; + case XK_ycircumflex: + *upper = XK_Ycircumflex; break; + } + break; + case 0x13: /* Latin 9 */ + if (sym == XK_OE) + *lower = XK_oe; + else if (sym == XK_oe) + *upper = XK_OE; + else if (sym == XK_Ydiaeresis) + *lower = XK_ydiaeresis; + break; case 0x14: /* Armenian */ if (sym >= XK_Armenian_AYB && sym <= XK_Armenian_fe) { *lower = sym | 1; *upper = sym & ~1; } break; + case 0x16: /* Caucasus, Inupiak, Guarani */ + if (sym == XK_ocaron || sym == XK_Ocaron) { + *upper = XK_Ocaron; + *lower = XK_ocaron; + } + else if (sym >= XK_Ccedillaabovedot && sym <= XK_Obarred) + *lower += (XK_ccedillaabovedot - XK_Ccedillaabovedot); + else if (sym >= XK_ccedillaabovedot && sym <= XK_obarred) + *upper -= (XK_ccedillaabovedot - XK_Ccedillaabovedot); + else if (sym == XK_schwa || sym == XK_SCHWA) { + *lower = XK_schwa; + *upper = XK_SCHWA; + } + else if (sym == XK_lbelowdot || sym == XK_Lbelowdot) { + *lower = XK_lbelowdot; + *upper = XK_Lbelowdot; + } + else if (sym == XK_lstrokebelowdot || sym == XK_Lstrokebelowdot) { + *lower = XK_lstrokebelowdot; + *upper = XK_Lstrokebelowdot; + } + else if (sym == XK_gtilde || sym == XK_Gtilde) { + *lower = XK_gtilde; + *upper = XK_Gtilde; + } + break; + case 0x1e: /* Vietnamese */ + if ((sym >= XK_Abelowdot && sym <= XK_uhornbelowdot) || + (sym >= XK_Ybelowdot && sym <= XK_uhorn)) { + *lower = sym | 1; + *upper = sym & ~1; + } + break; } } int -#if NeedFunctionPrototypes _XTranslateKey( register Display *dpy, KeyCode keycode, register unsigned int modifiers, unsigned int *modifiers_return, KeySym *keysym_return) -#else -_XTranslateKey(dpy, keycode, modifiers, modifiers_return, keysym_return) - register Display *dpy; - KeyCode keycode; - register unsigned int modifiers; - unsigned int *modifiers_return; - KeySym *keysym_return; -#endif { int per; register KeySym *syms; @@ -624,8 +1067,8 @@ XLookupString (event, buffer, nbytes, keysym, status) } static void -_XFreeKeyBindings (dpy) - Display *dpy; +_XFreeKeyBindings( + Display *dpy) { register struct _XKeytrans *p, *np; @@ -638,7 +1081,6 @@ _XFreeKeyBindings (dpy) } int -#if NeedFunctionPrototypes XRebindKeysym ( Display *dpy, KeySym keysym, @@ -646,15 +1088,6 @@ XRebindKeysym ( int nm, /* number of modifiers in mlist */ _Xconst unsigned char *str, int nbytes) -#else -XRebindKeysym (dpy, keysym, mlist, nm, str, nbytes) - Display *dpy; - KeySym keysym; - KeySym *mlist; - int nm; /* number of modifiers in mlist */ - unsigned char *str; - int nbytes; -#endif { register struct _XKeytrans *tmp, *p; int nb; @@ -693,9 +1126,9 @@ XRebindKeysym (dpy, keysym, mlist, nm, str, nbytes) } unsigned -_XKeysymToModifiers(dpy,ks) - Display *dpy; - KeySym ks; +_XKeysymToModifiers( + Display *dpy, + KeySym ks) { CARD8 code,mods; register KeySym *kmax; @@ -732,9 +1165,9 @@ _XKeysymToModifiers(dpy,ks) * can't map some keysym to a modifier. */ static void -ComputeMaskFromKeytrans(dpy, p) - Display *dpy; - register struct _XKeytrans *p; +ComputeMaskFromKeytrans( + Display *dpy, + register struct _XKeytrans *p) { register int i; diff --git a/src/KeysymStr.c b/src/KeysymStr.c index 5a2faf5..0a6a3f2 100644 --- a/src/KeysymStr.c +++ b/src/KeysymStr.c @@ -25,7 +25,7 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/KeysymStr.c,v 3.8 2001/12/14 19:54:02 dawes Exp $ */ +/* $XFree86: xc/lib/X11/KeysymStr.c,v 3.10 2003/11/17 22:20:07 dawes Exp $ */ #include "Xlibint.h" #include <X11/Xresource.h> @@ -37,9 +37,7 @@ typedef unsigned long Signature; #define NEEDVTABLE #include "ks_tables.h" - -extern XrmDatabase _XInitKeysymDB(); -extern const unsigned char _XkeyTable[]; +#include "Key.h" typedef struct _GRNData { @@ -48,9 +46,9 @@ typedef struct _GRNData { XrmValuePtr value; } GRNData; -#if NeedFunctionPrototypes /*ARGSUSED*/ -static Bool SameValue( +static Bool +SameValue( XrmDatabase* db, XrmBindingList bindings, XrmQuarkList quarks, @@ -58,15 +56,6 @@ static Bool SameValue( XrmValuePtr value, XPointer data ) -#else -static Bool SameValue(db, bindings, quarks, type, value, data) - XrmDatabase *db; - XrmBindingList bindings; - XrmQuarkList quarks; - XrmRepresentation *type; - XrmValuePtr value; - XPointer data; -#endif { GRNData *gd = (GRNData *)data; diff --git a/src/LoadFont.c b/src/LoadFont.c index 270ba32..0e6dba2 100644 --- a/src/LoadFont.c +++ b/src/LoadFont.c @@ -24,19 +24,14 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/LoadFont.c,v 1.4 2001/12/14 19:54:02 dawes Exp $ */ +/* $XFree86: xc/lib/X11/LoadFont.c,v 1.5 2003/11/17 22:20:07 dawes Exp $ */ #include "Xlibint.h" -#if NeedFunctionPrototypes -Font XLoadFont ( +Font +XLoadFont ( register Display *dpy, _Xconst char *name) -#else -Font XLoadFont (dpy, name) - register Display *dpy; - char *name; -#endif { register long nbytes; Font fid; diff --git a/src/LockDis.c b/src/LockDis.c index 9176679..7912a94 100644 --- a/src/LockDis.c +++ b/src/LockDis.c @@ -25,6 +25,7 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/lib/X11/LockDis.c,v 1.3 2003/11/17 22:20:08 dawes Exp $ */ /* * Author: Stephen Gildea, MIT X Consortium @@ -37,13 +38,9 @@ in this Software without prior written authorization from The Open Group. #include "locking.h" #endif -#if NeedFunctionPrototypes -void XLockDisplay( +void +XLockDisplay( register Display* dpy) -#else -void XLockDisplay(dpy) - register Display* dpy; -#endif { #ifdef XTHREADS LockDisplay(dpy); @@ -73,13 +70,9 @@ void XLockDisplay(dpy) #endif } -#if NeedFunctionPrototypes -void XUnlockDisplay( +void +XUnlockDisplay( register Display* dpy) -#else -void XUnlockDisplay(dpy) - register Display* dpy; -#endif { #ifdef XTHREADS LockDisplay(dpy); diff --git a/src/LookupCol.c b/src/LookupCol.c index 495ed7b..14ad14d 100644 --- a/src/LookupCol.c +++ b/src/LookupCol.c @@ -24,32 +24,21 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/LookupCol.c,v 1.5 2002/12/04 23:18:32 paulo Exp $ */ +/* $XFree86: xc/lib/X11/LookupCol.c,v 1.7 2003/11/17 22:20:08 dawes Exp $ */ #define NEED_REPLIES #include <stdio.h> #include "Xlibint.h" #include "Xcmsint.h" -extern Status _XcmsResolveColorString(); -extern void _XcmsRGB_to_XColor(); -extern void _XUnresolveColor(); - -#if NeedFunctionPrototypes -Status XLookupColor ( +Status +XLookupColor ( register Display *dpy, Colormap cmap, _Xconst char *spec, XColor *def, XColor *scr) -#else -Status XLookupColor (dpy, cmap, spec, def, scr) - register Display *dpy; - Colormap cmap; - char *spec; - XColor *def, *scr; -#endif { register int n; xLookupColorReply reply; diff --git a/src/Macros.c b/src/Macros.c index 779431f..0350963 100644 --- a/src/Macros.c +++ b/src/Macros.c @@ -24,9 +24,12 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/Macros.c,v 1.4 2001/12/14 19:54:02 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Macros.c,v 1.5 2003/04/13 19:22:17 dawes Exp $ */ #include "Xlibint.h" +#define XUTIL_DEFINE_FUNCTIONS +#include "Xutil.h" + /* * This file makes full definitions of routines for each macro. * We do not expect C programs to use these, but other languages may @@ -200,39 +203,39 @@ int XScreenNumberOfScreen (scr) */ #undef XDestroyImage int -XDestroyImage(ximage) - XImage *ximage; +XDestroyImage( + XImage *ximage) { return((*((ximage)->f.destroy_image))((ximage))); } #undef XGetPixel -unsigned long XGetPixel(ximage, x, y) - XImage *ximage; - int x, y; +unsigned long XGetPixel( + XImage *ximage, + int x, int y) { return ((*((ximage)->f.get_pixel))((ximage), (x), (y))); } #undef XPutPixel -int XPutPixel(ximage, x, y, pixel) - XImage *ximage; - int x, y; - unsigned long pixel; +int XPutPixel( + XImage *ximage, + int x, int y, + unsigned long pixel) { return((*((ximage)->f.put_pixel))((ximage), (x), (y), (pixel))); } #undef XSubImage -XImage *XSubImage(ximage, x, y, width, height) - XImage *ximage; - int x, y; - unsigned int width, height; +XImage *XSubImage( + XImage *ximage, + int x, int y, + unsigned int width, unsigned int height) { return((*((ximage)->f.sub_image))((ximage), (x), (y), (width), (height))); } #undef XAddPixel -int XAddPixel(ximage, value) - XImage *ximage; - long value; +int XAddPixel( + XImage *ximage, + long value) { return((*((ximage)->f.add_pixel))((ximage), (value))); } diff --git a/src/ModMap.c b/src/ModMap.c index c355ef3..49e599d 100644 --- a/src/ModMap.c +++ b/src/ModMap.c @@ -24,7 +24,7 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/ModMap.c,v 1.4 2001/12/14 19:54:03 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ModMap.c,v 1.5 2003/11/17 22:20:08 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" @@ -121,7 +121,6 @@ XFreeModifiermap(map) return 1; } -#if NeedFunctionPrototypes XModifierKeymap * XInsertModifiermapEntry(XModifierKeymap *map, #if NeedWidePrototypes @@ -130,13 +129,6 @@ XInsertModifiermapEntry(XModifierKeymap *map, KeyCode keycode, #endif int modifier) -#else -XModifierKeymap * -XInsertModifiermapEntry(map, keycode, modifier) - XModifierKeymap *map; - KeyCode keycode; - int modifier; -#endif { XModifierKeymap *newmap; int i, @@ -171,7 +163,6 @@ XInsertModifiermapEntry(map, keycode, modifier) return(newmap); } -#if NeedFunctionPrototypes XModifierKeymap * XDeleteModifiermapEntry(XModifierKeymap *map, #if NeedWidePrototypes @@ -180,13 +171,6 @@ XDeleteModifiermapEntry(XModifierKeymap *map, KeyCode keycode, #endif int modifier) -#else -XModifierKeymap * -XDeleteModifiermapEntry(map, keycode, modifier) - XModifierKeymap *map; - KeyCode keycode; - int modifier; -#endif { int i, row = modifier * map->max_keypermod; diff --git a/src/OMWrap.c b/src/OMWrap.c index 7a5de02..dcb09b9 100644 --- a/src/OMWrap.c +++ b/src/OMWrap.c @@ -23,22 +23,14 @@ * Author: Katsuhisa Yano TOSHIBA Corp. * mopi@osa.ilab.toshiba.co.jp */ -/* $XFree86: xc/lib/X11/OMWrap.c,v 1.4 2001/07/25 15:04:44 dawes Exp $ */ +/* $XFree86: xc/lib/X11/OMWrap.c,v 1.5 2003/11/17 22:20:08 dawes Exp $ */ #include "Xlibint.h" #include "Xlcint.h" XOM -#if NeedFunctionPrototypes XOpenOM(Display *dpy, XrmDatabase rdb, _Xconst char *res_name, _Xconst char *res_class) -#else -XOpenOM(dpy, rdb, res_name, res_class) - Display *dpy; - XrmDatabase rdb; - char *res_name; - char *res_class; -#endif { XLCd lcd = _XOpenLC((char *) NULL); diff --git a/src/OpenDis.c b/src/OpenDis.c index 9e9bd86..dc98f23 100644 --- a/src/OpenDis.c +++ b/src/OpenDis.c @@ -24,13 +24,14 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/OpenDis.c,v 3.12 2001/12/14 19:54:03 dawes Exp $ */ +/* $XFree86: xc/lib/X11/OpenDis.c,v 3.17 2003/11/17 22:20:08 dawes Exp $ */ #define NEED_REPLIES #define NEED_EVENTS #include "Xlibint.h" #include <X11/Xtrans.h> #include <X11/Xatom.h> +#include <X11/Xresource.h> #include "bigreqstr.h" #include <stdio.h> #include "Xintconn.h" @@ -80,13 +81,9 @@ static Bool _XBigReqHandler(Display *dpy, xReply *rep, char *buf, int len, * Connects to a server, creates a Display object and returns a pointer to * the newly created Display back to the caller. */ -#if NeedFunctionPrototypes -Display *XOpenDisplay ( +Display * +XOpenDisplay ( register _Xconst char *display) -#else -Display *XOpenDisplay (display) - register char *display; -#endif { register Display *dpy; /* New Display object being created. */ register int i; @@ -111,9 +108,12 @@ Display *XOpenDisplay (display) xVisualType *vp; } u; /* proto data returned from server */ long setuplength; /* number of bytes in setup message */ + long usedbytes = 0; /* number of bytes we have processed */ char *conn_auth_name, *conn_auth_data; int conn_auth_namelen, conn_auth_datalen; unsigned long mask; + long int conn_buf_size; + char *xlib_buffer_size; bzero((char *) &client, sizeof(client)); bzero((char *) &prefix, sizeof(prefix)); @@ -247,11 +247,24 @@ Display *XOpenDisplay (display) } /* Set up the output buffers. */ - if ((dpy->bufptr = dpy->buffer = Xcalloc(1, BUFSIZE)) == NULL) { - OutOfMemory (dpy, setup); - return(NULL); - } - dpy->bufmax = dpy->buffer + BUFSIZE; +#ifndef XLIBDEFAULTBUFSIZE +#define XLIBDEFAULTBUFSIZE 16384 /* 16k */ +#endif +#ifndef XLIBMINBUFSIZE +#define XLIBMINBUFSIZE BUFSIZE /* old default buffer size */ +#endif + if ((xlib_buffer_size = getenv("XLIBBUFFERSIZE")) == NULL) + conn_buf_size = XLIBDEFAULTBUFSIZE; + else + conn_buf_size = 1024 * strtol(xlib_buffer_size, NULL, 10); + if (conn_buf_size < XLIBMINBUFSIZE) + conn_buf_size = XLIBMINBUFSIZE; + + if ((dpy->bufptr = dpy->buffer = Xcalloc(1, conn_buf_size)) == NULL) { + OutOfMemory (dpy, setup); + return(NULL); + } + dpy->bufmax = dpy->buffer + conn_buf_size; /* Set up the input event queue and input event queue parameters. */ dpy->head = dpy->tail = NULL; @@ -328,6 +341,7 @@ Display *XOpenDisplay (display) return(NULL); } _XRead (dpy, (char *)u.setup, setuplength); + /* * If the connection was not accepted by the server due to problems, * give error message to the user.... @@ -337,14 +351,30 @@ Display *XOpenDisplay (display) fprintf (stderr, "Xlib: connection to \"%s\" refused by server\r\nXlib: ", fullname); - (void) fwrite (u.failure, (Size_t)sizeof(char), + + if (prefix.lengthReason > setuplength) { + fprintf (stderr, "Xlib: Broken initial reply: length of reason > length of packet\r\n"); + }else{ + (void) fwrite (u.failure, (Size_t)sizeof(char), (Size_t)prefix.lengthReason, stderr); - (void) fwrite ("\r\n", sizeof(char), 2, stderr); + (void) fwrite ("\r\n", sizeof(char), 2, stderr); + } + OutOfMemory(dpy, setup); return (NULL); } /* + * Check if the reply was long enough to get any information out of it. + */ + usedbytes = sz_xConnSetup; + if (setuplength < usedbytes ) { + fprintf (stderr, "Xlib: Broken initial reply: Too short (%ld)\n", setuplength); + OutOfMemory(dpy, setup); + return (NULL); + } + +/* * We succeeded at authorization, so let us move the data into * the display structure. */ @@ -387,23 +417,30 @@ Display *XOpenDisplay (display) OutOfMemory(dpy, setup); return (NULL); } + dpy->vendor = (char *) Xmalloc((unsigned) (u.setup->nbytesVendor + 1)); if (dpy->vendor == NULL) { OutOfMemory(dpy, setup); return (NULL); } vendorlen = u.setup->nbytesVendor; - u.setup = (xConnSetup *) (((char *) u.setup) + sz_xConnSetup); - (void) strncpy(dpy->vendor, u.vendor, vendorlen); - dpy->vendor[vendorlen] = '\0'; - vendorlen = (vendorlen + 3) & ~3; /* round up */ + /* * validate setup length */ - if ((int) setuplength - sz_xConnSetup - vendorlen < 0) { + usedbytes += (vendorlen + 3) & ~3; + if (setuplength < usedbytes) { + fprintf (stderr, "Xlib: Broken initial reply: Too short (%ld)\n", setuplength); OutOfMemory(dpy, setup); return (NULL); } + + u.setup = (xConnSetup *) (((char *) u.setup) + sz_xConnSetup); + (void) strncpy(dpy->vendor, u.vendor, vendorlen); + dpy->vendor[vendorlen] = '\0'; + vendorlen = (vendorlen + 3) & ~3; /* round up */ + + memmove (setup, u.vendor + vendorlen, (int) setuplength - sz_xConnSetup - vendorlen); u.vendor = setup; @@ -420,6 +457,14 @@ Display *XOpenDisplay (display) /* * First decode the Z axis Screen format information. */ + usedbytes += dpy->nformats * sz_xPixmapFormat; + + if (setuplength < usedbytes) { + fprintf (stderr, "Xlib: Broken initial reply: Too short (%ld)\n", setuplength); + OutOfMemory (dpy, setup); + return(NULL); + } + for (i = 0; i < dpy->nformats; i++) { register ScreenFormat *fmt = &dpy->pixmap_format[i]; fmt->depth = u.sf->depth; @@ -438,12 +483,22 @@ Display *XOpenDisplay (display) OutOfMemory (dpy, setup); return(NULL); } + /* * Now go deal with each screen structure. */ for (i = 0; i < dpy->nscreens; i++) { register Screen *sp = &dpy->screens[i]; - VisualID root_visualID = u.rp->rootVisualID; + VisualID root_visualID; + + usedbytes += sz_xWindowRoot; + if (setuplength < usedbytes) { + fprintf (stderr, "Xlib: Broken initial reply: Too short (%ld)\n", setuplength); + OutOfMemory (dpy, setup); + return(NULL); + } + + root_visualID = u.rp->rootVisualID; sp->display = dpy; sp->root = u.rp->windowId; sp->cmap = u.rp->defaultColormap; @@ -476,6 +531,14 @@ Display *XOpenDisplay (display) */ for (j = 0; j < sp->ndepths; j++) { Depth *dp = &sp->depths[j]; + + usedbytes += sz_xDepth; + if (setuplength < usedbytes) { + fprintf (stderr, "Xlib: Broken initial reply: Too short (%ld)\n", setuplength); + OutOfMemory (dpy, setup); + return(NULL); + } + dp->depth = u.dp->depth; dp->nvisuals = u.dp->nVisuals; u.dp = (xDepth *) (((char *) u.dp) + sz_xDepth); @@ -488,6 +551,14 @@ Display *XOpenDisplay (display) } for (k = 0; k < dp->nvisuals; k++) { register Visual *vp = &dp->visuals[k]; + + usedbytes += sz_xVisualType; + if (setuplength < usedbytes) { + fprintf (stderr, "Xlib: Broken initial reply: Too short (%ld)\n", setuplength); + OutOfMemory (dpy, setup); + return(NULL); + } + vp->visualid = u.vp->visualID; vp->class = u.vp->class; vp->bits_per_rgb= u.vp->bitsPerRGB; @@ -505,7 +576,15 @@ Display *XOpenDisplay (display) } sp->root_visual = _XVIDtoVisual(dpy, root_visualID); } - + + if(usedbytes != setuplength){ + /* Sanity check, shouldn't happen. */ + fprintf(stderr, "Xlib: Did not parse entire setup message: " + "parsed: %ld, message: %ld\n", + usedbytes, setuplength); + OutOfMemory(dpy, setup); + return(NULL); + } /* * Now start talking to the server to setup all other information... @@ -682,6 +761,9 @@ void _XFreeDisplayStructure(dpy) if (dpy->xkb_info) (*dpy->free_funcs->xkb)(dpy); + if (dpy->db) + XrmDestroyDatabase(dpy->db); + if (dpy->screens) { register int i; diff --git a/src/ParseCmd.c b/src/ParseCmd.c index 61e702d..121b8d0 100644 --- a/src/ParseCmd.c +++ b/src/ParseCmd.c @@ -46,7 +46,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/X11/ParseCmd.c,v 1.5 2001/12/14 19:54:03 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ParseCmd.c,v 1.6 2003/11/17 22:20:08 dawes Exp $ */ /* XrmParseCommand() @@ -69,23 +69,14 @@ static void _XReportParseError(XrmOptionDescRec *arg, char *msg) exit(1); } -#if NeedFunctionPrototypes -void XrmParseCommand( +void +XrmParseCommand( XrmDatabase *pdb, /* data base */ register XrmOptionDescList options, /* pointer to table of valid options */ int num_options, /* number of options */ _Xconst char *prefix, /* name to prefix resources with */ int *argc, /* address of argument count */ char **argv) /* argument list (command line) */ -#else -void XrmParseCommand(pdb, options, num_options, prefix, argc, argv) - XrmDatabase *pdb; /* data base */ - register XrmOptionDescList options; /* pointer to table of valid options */ - int num_options; /* number of options */ - char *prefix; /* name to prefix resources with */ - int *argc; /* address of argument count */ - char **argv; /* argument list (command line) */ -#endif { int foundOption; char **argsave; diff --git a/src/ParseCol.c b/src/ParseCol.c index f66ebb8..af699ec 100644 --- a/src/ParseCol.c +++ b/src/ParseCol.c @@ -24,29 +24,20 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/ParseCol.c,v 1.5 2002/12/04 23:18:32 paulo Exp $ */ +/* $XFree86: xc/lib/X11/ParseCol.c,v 1.7 2003/11/17 22:20:08 dawes Exp $ */ #define NEED_REPLIES #include <stdio.h> #include "Xlibint.h" #include "Xcmsint.h" -extern void _XcmsRGB_to_XColor(); -extern Status _XcmsResolveColorString(); -#if NeedFunctionPrototypes -Status XParseColor ( +Status +XParseColor ( register Display *dpy, Colormap cmap, _Xconst char *spec, XColor *def) -#else -Status XParseColor (dpy, cmap, spec, def) - register Display *dpy; - Colormap cmap; - char *spec; - XColor *def; -#endif { register int n, i; int r, g, b; diff --git a/src/ParseGeom.c b/src/ParseGeom.c index 5913c8a..a08a15d 100644 --- a/src/ParseGeom.c +++ b/src/ParseGeom.c @@ -27,7 +27,7 @@ other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/ParseGeom.c,v 1.3 2001/12/14 19:54:03 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ParseGeom.c,v 1.4 2003/11/17 22:20:08 dawes Exp $ */ #include "Xlibint.h" #include "Xutil.h" @@ -86,19 +86,13 @@ ReadInteger(char *string, char **NextString) return (-Result); } -#if NeedFunctionPrototypes -int XParseGeometry ( +int +XParseGeometry ( _Xconst char *string, int *x, int *y, unsigned int *width, /* RETURN */ unsigned int *height) /* RETURN */ -#else -int XParseGeometry (string, x, y, width, height) -char *string; -int *x, *y; -unsigned int *width, *height; /* RETURN */ -#endif { int mask = NoValue; register char *strind; diff --git a/src/PeekIfEv.c b/src/PeekIfEv.c index cb57c93..48a1f89 100644 --- a/src/PeekIfEv.c +++ b/src/PeekIfEv.c @@ -24,7 +24,7 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/PeekIfEv.c,v 1.4 2001/12/14 19:54:03 dawes Exp $ */ +/* $XFree86: xc/lib/X11/PeekIfEv.c,v 1.5 2003/11/17 22:20:08 dawes Exp $ */ #define NEED_EVENTS #include "Xlibint.h" @@ -40,11 +40,9 @@ XPeekIfEvent (dpy, event, predicate, arg) register Display *dpy; register XEvent *event; Bool (*predicate)( -#if NeedNestedPrototypes Display* /* display */, XEvent* /* event */, char* /* arg */ -#endif ); char *arg; { diff --git a/src/PolyReg.c b/src/PolyReg.c index 17fced5..3e196cc 100644 --- a/src/PolyReg.c +++ b/src/PolyReg.c @@ -45,7 +45,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ************************************************************************/ -/* $XFree86: xc/lib/X11/PolyReg.c,v 1.6 2001/12/14 19:54:03 dawes Exp $ */ +/* $XFree86: xc/lib/X11/PolyReg.c,v 1.7 2003/04/13 19:22:17 dawes Exp $ */ #define LARGE_COORDINATE 1000000 #define SMALL_COORDINATE -LARGE_COORDINATE @@ -65,12 +65,12 @@ SOFTWARE. * */ static void -InsertEdgeInET(ET, ETE, scanline, SLLBlock, iSLLBlock) - EdgeTable *ET; - EdgeTableEntry *ETE; - int scanline; - ScanLineListBlock **SLLBlock; - int *iSLLBlock; +InsertEdgeInET( + EdgeTable *ET, + EdgeTableEntry *ETE, + int scanline, + ScanLineListBlock **SLLBlock, + int *iSLLBlock) { register EdgeTableEntry *start, *prev; register ScanLineList *pSLL, *pPrevSLL; @@ -153,13 +153,13 @@ InsertEdgeInET(ET, ETE, scanline, SLLBlock, iSLLBlock) */ static void -CreateETandAET(count, pts, ET, AET, pETEs, pSLLBlock) - register int count; - register XPoint *pts; - EdgeTable *ET; - EdgeTableEntry *AET; - register EdgeTableEntry *pETEs; - ScanLineListBlock *pSLLBlock; +CreateETandAET( + register int count, + register XPoint *pts, + EdgeTable *ET, + EdgeTableEntry *AET, + register EdgeTableEntry *pETEs, + ScanLineListBlock *pSLLBlock) { register XPoint *top, *bottom; register XPoint *PrevPt, *CurrPt; @@ -245,8 +245,9 @@ CreateETandAET(count, pts, ET, AET, pETEs, pSLLBlock) */ static void -loadAET(AET, ETEs) - register EdgeTableEntry *AET, *ETEs; +loadAET( + register EdgeTableEntry *AET, + register EdgeTableEntry *ETEs) { register EdgeTableEntry *pPrevAET; register EdgeTableEntry *tmp; @@ -293,8 +294,8 @@ loadAET(AET, ETEs) * */ static void -computeWAET(AET) - register EdgeTableEntry *AET; +computeWAET( + register EdgeTableEntry *AET) { register EdgeTableEntry *pWETE; register int inside = 1; @@ -332,8 +333,8 @@ computeWAET(AET) */ static int -InsertionSort(AET) - register EdgeTableEntry *AET; +InsertionSort( + register EdgeTableEntry *AET) { register EdgeTableEntry *pETEchase; register EdgeTableEntry *pETEinsert; @@ -369,8 +370,8 @@ InsertionSort(AET) * Clean up our act. */ static void -FreeStorage(pSLLBlock) - register ScanLineListBlock *pSLLBlock; +FreeStorage( + register ScanLineListBlock *pSLLBlock) { register ScanLineListBlock *tmpSLLBlock; @@ -390,10 +391,11 @@ FreeStorage(pSLLBlock) * stack by the calling procedure. * */ -static int PtsToRegion(numFullPtBlocks, iCurPtBlock, FirstPtBlock, reg) - register int numFullPtBlocks, iCurPtBlock; - POINTBLOCK *FirstPtBlock; - REGION *reg; +static int PtsToRegion( + register int numFullPtBlocks, + register int iCurPtBlock, + POINTBLOCK *FirstPtBlock, + REGION *reg) { register BOX *rects; register XPoint *pts; diff --git a/src/PutImage.c b/src/PutImage.c index 3ae375d..660501f 100644 --- a/src/PutImage.c +++ b/src/PutImage.c @@ -24,11 +24,13 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/PutImage.c,v 3.11 2002/12/09 04:10:56 tsi Exp $ */ +/* $XFree86: xc/lib/X11/PutImage.c,v 3.12 2003/04/13 19:22:17 dawes Exp $ */ #include "Xlibint.h" #include "Xutil.h" #include <stdio.h> +#include "Cr.h" +#include "ImUtil.h" #if defined(__STDC__) && ((defined(sun) && defined(SVR4)) || defined(WIN32)) #define RConst /**/ @@ -114,9 +116,9 @@ static unsigned char const _reverse_nibs[0x100] = { }; int -_XReverse_Bytes (bpt, nb) - register unsigned char *bpt; - register int nb; +_XReverse_Bytes( + register unsigned char *bpt, + register int nb) { do { *bpt = _reverse_byte[*bpt]; @@ -133,11 +135,14 @@ _XReverse_Bytes (bpt, nb) /*ARGSUSED*/ static void -NoSwap (src, dest, srclen, srcinc, destinc, height, half_order) - register unsigned char *src, *dest; - long srclen, srcinc, destinc; - unsigned int height; - int half_order; +NoSwap ( + register unsigned char *src, + register unsigned char *dest, + long srclen, + long srcinc, + long destinc, + unsigned int height, + int half_order) { long h = height; @@ -149,11 +154,12 @@ NoSwap (src, dest, srclen, srcinc, destinc, height, half_order) } static void -SwapTwoBytes (src, dest, srclen, srcinc, destinc, height, half_order) - register unsigned char *src, *dest; - long srclen, srcinc, destinc; - unsigned int height; - int half_order; +SwapTwoBytes ( + register unsigned char *src, + register unsigned char *dest, + long srclen, long srcinc, long destinc, + unsigned int height, + int half_order) { long length = ROUNDUP(srclen, 2); register long h, n; @@ -176,11 +182,12 @@ SwapTwoBytes (src, dest, srclen, srcinc, destinc, height, half_order) } static void -SwapThreeBytes (src, dest, srclen, srcinc, destinc, height, byte_order) - register unsigned char *src, *dest; - long srclen, srcinc, destinc; - unsigned int height; - int byte_order; +SwapThreeBytes ( + register unsigned char *src, + register unsigned char *dest, + long srclen, long srcinc, long destinc, + unsigned int height, + int byte_order) { long length = ((srclen + 2) / 3) * 3; register long h, n; @@ -206,11 +213,12 @@ SwapThreeBytes (src, dest, srclen, srcinc, destinc, height, byte_order) } static void -SwapFourBytes (src, dest, srclen, srcinc, destinc, height, half_order) - register unsigned char *src, *dest; - long srclen, srcinc, destinc; - unsigned int height; - int half_order; +SwapFourBytes ( + register unsigned char *src, + register unsigned char *dest, + long srclen, long srcinc, long destinc, + unsigned int height, + int half_order) { long length = ROUNDUP(srclen, 4); register long h, n; @@ -241,11 +249,12 @@ SwapFourBytes (src, dest, srclen, srcinc, destinc, height, half_order) } static void -SwapWords (src, dest, srclen, srcinc, destinc, height, half_order) - register unsigned char *src, *dest; - long srclen, srcinc, destinc; - unsigned int height; - int half_order; +SwapWords ( + register unsigned char *src, + register unsigned char *dest, + long srclen, long srcinc, long destinc, + unsigned int height, + int half_order) { long length = ROUNDUP(srclen, 4); register long h, n; @@ -276,10 +285,11 @@ SwapWords (src, dest, srclen, srcinc, destinc, height, half_order) } static void -SwapNibbles (src, dest, srclen, srcinc, destinc, height) - register unsigned char *src, *dest; - long srclen, srcinc, destinc; - unsigned int height; +SwapNibbles( + register unsigned char *src, + register unsigned char *dest, + long srclen, long srcinc, long destinc, + unsigned int height) { register long h, n; register const unsigned char *rev = _reverse_nibs; @@ -292,11 +302,12 @@ SwapNibbles (src, dest, srclen, srcinc, destinc, height) } static void -ShiftNibblesLeft (src, dest, srclen, srcinc, destinc, height, nibble_order) - register unsigned char *src, *dest; - long srclen, srcinc, destinc; - unsigned int height; - int nibble_order; +ShiftNibblesLeft ( + register unsigned char *src, + register unsigned char *dest, + long srclen, long srcinc, long destinc, + unsigned int height, + int nibble_order) { register long h, n; register unsigned char c1, c2; @@ -322,11 +333,12 @@ ShiftNibblesLeft (src, dest, srclen, srcinc, destinc, height, nibble_order) /*ARGSUSED*/ static void -SwapBits (src, dest, srclen, srcinc, destinc, height, half_order) - register unsigned char *src, *dest; - long srclen, srcinc, destinc; - unsigned int height; - int half_order; +SwapBits( + register unsigned char *src, + register unsigned char *dest, + long srclen, long srcinc, long destinc, + unsigned int height, + int half_order) { register long h, n; register const unsigned char *rev = _reverse_byte; @@ -339,11 +351,12 @@ SwapBits (src, dest, srclen, srcinc, destinc, height, half_order) } static void -SwapBitsAndTwoBytes (src, dest, srclen, srcinc, destinc, height, half_order) - register unsigned char *src, *dest; - long srclen, srcinc, destinc; - unsigned int height; - int half_order; +SwapBitsAndTwoBytes( + register unsigned char *src, + register unsigned char *dest, + long srclen, long srcinc, long destinc, + unsigned int height, + int half_order) { long length = ROUNDUP(srclen, 2); register long h, n; @@ -367,11 +380,12 @@ SwapBitsAndTwoBytes (src, dest, srclen, srcinc, destinc, height, half_order) } static void -SwapBitsAndFourBytes (src, dest, srclen, srcinc, destinc, height, half_order) - register unsigned char *src, *dest; - long srclen, srcinc, destinc; - unsigned int height; - int half_order; +SwapBitsAndFourBytes( + register unsigned char *src, + register unsigned char *dest, + long srclen, long srcinc, long destinc, + unsigned int height, + int half_order) { long length = ROUNDUP(srclen, 4); register long h, n; @@ -403,11 +417,12 @@ SwapBitsAndFourBytes (src, dest, srclen, srcinc, destinc, height, half_order) } static void -SwapBitsAndWords (src, dest, srclen, srcinc, destinc, height, half_order) - register unsigned char *src, *dest; - long srclen, srcinc, destinc; - unsigned int height; - int half_order; +SwapBitsAndWords( + register unsigned char *src, + register unsigned char *dest, + long srclen, long srcinc, long destinc, + unsigned int height, + int half_order) { long length = ROUNDUP(srclen, 4); register long h, n; @@ -488,7 +503,14 @@ legend: */ -static void (* RConst (SwapFunction[12][12]))() = { +static void (* RConst (SwapFunction[12][12]))( + register unsigned char *src, + register unsigned char *dest, + long srclen, + long srcinc, + long destinc, + unsigned int height, + int half_order) = { #define n NoSwap, #define s SwapTwoBytes, #define l SwapFourBytes, @@ -588,18 +610,25 @@ static int const HalfOrderWord[12] = { #endif static void -SendXYImage(dpy, req, image, req_xoffset, req_yoffset) - register Display *dpy; - register xPutImageReq *req; - register XImage *image; - int req_xoffset, req_yoffset; +SendXYImage( + register Display *dpy, + register xPutImageReq *req, + register XImage *image, + int req_xoffset, int req_yoffset) { register int j; long total_xoffset, bytes_per_src, bytes_per_dest, length; long bytes_per_line, bytes_per_src_plane, bytes_per_dest_plane; char *src, *dest, *buf; char *extra = (char *)NULL; - register void (*swapfunc)(); + register void (*swapfunc)( + register unsigned char *src, + register unsigned char *dest, + long srclen, + long srcinc, + long destinc, + unsigned int height, + int half_order); int half_order; total_xoffset = image->xoffset + req_xoffset; @@ -726,12 +755,12 @@ SendXYImage(dpy, req, image, req_xoffset, req_yoffset) } static void -SendZImage(dpy, req, image, req_xoffset, req_yoffset, - dest_bits_per_pixel, dest_scanline_pad) - register Display *dpy; - register xPutImageReq *req; - register XImage *image; - int req_xoffset, req_yoffset, dest_bits_per_pixel, dest_scanline_pad; +SendZImage( + register Display *dpy, + register xPutImageReq *req, + register XImage *image, + int req_xoffset, int req_yoffset, + int dest_bits_per_pixel, int dest_scanline_pad) { long bytes_per_src, bytes_per_dest, length; unsigned char *src, *dest; @@ -813,15 +842,15 @@ SendZImage(dpy, req, image, req_xoffset, req_yoffset, } static void -PutImageRequest(dpy, d, gc, image, req_xoffset, req_yoffset, x, y, - req_width, req_height, dest_bits_per_pixel, dest_scanline_pad) - register Display *dpy; - Drawable d; - GC gc; - register XImage *image; - int x, y; - unsigned int req_width, req_height; - int req_xoffset, req_yoffset, dest_bits_per_pixel, dest_scanline_pad; +PutImageRequest( + register Display *dpy, + Drawable d, + GC gc, + register XImage *image, + int req_xoffset, int req_yoffset, + int x, int y, + unsigned int req_width, unsigned int req_height, + int dest_bits_per_pixel, int dest_scanline_pad) { register xPutImageReq *req; @@ -842,16 +871,18 @@ PutImageRequest(dpy, d, gc, image, req_xoffset, req_yoffset, x, y, } static void -PutSubImage (dpy, d, gc, image, req_xoffset, req_yoffset, x, y, - req_width, req_height, dest_bits_per_pixel, dest_scanline_pad) - register Display *dpy; - Drawable d; - GC gc; - register XImage *image; - int x, y; - unsigned int req_width, req_height; - int req_xoffset, req_yoffset, dest_bits_per_pixel, dest_scanline_pad; - +PutSubImage ( + register Display *dpy, + Drawable d, + GC gc, + register XImage *image, + int req_xoffset, + int req_yoffset, + int x, int y, + unsigned int req_width, + unsigned int req_height, + int dest_bits_per_pixel, + int dest_scanline_pad) { int left_pad, BytesPerRow, Available; @@ -905,15 +936,7 @@ PutSubImage (dpy, d, gc, image, req_xoffset, req_yoffset, x, y, } } -extern void _XInitImageFuncPtrs(); -#ifdef USE_DYNAMIC_XCURSOR -void -_XNoticePutBitmap (Display *dpy, - Drawable draw, - XImage *image); -#endif - int XPutImage (dpy, d, gc, image, req_xoffset, req_yoffset, x, y, req_width, req_height) diff --git a/src/QuExt.c b/src/QuExt.c index 5d49da0..dd70053 100644 --- a/src/QuExt.c +++ b/src/QuExt.c @@ -24,25 +24,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. */ +/* $XFree86: xc/lib/X11/QuExt.c,v 1.3 2003/11/17 22:20:08 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" -#if NeedFunctionPrototypes -Bool XQueryExtension( +Bool +XQueryExtension( register Display *dpy, _Xconst char *name, int *major_opcode, /* RETURN */ int *first_event, /* RETURN */ int *first_error) /* RETURN */ -#else -Bool XQueryExtension(dpy, name, major_opcode, first_event, first_error) - register Display *dpy; - char *name; - int *major_opcode; /* RETURN */ - int *first_event; /* RETURN */ - int *first_error; /* RETURN */ -#endif { xQueryExtensionReply rep; register xQueryExtensionReq *req; diff --git a/src/QuTextE16.c b/src/QuTextE16.c index e78ae36..8f2f82b 100644 --- a/src/QuTextE16.c +++ b/src/QuTextE16.c @@ -24,13 +24,12 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/QuTextE16.c,v 1.4 2001/12/14 19:54:04 dawes Exp $ */ +/* $XFree86: xc/lib/X11/QuTextE16.c,v 1.5 2003/11/17 22:20:08 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" int -#if NeedFunctionPrototypes XQueryTextExtents16 ( register Display *dpy, Font fid, @@ -40,17 +39,6 @@ XQueryTextExtents16 ( int *font_ascent, int *font_descent, register XCharStruct *overall) -#else -XQueryTextExtents16 (dpy, fid, string, nchars, dir, font_ascent, font_descent, - overall) - register Display *dpy; - Font fid; - XChar2b *string; - register int nchars; - int *dir; - int *font_ascent, *font_descent; - register XCharStruct *overall; -#endif { register long i; register unsigned char *ptr; diff --git a/src/QuTextExt.c b/src/QuTextExt.c index 34da05e..ef757a4 100644 --- a/src/QuTextExt.c +++ b/src/QuTextExt.c @@ -24,13 +24,12 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/QuTextExt.c,v 1.4 2001/12/14 19:54:04 dawes Exp $ */ +/* $XFree86: xc/lib/X11/QuTextExt.c,v 1.5 2003/11/17 22:20:08 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" int -#if NeedFunctionPrototypes XQueryTextExtents ( register Display *dpy, Font fid, @@ -40,17 +39,6 @@ XQueryTextExtents ( int *font_ascent, int *font_descent, register XCharStruct *overall) -#else -XQueryTextExtents (dpy, fid, string, nchars, dir, font_ascent, font_descent, - overall) - register Display *dpy; - Font fid; - register char *string; - register int nchars; - int *dir; - int *font_ascent, *font_descent; - register XCharStruct *overall; -#endif { register int i; register char *ptr; diff --git a/src/Quarks.c b/src/Quarks.c index 03f43bc..56005ce 100644 --- a/src/Quarks.c +++ b/src/Quarks.c @@ -49,19 +49,19 @@ other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/Quarks.c,v 1.5 2001/12/14 19:54:04 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Quarks.c,v 1.7 2003/11/17 22:20:08 dawes Exp $ */ #include "Xlibint.h" #include <X11/Xresource.h> +#include "Xresinternal.h" /* Not cost effective, at least for vanilla MIT clients */ /* #define PERMQ */ -typedef unsigned long Signature; -typedef unsigned long Entry; #ifdef PERMQ typedef unsigned char Bits; #endif +typedef unsigned long Entry; /* dont confuse with EntryRec from Xintatom.h */ static XrmQuark nextQuark = 1; /* next available quark number */ static unsigned long quarkMask = 0; @@ -239,17 +239,10 @@ ExpandQuarkTable(void) return True; } -#if NeedFunctionPrototypes -XrmQuark _XrmInternalStringToQuark( +XrmQuark +_XrmInternalStringToQuark( register _Xconst char *name, register int len, register Signature sig, Bool permstring) -#else -XrmQuark _XrmInternalStringToQuark(name, len, sig, permstring) - register XrmString name; - register int len; - register Signature sig; - Bool permstring; -#endif { register XrmQuark q; register Entry entry; @@ -354,13 +347,9 @@ nomatch: if (!rehash) return NULLQUARK; } -#if NeedFunctionPrototypes -XrmQuark XrmStringToQuark( +XrmQuark +XrmStringToQuark( _Xconst char *name) -#else -XrmQuark XrmStringToQuark(name) - XrmString name; -#endif { register char c, *tname; register Signature sig = 0; @@ -374,13 +363,9 @@ XrmQuark XrmStringToQuark(name) return _XrmInternalStringToQuark(name, tname-(char *)name-1, sig, False); } -#if NeedFunctionPrototypes -XrmQuark XrmPermStringToQuark( +XrmQuark +XrmPermStringToQuark( _Xconst char *name) -#else -XrmQuark XrmPermStringToQuark(name) - XrmString name; -#endif { register char c, *tname; register Signature sig = 0; diff --git a/src/RdBitF.c b/src/RdBitF.c index c879298..085f0e2 100644 --- a/src/RdBitF.c +++ b/src/RdBitF.c @@ -26,7 +26,7 @@ other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/RdBitF.c,v 3.5 2002/05/31 18:45:41 dawes Exp $ */ +/* $XFree86: xc/lib/X11/RdBitF.c,v 3.7 2003/11/17 22:20:08 dawes Exp $ */ /* * Code to read bitmaps from disk files. Interprets @@ -61,7 +61,7 @@ static Bool initialized = False; /* easier to fill in at run time */ * Table index for the hex values. Initialized once, first time. * Used for translation value or delimiter significance lookup. */ -static void initHexTable() +static void initHexTable(void) { /* * We build the table at run time for several reasons: @@ -95,8 +95,8 @@ static void initHexTable() * read next hex value in the input stream, return -1 if EOF */ static int -NextInt (fstream) - FILE *fstream; +NextInt ( + FILE *fstream) { int ch; int value = 0; @@ -124,21 +124,14 @@ NextInt (fstream) return value; } -#if NeedFunctionPrototypes -int XReadBitmapFileData ( +int +XReadBitmapFileData ( _Xconst char *filename, unsigned int *width, /* RETURNED */ unsigned int *height, /* RETURNED */ unsigned char **data, /* RETURNED */ int *x_hot, /* RETURNED */ int *y_hot) /* RETURNED */ -#else -int XReadBitmapFileData (filename, width, height, data, x_hot, y_hot) - char *filename; - unsigned int *width, *height; /* RETURNED */ - unsigned char **data; /* RETURNED */ - int *x_hot, *y_hot; /* RETURNED */ -#endif { FILE *fstream; /* handle on file */ unsigned char *bits = NULL; /* working variable */ @@ -260,8 +253,8 @@ int XReadBitmapFileData (filename, width, height, data, x_hot, y_hot) return (BitmapSuccess); } -#if NeedFunctionPrototypes -int XReadBitmapFile ( +int +XReadBitmapFile ( Display *display, Drawable d, _Xconst char *filename, @@ -270,15 +263,6 @@ int XReadBitmapFile ( Pixmap *pixmap, /* RETURNED */ int *x_hot, /* RETURNED */ int *y_hot) /* RETURNED */ -#else -int XReadBitmapFile (display, d, filename, width, height, pixmap, x_hot, y_hot) - Display *display; - Drawable d; - char *filename; - unsigned int *width, *height; /* RETURNED */ - Pixmap *pixmap; /* RETURNED */ - int *x_hot, *y_hot; /* RETURNED */ -#endif { unsigned char *data; int res; diff --git a/src/Region.c b/src/Region.c index bf6a58c..af1f0f2 100644 --- a/src/Region.c +++ b/src/Region.c @@ -45,7 +45,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ************************************************************************/ -/* $XFree86: xc/lib/X11/Region.c,v 1.9 2002/06/04 22:19:57 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Region.c,v 1.10 2003/04/13 19:22:17 dawes Exp $ */ /* * The functions in this file implement the Region abstraction, similar to one * used in the X11 sample server. A Region is simply an area, as the name @@ -85,12 +85,56 @@ SOFTWARE. #define assert(expr) #endif -typedef void (*voidProcp)(); +typedef int (*overlapProcp)( + register Region pReg, + register BoxPtr r1, + BoxPtr r1End, + register BoxPtr r2, + BoxPtr r2End, + short y1, + short y2); + +typedef int (*nonOverlapProcp)( + register Region pReg, + register BoxPtr r, + BoxPtr rEnd, + register short y1, + register short y2); + +static void miRegionOp( + register Region newReg, /* Place to store result */ + Region reg1, /* First region in operation */ + Region reg2, /* 2d region in operation */ + int (*overlapFunc)( + register Region pReg, + register BoxPtr r1, + BoxPtr r1End, + register BoxPtr r2, + BoxPtr r2End, + short y1, + short y2), /* Function to call for over- + * lapping bands */ + int (*nonOverlap1Func)( + register Region pReg, + register BoxPtr r, + BoxPtr rEnd, + register short y1, + register short y2), /* Function to call for non- + * overlapping bands in region + * 1 */ + int (*nonOverlap2Func)( + register Region pReg, + register BoxPtr r, + BoxPtr rEnd, + register short y1, + register short y2)); /* Function to call for non- + * overlapping bands in region + * 2 */ + -static void miRegionOp(); /* Create a new empty region */ Region -XCreateRegion() +XCreateRegion(void) { Region temp; @@ -110,9 +154,9 @@ XCreateRegion() } int -XClipBox( r, rect ) - Region r; - XRectangle *rect; +XClipBox( + Region r, + XRectangle *rect) { rect->x = r->extents.x1; rect->y = r->extents.y1; @@ -122,9 +166,9 @@ XClipBox( r, rect ) } int -XUnionRectWithRegion(rect, source, dest) - register XRectangle *rect; - Region source, dest; +XUnionRectWithRegion( + register XRectangle *rect, + Region source, Region dest) { REGION region; @@ -157,8 +201,8 @@ XUnionRectWithRegion(rect, source, dest) *----------------------------------------------------------------------- */ static void -miSetExtents (pReg) - Region pReg; +miSetExtents ( + Region pReg) { register BoxPtr pBox, pBoxEnd, @@ -205,13 +249,11 @@ miSetExtents (pReg) assert(pExtents->x1 < pExtents->x2); } -extern void _XSetClipRectangles(); - int -XSetRegion( dpy, gc, r ) - Display *dpy; - GC gc; - register Region r; +XSetRegion( + Display *dpy, + GC gc, + register Region r) { register int i; register XRectangle *xr, *pr; @@ -238,8 +280,8 @@ XSetRegion( dpy, gc, r ) } int -XDestroyRegion( r ) - Region r; +XDestroyRegion( + Region r) { Xfree( (char *) r->rects ); Xfree( (char *) r ); @@ -253,10 +295,10 @@ XDestroyRegion( r ) */ int -XOffsetRegion(pRegion, x, y) - register Region pRegion; - register int x; - register int y; +XOffsetRegion( + register Region pRegion, + register int x, + register int y) { register int nbox; register BOX *pbox; @@ -306,10 +348,10 @@ XOffsetRegion(pRegion, x, y) #define ZCopyRegion(a,b) XUnionRegion(a,a,b) static void -Compress(r, s, t, dx, xdir, grow) - Region r, s, t; - register unsigned dx; - register int xdir, grow; +Compress( + Region r, Region s, Region t, + register unsigned dx, + register int xdir, register int grow) { register unsigned shift = 1; @@ -333,9 +375,9 @@ Compress(r, s, t, dx, xdir, grow) #undef ZCopyRegion int -XShrinkRegion(r, dx, dy) - Region r; - int dx, dy; +XShrinkRegion( + Region r, + int dx, int dy) { Region s, t; int grow; @@ -359,10 +401,10 @@ XShrinkRegion(r, dx, dy) ***********************************************************/ static BOX -*IndexRects(rects, numRects, y) - register BOX *rects; - register int numRects; - register int y; +*IndexRects( + register BOX *rects, + register int numRects, + register int y) { while ((numRects--) && (rects->y2 <= y)) rects++; @@ -388,14 +430,14 @@ static BOX */ /* static void*/ static int -miIntersectO (pReg, r1, r1End, r2, r2End, y1, y2) - register Region pReg; - register BoxPtr r1; - BoxPtr r1End; - register BoxPtr r2; - BoxPtr r2End; - short y1; - short y2; +miIntersectO ( + register Region pReg, + register BoxPtr r1, + BoxPtr r1End, + register BoxPtr r2, + BoxPtr r2End, + short y1, + short y2) { register short x1; register short x2; @@ -452,10 +494,10 @@ miIntersectO (pReg, r1, r1End, r2, r2End, y1, y2) } int -XIntersectRegion(reg1, reg2, newReg) - Region reg1; - Region reg2; /* source regions */ - register Region newReg; /* destination Region */ +XIntersectRegion( + Region reg1, + Region reg2, /* source regions */ + register Region newReg) /* destination Region */ { /* check for trivial reject */ if ( (!(reg1->numRects)) || (!(reg2->numRects)) || @@ -463,7 +505,7 @@ XIntersectRegion(reg1, reg2, newReg) newReg->numRects = 0; else miRegionOp (newReg, reg1, reg2, - (voidProcp) miIntersectO, (voidProcp) NULL, (voidProcp) NULL); + miIntersectO, NULL, NULL); /* * Can't alter newReg's extents before we call miRegionOp because @@ -477,9 +519,9 @@ XIntersectRegion(reg1, reg2, newReg) } static void -miRegionCopy(dstrgn, rgn) - register Region dstrgn; - register Region rgn; +miRegionCopy( + register Region dstrgn, + register Region rgn) { if (dstrgn != rgn) /* don't want to copy to itself */ @@ -518,10 +560,10 @@ miRegionCopy(dstrgn, rgn) */ static void -combineRegs(newReg, reg1, reg2) - register Region newReg; - Region reg1; - Region reg2; +combineRegs( + register Region newReg, + Region reg1, + Region reg2) { register Region tempReg; register BOX *rects; @@ -567,8 +609,7 @@ combineRegs(newReg, reg1, reg2) */ static int -QuickCheck(newReg, reg1, reg2) - Region newReg, reg1, reg2; +QuickCheck(Region newReg, Region reg1, Region reg2) { /* if unioning with itself or no rects to union with */ @@ -603,12 +644,12 @@ QuickCheck(newReg, reg1, reg2) */ static int -TopRects(newReg, rects, reg1, reg2, FirstRect) - register Region newReg; - register BOX *rects; - register Region reg1; - register Region reg2; - BOX *FirstRect; +TopRects( + register Region newReg, + register BOX *rects, + register Region reg1, + register Region reg2, + BOX *FirstRect) { register BOX *tempRects; @@ -663,10 +704,10 @@ TopRects(newReg, rects, reg1, reg2, FirstRect) */ /* static int*/ static int -miCoalesce (pReg, prevStart, curStart) - register Region pReg; /* Region to coalesce */ - int prevStart; /* Index of start of previous band */ - int curStart; /* Index of start of current band */ +miCoalesce( + register Region pReg, /* Region to coalesce */ + int prevStart, /* Index of start of previous band */ + int curStart) /* Index of start of current band */ { register BoxPtr pPrevBox; /* Current box in previous band */ register BoxPtr pCurBox; /* Current box in current band */ @@ -814,16 +855,33 @@ miCoalesce (pReg, prevStart, curStart) */ /* static void*/ static void -miRegionOp(newReg, reg1, reg2, overlapFunc, nonOverlap1Func, nonOverlap2Func) - register Region newReg; /* Place to store result */ - Region reg1; /* First region in operation */ - Region reg2; /* 2d region in operation */ - void (*overlapFunc)(); /* Function to call for over- +miRegionOp( + register Region newReg, /* Place to store result */ + Region reg1, /* First region in operation */ + Region reg2, /* 2d region in operation */ + int (*overlapFunc)( + register Region pReg, + register BoxPtr r1, + BoxPtr r1End, + register BoxPtr r2, + BoxPtr r2End, + short y1, + short y2), /* Function to call for over- * lapping bands */ - void (*nonOverlap1Func)(); /* Function to call for non- + int (*nonOverlap1Func)( + register Region pReg, + register BoxPtr r, + BoxPtr rEnd, + register short y1, + register short y2), /* Function to call for non- * overlapping bands in region * 1 */ - void (*nonOverlap2Func)(); /* Function to call for non- + int (*nonOverlap2Func)( + register Region pReg, + register BoxPtr r, + BoxPtr rEnd, + register short y1, + register short y2)) /* Function to call for non- * overlapping bands in region * 2 */ { @@ -941,7 +999,7 @@ miRegionOp(newReg, reg1, reg2, overlapFunc, nonOverlap1Func, nonOverlap2Func) top = max(r1->y1,ybot); bot = min(r1->y2,r2->y1); - if ((top != bot) && (nonOverlap1Func != (void (*)())NULL)) + if ((top != bot) && (nonOverlap1Func != NULL)) { (* nonOverlap1Func) (newReg, r1, r1BandEnd, top, bot); } @@ -953,7 +1011,7 @@ miRegionOp(newReg, reg1, reg2, overlapFunc, nonOverlap1Func, nonOverlap2Func) top = max(r2->y1,ybot); bot = min(r2->y2,r1->y1); - if ((top != bot) && (nonOverlap2Func != (void (*)())NULL)) + if ((top != bot) && (nonOverlap2Func != NULL)) { (* nonOverlap2Func) (newReg, r2, r2BandEnd, top, bot); } @@ -1013,7 +1071,7 @@ miRegionOp(newReg, reg1, reg2, overlapFunc, nonOverlap1Func, nonOverlap2Func) curBand = newReg->numRects; if (r1 != r1End) { - if (nonOverlap1Func != (void (*)())NULL) + if (nonOverlap1Func != NULL) { do { @@ -1028,7 +1086,7 @@ miRegionOp(newReg, reg1, reg2, overlapFunc, nonOverlap1Func, nonOverlap2Func) } while (r1 != r1End); } } - else if ((r2 != r2End) && (nonOverlap2Func != (void (*)())NULL)) + else if ((r2 != r2End) && (nonOverlap2Func != NULL)) { do { @@ -1105,12 +1163,12 @@ miRegionOp(newReg, reg1, reg2, overlapFunc, nonOverlap1Func, nonOverlap2Func) */ /* static void*/ static int -miUnionNonO (pReg, r, rEnd, y1, y2) - register Region pReg; - register BoxPtr r; - BoxPtr rEnd; - register short y1; - register short y2; +miUnionNonO ( + register Region pReg, + register BoxPtr r, + BoxPtr rEnd, + register short y1, + register short y2) { register BoxPtr pNextRect; @@ -1154,14 +1212,14 @@ miUnionNonO (pReg, r, rEnd, y1, y2) /* static void*/ static int -miUnionO (pReg, r1, r1End, r2, r2End, y1, y2) - register Region pReg; - register BoxPtr r1; - BoxPtr r1End; - register BoxPtr r2; - BoxPtr r2End; - register short y1; - register short y2; +miUnionO ( + register Region pReg, + register BoxPtr r1, + BoxPtr r1End, + register BoxPtr r2, + BoxPtr r2End, + register short y1, + register short y2) { register BoxPtr pNextRect; @@ -1220,10 +1278,10 @@ miUnionO (pReg, r1, r1End, r2, r2End, y1, y2) } int -XUnionRegion(reg1, reg2, newReg) - Region reg1; - Region reg2; /* source regions */ - Region newReg; /* destination Region */ +XUnionRegion( + Region reg1, + Region reg2, /* source regions */ + Region newReg) /* destination Region */ { /* checks all the simple cases */ @@ -1275,8 +1333,8 @@ XUnionRegion(reg1, reg2, newReg) return 1; } - miRegionOp (newReg, reg1, reg2, (voidProcp) miUnionO, - (voidProcp) miUnionNonO, (voidProcp) miUnionNonO); + miRegionOp (newReg, reg1, reg2, miUnionO, + miUnionNonO, miUnionNonO); newReg->extents.x1 = min(reg1->extents.x1, reg2->extents.x1); newReg->extents.y1 = min(reg1->extents.y1, reg2->extents.y1); @@ -1307,12 +1365,12 @@ XUnionRegion(reg1, reg2, newReg) */ /* static void*/ static int -miSubtractNonO1 (pReg, r, rEnd, y1, y2) - register Region pReg; - register BoxPtr r; - BoxPtr rEnd; - register short y1; - register short y2; +miSubtractNonO1 ( + register Region pReg, + register BoxPtr r, + BoxPtr rEnd, + register short y1, + register short y2) { register BoxPtr pNextRect; @@ -1354,14 +1412,14 @@ miSubtractNonO1 (pReg, r, rEnd, y1, y2) */ /* static void*/ static int -miSubtractO (pReg, r1, r1End, r2, r2End, y1, y2) - register Region pReg; - register BoxPtr r1; - BoxPtr r1End; - register BoxPtr r2; - BoxPtr r2End; - register short y1; - register short y2; +miSubtractO ( + register Region pReg, + register BoxPtr r1, + BoxPtr r1End, + register BoxPtr r2, + BoxPtr r2End, + register short y1, + register short y2) { register BoxPtr pNextRect; register int x1; @@ -1503,10 +1561,10 @@ miSubtractO (pReg, r1, r1End, r2, r2End, y1, y2) */ int -XSubtractRegion(regM, regS, regD) - Region regM; - Region regS; - register Region regD; +XSubtractRegion( + Region regM, + Region regS, + register Region regD) { /* check for trivial reject */ if ( (!(regM->numRects)) || (!(regS->numRects)) || @@ -1516,8 +1574,8 @@ XSubtractRegion(regM, regS, regD) return 1; } - miRegionOp (regD, regM, regS, (voidProcp) miSubtractO, - (voidProcp) miSubtractNonO1, (voidProcp) NULL); + miRegionOp (regD, regM, regS, miSubtractO, + miSubtractNonO1, NULL); /* * Can't alter newReg's extents before we call miRegionOp because @@ -1531,8 +1589,7 @@ XSubtractRegion(regM, regS, regD) } int -XXorRegion( sra, srb, dr ) - Region sra, srb, dr; +XXorRegion(Region sra, Region srb, Region dr) { Region tra, trb; @@ -1551,8 +1608,8 @@ XXorRegion( sra, srb, dr ) * as a parameter */ int -XEmptyRegion( r ) - Region r; +XEmptyRegion( + Region r) { if( r->numRects == 0 ) return TRUE; else return FALSE; @@ -1562,8 +1619,7 @@ XEmptyRegion( r ) * Check to see if two regions are equal */ int -XEqualRegion( r1, r2 ) - Region r1, r2; +XEqualRegion(Region r1, Region r2) { int i; @@ -1583,9 +1639,9 @@ XEqualRegion( r1, r2 ) } int -XPointInRegion( pRegion, x, y ) - Region pRegion; - int x, y; +XPointInRegion( + Region pRegion, + int x, int y) { int i; @@ -1602,10 +1658,10 @@ XPointInRegion( pRegion, x, y ) } int -XRectInRegion(region, rx, ry, rwidth, rheight) - register Region region; - int rx, ry; - unsigned int rwidth, rheight; +XRectInRegion( + register Region region, + int rx, int ry, + unsigned int rwidth, unsigned int rheight) { register BoxPtr pbox; register BoxPtr pboxEnd; diff --git a/src/RegstFlt.c b/src/RegstFlt.c index ccc0eb7..1f97312 100644 --- a/src/RegstFlt.c +++ b/src/RegstFlt.c @@ -52,14 +52,14 @@ other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/RegstFlt.c,v 1.4 2001/12/14 19:54:05 dawes Exp $ */ +/* $XFree86: xc/lib/X11/RegstFlt.c,v 1.6 2003/11/17 22:20:08 dawes Exp $ */ #include "Xlibint.h" #include "Xlcint.h" static void -_XFreeIMFilters(display) - Display *display; +_XFreeIMFilters( + Display *display) { register XFilterEventList fl; @@ -73,16 +73,14 @@ _XFreeIMFilters(display) * Register a filter with the filter machinery by event mask. */ void -_XRegisterFilterByMask(display, window, event_mask, filter, client_data) - Display *display; - Window window; - unsigned long event_mask; +_XRegisterFilterByMask( + Display *display, + Window window, + unsigned long event_mask, Bool (*filter)( -#if NeedNestedPrototypes Display*, Window, XEvent*, XPointer -#endif - ); - XPointer client_data; + ), + XPointer client_data) { XFilterEventRec *rec; @@ -106,18 +104,15 @@ _XRegisterFilterByMask(display, window, event_mask, filter, client_data) * Register a filter with the filter machinery by type code. */ void -_XRegisterFilterByType(display, window, start_type, end_type, - filter, client_data) - Display *display; - Window window; - int start_type; - int end_type; +_XRegisterFilterByType( + Display *display, + Window window, + int start_type, + int end_type, Bool (*filter)( -#if NeedNestedPrototypes Display*, Window, XEvent*, XPointer -#endif - ); - XPointer client_data; + ), + XPointer client_data) { XFilterEventRec *rec; @@ -138,15 +133,13 @@ _XRegisterFilterByType(display, window, start_type, end_type, } void -_XUnregisterFilter(display, window, filter, client_data) - Display *display; - Window window; +_XUnregisterFilter( + Display *display, + Window window, Bool (*filter)( -#if NeedNestedPrototypes Display*, Window, XEvent*, XPointer -#endif - ); - XPointer client_data; + ), + XPointer client_data) { register XFilterEventList *prev, fl; diff --git a/src/SendEvent.c b/src/SendEvent.c index e6db9d3..6d30763 100644 --- a/src/SendEvent.c +++ b/src/SendEvent.c @@ -24,7 +24,7 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/SendEvent.c,v 1.4 2001/12/14 19:54:05 dawes Exp $ */ +/* $XFree86: xc/lib/X11/SendEvent.c,v 1.5 2003/04/13 19:22:17 dawes Exp $ */ #define NEED_EVENTS #include "Xlibint.h" @@ -43,7 +43,10 @@ XSendEvent(dpy, w, propagate, event_mask, event) { register xSendEventReq *req; xEvent ev; - register Status (**fp)(); + register Status (**fp)( + Display * /* dpy */, + XEvent * /* re */, + xEvent * /* event */); Status status; LockDisplay (dpy); diff --git a/src/SetCRects.c b/src/SetCRects.c index 3b9da0d..e9a6323 100644 --- a/src/SetCRects.c +++ b/src/SetCRects.c @@ -24,19 +24,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. */ -/* $XFree86: xc/lib/X11/SetCRects.c,v 1.4 2001/12/14 19:54:06 dawes Exp $ */ +/* $XFree86: xc/lib/X11/SetCRects.c,v 1.5 2003/04/13 19:22:17 dawes Exp $ */ #include "Xlibint.h" /* can only call when display is locked. */ -void _XSetClipRectangles (dpy, gc, clip_x_origin, clip_y_origin, rectangles, n, - ordering) - register Display *dpy; - GC gc; - int clip_x_origin, clip_y_origin; - XRectangle *rectangles; - int n; - int ordering; +void _XSetClipRectangles ( + register Display *dpy, + GC gc, + int clip_x_origin, int clip_y_origin, + XRectangle *rectangles, + int n, + int ordering) { register xSetClipRectanglesReq *req; register long len; diff --git a/src/SetDashes.c b/src/SetDashes.c index 4f59531..63e9b80 100644 --- a/src/SetDashes.c +++ b/src/SetDashes.c @@ -24,26 +24,17 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/SetDashes.c,v 1.4 2001/12/14 19:54:06 dawes Exp $ */ +/* $XFree86: xc/lib/X11/SetDashes.c,v 1.5 2003/11/17 22:20:08 dawes Exp $ */ #include "Xlibint.h" int -#if NeedFunctionPrototypes XSetDashes ( register Display *dpy, GC gc, int dash_offset, _Xconst char *list, int n) -#else -XSetDashes (dpy, gc, dash_offset, list, n) - register Display *dpy; - GC gc; - int dash_offset; - char *list; - int n; -#endif { register xSetDashesReq *req; diff --git a/src/SetHints.c b/src/SetHints.c index 68fe5b6..f6f25a7 100644 --- a/src/SetHints.c +++ b/src/SetHints.c @@ -46,7 +46,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/X11/SetHints.c,v 1.4 2001/12/14 19:54:06 dawes Exp $ */ +/* $XFree86: xc/lib/X11/SetHints.c,v 1.5 2003/11/17 22:20:08 dawes Exp $ */ #include <X11/Xlibint.h> #include <X11/Xutil.h> @@ -219,7 +219,6 @@ XSetCommand (dpy, w, argv, argc) */ int -#if NeedFunctionPrototypes XSetStandardProperties ( Display *dpy, Window w, /* window to decorate */ @@ -229,17 +228,6 @@ XSetStandardProperties ( char **argv, /* command to be used to restart application */ int argc, /* count of arguments */ XSizeHints *hints) /* size hints for window in its normal state */ -#else -XSetStandardProperties (dpy, w, name, icon_string, icon_pixmap, argv, argc, hints) - Display *dpy; - Window w; /* window to decorate */ - char *name; /* name of application */ - char *icon_string; /* name string for icon */ - Pixmap icon_pixmap; /* pixmap to use as icon, or None */ - char **argv; /* command to be used to restart application */ - int argc; /* count of arguments */ - XSizeHints *hints; /* size hints for window in its normal state */ -#endif { XWMHints phints; phints.flags = 0; diff --git a/src/SetLocale.c b/src/SetLocale.c index ac33f02..07996df 100644 --- a/src/SetLocale.c +++ b/src/SetLocale.c @@ -55,12 +55,13 @@ other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/SetLocale.c,v 3.17 2002/05/31 18:45:41 dawes Exp $ */ +/* $XFree86: xc/lib/X11/SetLocale.c,v 3.20 2003/11/17 22:20:08 dawes Exp $ */ #include "Xlibint.h" #include "Xlcint.h" #include <X11/Xlocale.h> #include <X11/Xos.h> +#include "XlcPubI.h" #define MAXLOCALE 64 /* buffer size of locale name */ @@ -68,18 +69,11 @@ from The Open Group. /* alternative setlocale() for when the OS does not provide one */ -#if NeedFunctionPrototypes char * _Xsetlocale( int category, _Xconst char *name ) -#else -char * -_Xsetlocale(category, name) - int category; - char *name; -#endif { static char *xsl_name; char *old_name; @@ -99,7 +93,7 @@ _Xsetlocale(category, name) name = getenv("LANG"); if (name && strlen(name) >= MAXLOCALE) name = NULL; - if (!name || !*name || !_XOpenLC(name)) + if (!name || !*name || !_XOpenLC((char *) name)) name = "C"; old_name = xsl_name; xsl_name = (char *)name; @@ -140,9 +134,9 @@ _Xsetlocale(category, name) */ char * -_XlcMapOSLocaleName(osname, siname) - char *osname; - char *siname; +_XlcMapOSLocaleName( + char *osname, + char *siname) { #if defined(hpux) || defined(CSRG_BASED) || defined(sun) || defined(SVR4) || defined(sgi) || defined(__osf__) || defined(AIXV3) || defined(ultrix) || defined(WIN32) || defined(__UNIXOS2__) || defined(linux) # ifdef hpux diff --git a/src/SetPntMap.c b/src/SetPntMap.c index 80dd63a..b4ea39f 100644 --- a/src/SetPntMap.c +++ b/src/SetPntMap.c @@ -24,24 +24,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. */ -/* $XFree86: xc/lib/X11/SetPntMap.c,v 1.4 2001/12/14 19:54:06 dawes Exp $ */ +/* $XFree86: xc/lib/X11/SetPntMap.c,v 1.5 2003/11/17 22:20:08 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" /* returns either DeviceMappingSuccess or DeviceMappingBusy */ -#if NeedFunctionPrototypes -int XSetPointerMapping ( +int +XSetPointerMapping ( register Display *dpy, _Xconst unsigned char *map, int nmaps) -#else -int XSetPointerMapping (dpy, map, nmaps) - register Display *dpy; - unsigned char *map; - int nmaps; -#endif { register xSetPointerMappingReq *req; xSetPointerMappingReply rep; diff --git a/src/StBytes.c b/src/StBytes.c index f1d8cf0..ec4c567 100644 --- a/src/StBytes.c +++ b/src/StBytes.c @@ -24,7 +24,7 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/StBytes.c,v 1.4 2001/12/14 19:54:07 dawes Exp $ */ +/* $XFree86: xc/lib/X11/StBytes.c,v 1.5 2003/11/17 22:20:08 dawes Exp $ */ #include <X11/Xlibint.h> #include <X11/Xatom.h> @@ -82,19 +82,11 @@ char *XFetchBytes (dpy, nbytes) } int -#if NeedFunctionPrototypes XStoreBuffer ( register Display *dpy, _Xconst char *bytes, int nbytes, register int buffer) -#else -XStoreBuffer (dpy, bytes, nbytes, buffer) - register Display *dpy; - char *bytes; - int nbytes; - register int buffer; -#endif { if ((buffer < 0) || (buffer > 7)) return 0; return XChangeProperty(dpy, RootWindow(dpy, 0), n_to_atom[buffer], @@ -102,17 +94,10 @@ XStoreBuffer (dpy, bytes, nbytes, buffer) } int -#if NeedFunctionPrototypes XStoreBytes ( register Display *dpy, _Xconst char *bytes, int nbytes) -#else -XStoreBytes (dpy, bytes, nbytes) - register Display *dpy; - char *bytes; - int nbytes; -#endif { return XStoreBuffer (dpy, bytes, nbytes, 0); } diff --git a/src/StNColor.c b/src/StNColor.c index 5b039ad..8385287 100644 --- a/src/StNColor.c +++ b/src/StNColor.c @@ -24,33 +24,20 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/StNColor.c,v 1.4 2001/12/14 19:54:07 dawes Exp $ */ +/* $XFree86: xc/lib/X11/StNColor.c,v 1.6 2003/11/17 22:20:08 dawes Exp $ */ #include <stdio.h> #include "Xlibint.h" #include "Xcmsint.h" -extern void _XcmsRGB_to_XColor(); - -/* cmsColNm.c */ -Status _XcmsResolveColorString(); int -#if NeedFunctionPrototypes XStoreNamedColor( register Display *dpy, Colormap cmap, _Xconst char *name, /* STRING8 */ unsigned long pixel, /* CARD32 */ int flags) /* DoRed, DoGreen, DoBlue */ -#else -XStoreNamedColor(dpy, cmap, name, pixel, flags) -register Display *dpy; -Colormap cmap; -char *name; /* STRING8 */ -unsigned long pixel; /* CARD32 */ -int flags; /* DoRed, DoGreen, DoBlue */ -#endif { unsigned int nbytes; register xStoreNamedColorReq *req; diff --git a/src/StName.c b/src/StName.c index d8ecbe1..7d1963b 100644 --- a/src/StName.c +++ b/src/StName.c @@ -24,23 +24,16 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/StName.c,v 1.4 2001/12/14 19:54:07 dawes Exp $ */ +/* $XFree86: xc/lib/X11/StName.c,v 1.5 2003/11/17 22:20:08 dawes Exp $ */ #include <X11/Xlibint.h> #include <X11/Xatom.h> int -#if NeedFunctionPrototypes XStoreName ( register Display *dpy, Window w, _Xconst char *name) -#else -XStoreName (dpy, w, name) - register Display *dpy; - Window w; - char *name; -#endif { return XChangeProperty(dpy, w, XA_WM_NAME, XA_STRING, 8, PropModeReplace, (unsigned char *)name, @@ -48,17 +41,10 @@ XStoreName (dpy, w, name) } int -#if NeedFunctionPrototypes XSetIconName ( register Display *dpy, Window w, _Xconst char *icon_name) -#else -XSetIconName (dpy, w, icon_name) - register Display *dpy; - Window w; - char *icon_name; -#endif { return XChangeProperty(dpy, w, XA_WM_ICON_NAME, XA_STRING, 8, PropModeReplace, (unsigned char *)icon_name, diff --git a/src/StrKeysym.c b/src/StrKeysym.c index 21949b1..e13ee78 100644 --- a/src/StrKeysym.c +++ b/src/StrKeysym.c @@ -24,18 +24,16 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/StrKeysym.c,v 3.6 2001/12/14 19:54:07 dawes Exp $ */ +/* $XFree86: xc/lib/X11/StrKeysym.c,v 3.8 2003/11/17 22:20:08 dawes Exp $ */ #include "Xlibint.h" #include <X11/Xresource.h> #include <X11/keysymdef.h> - -extern XrmQuark _XrmInternalStringToQuark(); - -typedef unsigned long Signature; +#include "Xresinternal.h" #define NEEDKTABLE #include "ks_tables.h" +#include "Key.h" #ifndef KEYSYMDB #define KEYSYMDB "/usr/lib/X11/XKeysymDB" @@ -46,7 +44,7 @@ static XrmDatabase keysymdb; static XrmQuark Qkeysym[2]; XrmDatabase -_XInitKeysymDB() +_XInitKeysymDB(void) { if (!initialized) { @@ -66,13 +64,8 @@ _XInitKeysymDB() return keysymdb; } -#if NeedFunctionPrototypes -KeySym XStringToKeysym(s) - _Xconst char *s; -#else -KeySym XStringToKeysym(s) - char *s; -#endif +KeySym +XStringToKeysym(_Xconst char *s) { register int i, n; int h; diff --git a/src/Synchro.c b/src/Synchro.c index 9e9d50a..713bc23 100644 --- a/src/Synchro.c +++ b/src/Synchro.c @@ -24,27 +24,21 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/lib/X11/Synchro.c,v 1.4 2003/11/17 22:20:08 dawes Exp $ */ #include "Xlibint.h" -int _XSyncFunction(dpy) -register Display *dpy; +static int _XSyncFunction(register Display *dpy) { XSync(dpy,0); return 0; } -#if NeedFunctionPrototypes -int (*XSynchronize(Display *dpy, int onoff))() -#else -int (*XSynchronize(dpy,onoff))() - register Display *dpy; - int onoff; -#endif +int (*XSynchronize(Display *dpy, int onoff))(Display *) { - int (*temp)(); - int (*func)() = NULL; + int (*temp)(Display *); + int (*func)(Display *) = NULL; if (onoff) func = _XSyncFunction; @@ -61,26 +55,14 @@ int (*XSynchronize(dpy,onoff))() return (temp); } -#if NeedFunctionPrototypes int (*XSetAfterFunction( Display *dpy, int (*func)( -#if NeedNestedPrototypes Display* -#endif ) -))() -#else -int (*XSetAfterFunction(dpy,func))() - register Display *dpy; - int (*func)( -#if NeedNestedPrototypes - Display* -#endif - ); -#endif + ))(Display *) { - int (*temp)(); + int (*temp)(Display *); LockDisplay(dpy); if (dpy->flags & XlibDisplayPrivSync) { @@ -24,12 +24,11 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/Text.c,v 1.4 2001/12/14 19:54:07 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Text.c,v 1.5 2003/11/17 22:20:08 dawes Exp $ */ #include "Xlibint.h" int -#if NeedFunctionPrototypes XDrawString( register Display *dpy, Drawable d, @@ -38,15 +37,6 @@ XDrawString( int y, _Xconst char *string, int length) -#else -XDrawString(dpy, d, gc, x, y, string, length) - register Display *dpy; - Drawable d; - GC gc; - int x, y; - char *string; - int length; -#endif { int Datalength = 0; register xPolyText8Req *req; diff --git a/src/Text16.c b/src/Text16.c index a20f3a3..89d05ab 100644 --- a/src/Text16.c +++ b/src/Text16.c @@ -24,12 +24,11 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/Text16.c,v 1.5 2001/12/14 19:54:07 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Text16.c,v 1.6 2003/11/17 22:20:08 dawes Exp $ */ #include "Xlibint.h" int -#if NeedFunctionPrototypes XDrawString16( register Display *dpy, Drawable d, @@ -38,15 +37,6 @@ XDrawString16( int y, _Xconst XChar2b *string, int length) -#else -XDrawString16(dpy, d, gc, x, y, string, length) - register Display *dpy; - Drawable d; - GC gc; - int x, y; - XChar2b *string; - int length; -#endif { int Datalength = 0; register xPolyText16Req *req; diff --git a/src/TextExt.c b/src/TextExt.c index 9c68ee8..6b39091 100644 --- a/src/TextExt.c +++ b/src/TextExt.c @@ -26,7 +26,7 @@ other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/TextExt.c,v 1.4 2001/12/14 19:54:07 dawes Exp $ */ +/* $XFree86: xc/lib/X11/TextExt.c,v 1.5 2003/11/17 22:20:08 dawes Exp $ */ /* * Copyright 1995 by FUJITSU LIMITED * This is source code modified by FUJITSU LIMITED under the Joint @@ -70,7 +70,6 @@ from The Open Group. * what is done in XTextExtents16. */ int -#if NeedFunctionPrototypes XTextExtents ( XFontStruct *fs, _Xconst char *string, @@ -79,14 +78,6 @@ XTextExtents ( int *font_ascent, /* RETURN font information */ int *font_descent, /* RETURN font information */ register XCharStruct *overall) /* RETURN character information */ -#else -XTextExtents (fs, string, nchars, dir, font_ascent, font_descent, overall) - XFontStruct *fs; - char *string; - int nchars; - int *dir, *font_ascent, *font_descent; /* RETURN font information */ - register XCharStruct *overall; /* RETURN character information */ -#endif { int i; /* iterator */ Bool singlerow = (fs->max_byte1 == 0); /* optimization */ @@ -152,17 +143,11 @@ XTextExtents (fs, string, nchars, dir, font_ascent, font_descent, overall) * XTextWidth - compute the width of a string of eightbit bytes. This is a * subset of XTextExtents. */ -#if NeedFunctionPrototypes -int XTextWidth ( +int +XTextWidth ( XFontStruct *fs, _Xconst char *string, int count) -#else -int XTextWidth (fs, string, count) - XFontStruct *fs; - char *string; - int count; -#endif { int i; /* iterator */ Bool singlerow = (fs->max_byte1 == 0); /* optimization */ @@ -204,17 +189,11 @@ int XTextWidth (fs, string, count) /* * _XTextHeight - compute the height of a string of eightbit bytes. */ -#if NeedFunctionPrototypes -int _XTextHeight ( +int +_XTextHeight ( XFontStruct *fs, _Xconst char *string, int count) -#else -int _XTextHeight (fs, string, count) - XFontStruct *fs; - char *string; - int count; -#endif { int i; /* iterator */ Bool singlerow = (fs->max_byte1 == 0); /* optimization */ diff --git a/src/TextExt16.c b/src/TextExt16.c index 14064f6..5707faa 100644 --- a/src/TextExt16.c +++ b/src/TextExt16.c @@ -26,7 +26,7 @@ other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/TextExt16.c,v 1.4 2001/12/14 19:54:07 dawes Exp $ */ +/* $XFree86: xc/lib/X11/TextExt16.c,v 1.5 2003/11/17 22:20:08 dawes Exp $ */ /* * Copyright 1995 by FUJITSU LIMITED * This is source code modified by FUJITSU LIMITED under the Joint @@ -44,7 +44,6 @@ from The Open Group. * XChar2bs. */ int -#if NeedFunctionPrototypes XTextExtents16 ( XFontStruct *fs, _Xconst XChar2b *string, @@ -53,14 +52,6 @@ XTextExtents16 ( int *font_ascent, /* RETURN font information */ int *font_descent, /* RETURN font information */ register XCharStruct *overall) /* RETURN character information */ -#else -XTextExtents16 (fs, string, nchars, dir, font_ascent, font_descent, overall) - XFontStruct *fs; - XChar2b *string; - int nchars; - int *dir, *font_ascent, *font_descent; /* RETURN font information */ - register XCharStruct *overall; /* RETURN character information */ -#endif { int i; /* iterator */ Bool singlerow = (fs->max_byte1 == 0); /* optimization */ @@ -127,17 +118,11 @@ XTextExtents16 (fs, string, nchars, dir, font_ascent, font_descent, overall) * XTextWidth16 - compute the width of sequence of XChar2bs. This is a * subset of XTextExtents16. */ -#if NeedFunctionPrototypes -int XTextWidth16 ( +int +XTextWidth16 ( XFontStruct *fs, _Xconst XChar2b *string, int count) -#else -int XTextWidth16 (fs, string, count) - XFontStruct *fs; - XChar2b *string; - int count; -#endif { int i; /* iterator */ Bool singlerow = (fs->max_byte1 == 0); /* optimization */ @@ -179,17 +164,11 @@ int XTextWidth16 (fs, string, count) /* * _XTextHeight16 - compute the height of sequence of XChar2bs. */ -#if NeedFunctionPrototypes -int _XTextHeight16 ( +int +_XTextHeight16 ( XFontStruct *fs, _Xconst XChar2b *string, int count) -#else -int _XTextHeight16 (fs, string, count) - XFontStruct *fs; - XChar2b *string; - int count; -#endif { int i; /* iterator */ Bool singlerow = (fs->max_byte1 == 0); /* optimization */ diff --git a/src/WMGeom.c b/src/WMGeom.c index 96b9b53..05ce8e4 100644 --- a/src/WMGeom.c +++ b/src/WMGeom.c @@ -24,12 +24,13 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/lib/X11/WMGeom.c,v 1.4 2003/11/17 22:20:08 dawes Exp $ */ #include "Xlibint.h" #include "Xutil.h" -static int _GeometryMaskToGravity(); - +static int _GeometryMaskToGravity( + int mask); /* * This routine given a user supplied positional argument and a default @@ -40,8 +41,8 @@ static int _GeometryMaskToGravity(); * be considered "negative". */ -#if NeedFunctionPrototypes -int XWMGeometry ( +int +XWMGeometry ( Display *dpy, /* user's display connection */ int screen, /* screen on which to do computation */ _Xconst char *user_geom, /* user provided geometry spec */ @@ -53,20 +54,6 @@ int XWMGeometry ( int *width_return, /* size of window */ int *height_return, /* size of window */ int *gravity_return) /* gravity of window */ -#else -int XWMGeometry (dpy, screen, user_geom, def_geom, bwidth, hints, - x_return, y_return, width_return, height_return, - gravity_return) - Display *dpy; /* user's display connection */ - int screen; /* screen on which to do computation */ - char *user_geom; /* user provided geometry spec */ - char *def_geom; /* default geometry spec for window */ - unsigned int bwidth; /* border width */ - XSizeHints *hints; /* usually WM_NORMAL_HINTS */ - int *x_return, *y_return; /* location of window */ - int *width_return, *height_return; /* size of window */ - int *gravity_return; /* gravity of window */ -#endif { int ux, uy; /* returned values from parse */ unsigned int uwidth, uheight; /* returned values from parse */ @@ -179,8 +166,8 @@ int XWMGeometry (dpy, screen, user_geom, def_geom, bwidth, hints, } -static int _GeometryMaskToGravity (mask) - int mask; +static int _GeometryMaskToGravity( + int mask) { switch (mask & (XNegative|YNegative)) { case 0: diff --git a/src/Window.c b/src/Window.c index b48b191..470c1c2 100644 --- a/src/Window.c +++ b/src/Window.c @@ -24,15 +24,15 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/Window.c,v 1.4 2001/12/14 19:54:08 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Window.c,v 1.5 2003/04/13 19:22:18 dawes Exp $ */ #include "Xlibint.h" -void _XProcessWindowAttributes (dpy, req, valuemask, attributes) - register Display *dpy; - xChangeWindowAttributesReq *req; - register unsigned long valuemask; - register XSetWindowAttributes *attributes; +void _XProcessWindowAttributes ( + register Display *dpy, + xChangeWindowAttributesReq *req, + register unsigned long valuemask, + register XSetWindowAttributes *attributes) { unsigned long values[32]; register unsigned long *value = values; diff --git a/src/WrBitF.c b/src/WrBitF.c index 5f155a2..e45e294 100644 --- a/src/WrBitF.c +++ b/src/WrBitF.c @@ -26,7 +26,7 @@ other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/WrBitF.c,v 3.5 2002/05/31 18:45:41 dawes Exp $ */ +/* $XFree86: xc/lib/X11/WrBitF.c,v 3.7 2003/11/17 22:20:08 dawes Exp $ */ #include "Xlibint.h" #include <X11/Xos.h> @@ -35,9 +35,9 @@ from The Open Group. #define ERR_RETURN 0 -static char *Format_Image(image, resultsize) -XImage *image; -int *resultsize; +static char *Format_Image( + XImage *image, + int *resultsize) { register int x, c, b; register char *ptr; @@ -82,8 +82,8 @@ int *resultsize; #define BYTES_PER_OUTPUT_LINE 12 -#if NeedFunctionPrototypes -int XWriteBitmapFile( +int +XWriteBitmapFile( Display *display, _Xconst char *filename, Pixmap bitmap, @@ -91,14 +91,6 @@ int XWriteBitmapFile( unsigned int height, int x_hot, int y_hot) -#else -int XWriteBitmapFile(display, filename, bitmap, width, height, x_hot, y_hot) - Display *display; - char *filename; - Pixmap bitmap; - unsigned int width, height; - int x_hot, y_hot; -#endif { char *data, *ptr; int size, byte; diff --git a/src/Xintconn.h b/src/Xintconn.h index 3010da4..f210d4e 100644 --- a/src/Xintconn.h +++ b/src/Xintconn.h @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/X11/Xintconn.h,v 1.1 2001/08/18 02:41:28 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Xintconn.h,v 1.2 2003/04/13 19:22:19 dawes Exp $ */ #ifndef _XINTCONN_H_ #define _XINTCONN_H_ 1 @@ -9,6 +9,15 @@ _XFUNCPROTOBEGIN /* ConnDis.c */ +int _XConnectDisplay ( + char *display_name, + char **fullnamep, /* RETURN */ + int *dpynump, /* RETURN */ + int *screenp, /* RETURN */ + char **auth_namep, /* RETURN */ + int *auth_namelenp, /* RETURN */ + char **auth_datap, /* RETURN */ + int *auth_datalenp); /* RETURN */ extern int _XDisconnectDisplay(XtransConnInfo trans_conn); extern Bool _XSendClientPrefix(Display *dpy, xConnClientPrefix *client, char *auth_proto, char *auth_string, diff --git a/src/XlibInt.c b/src/XlibInt.c index 689112c..6bb2d18 100644 --- a/src/XlibInt.c +++ b/src/XlibInt.c @@ -26,7 +26,7 @@ other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/XlibInt.c,v 3.34 2003/02/18 05:15:27 dawes Exp $ */ +/* $XFree86: xc/lib/X11/XlibInt.c,v 3.39 2003/11/17 22:20:10 dawes Exp $ */ /* * XlibInt.c - Internal support routines for the C subroutine @@ -46,12 +46,24 @@ from The Open Group. /* these pointers get initialized by XInitThreads */ LockInfoPtr _Xglobal_lock = NULL; -void (*_XCreateMutex_fn)() = NULL; -struct _XCVList *(*_XCreateCVL_fn)() = NULL; -void (*_XFreeMutex_fn)() = NULL; -void (*_XLockMutex_fn)() = NULL; -void (*_XUnlockMutex_fn)() = NULL; -xthread_t (*_Xthread_self_fn)() = NULL; +void (*_XCreateMutex_fn)(LockInfoPtr) = NULL; +/* struct _XCVList *(*_XCreateCVL_fn)() = NULL; */ +void (*_XFreeMutex_fn)(LockInfoPtr) = NULL; +void (*_XLockMutex_fn)( + LockInfoPtr /* lock */ +#if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE) + , char * /* file */ + , int /* line */ +#endif + ) = NULL; +void (*_XUnlockMutex_fn)( + LockInfoPtr /* lock */ +#if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE) + , char * /* file */ + , int /* line */ +#endif + ) = NULL; +xthread_t (*_Xthread_self_fn)(void) = NULL; #define XThread_Self() ((*_Xthread_self_fn)()) @@ -163,8 +175,17 @@ typedef union { char buf[BUFSIZE]; } _XAlignedBuffer; -static char *_XAsyncReply(); -static void _XProcessInternalConnection(); +static char *_XAsyncReply( + Display *dpy, + register xReply *rep, + char *buf, + register int *lenp, + Bool discard); + +static void _XProcessInternalConnection( + Display *dpy, + struct _XConnectionInfo *conn_info); + #define SEQLIMIT (65535 - (BUFSIZE / SIZEOF(xReq)) - 10) /* @@ -196,15 +217,13 @@ static xReq _dummy_request = { * until the connection is writable. */ static void -_XWaitForWritable(dpy -#ifdef XTHREADS - , cv -#endif - ) - Display *dpy; +_XWaitForWritable( + Display *dpy #ifdef XTHREADS - xcondition_t cv; /* our reading condition variable */ + , + xcondition_t cv /* our reading condition variable */ #endif + ) { #ifdef USE_POLL struct pollfd filedes; @@ -278,7 +297,7 @@ _XWaitForWritable(dpy { _XAlignedBuffer buf; BytesReadable_t pend; - register BytesReadable_t len; + register int len; register xReply *rep; /* find out how much data can be read */ @@ -305,11 +324,12 @@ _XWaitForWritable(dpy STARTITERATE(rep,xReply,buf.buf,len > 0) { if (rep->generic.type == X_Reply) { - pend = len; + int tmp = len; RESETITERPTR(rep,xReply, _XAsyncReply (dpy, rep, - ITERPTR(rep), &pend, True)); - len = pend; + ITERPTR(rep), &tmp, True)); + len = tmp; + pend = len; } else { if (rep->generic.type == X_Error) _XError (dpy, (xError *)rep); @@ -344,8 +364,8 @@ _XWaitForWritable(dpy #define POLLFD_CACHE_SIZE 5 /* initialize the struct array passed to poll() below */ -Bool _XPollfdCacheInit(dpy) - Display *dpy; +Bool _XPollfdCacheInit( + Display *dpy) { #ifdef USE_POLL struct pollfd *pfp; @@ -361,9 +381,9 @@ Bool _XPollfdCacheInit(dpy) return True; } -void _XPollfdCacheAdd(dpy, fd) - Display *dpy; - int fd; +void _XPollfdCacheAdd( + Display *dpy, + int fd) { #ifdef USE_POLL struct pollfd *pfp = (struct pollfd *)dpy->filedes; @@ -376,9 +396,9 @@ void _XPollfdCacheAdd(dpy, fd) } /* ARGSUSED */ -void _XPollfdCacheDel(dpy, fd) - Display *dpy; - int fd; /* not used */ +void _XPollfdCacheDel( + Display *dpy, + int fd) /* not used */ { #ifdef USE_POLL struct pollfd *pfp = (struct pollfd *)dpy->filedes; @@ -399,9 +419,9 @@ void _XPollfdCacheDel(dpy, fd) /* returns True iff there is an event in the queue newer than serial_num */ static Bool -_XNewerQueuedEvent(dpy, serial_num) - Display *dpy; - int serial_num; +_XNewerQueuedEvent( + Display *dpy, + int serial_num) { _XQEvent *qev; @@ -419,8 +439,8 @@ _XNewerQueuedEvent(dpy, serial_num) } static int -_XWaitForReadable(dpy) - Display *dpy; +_XWaitForReadable( + Display *dpy) { int result; int fd = dpy->fd; @@ -527,8 +547,8 @@ _XWaitForReadable(dpy) } static -int _XSeqSyncFunction(dpy) - register Display *dpy; +int _XSeqSyncFunction( + register Display *dpy) { xGetInputFocusReply rep; register xReq *req; @@ -549,7 +569,9 @@ int _XSeqSyncFunction(dpy) } #ifdef XTHREADS -static void _XFlushInt(); +static void _XFlushInt( + register Display *dpy, + register xcondition_t cv); #endif /* @@ -557,8 +579,8 @@ static void _XFlushInt(); * action is taken. This routine correctly handles incremental writes. * This routine may have to be reworked if int < long. */ -void _XFlush (dpy) - register Display *dpy; +void _XFlush( + register Display *dpy) { #ifdef XTHREADS /* With multi-threading we introduce an internal routine to which @@ -571,9 +593,9 @@ void _XFlush (dpy) * locking correctly. */ -static void _XFlushInt (dpy, cv) - register Display *dpy; - register xcondition_t cv; +static void _XFlushInt( + register Display *dpy, + register xcondition_t cv) { #endif /* XTHREADS*/ register long size, todo; @@ -671,11 +693,11 @@ static void _XFlushInt (dpy, cv) } int -_XEventsQueued (dpy, mode) - register Display *dpy; - int mode; +_XEventsQueued( + register Display *dpy, + int mode) { - register BytesReadable_t len; + register int len; BytesReadable_t pend; _XAlignedBuffer buf; register xReply *rep; @@ -838,11 +860,12 @@ _XEventsQueued (dpy, mode) STARTITERATE(rep,xReply,buf.buf,len > 0) { if (rep->generic.type == X_Reply) { - pend = len; + int tmp = len; RESETITERPTR(rep,xReply, _XAsyncReply (dpy, rep, - ITERPTR(rep), &pend, True)); - len = pend; + ITERPTR(rep), &tmp, True)); + len = tmp; + pend = len; } else { if (rep->generic.type == X_Error) _XError (dpy, (xError *)rep); @@ -865,12 +888,12 @@ _XEventsQueued (dpy, mode) /* _XReadEvents - Flush the output queue, * then read as many events as possible (but at least 1) and enqueue them */ -void _XReadEvents(dpy) - register Display *dpy; +void _XReadEvents( + register Display *dpy) { _XAlignedBuffer buf; BytesReadable_t pend; - register BytesReadable_t len; + int len; register xReply *rep; Bool not_yet_flushed = True; char *read_buf; @@ -1002,11 +1025,10 @@ void _XReadEvents(dpy) STARTITERATE(rep,xReply,buf.buf,len > 0) { if (rep->generic.type == X_Reply) { - pend = len; RESETITERPTR(rep,xReply, _XAsyncReply (dpy, rep, - ITERPTR(rep), &pend, True)); - len = pend; + ITERPTR(rep), &len, True)); + pend = len; } else { if (rep->generic.type == X_Error) _XError (dpy, (xError *) rep); @@ -1025,10 +1047,10 @@ void _XReadEvents(dpy) * _XRead - Read bytes from the socket taking into account incomplete * reads. This routine may have to be reworked if int < long. */ -int _XRead (dpy, data, size) - register Display *dpy; - register char *data; - register long size; +int _XRead( + register Display *dpy, + register char *data, + register long size) { register long bytes_read; #ifdef XTHREADS @@ -1082,10 +1104,10 @@ int _XRead (dpy, data, size) } #ifdef LONG64 -void _XRead32 (dpy, data, len) - Display *dpy; - register long *data; - long len; +void _XRead32( + Display *dpy, + register long *data, + long len) { register int *buf; register long i; @@ -1116,11 +1138,11 @@ void _XRead32 (dpy, data, len) * into a long (64 bits on a CRAY computer). * */ -static void _doXRead32 (dpy, data, size, packbuffer) - register Display *dpy; - register long *data; - register long size; - register char *packbuffer; +static void _doXRead32( + register Display *dpy, + register long *data + register long size, + register char *packbuffer) { long *lpack,*lp; long mask32 = 0x00000000ffffffff; @@ -1143,10 +1165,10 @@ static void _doXRead32 (dpy, data, size, packbuffer) } } -void _XRead32 (dpy, data, len) - Display *dpy; - long *data; - long len; +void _XRead32( + Display *dpy, + long *data, + long len) { char packbuffer[PACKBUFFERSIZE]; unsigned nunits = PACKBUFFERSIZE >> 2; @@ -1164,11 +1186,11 @@ void _XRead32 (dpy, data, len) * into a long (64 bits on a CRAY computer). * */ -static _doXRead16 (dpy, data, size, packbuffer) - register Display *dpy; - register short *data; - register long size; - char *packbuffer; +static _doXRead16( + register Display *dpy, + register short *data, + register long size, + char *packbuffer) { long *lpack,*lp; long mask16 = 0x000000000000ffff; @@ -1191,10 +1213,10 @@ static _doXRead16 (dpy, data, size, packbuffer) } } -void _XRead16 (dpy, data, len) - Display *dpy; - short *data; - long len; +void _XRead16( + Display *dpy, + short *data, + long len) { char packbuffer[PACKBUFFERSIZE]; unsigned nunits = PACKBUFFERSIZE >> 1; @@ -1205,10 +1227,10 @@ void _XRead16 (dpy, data, len) if (len) _doXRead16 (dpy, data, len, packbuffer); } -void _XRead16Pad (dpy, data, size) - Display *dpy; - short *data; - long size; +void _XRead16Pad( + Display *dpy, + short *data, + long size) { int slop = (size & 3); short slopbuf[3]; @@ -1226,10 +1248,10 @@ void _XRead16Pad (dpy, data, size) * reads. If the number of bytes is not 0 mod 4, read additional pad * bytes. This routine may have to be reworked if int < long. */ -void _XReadPad (dpy, data, size) - register Display *dpy; - register char *data; - register long size; +void _XReadPad( + register Display *dpy, + register char *data, + register long size) { register long bytes_read; struct iovec iov[2]; @@ -1258,14 +1280,17 @@ void _XReadPad (dpy, data, size) if (bytes_read > 0) { size -= bytes_read; - if ((iov[0].iov_len -= bytes_read) < 0) { - iov[1].iov_len += iov[0].iov_len; - iov[1].iov_base = (char *)iov[1].iov_base - iov[0].iov_len; + if (iov[0].iov_len < bytes_read) { + iov[1].iov_len += iov[0].iov_len - bytes_read; + iov[1].iov_base = + (char *)iov[1].iov_base + bytes_read - iov[0].iov_len; iov[0].iov_len = 0; } - else + else { + iov[0].iov_len -= bytes_read; iov[0].iov_base = (char *)iov[0].iov_base + bytes_read; } + } else if (ETEST()) { _XWaitForReadable(dpy); ESET(0); @@ -1305,17 +1330,10 @@ void _XReadPad (dpy, data, size) * This routine may have to be reworked if int < long; */ void -#if NeedFunctionPrototypes _XSend ( register Display *dpy, _Xconst char *data, register long size) -#else -_XSend (dpy, data, size) - register Display *dpy; - char *data; - register long size; -#endif { struct iovec iov[3]; static char const pad[3] = {0, 0, 0}; @@ -1438,8 +1456,8 @@ _XSend (dpy, data, size) } static void -_XGetMiscCode(dpy) - register Display *dpy; +_XGetMiscCode( + register Display *dpy) { xQueryExtensionReply qrep; register xQueryExtensionReq *qreq; @@ -1468,8 +1486,8 @@ _XGetMiscCode(dpy) } static int -_XIDHandler(dpy) - register Display *dpy; +_XIDHandler( + register Display *dpy) { xXCMiscGetXIDRangeReply grep; register xXCMiscGetXIDRangeReq *greq; @@ -1501,8 +1519,8 @@ _XIDHandler(dpy) /* * _XAllocID - resource ID allocation routine. */ -XID _XAllocID(dpy) - register Display *dpy; +XID _XAllocID( + register Display *dpy) { XID id; @@ -1531,10 +1549,10 @@ XID _XAllocID(dpy) /* * _XAllocIDs - multiple resource ID allocation routine. */ -void _XAllocIDs(dpy, ids, count) - register Display *dpy; - XID *ids; - int count; +void _XAllocIDs( + register Display *dpy, + XID *ids, + int count) { XID id; int i; @@ -1592,9 +1610,9 @@ void _XAllocIDs(dpy, ids, count) */ unsigned long -_XSetLastRequestRead(dpy, rep) - register Display *dpy; - register xGenericReply *rep; +_XSetLastRequestRead( + register Display *dpy, + register xGenericReply *rep) { register unsigned long newseq, lastseq; @@ -1630,11 +1648,11 @@ _XSetLastRequestRead(dpy, rep) * we may encounter. */ Status -_XReply (dpy, rep, extra, discard) - register Display *dpy; - register xReply *rep; - int extra; /* number of 32-bit words expected after the reply */ - Bool discard; /* should I discard data following "extra" words? */ +_XReply ( + register Display *dpy, + register xReply *rep, + int extra, /* number of 32-bit words expected after the reply */ + Bool discard) /* should I discard data following "extra" words? */ { /* Pull out the serial number now, so that (currently illegal) requests * generated by an error handler don't confuse us. @@ -1806,12 +1824,12 @@ _XReply (dpy, rep, extra, discard) } static char * -_XAsyncReply(dpy, rep, buf, lenp, discard) - Display *dpy; - register xReply *rep; - char *buf; - register int *lenp; - Bool discard; +_XAsyncReply( + Display *dpy, + register xReply *rep, + char *buf, + register int *lenp, + Bool discard) { register _XAsyncHandler *async, *next; register int len; @@ -1904,21 +1922,13 @@ _XAsyncReply(dpy, rep, buf, lenp, discard) * because could not allocate memory. * Assumes Display locked when called. */ -#if NeedFunctionPrototypes -Status _XRegisterInternalConnection( +Status +_XRegisterInternalConnection( Display* dpy, int fd, _XInternalConnectionProc callback, XPointer call_data ) -#else -Status -_XRegisterInternalConnection(dpy, fd, callback, call_data) - Display *dpy; - int fd; - _XInternalConnectionProc callback; - XPointer call_data; -#endif { struct _XConnectionInfo *new_conni, **iptr; struct _XConnWatchInfo *watchers; @@ -1961,17 +1971,11 @@ _XRegisterInternalConnection(dpy, fd, callback, call_data) * * Assumes Display locked when called. */ -#if NeedFunctionPrototypes -void _XUnregisterInternalConnection( +void +_XUnregisterInternalConnection( Display* dpy, int fd ) -#else -void -_XUnregisterInternalConnection(dpy, fd) - Display *dpy; - int fd; -#endif { struct _XConnectionInfo *info_list, **prev; struct _XConnWatchInfo *watch; @@ -2005,19 +2009,12 @@ _XUnregisterInternalConnection(dpy, fd) * The list is allocated with Xmalloc and should be freed by the caller * with Xfree; */ -#if NeedFunctionPrototypes -Status XInternalConnectionNumbers( +Status +XInternalConnectionNumbers( Display *dpy, int **fd_return, int *count_return ) -#else -Status -XInternalConnectionNumbers(dpy, fd_return, count_return) - Display *dpy; - int **fd_return; - int *count_return; -#endif { int count; struct _XConnectionInfo *info_list; @@ -2044,9 +2041,9 @@ XInternalConnectionNumbers(dpy, fd_return, count_return) return 1; } -static void _XProcessInternalConnection(dpy, conn_info) - Display *dpy; - struct _XConnectionInfo *conn_info; +static void _XProcessInternalConnection( + Display *dpy, + struct _XConnectionInfo *conn_info) { dpy->flags |= XlibDisplayProcConni; #ifdef XTHREADS @@ -2073,17 +2070,11 @@ static void _XProcessInternalConnection(dpy, conn_info) * for this fd. * The Display is NOT locked during the call. */ -#if NeedFunctionPrototypes -void XProcessInternalConnection( +void +XProcessInternalConnection( Display* dpy, int fd ) -#else -void -XProcessInternalConnection(dpy, fd) - Display *dpy; - int fd; -#endif { struct _XConnectionInfo *info_list; @@ -2104,19 +2095,12 @@ XProcessInternalConnection(dpy, fd) * If any connections are already registered, the callback is immediately * called for each of them. */ -#if NeedFunctionPrototypes -Status XAddConnectionWatch( +Status +XAddConnectionWatch( Display* dpy, XConnectionWatchProc callback, XPointer client_data ) -#else -Status -XAddConnectionWatch(dpy, callback, client_data) - Display *dpy; - XConnectionWatchProc callback; - XPointer client_data; -#endif { struct _XConnWatchInfo *new_watcher, **wptr; struct _XConnectionInfo *info_list; @@ -2166,19 +2150,12 @@ XAddConnectionWatch(dpy, callback, client_data) * Both callback and client_data must match what was passed to * XAddConnectionWatch. */ -#if NeedFunctionPrototypes -void XRemoveConnectionWatch( +void +XRemoveConnectionWatch( Display* dpy, XConnectionWatchProc callback, XPointer client_data ) -#else -void -XRemoveConnectionWatch(dpy, callback, client_data) - Display *dpy; - XConnectionWatchProc callback; - XPointer client_data; -#endif { struct _XConnWatchInfo *watch; struct _XConnWatchInfo *previous = NULL; @@ -2215,9 +2192,9 @@ XRemoveConnectionWatch(dpy, callback, client_data) /* Read and discard "n" 8-bit bytes of data */ -void _XEatData (dpy, n) - Display *dpy; - register unsigned long n; +void _XEatData( + Display *dpy, + register unsigned long n) { #define SCRATCHSIZE 2048 char buf[SCRATCHSIZE]; @@ -2236,9 +2213,9 @@ void _XEatData (dpy, n) * note that no squishing of move events in V11, since there * is pointer motion hints.... */ -void _XEnq (dpy, event) - register Display *dpy; - register xEvent *event; +void _XEnq( + register Display *dpy, + register xEvent *event) { register _XQEvent *qelt; @@ -2271,10 +2248,10 @@ void _XEnq (dpy, event) /* * _XDeq - Remove event packet from the display's queue. */ -void _XDeq (dpy, prev, qelt) - register Display *dpy; - register _XQEvent *prev; /* element before qelt */ - register _XQEvent *qelt; /* element to be unlinked */ +void _XDeq( + register Display *dpy, + register _XQEvent *prev, /* element before qelt */ + register _XQEvent *qelt) /* element to be unlinked */ { if (prev) { if ((prev->next = qelt->next) == NULL) @@ -2296,10 +2273,10 @@ void _XDeq (dpy, prev, qelt) /*ARGSUSED*/ Bool -_XUnknownWireEvent(dpy, re, event) -register Display *dpy; /* pointer to display structure */ -register XEvent *re; /* pointer to where event should be reformatted */ -register xEvent *event; /* wire protocol event */ +_XUnknownWireEvent( + register Display *dpy, /* pointer to display structure */ + register XEvent *re, /* pointer to where event should be reformatted */ + register xEvent *event) /* wire protocol event */ { #ifdef notdef (void) fprintf(stderr, @@ -2311,10 +2288,10 @@ register xEvent *event; /* wire protocol event */ /*ARGSUSED*/ Status -_XUnknownNativeEvent(dpy, re, event) -register Display *dpy; /* pointer to display structure */ -register XEvent *re; /* pointer to where event should be reformatted */ -register xEvent *event; /* wire protocol event */ +_XUnknownNativeEvent( + register Display *dpy, /* pointer to display structure */ + register XEvent *re, /* pointer to where event should be reformatted */ + register xEvent *event) /* wire protocol event */ { #ifdef notdef (void) fprintf(stderr, @@ -2327,10 +2304,10 @@ register xEvent *event; /* wire protocol event */ * reformat a wire event into an XEvent structure of the right type. */ Bool -_XWireToEvent(dpy, re, event) -register Display *dpy; /* pointer to display structure */ -register XEvent *re; /* pointer to where event should be reformatted */ -register xEvent *event; /* wire protocol event */ +_XWireToEvent( + register Display *dpy, /* pointer to display structure */ + register XEvent *re, /* pointer to where event should be reformatted */ + register xEvent *event) /* wire protocol event */ { re->type = event->u.u.type & 0x7f; @@ -2701,8 +2678,8 @@ register xEvent *event; /* wire protocol event */ * _XDefaultIOError - Default fatal system error reporting routine. Called * when an X internal system error is encountered. */ -void _XDefaultIOError (dpy) - Display *dpy; +int _XDefaultIOError( + Display *dpy) { if (ECHECK(EPIPE)) { (void) fprintf (stderr, @@ -2724,13 +2701,14 @@ void _XDefaultIOError (dpy) } exit(1); + return(0); /* dummy - function should never return */ } -static int _XPrintDefaultError (dpy, event, fp) - Display *dpy; - XErrorEvent *event; - FILE *fp; +static int _XPrintDefaultError( + Display *dpy, + XErrorEvent *event, + FILE *fp) { char buffer[BUFSIZ]; char mesg[BUFSIZ]; @@ -2838,9 +2816,9 @@ static int _XPrintDefaultError (dpy, event, fp) return 1; } -int _XDefaultError(dpy, event) - Display *dpy; - XErrorEvent *event; +int _XDefaultError( + Display *dpy, + XErrorEvent *event) { if (_XPrintDefaultError (dpy, event, stderr) == 0) return 0; exit(1); @@ -2859,9 +2837,9 @@ Bool _XDefaultWireError(display, he, we) /* * _XError - upcall internal or user protocol error handler */ -int _XError (dpy, rep) - Display *dpy; - register xError *rep; +int _XError ( + Display *dpy, + register xError *rep) { /* * X_Error packet encountered! We need to unpack the error before @@ -2911,8 +2889,8 @@ int _XError (dpy, rep) * _XIOError - call user connection error handler and exit */ int -_XIOError (dpy) - Display *dpy; +_XIOError ( + Display *dpy) { dpy->flags |= XlibDisplayIOError; #ifdef WIN32 @@ -2935,9 +2913,9 @@ _XIOError (dpy) * GetReq* and a call to Data* or _XSend*, or in a context when the thread * is guaranteed to not unlock the display. */ -char *_XAllocScratch (dpy, nbytes) - register Display *dpy; - unsigned long nbytes; +char *_XAllocScratch( + register Display *dpy, + unsigned long nbytes) { if (nbytes > dpy->scratch_length) { if (dpy->scratch_buffer) Xfree (dpy->scratch_buffer); @@ -2952,9 +2930,9 @@ char *_XAllocScratch (dpy, nbytes) * Scratch space allocator you can call any time, multiple times, and be * MT safe, but you must hand the buffer back with _XFreeTemp. */ -char *_XAllocTemp (dpy, nbytes) - register Display *dpy; - unsigned long nbytes; +char *_XAllocTemp( + register Display *dpy, + unsigned long nbytes) { char *buf; @@ -2964,10 +2942,10 @@ char *_XAllocTemp (dpy, nbytes) return buf; } -void _XFreeTemp (dpy, buf, nbytes) - register Display *dpy; - char *buf; - unsigned long nbytes; +void _XFreeTemp( + register Display *dpy, + char *buf, + unsigned long nbytes) { if (dpy->scratch_buffer) Xfree(dpy->scratch_buffer); @@ -2978,9 +2956,9 @@ void _XFreeTemp (dpy, buf, nbytes) /* * Given a visual id, find the visual structure for this id on this display. */ -Visual *_XVIDtoVisual (dpy, id) - Display *dpy; - VisualID id; +Visual *_XVIDtoVisual( + Display *dpy, + VisualID id) { register int i, j, k; register Screen *sp; @@ -3001,12 +2979,7 @@ Visual *_XVIDtoVisual (dpy, id) } int -#if NeedFunctionPrototypes XFree (void *data) -#else -XFree (data) - char *data; -#endif { Xfree (data); return 1; @@ -3030,10 +3003,10 @@ void _Xbcopy(b1, b2, length) #endif #ifdef DataRoutineIsProcedure -void Data (dpy, data, len) - Display *dpy; - char *data; - long len; +void Data( + Display *dpy, + char *data, + long len) { if (dpy->bufptr + (len) <= dpy->bufmax) { memcpy(dpy->bufptr, data, (int)len); @@ -3047,10 +3020,10 @@ void Data (dpy, data, len) #ifdef LONG64 int -_XData32 (dpy, data, len) - Display *dpy; - register long *data; - unsigned len; +_XData32( + Display *dpy, + register long *data, + unsigned len) { register int *buf; register long i; @@ -3089,11 +3062,11 @@ _XData32 (dpy, data, len) * "len" is the length in bytes of the data. */ -static doData16(dpy, data, len, packbuffer) - register Display *dpy; - short *data; - unsigned len; - char *packbuffer; +static doData16( + register Display *dpy, + short *data, + unsigned len, + char *packbuffer) { long *lp,*lpack; long i, nwords,bits; @@ -3122,10 +3095,10 @@ static doData16(dpy, data, len, packbuffer) Data(dpy, packbuffer, len); } -_XData16 (dpy, data, len) - Display *dpy; - short *data; - unsigned len; +_XData16 ( + Display *dpy, + short *data, + unsigned len) { char packbuffer[PACKBUFFERSIZE]; unsigned nunits = PACKBUFFERSIZE >> 1; @@ -3144,11 +3117,11 @@ _XData16 (dpy, data, len) * "len" is the length in bytes of the data. */ -static doData32 (dpy, data, len, packbuffer) - register Display *dpy; - long *data; - unsigned len; - char *packbuffer; +static doData32( + register Display *dpy + long *data, + unsigned len, + char *packbuffer) { long *lp,*lpack; long i,bits,nwords; @@ -3175,10 +3148,10 @@ static doData32 (dpy, data, len, packbuffer) Data(dpy, packbuffer, len); } -_XData32 (dpy, data, len) - Display *dpy; - long *data; - unsigned len; +void _XData32( + Display *dpy, + long *data, + unsigned len, { char packbuffer[PACKBUFFERSIZE]; unsigned nunits = PACKBUFFERSIZE >> 2; @@ -3208,9 +3181,9 @@ _XData32 (dpy, data, len) /* * _XGetHostname - similar to gethostname but allows special processing. */ -int _XGetHostname (buf, maxlen) - char *buf; - int maxlen; +int _XGetHostname ( + char *buf, + int maxlen) { int len; diff --git a/src/XomGeneric.h b/src/XomGeneric.h index 019d011..9b54749 100644 --- a/src/XomGeneric.h +++ b/src/XomGeneric.h @@ -31,7 +31,7 @@ * Modifier: Takanori Tateno FUJITSU LIMITED * */ -/* $XFree86: xc/lib/X11/XomGeneric.h,v 1.4 2001/01/17 19:41:50 dawes Exp $ */ +/* $XFree86: xc/lib/X11/XomGeneric.h,v 1.6 2003/11/17 22:20:11 dawes Exp $ */ #ifndef _XOMGENERIC_H_ #define _XOMGENERIC_H_ @@ -150,24 +150,19 @@ typedef struct _XOCGenericRec { _XFUNCPROTOBEGIN extern XOM _XomGenericOpenOM( -#if NeedFunctionPrototypes XLCd /* lcd */, Display* /* dpy */, XrmDatabase /* rdb */, _Xconst char* /* res_name */, _Xconst char* /* res_class */ -#endif ); extern XlcConv _XomInitConverter( -#if NeedFunctionPrototypes XOC /* oc */, XOMTextType /* type */ -#endif ); extern int _XomConvert( -#if NeedFunctionPrototypes XOC /* oc */, XlcConv /* conv */, XPointer* /* from */, @@ -176,9 +171,148 @@ extern int _XomConvert( int* /* to_left */, XPointer* /* args */, int /* num_args */ -#endif ); +extern int +_XmbDefaultTextEscapement(XOC oc, _Xconst char *text, int length); +extern int +_XwcDefaultTextEscapement(XOC oc, _Xconst wchar_t *text, int length); +extern int +_Xutf8DefaultTextEscapement(XOC oc, _Xconst char *text, int length); +extern int +_XmbDefaultTextExtents(XOC oc, _Xconst char *text, int length, + XRectangle *overall_ink, XRectangle *overall_logical); +extern int +_XwcDefaultTextExtents(XOC oc, _Xconst wchar_t *text, int length, + XRectangle *overall_ink, XRectangle *overall_logical); +extern int +_Xutf8DefaultTextExtents(XOC oc, _Xconst char *text, int length, + XRectangle *overall_ink, XRectangle *overall_logical); +extern Status +_XmbDefaultTextPerCharExtents( + XOC oc, _Xconst char *text, int length, + XRectangle *ink_buf, XRectangle *logical_buf, + int buf_size, int *num_chars, + XRectangle *overall_ink, + XRectangle *overall_logical); +extern Status +_XwcDefaultTextPerCharExtents( + XOC oc, _Xconst wchar_t *text, int length, + XRectangle *ink_buf, XRectangle *logical_buf, + int buf_size, int *num_chars, + XRectangle *overall_ink, + XRectangle *overall_logical); +extern Status +_Xutf8DefaultTextPerCharExtents( + XOC oc, _Xconst char *text, int length, + XRectangle *ink_buf, XRectangle *logical_buf, + int buf_size, int *num_chars, + XRectangle *overall_ink, + XRectangle *overall_logical); +extern int +_XmbDefaultDrawString(Display *dpy, Drawable d, XOC oc, GC gc, int x, int y, + _Xconst char *text, int length); +extern int +_XwcDefaultDrawString(Display *dpy, Drawable d, XOC oc, GC gc, int x, int y, + _Xconst wchar_t *text, int length); +extern int +_Xutf8DefaultDrawString(Display *dpy, Drawable d, XOC oc, GC gc, int x, int y, + _Xconst char *text, int length); +extern void +_XmbDefaultDrawImageString(Display *dpy, Drawable d, XOC oc, GC gc, int x, + int y, _Xconst char *text, int length); +extern void +_XwcDefaultDrawImageString(Display *dpy, Drawable d, XOC oc, GC gc, int x, + int y, _Xconst wchar_t *text, int length); +extern void +_Xutf8DefaultDrawImageString(Display *dpy, Drawable d, XOC oc, GC gc, int x, + int y, _Xconst char *text, int length); + +extern int +_XmbGenericTextEscapement(XOC oc, _Xconst char *text, int length); +extern int +_XmbGenericTextExtents(XOC oc, _Xconst char *text, int length, + XRectangle *overall_ink, XRectangle *overall_logical); +extern int +_Xutf8GenericDrawString(Display *dpy, Drawable d, XOC oc, GC gc, int x, int y, + _Xconst char *text, int length); +extern void +_Xutf8GenericDrawImageString(Display *dpy, Drawable d, XOC oc, GC gc, int x, + int y, _Xconst char *text, int length); +extern Status +_Xutf8GenericTextPerCharExtents( + XOC oc, _Xconst char *text, int length, + XRectangle *ink_buf, XRectangle *logical_buf, + int buf_size, int *num_chars, + XRectangle *overall_ink, + XRectangle *overall_logical); +extern int +_Xutf8GenericTextExtents(XOC oc, _Xconst char *text, int length, + XRectangle *overall_ink, XRectangle *overall_logical); +extern int +_Xutf8GenericTextEscapement(XOC oc, _Xconst char *text, int length); +extern void +_XwcGenericDrawImageString(Display *dpy, Drawable d, XOC oc, GC gc, int x, + int y, _Xconst wchar_t *text, int length); +extern int +_XwcGenericDrawString(Display *dpy, Drawable d, XOC oc, GC gc, int x, int y, + _Xconst wchar_t *text, int length); +extern Status +_XwcGenericTextPerCharExtents(XOC oc, _Xconst wchar_t *text, int length, + XRectangle *ink_buf, XRectangle *logical_buf, + int buf_size, int *num_chars, + XRectangle *overall_ink, + XRectangle *overall_logical); +extern int +_XwcGenericTextExtents(XOC oc, _Xconst wchar_t *text, int length, + XRectangle *overall_ink, XRectangle *overall_logical); +extern int +_XwcGenericTextEscapement(XOC oc, _Xconst wchar_t *text, int length); +extern void +_XmbGenericDrawImageString(Display *dpy, Drawable d, XOC oc, GC gc, int x, + int y, _Xconst char *text, int length); +extern int +_XmbGenericDrawString(Display *dpy, Drawable d, XOC oc, GC gc, int x, int y, + _Xconst char *text, int length); +extern Status +_XmbGenericTextPerCharExtents(XOC oc, _Xconst char *text, int length, + XRectangle *ink_buf, XRectangle *logical_buf, + int buf_size, int *num_chars, + XRectangle *overall_ink, + XRectangle *overall_logical); + +extern FontData +read_EncodingInfo( + int count, + char **value); + +extern int +_XomGenericDrawString( + Display *dpy, + Drawable d, + XOC oc, + GC gc, + int x, int y, + XOMTextType type, + XPointer text, + int length); +extern int +_XomGenericTextExtents( + XOC oc, + XOMTextType type, + XPointer text, + int length, + XRectangle *overall_ink, + XRectangle *overall_logical); +extern FontData +_XomGetFontDataFromFontSet( + FontSet fs, + unsigned char *str, + int len, + int *len_ret, + int is2b, + int type); + _XFUNCPROTOEND #endif /* _XOMGENERIC_H_ */ diff --git a/src/Xresinternal.h b/src/Xresinternal.h new file mode 100644 index 0000000..b0a7897 --- /dev/null +++ b/src/Xresinternal.h @@ -0,0 +1,15 @@ +/* $XFree86: xc/lib/X11/Xresinternal.h,v 1.1 2003/04/13 19:22:19 dawes Exp $ */ + +#ifndef _XRESINTERNAL_H_ +#define _XRESINTERNAL_H_ + +/* type defines */ +typedef unsigned long Signature; + +/* prototypes */ +extern XrmQuark _XrmInternalStringToQuark( + register _Xconst char *name, register int len, register Signature sig, + Bool permstring); + +#endif /* _XRESOURCEINTERNAL_H_ */ +/* DON'T ADD STUFF AFTER THIS #endif */ @@ -49,7 +49,7 @@ other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/Xrm.c,v 3.20 2002/05/31 18:45:42 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Xrm.c,v 3.23 2003/11/17 22:20:11 dawes Exp $ */ #include <stdio.h> #include <ctype.h> @@ -61,8 +61,8 @@ from The Open Group. #endif #include "XrmI.h" #include <X11/Xos.h> - -extern XrmQuark _XrmInternalStringToQuark(); +#include "Xresinternal.h" +#include "Xresource.h" /* @@ -112,19 +112,15 @@ Bob Scheifler */ -typedef unsigned long Signature; - static XrmQuark XrmQString, XrmQANY; typedef Bool (*DBEnumProc)( -#if NeedNestedPrototypes /* this is Nested on purpose, to match Xlib.h */ XrmDatabase* /* db */, XrmBindingList /* bindings */, XrmQuarkList /* quarks */, XrmRepresentation* /* type */, XrmValue* /* value */, XPointer /* closure */ -#endif ); typedef struct _VEntry { @@ -218,6 +214,24 @@ typedef struct _EClosure { int mode; /* XrmEnum<kind> */ } EClosureRec, *EClosure; +/* types for typecasting ETable based functions to NTable based functions */ +typedef Bool (*getNTableSProcp)( + NTable table, + XrmNameList names, + XrmClassList classes, + SClosure closure); +typedef Bool (*getNTableVProcp)( + NTable table, + XrmNameList names, + XrmClassList classes, + VClosure closure); +typedef Bool (*getNTableEProcp)( + NTable table, + XrmNameList names, + XrmClassList classes, + register int level, + EClosure closure); + /* predicate to determine when to resize a hash table */ #define GrowthPred(n,m) ((unsigned)(n) > (((m) + 1) << 2)) @@ -312,14 +326,15 @@ static XrmBits const xrmtypes[256] = { /* The rest will be automatically initialized to zero. */ }; -void XrmInitialize() +void XrmInitialize(void) { XrmQString = XrmPermStringToQuark("String"); XrmQANY = XrmPermStringToQuark("?"); } -XrmDatabase XrmGetDatabase(display) - Display *display; +#ifndef _XP_PRINT_SERVER_ +XrmDatabase XrmGetDatabase( + Display *display) { XrmDatabase retval; LockDisplay(display); @@ -328,24 +343,20 @@ XrmDatabase XrmGetDatabase(display) return retval; } -void XrmSetDatabase(display, database) - Display *display; - XrmDatabase database; +void XrmSetDatabase( + Display *display, + XrmDatabase database) { LockDisplay(display); display->db = database; UnlockDisplay(display); } +#endif /* !_XP_PRINT_SERVER_ */ -#if NeedFunctionPrototypes -void XrmStringToQuarkList( +void +XrmStringToQuarkList( register _Xconst char *name, register XrmQuarkList quarks) /* RETURN */ -#else -void XrmStringToQuarkList(name, quarks) - register char *name; - register XrmQuarkList quarks; /* RETURN */ -#endif { register XrmBits bits; register Signature sig = 0; @@ -375,17 +386,11 @@ void XrmStringToQuarkList(name, quarks) *quarks = NULLQUARK; } -#if NeedFunctionPrototypes -void XrmStringToBindingQuarkList( +void +XrmStringToBindingQuarkList( register _Xconst char *name, register XrmBindingList bindings, /* RETURN */ register XrmQuarkList quarks) /* RETURN */ -#else -void XrmStringToBindingQuarkList(name, bindings, quarks) - register char *name; - register XrmBindingList bindings; /* RETURN */ - register XrmQuarkList quarks; /* RETURN */ -#endif { register XrmBits bits; register Signature sig = 0; @@ -426,9 +431,9 @@ void XrmStringToBindingQuarkList(name, bindings, quarks) #ifdef DEBUG -static void PrintQuarkList(quarks, stream) - XrmQuarkList quarks; - FILE *stream; +static void PrintQuarkList( + XrmQuarkList quarks, + FILE *stream) { Bool firstNameSeen; @@ -481,7 +486,7 @@ static const XrmMethodsRec mb_methods = { }; -static XrmDatabase NewDatabase() +static XrmDatabase NewDatabase(void) { register XrmDatabase db; @@ -504,9 +509,9 @@ static XrmDatabase NewDatabase() /* move all values from ftable to ttable, and free ftable's buckets. * ttable is quaranteed empty to start with. */ -static void MoveValues(ftable, ttable) - LTable ftable; - register LTable ttable; +static void MoveValues( + LTable ftable, + register LTable ttable) { register VEntry fentry, nfentry; register VEntry *prev; @@ -531,9 +536,9 @@ static void MoveValues(ftable, ttable) /* move all tables from ftable to ttable, and free ftable. * ttable is quaranteed empty to start with. */ -static void MoveTables(ftable, ttable) - NTable ftable; - register NTable ttable; +static void MoveTables( + NTable ftable, + register NTable ttable) { register NTable fentry, nfentry; register NTable *prev; @@ -556,8 +561,8 @@ static void MoveTables(ftable, ttable) } /* grow the table, based on current number of entries */ -static void GrowTable(prev) - NTable *prev; +static void GrowTable( + NTable *prev) { register NTable table; register int i; @@ -599,10 +604,10 @@ static void GrowTable(prev) } /* merge values from ftable into *pprev, destroy ftable in the process */ -static void MergeValues(ftable, pprev, override) - LTable ftable; - NTable *pprev; - Bool override; +static void MergeValues( + LTable ftable, + NTable *pprev, + Bool override) { register VEntry fentry, tentry; register VEntry *prev; @@ -679,10 +684,10 @@ static void MergeValues(ftable, pprev, override) } /* merge tables from ftable into *pprev, destroy ftable in the process */ -static void MergeTables(ftable, pprev, override) - NTable ftable; - NTable *pprev; - Bool override; +static void MergeTables( + NTable ftable, + NTable *pprev, + Bool override) { register NTable fentry, tentry; NTable nfentry; @@ -752,9 +757,9 @@ static void MergeTables(ftable, pprev, override) GROW(pprev); } -void XrmCombineDatabase(from, into, override) - XrmDatabase from, *into; - Bool override; +void XrmCombineDatabase( + XrmDatabase from, XrmDatabase *into, + Bool override) { register NTable *prev; register NTable ftable, ttable, nftable; @@ -801,19 +806,19 @@ void XrmCombineDatabase(from, into, override) } } -void XrmMergeDatabases(from, into) - XrmDatabase from, *into; +void XrmMergeDatabases( + XrmDatabase from, XrmDatabase *into) { XrmCombineDatabase(from, into, True); } /* store a value in the database, overriding any existing entry */ -static void PutEntry(db, bindings, quarks, type, value) - XrmDatabase db; - XrmBindingList bindings; - XrmQuarkList quarks; - XrmRepresentation type; - XrmValuePtr value; +static void PutEntry( + XrmDatabase db, + XrmBindingList bindings, + XrmQuarkList quarks, + XrmRepresentation type, + XrmValuePtr value) { register NTable *pprev, *prev; register NTable table; @@ -1001,12 +1006,12 @@ static void PutEntry(db, bindings, quarks, type, value) #undef NEWTABLE } -void XrmQPutResource(pdb, bindings, quarks, type, value) - XrmDatabase *pdb; - XrmBindingList bindings; - XrmQuarkList quarks; - XrmRepresentation type; - XrmValuePtr value; +void XrmQPutResource( + XrmDatabase *pdb, + XrmBindingList bindings, + XrmQuarkList quarks, + XrmRepresentation type, + XrmValuePtr value) { if (!*pdb) *pdb = NewDatabase(); _XLockMutex(&(*pdb)->linfo); @@ -1014,19 +1019,12 @@ void XrmQPutResource(pdb, bindings, quarks, type, value) _XUnlockMutex(&(*pdb)->linfo); } -#if NeedFunctionPrototypes -void XrmPutResource( +void +XrmPutResource( XrmDatabase *pdb, _Xconst char *specifier, _Xconst char *type, XrmValuePtr value) -#else -void XrmPutResource(pdb, specifier, type, value) - XrmDatabase *pdb; - char *specifier; - char *type; - XrmValuePtr value; -#endif { XrmBinding bindings[MAXDBDEPTH+1]; XrmQuark quarks[MAXDBDEPTH+1]; @@ -1038,19 +1036,12 @@ void XrmPutResource(pdb, specifier, type, value) _XUnlockMutex(&(*pdb)->linfo); } -#if NeedFunctionPrototypes -void XrmQPutStringResource( +void +XrmQPutStringResource( XrmDatabase *pdb, XrmBindingList bindings, XrmQuarkList quarks, _Xconst char *str) -#else -void XrmQPutStringResource(pdb, bindings, quarks, str) - XrmDatabase *pdb; - XrmBindingList bindings; - XrmQuarkList quarks; - char *str; -#endif { XrmValue value; @@ -1091,13 +1082,17 @@ void XrmQPutStringResource(pdb, bindings, quarks, str) */ #define DEF_BUFF_SIZE 8192 -static void GetIncludeFile(); +static void GetIncludeFile( + XrmDatabase db, + _Xconst char *base, + _Xconst char *fname, + int fnamelen); -static void GetDatabase(db, str, filename, doall) - XrmDatabase db; - register char *str; - char *filename; - Bool doall; +static void GetDatabase( + XrmDatabase db, + _Xconst register char *str, + _Xconst char *filename, + Bool doall) { char *rhs; char *lhs, lhs_s[DEF_BUFF_SIZE]; @@ -1194,7 +1189,7 @@ static void GetDatabase(db, str, filename, doall) while (is_space(bits = next_char(c, str))) {}; /* must have a starting " */ if (c == '"') { - char *fname = str+1; + _Xconst char *fname = str+1; len = 0; do { if (only_pcs) { @@ -1521,17 +1516,11 @@ static void GetDatabase(db, str, filename, doall) (*db->methods->mbfinish)(db->mbstate); } -#if NeedFunctionPrototypes -void XrmPutStringResource( +void +XrmPutStringResource( XrmDatabase *pdb, _Xconst char*specifier, _Xconst char*str) -#else -void XrmPutStringResource(pdb, specifier, str) - XrmDatabase *pdb; - char *specifier; - char *str; -#endif { XrmValue value; XrmBinding bindings[MAXDBDEPTH+1]; @@ -1547,15 +1536,10 @@ void XrmPutStringResource(pdb, specifier, str) } -#if NeedFunctionPrototypes -void XrmPutLineResource( +void +XrmPutLineResource( XrmDatabase *pdb, _Xconst char*line) -#else -void XrmPutLineResource(pdb, line) - XrmDatabase *pdb; - char *line; -#endif { if (!*pdb) *pdb = NewDatabase(); _XLockMutex(&(*pdb)->linfo); @@ -1563,13 +1547,9 @@ void XrmPutLineResource(pdb, line) _XUnlockMutex(&(*pdb)->linfo); } -#if NeedFunctionPrototypes -XrmDatabase XrmGetStringDatabase( +XrmDatabase +XrmGetStringDatabase( _Xconst char *data) -#else -XrmDatabase XrmGetStringDatabase(data) - char *data; -#endif { XrmDatabase db; @@ -1587,8 +1567,7 @@ XrmDatabase XrmGetStringDatabase(data) */ static char * -ReadInFile(filename) -char * filename; +ReadInFile(_Xconst char *filename) { register int fd, size; char * filebuf; @@ -1643,11 +1622,11 @@ char * filename; } static void -GetIncludeFile(db, base, fname, fnamelen) - XrmDatabase db; - char *base; - char *fname; - int fnamelen; +GetIncludeFile( + XrmDatabase db, + _Xconst char *base, + _Xconst char *fname, + int fnamelen) { int len; char *str; @@ -1672,13 +1651,9 @@ GetIncludeFile(db, base, fname, fnamelen) Xfree(str); } -#if NeedFunctionPrototypes -XrmDatabase XrmGetFileDatabase( +XrmDatabase +XrmGetFileDatabase( _Xconst char *filename) -#else -XrmDatabase XrmGetFileDatabase(filename) - char *filename; -#endif { XrmDatabase db; char *str; @@ -1694,17 +1669,11 @@ XrmDatabase XrmGetFileDatabase(filename) return db; } -#if NeedFunctionPrototypes -Status XrmCombineFileDatabase( +Status +XrmCombineFileDatabase( _Xconst char *filename, XrmDatabase *target, Bool override) -#else -Status XrmCombineFileDatabase(filename, target, override) - char *filename; - XrmDatabase *target; - Bool override; -#endif { XrmDatabase db; char *str; @@ -1730,12 +1699,12 @@ Status XrmCombineFileDatabase(filename, target, override) * stop if user proc returns True. level is current depth in database. */ /*ARGSUSED*/ -static Bool EnumLTable(table, names, classes, level, closure) - LTable table; - XrmNameList names; - XrmClassList classes; - register int level; - register EClosure closure; +static Bool EnumLTable( + LTable table, + XrmNameList names, + XrmClassList classes, + register int level, + register EClosure closure) { register VEntry *bucket; register int i; @@ -1776,10 +1745,10 @@ static Bool EnumLTable(table, names, classes, level, closure) return False; } -static Bool EnumAllNTable(table, level, closure) - NTable table; - register int level; - register EClosure closure; +static Bool EnumAllNTable( + NTable table, + register int level, + register EClosure closure) { register NTable *bucket; register int i; @@ -1810,17 +1779,22 @@ static Bool EnumAllNTable(table, level, closure) /* recurse on every table in the table, arbitrary order. * stop if user proc returns True. level is current depth in database. */ -static Bool EnumNTable(table, names, classes, level, closure) - NTable table; - XrmNameList names; - XrmClassList classes; - register int level; - register EClosure closure; +static Bool EnumNTable( + NTable table, + XrmNameList names, + XrmClassList classes, + register int level, + register EClosure closure) { register NTable entry; register XrmQuark q; register unsigned int leaf; - Bool (*get)(); + Bool (*get)( + NTable table, + XrmNameList names, + XrmClassList classes, + register int level, + EClosure closure); Bool bilevel; /* find entries named ename, leafness leaf, tight or loose, and call get */ @@ -1881,7 +1855,7 @@ static Bool EnumNTable(table, names, classes, level, closure) leaf = 0; bilevel = !names[1]; } else { - get = EnumLTable; /* bottom of recursion */ + get = (getNTableEProcp)EnumLTable; /* bottom of recursion */ leaf = 1; bilevel = False; } @@ -1924,7 +1898,7 @@ static Bool EnumNTable(table, names, classes, level, closure) if (!*names) break; if (!names[1] && closure->mode != XrmEnumAllLevels) { - get = EnumLTable; /* bottom of recursion */ + get = (getNTableEProcp)EnumLTable; /* bottom of recursion */ leaf = 1; } ILOOSE(*names); /* loose names */ @@ -1968,13 +1942,13 @@ static Bool EnumNTable(table, names, classes, level, closure) /* call the proc for every value in the database, arbitrary order. * stop if the proc returns True. */ -Bool XrmEnumerateDatabase(db, names, classes, mode, proc, closure) - XrmDatabase db; - XrmNameList names; - XrmClassList classes; - int mode; - DBEnumProc proc; - XPointer closure; +Bool XrmEnumerateDatabase( + XrmDatabase db, + XrmNameList names, + XrmClassList classes, + int mode, + DBEnumProc proc, + XPointer closure) { XrmBinding bindings[MAXDBDEPTH+2]; XrmQuark quarks[MAXDBDEPTH+2]; @@ -2004,10 +1978,10 @@ Bool XrmEnumerateDatabase(db, names, classes, mode, proc, closure) return retval; } -static void PrintBindingQuarkList(bindings, quarks, stream) - XrmBindingList bindings; - XrmQuarkList quarks; - FILE *stream; +static void PrintBindingQuarkList( + XrmBindingList bindings, + XrmQuarkList quarks, + FILE *stream) { Bool firstNameSeen; @@ -2024,13 +1998,13 @@ static void PrintBindingQuarkList(bindings, quarks, stream) /* output out the entry in correct file syntax */ /*ARGSUSED*/ -static Bool DumpEntry(db, bindings, quarks, type, value, data) - XrmDatabase *db; - XrmBindingList bindings; - XrmQuarkList quarks; - XrmRepresentation *type; - XrmValuePtr value; - XPointer data; +static Bool DumpEntry( + XrmDatabase *db, + XrmBindingList bindings, + XrmQuarkList quarks, + XrmRepresentation *type, + XrmValuePtr value, + XPointer data) { FILE *stream = (FILE *)data; register unsigned int i; @@ -2072,9 +2046,9 @@ static Bool DumpEntry(db, bindings, quarks, type, value, data) #ifdef DEBUG -void PrintTable(table, file) - NTable table; - FILE *file; +void PrintTable( + NTable table, + FILE *file) { XrmBinding bindings[MAXDBDEPTH+1]; XrmQuark quarks[MAXDBDEPTH+1]; @@ -2095,15 +2069,10 @@ void PrintTable(table, file) #endif /* DEBUG */ -#if NeedFunctionPrototypes -void XrmPutFileDatabase( +void +XrmPutFileDatabase( XrmDatabase db, _Xconst char *fileName) -#else -void XrmPutFileDatabase(db, fileName) - XrmDatabase db; - char *fileName; -#endif { FILE *file; XrmQuark empty = NULLQUARK; @@ -2162,11 +2131,11 @@ void XrmPutFileDatabase(db, fileName) /* add tight/loose entry to the search list, return True if list is full */ /*ARGSUSED*/ -static Bool AppendLEntry(table, names, classes, closure) - LTable table; - XrmNameList names; - XrmClassList classes; - register SClosure closure; +static Bool AppendLEntry( + LTable table, + XrmNameList names, + XrmClassList classes, + register SClosure closure) { /* check for duplicate */ if (closure->idx >= 0 && closure->list[closure->idx] == table) @@ -2181,11 +2150,11 @@ static Bool AppendLEntry(table, names, classes, closure) /* add loose entry to the search list, return True if list is full */ /*ARGSUSED*/ -static Bool AppendLooseLEntry(table, names, classes, closure) - LTable table; - XrmNameList names; - XrmClassList classes; - register SClosure closure; +static Bool AppendLooseLEntry( + LTable table, + XrmNameList names, + XrmClassList classes, + register SClosure closure) { /* check for duplicate */ if (closure->idx >= 0 && closure->list[closure->idx] == table) @@ -2201,22 +2170,26 @@ static Bool AppendLooseLEntry(table, names, classes, closure) } /* search for a leaf table */ -static Bool SearchNEntry(table, names, classes, closure) - NTable table; - XrmNameList names; - XrmClassList classes; - SClosure closure; +static Bool SearchNEntry( + NTable table, + XrmNameList names, + XrmClassList classes, + SClosure closure) { register NTable entry; register XrmQuark q; register unsigned int leaf; - Bool (*get)(); + Bool (*get)( + NTable table, + XrmNameList names, + XrmClassList classes, + SClosure closure); if (names[1]) { get = SearchNEntry; /* recurse */ leaf = 0; } else { - get = AppendLEntry; /* bottom of recursion */ + get = (getNTableSProcp)AppendLEntry; /* bottom of recursion */ leaf = 1; } GTIGHTLOOSE(*names, AppendLooseLEntry); /* do name, tight and loose */ @@ -2231,7 +2204,7 @@ static Bool SearchNEntry(table, names, classes, closure) if (!*names) break; if (!names[1]) { - get = AppendLEntry; /* bottom of recursion */ + get = (getNTableSProcp)AppendLEntry; /* bottom of recursion */ leaf = 1; } GLOOSE(*names, AppendLooseLEntry); /* loose names */ @@ -2265,12 +2238,12 @@ static Bool SearchNEntry(table, names, classes, closure) return False; } -Bool XrmQGetSearchList(db, names, classes, searchList, listLength) - XrmDatabase db; - XrmNameList names; - XrmClassList classes; - XrmSearchList searchList; /* RETURN */ - int listLength; +Bool XrmQGetSearchList( + XrmDatabase db, + XrmNameList names, + XrmClassList classes, + XrmSearchList searchList, /* RETURN */ + int listLength) { register NTable table; SClosureRec closure; @@ -2310,12 +2283,12 @@ Bool XrmQGetSearchList(db, names, classes, searchList, listLength) return True; } -Bool XrmQGetSearchResource(searchList, name, class, pType, pValue) - XrmSearchList searchList; - register XrmName name; - register XrmClass class; - XrmRepresentation *pType; /* RETURN */ - XrmValue *pValue; /* RETURN */ +Bool XrmQGetSearchResource( + XrmSearchList searchList, + register XrmName name, + register XrmClass class, + XrmRepresentation *pType, /* RETURN */ + XrmValue *pValue) /* RETURN */ { register LTable *list; register LTable table; @@ -2399,11 +2372,11 @@ Bool XrmQGetSearchResource(searchList, name, class, pType, pValue) } /* look for a tight/loose value */ -static Bool GetVEntry(table, names, classes, closure) - LTable table; - XrmNameList names; - XrmClassList classes; - VClosure closure; +static Bool GetVEntry( + LTable table, + XrmNameList names, + XrmClassList classes, + VClosure closure) { register VEntry entry; register XrmQuark q; @@ -2434,11 +2407,11 @@ static Bool GetVEntry(table, names, classes, closure) } /* look for a loose value */ -static Bool GetLooseVEntry(table, names, classes, closure) - LTable table; - XrmNameList names; - XrmClassList classes; - VClosure closure; +static Bool GetLooseVEntry( + LTable table, + XrmNameList names, + XrmClassList classes, + VClosure closure) { register VEntry entry; register XrmQuark q; @@ -2476,23 +2449,27 @@ static Bool GetLooseVEntry(table, names, classes, closure) } /* recursive search for a value */ -static Bool GetNEntry(table, names, classes, closure) - NTable table; - XrmNameList names; - XrmClassList classes; - VClosure closure; +static Bool GetNEntry( + NTable table, + XrmNameList names, + XrmClassList classes, + VClosure closure) { register NTable entry; register XrmQuark q; register unsigned int leaf; - Bool (*get)(); + Bool (*get)( + NTable table, + XrmNameList names, + XrmClassList classes, + VClosure closure); NTable otable; if (names[2]) { get = GetNEntry; /* recurse */ leaf = 0; } else { - get = GetVEntry; /* bottom of recursion */ + get = (getNTableVProcp)GetVEntry; /* bottom of recursion */ leaf = 1; } GTIGHTLOOSE(*names, GetLooseVEntry); /* do name, tight and loose */ @@ -2507,7 +2484,7 @@ static Bool GetNEntry(table, names, classes, closure) if (!names[1]) break; if (!names[2]) { - get = GetVEntry; /* bottom of recursion */ + get = (getNTableVProcp)GetVEntry; /* bottom of recursion */ leaf = 1; } GLOOSE(*names, GetLooseVEntry); /* do name, loose only */ @@ -2544,12 +2521,12 @@ static Bool GetNEntry(table, names, classes, closure) return False; } -Bool XrmQGetResource(db, names, classes, pType, pValue) - XrmDatabase db; - XrmNameList names; - XrmClassList classes; - XrmRepresentation *pType; /* RETURN */ - XrmValuePtr pValue; /* RETURN */ +Bool XrmQGetResource( + XrmDatabase db, + XrmNameList names, + XrmClassList classes, + XrmRepresentation *pType, /* RETURN */ + XrmValuePtr pValue) /* RETURN */ { register NTable table; VClosureRec closure; @@ -2586,21 +2563,13 @@ Bool XrmQGetResource(db, names, classes, pType, pValue) return False; } -#if NeedFunctionPrototypes -Bool XrmGetResource(db, name_str, class_str, pType_str, pValue) +Bool +XrmGetResource(db, name_str, class_str, pType_str, pValue) XrmDatabase db; _Xconst char *name_str; _Xconst char *class_str; XrmString *pType_str; /* RETURN */ XrmValuePtr pValue; /* RETURN */ -#else -Bool XrmGetResource(db, name_str, class_str, pType_str, pValue) - XrmDatabase db; - XrmString name_str; - XrmString class_str; - XrmString *pType_str; /* RETURN */ - XrmValuePtr pValue; /* RETURN */ -#endif { XrmName names[MAXDBDEPTH+1]; XrmClass classes[MAXDBDEPTH+1]; @@ -2615,8 +2584,8 @@ Bool XrmGetResource(db, name_str, class_str, pType_str, pValue) } /* destroy all values, plus table itself */ -static void DestroyLTable(table) - LTable table; +static void DestroyLTable( + LTable table) { register int i; register VEntry *buckets; @@ -2634,8 +2603,8 @@ static void DestroyLTable(table) } /* destroy all contained tables, plus table itself */ -static void DestroyNTable(table) - NTable table; +static void DestroyNTable( + NTable table) { register int i; register NTable *buckets; @@ -2655,8 +2624,8 @@ static void DestroyNTable(table) } const char * -XrmLocaleOfDatabase(db) - XrmDatabase db; +XrmLocaleOfDatabase( + XrmDatabase db) { const char* retval; _XLockMutex(&db->linfo); @@ -2665,8 +2634,8 @@ XrmLocaleOfDatabase(db) return retval; } -void XrmDestroyDatabase(db) - XrmDatabase db; +void XrmDestroyDatabase( + XrmDatabase db) { register NTable table, next; diff --git a/src/imConv.c b/src/imConv.c index 339ba13..b77eaae 100644 --- a/src/imConv.c +++ b/src/imConv.c @@ -33,7 +33,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ /* 2000 Modifier: Ivan Pascal The XFree86 Project. */ -/* $XFree86: xc/lib/X11/imConv.c,v 1.31 2001/02/09 00:02:53 dawes Exp $ */ +/* $XFree86: xc/lib/X11/imConv.c,v 1.33 2003/11/17 22:20:11 dawes Exp $ */ #define NEED_EVENTS #include <stdio.h> @@ -57,16 +57,10 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. typedef unsigned int ucs4_t; typedef int (*ucstocsConvProc)( -#if NeedFunctionPrototypes XPointer, unsigned char *, ucs4_t, int -#endif -); - -XPointer _Utf8GetConvByName( - const char * name ); struct SubstRec { @@ -87,13 +81,8 @@ static struct SubstRec SubstTable[] = { * This converter is needed for _XimGetCharCode subroutine. */ XPointer -#if NeedFunctionPrototypes _XimGetLocaleCode ( _Xconst char* encoding_name) -#else -_XimGetLocaleCode (encoding_name) - _Xconst char* encoding_name; -#endif { XPointer cvt = _Utf8GetConvByName(encoding_name); if (!cvt && encoding_name) { @@ -116,19 +105,11 @@ _XimGetLocaleCode (encoding_name) */ /*ARGSUSED*/ int -#if NeedFunctionPrototypes _XimGetCharCode ( XPointer ucs_conv, KeySym keysym, unsigned char* buf, int nbytes) -#else -_XimGetCharCode (ucs_conv, keysym, buf, nbytes) - XPointer ucs_conv; - KeySym keysym; - unsigned char *buf; - int nbytes; -#endif { int count = 0; ucstocsConvProc cvt = (ucstocsConvProc) ucs_conv; @@ -153,12 +134,12 @@ _XimGetCharCode (ucs_conv, keysym, buf, nbytes) } #ifdef XKB -static int lookup_string (event, buffer, nbytes, keysym, status) - XKeyEvent* event; - char* buffer; - int nbytes; - KeySym* keysym; - XComposeStatus* status; +static int lookup_string( + XKeyEvent* event, + char* buffer, + int nbytes, + KeySym* keysym, + XComposeStatus* status) { int ret; unsigned ctrls = XkbGetXlibControls (event->display); diff --git a/src/locking.c b/src/locking.c index 20b6d66..c13cdc1 100644 --- a/src/locking.c +++ b/src/locking.c @@ -24,7 +24,7 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/locking.c,v 1.4 2001/12/14 19:54:10 dawes Exp $ */ +/* $XFree86: xc/lib/X11/locking.c,v 1.6 2003/11/17 22:20:12 dawes Exp $ */ /* * Author: Stephen Gildea, MIT X Consortium @@ -74,7 +74,7 @@ _Xthread_waiter() } #endif /* WIN32 */ -static xthread_t _Xthread_self() +static xthread_t _Xthread_self(void) { return xthread_self(); } @@ -88,28 +88,28 @@ static void _XLockMutex(lip,file,line) char* file; int line; #else -static void _XLockMutex(lip) - LockInfoPtr lip; +static void _XLockMutex( + LockInfoPtr lip) #endif { xmutex_lock(lip->lock); } #if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE) -static void _XUnlockMutex(lip,file,line) - LockInfoPtr lip; - char* file; - int line; +static void _XUnlockMutex( + LockInfoPtr lip, + char* file, + int line) #else -static void _XUnlockMutex(lip) - LockInfoPtr lip; +static void _XUnlockMutex( + LockInfoPtr lip) #endif { xmutex_unlock(lip->lock); } -static void _XCreateMutex(lip) - LockInfoPtr lip; +static void _XCreateMutex( + LockInfoPtr lip) { lip->lock = xmutex_malloc(); if (lip->lock) { @@ -118,8 +118,8 @@ static void _XCreateMutex(lip) } } -static void _XFreeMutex(lip) - LockInfoPtr lip; +static void _XFreeMutex( + LockInfoPtr lip) { xmutex_clear(lip->lock); xmutex_free(lip->lock); @@ -143,10 +143,10 @@ static struct { int lock_hist_loc = 0; /* next slot to fill */ -static void _XLockDisplayWarn(dpy,file,line) - Display *dpy; - char *file; /* source file, from macro */ - int line; +static void _XLockDisplayWarn( + Display *dpy, + char *file, /* source file, from macro */ + int line) { xthread_t self; xthread_t old_locker; @@ -201,8 +201,8 @@ static void _XUnlockDisplay(dpy,file,line) char *file; int line; #else -static void _XUnlockDisplay(dpy) - Display *dpy; +static void _XUnlockDisplay( + Display *dpy) #endif { #ifdef XTHREADS_WARN @@ -238,8 +238,8 @@ static void _XUnlockDisplay(dpy) } -static struct _XCVList *_XCreateCVL(dpy) - Display *dpy; +static struct _XCVList *_XCreateCVL( + Display *dpy) { struct _XCVList *cvl; @@ -266,9 +266,9 @@ static struct _XCVList *_XCreateCVL(dpy) Allocates and returns a queue element. */ static struct _XCVList * -_XPushReader(dpy, tail) - Display *dpy; - struct _XCVList ***tail; +_XPushReader( + Display *dpy, + struct _XCVList ***tail) { struct _XCVList *cvl; @@ -284,10 +284,10 @@ _XPushReader(dpy, tail) /* signal the next thread waiting to read the connection */ -static void _XPopReader(dpy, list, tail) - Display *dpy; - struct _XCVList **list; - struct _XCVList ***tail; +static void _XPopReader( + Display *dpy, + struct _XCVList **list, + struct _XCVList ***tail) { register struct _XCVList *front = *list; @@ -330,9 +330,9 @@ static void _XConditionWait(cv, mutex,file,line) char *file; int line; #else -static void _XConditionWait(cv, mutex) - xcondition_t cv; - xmutex_t mutex; +static void _XConditionWait( + xcondition_t cv, + xmutex_t mutex) #endif { #ifdef XTHREADS_WARN @@ -380,8 +380,8 @@ static void _XConditionSignal(cv,file,line) char *file; int line; #else -static void _XConditionSignal(cv) - xcondition_t cv; +static void _XConditionSignal( + xcondition_t cv) #endif { #ifdef XTHREADS_WARN @@ -399,8 +399,8 @@ static void _XConditionBroadcast(cv,file,line) char *file; int line; #else -static void _XConditionBroadcast(cv) - xcondition_t cv; +static void _XConditionBroadcast( + xcondition_t cv) #endif { #ifdef XTHREADS_WARN @@ -412,8 +412,8 @@ static void _XConditionBroadcast(cv) } -static void _XFreeDisplayLock(dpy) - Display *dpy; +static void _XFreeDisplayLock( + Display *dpy) { struct _XCVList *cvl; @@ -449,8 +449,8 @@ static void _XFreeDisplayLock(dpy) * wait for thread with user-level display lock to release it. */ -static void _XDisplayLockWait(dpy) - Display *dpy; +static void _XDisplayLockWait( + Display *dpy) { xthread_t self; @@ -468,8 +468,8 @@ static void _XLockDisplay(dpy, file, line) char *file; /* source file, from macro */ int line; #else -static void _XLockDisplay(dpy) - Display *dpy; +static void _XLockDisplay( + Display *dpy) #endif { #ifdef XTHREADS_WARN @@ -492,9 +492,9 @@ static void _XInternalLockDisplay(dpy, wskip, file, line) char *file; /* source file, from macro */ int line; #else -static void _XInternalLockDisplay(dpy, wskip) - Display *dpy; - Bool wskip; +static void _XInternalLockDisplay( + Display *dpy, + Bool wskip) #endif { #ifdef XTHREADS_WARN @@ -506,13 +506,8 @@ static void _XInternalLockDisplay(dpy, wskip) _XDisplayLockWait(dpy); } -#if NeedFunctionPrototypes static void _XUserLockDisplay( register Display* dpy) -#else -static void _XUserLockDisplay(dpy) - register Display* dpy; -#endif { if (++dpy->lock->locking_level == 1) { dpy->lock->lock_wait = _XDisplayLockWait; @@ -520,13 +515,9 @@ static void _XUserLockDisplay(dpy) } } -#if NeedFunctionPrototypes +static void _XUserUnlockDisplay( register Display* dpy) -#else -void _XUserUnlockDisplay(dpy) - register Display* dpy; -#endif { if (dpy->lock->locking_level > 0 && --dpy->lock->locking_level == 0) { /* signal other threads that might be waiting in XLockDisplay */ @@ -539,8 +530,8 @@ void _XUserUnlockDisplay(dpy) /* returns 0 if initialized ok, -1 if unable to allocate a mutex or other memory */ -static int _XInitDisplayLock(dpy) - Display *dpy; +static int _XInitDisplayLock( + Display *dpy) { dpy->lock_fns = (struct _XLockPtrs*)Xmalloc(sizeof(struct _XLockPtrs)); if (dpy->lock_fns == NULL) diff --git a/src/locking.h b/src/locking.h index 499e616..7139d5a 100644 --- a/src/locking.h +++ b/src/locking.h @@ -24,7 +24,7 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/locking.h,v 1.4 2001/12/14 19:54:10 dawes Exp $ */ +/* $XFree86: xc/lib/X11/locking.h,v 1.5 2003/11/17 22:20:12 dawes Exp $ */ /* * Author: Stephen Gildea, MIT X Consortium @@ -47,9 +47,7 @@ struct _XCVList { }; extern xthread_t (*_Xthread_self_fn)( /* in XlibInt.c */ -#if NeedFunctionPrototypes void -#endif ); /* Display->lock is a pointer to one of these */ @@ -74,77 +72,57 @@ struct _XLockInfo { struct _XCVList *free_cvls; /* used only in XlibInt.c */ void (*pop_reader)( -#if NeedNestedPrototypes Display* /* dpy */, struct _XCVList** /* list */, struct _XCVList*** /* tail */ -#endif ); struct _XCVList *(*push_reader)( -#if NeedNestedPrototypes Display * /* dpy */, struct _XCVList*** /* tail */ -#endif ); void (*condition_wait)( -#if NeedNestedPrototypes xcondition_t /* cv */, xmutex_t /* mutex */ #if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE) , char* /* file */, int /* line */ #endif -#endif ); void (*internal_lock_display)( -#if NeedNestedPrototypes Display* /* dpy */, Bool /* wskip */ #if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE) , char* /* file */, int /* line */ #endif -#endif ); /* used in XlibInt.c and locking.c */ void (*condition_signal)( -#if NeedNestedPrototypes xcondition_t /* cv */ #if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE) , char* /* file */, int /* line */ #endif -#endif ); void (*condition_broadcast)( -#if NeedNestedPrototypes xcondition_t /* cv */ #if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE) , char* /* file */, int /* line */ #endif -#endif ); /* used in XlibInt.c and XLockDis.c */ void (*lock_wait)( -#if NeedNestedPrototypes Display* /* dpy */ -#endif ); void (*user_lock_display)( -#if NeedNestedPrototypes Display* /* dpy */ -#endif ); void (*user_unlock_display)( -#if NeedNestedPrototypes Display* /* dpy */ -#endif ); struct _XCVList *(*create_cvl)( -#if NeedNestedPrototypes Display * /* dpy */ -#endif ); }; diff --git a/src/xcms/AddDIC.c b/src/xcms/AddDIC.c index aefae0f..02b3194 100644 --- a/src/xcms/AddDIC.c +++ b/src/xcms/AddDIC.c @@ -32,9 +32,11 @@ * * */ +/* $XFree86: xc/lib/X11/AddDIC.c,v 1.2 2003/04/13 19:22:14 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" +#include "Cv.h" /* @@ -44,15 +46,6 @@ (XCMS_UNREG_ID(lastid) ? ++lastid : XCMS_FIRST_UNREG_DI_ID) #define MAX(x,y) ((x) < (y) ? (y) : (x)) - -/* - * EXTERNS - */ -extern XcmsPerDpyInfo *_XcmsFindDpyInfo(); -extern XPointer *_XcmsPushPointerArray(); -extern XcmsColorFormat _XcmsRegFormatOfPrefix(); -extern XcmsColorSpace **_XcmsDIColorSpaces; -extern XcmsColorSpace *_XcmsDIColorSpacesInit[]; /* * NAME diff --git a/src/xcms/AddSF.c b/src/xcms/AddSF.c index 5c2ae54..9fab20f 100644 --- a/src/xcms/AddSF.c +++ b/src/xcms/AddSF.c @@ -32,9 +32,11 @@ * * */ +/* $XFree86: xc/lib/X11/AddSF.c,v 1.2 2003/04/13 19:22:14 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" +#include "Cv.h" /* * DEFINES @@ -43,18 +45,6 @@ (XCMS_UNREG_ID(lastid) ? ++lastid : XCMS_FIRST_UNREG_DD_ID) #define MIN(x,y) ((x) > (y) ? (y) : (x)) - -/* - * EXTERNS - */ -extern XPointer *_XcmsPushPointerArray(); -extern XcmsColorFormat _XcmsRegFormatOfPrefix(); -extern XcmsFunctionSet **_XcmsSCCFuncSets; -extern XcmsFunctionSet **_XcmsSCCFuncSetsInit; -extern XcmsColorSpace **_XcmsDDColorSpaces; -extern XcmsColorSpace **_XcmsDDColorSpacesInit; - - /* * NAME diff --git a/src/xcms/CCC.c b/src/xcms/CCC.c index a9b8272..c4e8282 100644 --- a/src/xcms/CCC.c +++ b/src/xcms/CCC.c @@ -33,7 +33,7 @@ * * */ -/* $XFree86: xc/lib/X11/CCC.c,v 1.4 2001/12/14 19:53:56 dawes Exp $ */ +/* $XFree86: xc/lib/X11/CCC.c,v 1.5 2003/04/13 19:22:14 dawes Exp $ */ /* @@ -66,14 +66,7 @@ from The Open Group. #include <stdio.h> #include "Xlibint.h" #include "Xcmsint.h" - -extern XcmsIntensityMap *_XcmsGetIntensityMap(); - -/* cmsInt.c */ -extern int _XcmsInitDefaultCCCs(); -extern int _XcmsInitScrnInfo(); - - +#include "Cv.h" diff --git a/src/xcms/Cv.h b/src/xcms/Cv.h new file mode 100644 index 0000000..08969e0 --- /dev/null +++ b/src/xcms/Cv.h @@ -0,0 +1,190 @@ +/* $XFree86: xc/lib/X11/Cv.h,v 1.2 2003/04/17 02:06:31 dawes Exp $ */ + +#ifndef _CV_H_ +#define _CV_H_ + +/* variables */ +extern const char _XcmsCIEXYZ_prefix[]; +extern const char _XcmsCIEuvY_prefix[]; +extern const char _XcmsCIExyY_prefix[]; +extern const char _XcmsCIELab_prefix[]; +extern const char _XcmsCIELuv_prefix[]; +extern const char _XcmsTekHVC_prefix[]; +extern const char _XcmsRGBi_prefix[]; +extern const char _XcmsRGB_prefix[]; + +extern XcmsColorSpace XcmsUNDEFINEDColorSpace; +extern XcmsColorSpace XcmsTekHVCColorSpace; +extern XcmsColorSpace XcmsCIEXYZColorSpace; +extern XcmsColorSpace XcmsCIEuvYColorSpace; +extern XcmsColorSpace XcmsCIExyYColorSpace; +extern XcmsColorSpace XcmsCIELabColorSpace; +extern XcmsColorSpace XcmsCIELuvColorSpace; +extern XcmsColorSpace XcmsRGBColorSpace; +extern XcmsColorSpace XcmsRGBiColorSpace; + +extern XcmsColorSpace *_XcmsDIColorSpacesInit[]; +extern XcmsColorSpace **_XcmsDIColorSpaces; + +extern XcmsColorSpace *_XcmsDDColorSpacesInit[]; +extern XcmsColorSpace **_XcmsDDColorSpaces; + +extern XcmsFunctionSet XcmsLinearRGBFunctionSet; + +extern XcmsFunctionSet *_XcmsSCCFuncSetsInit[]; +extern XcmsFunctionSet **_XcmsSCCFuncSets; + +extern XcmsRegColorSpaceEntry _XcmsRegColorSpaces[]; + +/* functions */ +extern XPointer * +_XcmsCopyPointerArray( + XPointer *pap); +extern void +_XcmsFreePointerArray( + XPointer *pap); +extern XPointer * +_XcmsPushPointerArray( + XPointer *pap, + XPointer p, + XPointer *papNoFree); +extern Status +_XcmsCIEXYZ_ValidSpec( + XcmsColor *pColor); +extern Status +_XcmsCIEuvY_ValidSpec( + XcmsColor *pColor); +extern int +_XcmsTekHVC_CheckModify( + XcmsColor *pColor); + +extern Status +_XcmsTekHVCQueryMaxVCRGB( + XcmsCCC ccc, + XcmsFloat hue, + XcmsColor *pColor_return, + XcmsRGBi *pRGB_return); +extern Status +_XcmsCIELabQueryMaxLCRGB( + XcmsCCC ccc, + XcmsFloat hue, /* hue in radians */ + XcmsColor *pColor_return, + XcmsRGBi *pRGB_return); +extern Status +_XcmsConvertColorsWithWhitePt( + XcmsCCC ccc, + XcmsColor *pColors_in_out, + XcmsColor *pWhitePt, + unsigned int nColors, + XcmsColorFormat newFormat, + Bool *pCompressed); + +extern Status +_XcmsDIConvertColors( + XcmsCCC ccc, + XcmsColor *pColors_in_out, + XcmsColor *pWhitePt, + unsigned int nColors, + XcmsColorFormat newFormat); +extern Status +_XcmsDDConvertColors( + XcmsCCC ccc, + XcmsColor *pColors_in_out, + unsigned int nColors, + XcmsColorFormat newFormat, + Bool *pCompressed); +extern XcmsColorFormat +_XcmsRegFormatOfPrefix( + _Xconst char *prefix); +extern void +_XColor_to_XcmsRGB( + XcmsCCC ccc, + XColor *pXColors, + XcmsColor *pColors, + unsigned int nColors); +extern Status +_XcmsSetGetColor( + Status (*xColorProc)( + Display* /* display */, + Colormap /* colormap */, + XColor* /* screen_in_out */), + Display *dpy, + Colormap cmap, + XcmsColor *pColors_in_out, + XcmsColorFormat result_format, + Bool *pCompressed); +extern Status +_XcmsSetGetColors( + Status (*xColorProc)( + Display* /* display */, + Colormap /* colormap */, + XColor* /* screen_in_out */, + int /* nColors */), + Display *dpy, + Colormap cmap, + XcmsColor *pColors_in_out, + int nColors, + XcmsColorFormat result_format, + Bool *pCompressed); +extern Status +_XcmsCIELuvQueryMaxLCRGB( + XcmsCCC ccc, + XcmsFloat hue, /* hue in radians */ + XcmsColor *pColor_return, + XcmsRGBi *pRGB_return); + +extern XcmsIntensityMap * +_XcmsGetIntensityMap( + Display *dpy, + Visual *visual); +extern int +_XcmsInitDefaultCCCs( + Display *dpy); +extern int +_XcmsInitScrnInfo( + register Display *dpy, + int screenNumber); +extern XcmsCmapRec * +_XcmsCopyCmapRecAndFree( + Display *dpy, + Colormap src_cmap, + Colormap copy_cmap); +extern void +_XcmsCopyISOLatin1Lowered( + char *dst, + const char *src); +extern int +_XcmsEqualWhitePts( + XcmsCCC ccc, XcmsColor *pWhitePt1, XcmsColor *pWhitePt2); +extern int +_XcmsLRGB_InitScrnDefault( + Display *dpy, + int screenNumber, + XcmsPerScrnInfo *pPerScrnInfo); +extern void +_XcmsFreeIntensityMaps( + Display *dpy); +extern int +_XcmsGetProperty( + Display *pDpy, + Window w, + Atom property, + int *pFormat, + unsigned long *pNItems, + unsigned long *pNBytes, + char **pValue); +extern unsigned long +_XcmsGetElement( + int format, + char **pValue, + unsigned long *pCount); +extern void +_XcmsUnresolveColor( + XcmsCCC ccc, + XcmsColor *pColor); +extern void +_XcmsResolveColor( + XcmsCCC ccc, + XcmsColor *pXcmsColor); + +#endif /* _CV_H_ */ diff --git a/src/xcms/CvColW.c b/src/xcms/CvColW.c index 34be833..2ba67f0 100644 --- a/src/xcms/CvColW.c +++ b/src/xcms/CvColW.c @@ -33,16 +33,11 @@ * * */ -/* $XFree86: xc/lib/X11/CvColW.c,v 1.3 2001/01/17 19:41:34 dawes Exp $ */ +/* $XFree86: xc/lib/X11/CvColW.c,v 1.4 2003/04/13 19:22:15 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" - -/* EXTERNS */ -/* CvCols.c */ -extern Status _XcmsDDConvertColors(); -extern Status _XcmsDIConvertColors(); - +#include "Cv.h" /************************************************************************ @@ -59,14 +54,13 @@ extern Status _XcmsDIConvertColors(); * SYNOPSIS */ Status -_XcmsConvertColorsWithWhitePt(ccc, pColors_in_out, pWhitePt, nColors, - newFormat, pCompressed) - XcmsCCC ccc; - XcmsColor *pColors_in_out; - XcmsColor *pWhitePt; - unsigned int nColors; - XcmsColorFormat newFormat; - Bool *pCompressed; +_XcmsConvertColorsWithWhitePt( + XcmsCCC ccc, + XcmsColor *pColors_in_out, + XcmsColor *pWhitePt, + unsigned int nColors, + XcmsColorFormat newFormat, + Bool *pCompressed) /* * DESCRIPTION * Convert XcmsColor structures between device-independent diff --git a/src/xcms/CvCols.c b/src/xcms/CvCols.c index 1c16de1..0062da0 100644 --- a/src/xcms/CvCols.c +++ b/src/xcms/CvCols.c @@ -33,20 +33,11 @@ * * */ -/* $XFree86: xc/lib/X11/CvCols.c,v 1.3 2001/01/17 19:41:34 dawes Exp $ */ +/* $XFree86: xc/lib/X11/CvCols.c,v 1.5 2003/11/03 03:46:26 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" - -/* - * EXTERNS - * External declarations required locally to this package - * that are not already declared in any of the included header - * files (external includes or internal includes). - */ -extern XcmsRegColorSpaceEntry _XcmsRegColorSpaces[]; -extern XcmsColorSpace **_XcmsDIColorSpaces; -extern XcmsColorSpace **_XcmsDDColorSpaces; +#include "Cv.h" /* * LOCAL DEFINES @@ -58,13 +49,6 @@ extern XcmsColorSpace **_XcmsDDColorSpaces; # define MAX(x,y) ((x) > (y) ? (x) : (y)) #endif -/* - * FORWARD DECLARATIONS - */ -Status _XcmsDIConvertColors(); -Status _XcmsDDConvertColors(); -int _XcmsEqualWhitePts(); - /************************************************************************ * * @@ -79,8 +63,8 @@ int _XcmsEqualWhitePts(); * SYNOPSIS */ static int -EqualCIEXYZ(p1, p2) - XcmsColor *p1, *p2; +EqualCIEXYZ( + XcmsColor *p1, XcmsColor *p2) /* * DESCRIPTION * Compares two XcmsColor structures that are in XcmsCIEXYZFormat @@ -109,9 +93,9 @@ EqualCIEXYZ(p1, p2) * SYNOPSIS */ static XcmsColorSpace * -ColorSpaceOfID(ccc, id) - XcmsCCC ccc; - XcmsColorFormat id; +ColorSpaceOfID( + XcmsCCC ccc, + XcmsColorFormat id) /* * DESCRIPTION * Returns a pointer to the color space structure @@ -166,8 +150,8 @@ ColorSpaceOfID(ccc, id) * SYNOPSIS */ static int -ValidDIColorSpaceID(id) - XcmsColorFormat id; +ValidDIColorSpaceID( + XcmsColorFormat id) /* * DESCRIPTION * Determines if the specified color space ID is a valid @@ -199,9 +183,9 @@ ValidDIColorSpaceID(id) * SYNOPSIS */ static int -ValidDDColorSpaceID(ccc, id) - XcmsCCC ccc; - XcmsColorFormat id; +ValidDDColorSpaceID( + XcmsCCC ccc, + XcmsColorFormat id) /* * DESCRIPTION * Determines if the specified color space ID is a valid @@ -234,14 +218,13 @@ ValidDDColorSpaceID(ccc, id) * SYNOPSIS */ static Status -ConvertMixedColors(ccc, pColors_in_out, pWhitePt, nColors, - targetFormat, format_flag) - XcmsCCC ccc; - XcmsColor *pColors_in_out; - XcmsColor *pWhitePt; - unsigned int nColors; - XcmsColorFormat targetFormat; - unsigned char format_flag; +ConvertMixedColors( + XcmsCCC ccc, + XcmsColor *pColors_in_out, + XcmsColor *pWhitePt, + unsigned int nColors, + XcmsColorFormat targetFormat, + unsigned char format_flag) /* * DESCRIPTION * This routine will only convert the following types of @@ -376,9 +359,7 @@ ConvertMixedColors(ccc, pColors_in_out, pWhitePt, nColors, * SYNOPSIS */ int -_XcmsEqualWhitePts(ccc, pWhitePt1, pWhitePt2) - XcmsCCC ccc; - XcmsColor *pWhitePt1, *pWhitePt2; +_XcmsEqualWhitePts(XcmsCCC ccc, XcmsColor *pWhitePt1, XcmsColor *pWhitePt2) /* * DESCRIPTION * @@ -417,13 +398,12 @@ _XcmsEqualWhitePts(ccc, pWhitePt1, pWhitePt2) * SYNOPSIS */ Status -_XcmsDIConvertColors(ccc, pColors_in_out, pWhitePt, nColors, - newFormat) - XcmsCCC ccc; - XcmsColor *pColors_in_out; - XcmsColor *pWhitePt; - unsigned int nColors; - XcmsColorFormat newFormat; +_XcmsDIConvertColors( + XcmsCCC ccc, + XcmsColor *pColors_in_out, + XcmsColor *pWhitePt, + unsigned int nColors, + XcmsColorFormat newFormat) /* * DESCRIPTION * Convert XcmsColor structures to another Device-Independent @@ -447,10 +427,10 @@ _XcmsDIConvertColors(ccc, pColors_in_out, pWhitePt, nColors, */ { XcmsColorSpace *pFrom, *pTo; - XcmsConversionProc *src_to_CIEXYZ, *src_from_CIEXYZ; - XcmsConversionProc *dest_to_CIEXYZ, *dest_from_CIEXYZ; - XcmsConversionProc *to_CIEXYZ_stop, *from_CIEXYZ_start; - XcmsConversionProc *tmp; + XcmsDIConversionProc *src_to_CIEXYZ, *src_from_CIEXYZ; + XcmsDIConversionProc *dest_to_CIEXYZ, *dest_from_CIEXYZ; + XcmsDIConversionProc *to_CIEXYZ_stop, *from_CIEXYZ_start; + XcmsDIConversionProc *tmp; /* * Allow pWhitePt to equal NULL. This appropriate when converting @@ -562,13 +542,12 @@ Continue: * SYNOPSIS */ Status -_XcmsDDConvertColors(ccc, pColors_in_out, nColors, newFormat, - pCompressed) - XcmsCCC ccc; - XcmsColor *pColors_in_out; - unsigned int nColors; - XcmsColorFormat newFormat; - Bool *pCompressed; +_XcmsDDConvertColors( + XcmsCCC ccc, + XcmsColor *pColors_in_out, + unsigned int nColors, + XcmsColorFormat newFormat, + Bool *pCompressed) /* * DESCRIPTION * Convert XcmsColor structures: @@ -599,10 +578,10 @@ _XcmsDDConvertColors(ccc, pColors_in_out, nColors, newFormat, */ { XcmsColorSpace *pFrom, *pTo; - XcmsConversionProc *src_to_CIEXYZ, *src_from_CIEXYZ; - XcmsConversionProc *dest_to_CIEXYZ, *dest_from_CIEXYZ; - XcmsConversionProc *from_CIEXYZ_start, *to_CIEXYZ_stop; - XcmsConversionProc *tmp; + XcmsDDConversionProc *src_to_CIEXYZ, *src_from_CIEXYZ; + XcmsDDConversionProc *dest_to_CIEXYZ, *dest_from_CIEXYZ; + XcmsDDConversionProc *from_CIEXYZ_start, *to_CIEXYZ_stop; + XcmsDDConversionProc *tmp; int retval; int hasCompressed = 0; @@ -642,10 +621,10 @@ _XcmsDDConvertColors(ccc, pColors_in_out, nColors, newFormat, return(XcmsFailure); } - src_to_CIEXYZ = pFrom->to_CIEXYZ; - src_from_CIEXYZ = pFrom->from_CIEXYZ; - dest_to_CIEXYZ = pTo->to_CIEXYZ; - dest_from_CIEXYZ = pTo->from_CIEXYZ; + src_to_CIEXYZ = (XcmsDDConversionProc *)pFrom->to_CIEXYZ; + src_from_CIEXYZ = (XcmsDDConversionProc *)pFrom->from_CIEXYZ; + dest_to_CIEXYZ = (XcmsDDConversionProc *)pTo->to_CIEXYZ; + dest_from_CIEXYZ = (XcmsDDConversionProc *)pTo->from_CIEXYZ; if (pTo->inverse_flag && pFrom->inverse_flag) { /* @@ -1026,8 +1005,8 @@ Failure: * SYNOPSIS */ XcmsColorFormat -_XcmsRegFormatOfPrefix(prefix) - char *prefix; +_XcmsRegFormatOfPrefix( + _Xconst char *prefix) /* * DESCRIPTION * Returns a color space ID associated with the specified diff --git a/src/xcms/HVC.c b/src/xcms/HVC.c index 894e8dd..22f7a64 100644 --- a/src/xcms/HVC.c +++ b/src/xcms/HVC.c @@ -47,12 +47,13 @@ * DOCUMENTATION * "TekColor Color Management System, System Implementor's Manual" */ -/* $XFree86: xc/lib/X11/HVC.c,v 1.3 2001/01/17 19:41:37 dawes Exp $ */ +/* $XFree86: xc/lib/X11/HVC.c,v 1.4 2003/04/13 19:22:16 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" #include <X11/Xos.h> #include <math.h> +#include "Cv.h" #include <stdio.h> @@ -93,24 +94,10 @@ #endif /* - * EXTERNS - */ - -extern char _XcmsTekHVC_prefix[]; - -/* CvCols.c */ -extern Status _XcmsDIConvertColors(); - -/* uvY.c */ -extern Status _XcmsCIEuvY_ValidSpec(); - -/* * FORWARD DECLARATIONS */ - -static int TekHVC_ParseString(); -static Status XcmsTekHVC_ValidSpec(); - +static int TekHVC_ParseString(register char *spec, XcmsColor *pColor); +static Status XcmsTekHVC_ValidSpec(XcmsColor *pColor); /* * LOCAL VARIABLES @@ -167,9 +154,9 @@ XcmsColorSpace XcmsTekHVCColorSpace = * SYNOPSIS */ static int -TekHVC_ParseString(spec, pColor) - register char *spec; - XcmsColor *pColor; +TekHVC_ParseString( + register char *spec, + XcmsColor *pColor) /* * DESCRIPTION * This routines takes a string and attempts to convert @@ -225,9 +212,9 @@ TekHVC_ParseString(spec, pColor) * SYNOPSIS */ static int -ThetaOffset(pWhitePt, pThetaOffset) - XcmsColor *pWhitePt; - XcmsFloat *pThetaOffset; +ThetaOffset( + XcmsColor *pWhitePt, + XcmsFloat *pThetaOffset) /* * DESCRIPTION * This routine computes the theta offset of a given @@ -274,8 +261,8 @@ ThetaOffset(pWhitePt, pThetaOffset) * SYNOPSIS */ static int -XcmsTekHVC_ValidSpec(pColor) - XcmsColor *pColor; +XcmsTekHVC_ValidSpec( + XcmsColor *pColor) /* * DESCRIPTION * Checks if values in the color specification are valid. @@ -576,8 +563,8 @@ XcmsCIEuvYToTekHVC(ccc, pHVC_WhitePt, pColors_in_out, nColors) * SYNOPSIS */ int -_XcmsTekHVC_CheckModify(pColor) - XcmsColor *pColor; +_XcmsTekHVC_CheckModify( + XcmsColor *pColor) /* * DESCRIPTION * Checks if values in the color specification are valid. diff --git a/src/xcms/HVCGcC.c b/src/xcms/HVCGcC.c index 9260c39..356bcc1 100644 --- a/src/xcms/HVCGcC.c +++ b/src/xcms/HVCGcC.c @@ -43,19 +43,11 @@ * Source for XcmsTekHVCClipC() gamut compression routine. * */ -/* $XFree86: xc/lib/X11/HVCGcC.c,v 1.3 2001/01/17 19:41:37 dawes Exp $ */ +/* $XFree86: xc/lib/X11/HVCGcC.c,v 1.4 2003/04/13 19:22:16 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" - -/* - * EXTERNS - */ -extern XcmsColorSpace XcmsTekHVCColorSpace; -extern XcmsFunctionSet XcmsLinearRGBFunctionSet; - -/* CvCols.c */ -extern Status _XcmsDIConvertColors(); +#include "Cv.h" /************************************************************************ diff --git a/src/xcms/HVCGcV.c b/src/xcms/HVCGcV.c index eeb6262..5f3a2e8 100644 --- a/src/xcms/HVCGcV.c +++ b/src/xcms/HVCGcV.c @@ -43,26 +43,11 @@ * Source for XcmsTekHVCClipV() gamut compression routine. * */ -/* $XFree86: xc/lib/X11/HVCGcV.c,v 1.3 2001/01/17 19:41:37 dawes Exp $ */ +/* $XFree86: xc/lib/X11/HVCGcV.c,v 1.4 2003/04/13 19:22:16 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" - -/* - * EXTERNS - */ -extern Status _XcmsTekHVC_CheckModify(); -extern XcmsColorSpace XcmsTekHVCColorSpace; -extern XcmsFunctionSet XcmsLinearRGBFunctionSet; - -/* CvCols.c */ -extern Status _XcmsDIConvertColors(); - -/* HVCMxVC.c */ -extern Status _XcmsTekHVCQueryMaxVCRGB(); - - - +#include "Cv.h" /************************************************************************ diff --git a/src/xcms/HVCGcVC.c b/src/xcms/HVCGcVC.c index d1cebc8..905161c 100644 --- a/src/xcms/HVCGcVC.c +++ b/src/xcms/HVCGcVC.c @@ -43,11 +43,12 @@ * Source for XcmsTekHVCClipVC() gamut * compression function. */ -/* $XFree86: xc/lib/X11/HVCGcVC.c,v 1.3 2001/01/17 19:41:37 dawes Exp $ */ +/* $XFree86: xc/lib/X11/HVCGcVC.c,v 1.4 2003/04/13 19:22:16 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" #include <math.h> +#include "Cv.h" /* * INTERNALS @@ -56,20 +57,6 @@ */ #define MAXBISECTCOUNT 100 -/* - * EXTERNS - */ -extern int _XcmsTekHVC_CheckModify(); -extern Status _XcmsTekHVCQueryMaxVCRGB(); -extern XcmsColorSpace XcmsTekHVCColorSpace; -extern XcmsFunctionSet XcmsLinearRGBFunctionSet; - -/* CvCols.c */ -extern Status _XcmsDIConvertColors(); - -/* CvColW.c */ -extern Status _XcmsConvertColorsWithWhitePt(); - /************************************************************************ * * diff --git a/src/xcms/HVCMnV.c b/src/xcms/HVCMnV.c index f66e0e1..055d47b 100644 --- a/src/xcms/HVCMnV.c +++ b/src/xcms/HVCMnV.c @@ -43,22 +43,17 @@ * Source for XcmsTekHVCQueryMinV gamut boundary querying routine. * */ +/* $XFree86: xc/lib/X11/HVCMnV.c,v 1.2 2003/04/13 19:22:16 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" +#include "Cv.h" /* * DEFINES */ #define EPS 0.001 -/* - * EXTERNS - */ -extern Status _XcmsTekHVCQueryMaxVCRGB(); -extern Status _XcmsTekHVC_CheckModify(); -extern XcmsColorSpace XcmsTekHVCColorSpace; - /************************************************************************ * * diff --git a/src/xcms/HVCMxC.c b/src/xcms/HVCMxC.c index 20aa9ef..daa9bf6 100644 --- a/src/xcms/HVCMxC.c +++ b/src/xcms/HVCMxC.c @@ -44,11 +44,12 @@ * querying routine. * */ -/* $XFree86: xc/lib/X11/HVCMxC.c,v 1.3 2001/01/17 19:41:37 dawes Exp $ */ +/* $XFree86: xc/lib/X11/HVCMxC.c,v 1.5 2003/07/16 01:38:26 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" #include <math.h> +#include "Cv.h" /* * DEFINES @@ -56,17 +57,6 @@ #define MAXBISECTCOUNT 100 #define EPS 0.001 -/* - * EXTERNS - */ -extern Status _XcmsTekHVCQueryMaxVCRGB(); -extern int _XcmsTekHVC_CheckModify(); -extern XcmsColorSpace XcmsTekHVCColorSpace; - -/* CvColW.c */ -extern Status _XcmsConvertColorsWithWhitePt(); - - /************************************************************************ * * @@ -167,6 +157,7 @@ XcmsTekHVCQueryMaxC(ccc, hue, value, pColor_return) /* save the structure input so that any elements that */ /* are not touched are recopied later in the routine. */ nValue = savedValue = value; + lastChroma = -1.0; lastValue = -1.0; nMaxCount = MAXBISECTCOUNT; maxDist = 100.0 - max_vc.spec.TekHVC.V; diff --git a/src/xcms/HVCMxV.c b/src/xcms/HVCMxV.c index fec1c3b..1e0d5d3 100644 --- a/src/xcms/HVCMxV.c +++ b/src/xcms/HVCMxV.c @@ -44,11 +44,12 @@ * querying routine. * */ -/* $XFree86: xc/lib/X11/HVCMxV.c,v 1.3 2001/01/17 19:41:37 dawes Exp $ */ +/* $XFree86: xc/lib/X11/HVCMxV.c,v 1.5 2003/07/16 01:38:26 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" #include <math.h> +#include "Cv.h" /* * DEFINES @@ -56,16 +57,6 @@ #define MAXBISECTCOUNT 100 #define EPS 0.001 -/* - * EXTERNS - */ -extern Status _XcmsTekHVCQueryMaxVCRGB(); -extern int _XcmsTekHVC_CheckModify(); -extern XcmsColorSpace XcmsTekHVCColorSpace; - -/* CvColW.c */ -extern Status _XcmsConvertColorsWithWhitePt(); - /************************************************************************ * * @@ -177,6 +168,7 @@ XcmsTekHVCQueryMaxV(ccc, hue, chroma, pColor_return) tmp.spec.TekHVC.C = max_vc.spec.TekHVC.C; tmp.spec.TekHVC.V = max_vc.spec.TekHVC.V; lastChroma = -1.0; + lastValue = -1.0; nMaxCount = MAXBISECTCOUNT; rFactor = 1.0; diff --git a/src/xcms/HVCMxVC.c b/src/xcms/HVCMxVC.c index 7c8ec7d..d00f6d8 100644 --- a/src/xcms/HVCMxVC.c +++ b/src/xcms/HVCMxVC.c @@ -44,9 +44,11 @@ * querying routine. * */ +/* $XFree86: xc/lib/X11/HVCMxVC.c,v 1.2 2003/04/13 19:22:16 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" +#include "Cv.h" /* * DEFINES @@ -58,18 +60,6 @@ #define START_V 40.0 #define START_C 120.0 -/* - * EXTERNS - */ -extern Status _XcmsTekHVC_CheckModify(); -extern Status _XcmsConvertColorsWithWhitePt(); -extern XcmsColorSpace XcmsTekHVCColorSpace; - -/* - * FORWARD DECLARATIONS - */ -Status _XcmsTekHVCQueryMaxVCRGB(); - /************************************************************************ * * @@ -84,11 +74,11 @@ Status _XcmsTekHVCQueryMaxVCRGB(); * SYNOPSIS */ Status -_XcmsTekHVCQueryMaxVCRGB(ccc, hue, pColor_return, pRGB_return) - XcmsCCC ccc; - XcmsFloat hue; - XcmsColor *pColor_return; - XcmsRGBi *pRGB_return; +_XcmsTekHVCQueryMaxVCRGB( + XcmsCCC ccc, + XcmsFloat hue, + XcmsColor *pColor_return, + XcmsRGBi *pRGB_return) /* * DESCRIPTION diff --git a/src/xcms/HVCMxVs.c b/src/xcms/HVCMxVs.c index 6f98d0d..bc21d94 100644 --- a/src/xcms/HVCMxVs.c +++ b/src/xcms/HVCMxVs.c @@ -43,20 +43,11 @@ * Source for the XcmsTekHVCQueryMaxVSamples() gamut boundary * querying routine. */ -/* $XFree86: xc/lib/X11/HVCMxVs.c,v 1.3 2001/01/17 19:41:37 dawes Exp $ */ +/* $XFree86: xc/lib/X11/HVCMxVs.c,v 1.4 2003/04/13 19:22:16 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" - -/* - * EXTERNS - */ -extern Status _XcmsTekHVCQueryMaxVCRGB(); -extern Status _XcmsTekHVC_CheckModify(); -extern XcmsColorSpace XcmsTekHVCColorSpace; - -/* CvColW.c */ -extern Status _XcmsConvertColorsWithWhitePt(); +#include "Cv.h" /************************************************************************ diff --git a/src/xcms/HVCWpAj.c b/src/xcms/HVCWpAj.c index 76e64c0..b1b6f0f 100644 --- a/src/xcms/HVCWpAj.c +++ b/src/xcms/HVCWpAj.c @@ -44,15 +44,11 @@ * adjustment of color specifications in the TekHVC color * space. */ +/* $XFree86: xc/lib/X11/HVCWpAj.c,v 1.2 2003/04/13 19:22:16 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" - -/* - * EXTERNS - */ -extern Status _XcmsConvertColorsWithWhitePt(); -extern XcmsColorSpace XcmsTekHVCColorSpace; +#include "Cv.h" /************************************************************************ diff --git a/src/xcms/IdOfPr.c b/src/xcms/IdOfPr.c index d84986e..b6b4591 100644 --- a/src/xcms/IdOfPr.c +++ b/src/xcms/IdOfPr.c @@ -32,16 +32,11 @@ * * */ +/* $XFree86: xc/lib/X11/IdOfPr.c,v 1.2 2003/04/13 19:22:16 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" - -/* - * EXTERNS - */ -extern XcmsColorSpace **_XcmsDIColorSpaces; -extern XcmsColorSpace **_XcmsDDColorSpaces; -void _XcmsCopyISOLatin1Lowered(); +#include "Cv.h" /* diff --git a/src/xcms/LRGB.c b/src/xcms/LRGB.c index 4113b8a..7c252b6 100644 --- a/src/xcms/LRGB.c +++ b/src/xcms/LRGB.c @@ -35,28 +35,14 @@ * 4. RGB intensity to CIE XYZ * */ -/* $XFree86: xc/lib/X11/LRGB.c,v 3.5 2001/07/25 15:04:44 dawes Exp $ */ +/* $XFree86: xc/lib/X11/LRGB.c,v 3.7 2003/11/03 03:46:26 dawes Exp $ */ #include <stdio.h> #include <X11/Xos.h> #include <X11/Xatom.h> #include "Xlibint.h" #include "Xcmsint.h" - -/* - * EXTERNS - * External declarations required locally to this package - * that are not already declared in any of the included header - * files (external includes or internal includes). - */ -extern char _XcmsRGB_prefix[]; -extern char _XcmsRGBi_prefix[]; -extern unsigned long _XcmsGetElement(); -extern void _XcmsFreeIntensityMaps(); - -/* cmsProp.c */ -extern int _XcmsGetProperty(); - +#include "Cv.h" /* * LOCAL DEFINES @@ -85,12 +71,23 @@ extern int _XcmsGetProperty(); /* * FORWARD DECLARATIONS */ -static void LINEAR_RGB_FreeSCCData(); -static int LINEAR_RGB_InitSCCData(); -static int XcmsLRGB_RGB_ParseString(); -static int XcmsLRGB_RGBi_ParseString(); -Status _XcmsGetTableType0(); -Status _XcmsGetTableType1(); +static void LINEAR_RGB_FreeSCCData(XPointer pScreenDataTemp); +static int LINEAR_RGB_InitSCCData(Display *dpy, + int screenNumber, XcmsPerScrnInfo *pPerScrnInfo); +static int XcmsLRGB_RGB_ParseString(register char *spec, XcmsColor *pColor); +static int XcmsLRGB_RGBi_ParseString(register char *spec, XcmsColor *pColor); +static Status +_XcmsGetTableType0( + IntensityTbl *pTbl, + int format, + char **pChar, + unsigned long *pCount); +static Status +_XcmsGetTableType1( + IntensityTbl *pTbl, + int format, + char **pChar, + unsigned long *pCount); /* * LOCALS VARIABLES @@ -126,8 +123,8 @@ static unsigned short const MASK[17] = { * to XcmsCIEXYZFormat. */ static XcmsConversionProc Fl_RGB_to_CIEXYZ[] = { - XcmsRGBToRGBi, - XcmsRGBiToCIEXYZ, + (XcmsConversionProc)XcmsRGBToRGBi, + (XcmsConversionProc)XcmsRGBiToCIEXYZ, NULL }; @@ -137,8 +134,8 @@ static XcmsConversionProc Fl_RGB_to_CIEXYZ[] = { * to XcmsRGBFormat. */ static XcmsConversionProc Fl_CIEXYZ_to_RGB[] = { - XcmsCIEXYZToRGBi, - XcmsRGBiToRGB, + (XcmsConversionProc)XcmsCIEXYZToRGBi, + (XcmsConversionProc)XcmsRGBiToRGB, NULL }; @@ -148,7 +145,7 @@ static XcmsConversionProc Fl_CIEXYZ_to_RGB[] = { * to XcmsCIEXYZFormat. */ static XcmsConversionProc Fl_RGBi_to_CIEXYZ[] = { - XcmsRGBiToCIEXYZ, + (XcmsConversionProc)XcmsRGBiToCIEXYZ, NULL }; @@ -158,7 +155,7 @@ static XcmsConversionProc Fl_RGBi_to_CIEXYZ[] = { * to XcmsRGBiFormat. */ static XcmsConversionProc Fl_CIEXYZ_to_RGBi[] = { - XcmsCIEXYZToRGBi, + (XcmsConversionProc)XcmsCIEXYZToRGBi, NULL }; @@ -453,10 +450,10 @@ static LINEAR_RGB_SCCData Default_RGB_SCCData = { * SYNOPSIS */ static Status -LINEAR_RGB_InitSCCData(dpy, screenNumber, pPerScrnInfo) - Display *dpy; - int screenNumber; - XcmsPerScrnInfo *pPerScrnInfo; +LINEAR_RGB_InitSCCData( + Display *dpy, + int screenNumber, + XcmsPerScrnInfo *pPerScrnInfo) /* * DESCRIPTION * @@ -835,8 +832,8 @@ FreeSCCData: * SYNOPSIS */ static void -LINEAR_RGB_FreeSCCData(pScreenDataTemp) - XPointer pScreenDataTemp; +LINEAR_RGB_FreeSCCData( + XPointer pScreenDataTemp) /* * DESCRIPTION * @@ -895,12 +892,12 @@ LINEAR_RGB_FreeSCCData(pScreenDataTemp) * * SYNOPSIS */ -Status -_XcmsGetTableType0(pTbl, format, pChar, pCount) - IntensityTbl *pTbl; - int format; - char **pChar; - unsigned long *pCount; +static Status +_XcmsGetTableType0( + IntensityTbl *pTbl, + int format, + char **pChar, + unsigned long *pCount) /* * DESCRIPTION * @@ -956,12 +953,12 @@ _XcmsGetTableType0(pTbl, format, pChar, pCount) * * SYNOPSIS */ -Status -_XcmsGetTableType1(pTbl, format, pChar, pCount) - IntensityTbl *pTbl; - int format; - char **pChar; - unsigned long *pCount; +static Status +_XcmsGetTableType1( + IntensityTbl *pTbl, + int format, + char **pChar, + unsigned long *pCount) /* * DESCRIPTION * @@ -1018,9 +1015,9 @@ _XcmsGetTableType1(pTbl, format, pChar, pCount) * * SYNOPSIS */ -int -_XcmsValueCmp (p1, p2) - IntensityRec *p1, *p2; +static int +_XcmsValueCmp( + IntensityRec *p1, IntensityRec *p2) /* * DESCRIPTION * Compares the value component of two IntensityRec @@ -1043,9 +1040,9 @@ _XcmsValueCmp (p1, p2) * * SYNOPSIS */ -int -_XcmsIntensityCmp (p1, p2) - IntensityRec *p1, *p2; +static int +_XcmsIntensityCmp( + IntensityRec *p1, IntensityRec *p2) /* * DESCRIPTION * Compares the intensity component of two IntensityRec @@ -1074,10 +1071,10 @@ _XcmsIntensityCmp (p1, p2) * SYNOPSIS */ /* ARGSUSED */ -int -_XcmsValueInterpolation (key, lo, hi, answer, bitsPerRGB) - IntensityRec *key, *lo, *hi, *answer; - int bitsPerRGB; +static int +_XcmsValueInterpolation( + IntensityRec *key, IntensityRec *lo, IntensityRec *hi, IntensityRec *answer, + int bitsPerRGB) /* * DESCRIPTION * Based on a given value, performs a linear interpolation @@ -1104,10 +1101,10 @@ _XcmsValueInterpolation (key, lo, hi, answer, bitsPerRGB) * * SYNOPSIS */ -int -_XcmsIntensityInterpolation (key, lo, hi, answer, bitsPerRGB) - IntensityRec *key, *lo, *hi, *answer; - int bitsPerRGB; +static int +_XcmsIntensityInterpolation( + IntensityRec *key, IntensityRec *lo, IntensityRec *hi, IntensityRec *answer, + int bitsPerRGB) /* * DESCRIPTION * Based on a given intensity, performs a linear interpolation @@ -1146,22 +1143,40 @@ _XcmsIntensityInterpolation (key, lo, hi, answer, bitsPerRGB) } + +typedef int (*comparProcp)( + char *p1, + char *p2); +typedef int (*interpolProcp)( + char *key, + char *lo, + char *hi, + char *answer, + int bitsPerRGB); + /* * NAME * _XcmsTableSearch * * SYNOPSIS */ -int -_XcmsTableSearch (key, bitsPerRGB, base, nel, nKeyPtrSize, compar, interpol, answer) - char *key; - int bitsPerRGB; - char *base; - unsigned nel; - unsigned nKeyPtrSize; - int (*compar)(); - int (*interpol)(); - char *answer; +static int +_XcmsTableSearch( + char *key, + int bitsPerRGB, + char *base, + unsigned nel, + unsigned nKeyPtrSize, + int (*compar)( + char *p1, + char *p2), + int (*interpol)( + char *key, + char *lo, + char *hi, + char *answer, + int bitsPerRGB), + char *answer) /* * DESCRIPTION @@ -1219,8 +1234,8 @@ _XcmsTableSearch (key, bitsPerRGB, base, nel, nKeyPtrSize, compar, interpol, ans * * SYNOPSIS */ -void _XcmsMatVec(pMat, pIn, pOut) - XcmsFloat *pMat, *pIn, *pOut; +static void _XcmsMatVec( + XcmsFloat *pMat, XcmsFloat *pIn, XcmsFloat *pOut) /* * DESCRIPTION * Multiply the passed vector by the passed matrix to return a @@ -1254,9 +1269,9 @@ void _XcmsMatVec(pMat, pIn, pOut) * SYNOPSIS */ static int -XcmsLRGB_RGB_ParseString(spec, pColor) - register char *spec; - XcmsColor *pColor; +XcmsLRGB_RGB_ParseString( + register char *spec, + XcmsColor *pColor) /* * DESCRIPTION * This routines takes a string and attempts to convert @@ -1372,9 +1387,9 @@ XcmsLRGB_RGB_ParseString(spec, pColor) * SYNOPSIS */ static int -XcmsLRGB_RGBi_ParseString(spec, pColor) - register char *spec; - XcmsColor *pColor; +XcmsLRGB_RGBi_ParseString( + register char *spec, + XcmsColor *pColor) /* * DESCRIPTION * This routines takes a string and attempts to convert @@ -1652,7 +1667,7 @@ XcmsRGBiToRGB(ccc, pXcmsColors_in_out, nColors, pCompressed) (char *)pScreenData->pRedTbl->pBase, (unsigned)pScreenData->pRedTbl->nEntries, (unsigned)sizeof(IntensityRec), - _XcmsIntensityCmp, _XcmsIntensityInterpolation, (char *)&answerIRec)) { + (comparProcp)_XcmsIntensityCmp, (interpolProcp)_XcmsIntensityInterpolation, (char *)&answerIRec)) { return(XcmsFailure); } tmpRGB.red = answerIRec.value; @@ -1662,7 +1677,7 @@ XcmsRGBiToRGB(ccc, pXcmsColors_in_out, nColors, pCompressed) (char *)pScreenData->pGreenTbl->pBase, (unsigned)pScreenData->pGreenTbl->nEntries, (unsigned)sizeof(IntensityRec), - _XcmsIntensityCmp, _XcmsIntensityInterpolation, (char *)&answerIRec)) { + (comparProcp)_XcmsIntensityCmp, (interpolProcp)_XcmsIntensityInterpolation, (char *)&answerIRec)) { return(XcmsFailure); } tmpRGB.green = answerIRec.value; @@ -1672,7 +1687,7 @@ XcmsRGBiToRGB(ccc, pXcmsColors_in_out, nColors, pCompressed) (char *)pScreenData->pBlueTbl->pBase, (unsigned)pScreenData->pBlueTbl->nEntries, (unsigned)sizeof(IntensityRec), - _XcmsIntensityCmp, _XcmsIntensityInterpolation, (char *)&answerIRec)) { + (comparProcp)_XcmsIntensityCmp, (interpolProcp)_XcmsIntensityInterpolation, (char *)&answerIRec)) { return(XcmsFailure); } tmpRGB.blue = answerIRec.value; @@ -1692,11 +1707,11 @@ XcmsRGBiToRGB(ccc, pXcmsColors_in_out, nColors, pCompressed) */ /* ARGSUSED */ Status -XcmsRGBToRGBi(ccc, pXcmsColors_in_out, nColors, pCompressed) - XcmsCCC ccc; - XcmsColor *pXcmsColors_in_out;/* pointer to XcmsColors to convert */ - unsigned int nColors; /* Number of colors */ - Bool *pCompressed; /* pointer to a bit array */ +XcmsRGBToRGBi( + XcmsCCC ccc, + XcmsColor *pXcmsColors_in_out,/* pointer to XcmsColors to convert */ + unsigned int nColors, /* Number of colors */ + Bool *pCompressed) /* pointer to a bit array */ /* * DESCRIPTION * Converts color specifications in an array of XcmsColor @@ -1733,7 +1748,7 @@ XcmsRGBToRGBi(ccc, pXcmsColors_in_out, nColors, pCompressed) (char *)pScreenData->pRedTbl->pBase, (unsigned)pScreenData->pRedTbl->nEntries, (unsigned)sizeof(IntensityRec), - _XcmsValueCmp, _XcmsValueInterpolation, (char *)&answerIRec)) { + (comparProcp)_XcmsValueCmp, (interpolProcp)_XcmsValueInterpolation, (char *)&answerIRec)) { return(XcmsFailure); } tmpRGBi.red = answerIRec.intensity; @@ -1743,7 +1758,7 @@ XcmsRGBToRGBi(ccc, pXcmsColors_in_out, nColors, pCompressed) (char *)pScreenData->pGreenTbl->pBase, (unsigned)pScreenData->pGreenTbl->nEntries, (unsigned)sizeof(IntensityRec), - _XcmsValueCmp, _XcmsValueInterpolation, (char *)&answerIRec)) { + (comparProcp)_XcmsValueCmp, (interpolProcp)_XcmsValueInterpolation, (char *)&answerIRec)) { return(XcmsFailure); } tmpRGBi.green = answerIRec.intensity; @@ -1753,7 +1768,7 @@ XcmsRGBToRGBi(ccc, pXcmsColors_in_out, nColors, pCompressed) (char *)pScreenData->pBlueTbl->pBase, (unsigned)pScreenData->pBlueTbl->nEntries, (unsigned)sizeof(IntensityRec), - _XcmsValueCmp, _XcmsValueInterpolation, (char *)&answerIRec)) { + (comparProcp)_XcmsValueCmp, (interpolProcp)_XcmsValueInterpolation, (char *)&answerIRec)) { return(XcmsFailure); } tmpRGBi.blue = answerIRec.intensity; @@ -1772,10 +1787,10 @@ XcmsRGBToRGBi(ccc, pXcmsColors_in_out, nColors, pCompressed) */ /* ARGSUSED */ int -_XcmsLRGB_InitScrnDefault(dpy, screenNumber, pPerScrnInfo) - Display *dpy; - int screenNumber; - XcmsPerScrnInfo *pPerScrnInfo; +_XcmsLRGB_InitScrnDefault( + Display *dpy, + int screenNumber, + XcmsPerScrnInfo *pPerScrnInfo) /* * DESCRIPTION * Given a display and screen number, this routine attempts diff --git a/src/xcms/Lab.c b/src/xcms/Lab.c index b33ba71..6395a92 100644 --- a/src/xcms/Lab.c +++ b/src/xcms/Lab.c @@ -36,13 +36,14 @@ * * Note that the range for L* is 0 to 1. */ -/* $XFree86: xc/lib/X11/Lab.c,v 1.3 2001/01/17 19:41:38 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Lab.c,v 1.4 2003/04/13 19:22:16 dawes Exp $ */ #include <X11/Xos.h> #include <stdio.h> /* sscanf */ #include "Xlibint.h" #include "Xcmsint.h" +#include "Cv.h" /* * DEFINES @@ -57,22 +58,11 @@ #define DIV16BY116 0.137931 /* - * EXTERNS - */ -extern char _XcmsCIELab_prefix[]; - -/* CvCols.c */ -extern Status _XcmsDIConvertColors(); - -/* XYZ.c */ -extern Status _XcmsCIEXYZ_ValidSpec(); - -/* * FORWARD DECLARATIONS */ -static int CIELab_ParseString(); -static Status XcmsCIELab_ValidSpec(); +static int CIELab_ParseString(register char *spec, XcmsColor *pColor); +static Status XcmsCIELab_ValidSpec(XcmsColor *pColor); /* @@ -127,9 +117,9 @@ XcmsColorSpace XcmsCIELabColorSpace = * SYNOPSIS */ static int -CIELab_ParseString(spec, pColor) - register char *spec; - XcmsColor *pColor; +CIELab_ParseString( + register char *spec, + XcmsColor *pColor) /* * DESCRIPTION * This routines takes a string and attempts to convert @@ -192,8 +182,8 @@ CIELab_ParseString(spec, pColor) * SYNOPSIS */ static Status -XcmsCIELab_ValidSpec(pColor) - XcmsColor *pColor; +XcmsCIELab_ValidSpec( + XcmsColor *pColor) /* * DESCRIPTION * Checks if color specification valid for CIE L*a*b*. diff --git a/src/xcms/LabGcC.c b/src/xcms/LabGcC.c index a234967..c13397a 100644 --- a/src/xcms/LabGcC.c +++ b/src/xcms/LabGcC.c @@ -30,12 +30,11 @@ * Source for XcmsCIELabClipuv() gamut compression routine. * */ -/* $XFree86: xc/lib/X11/LabGcC.c,v 1.3 2001/01/17 19:41:38 dawes Exp $ */ +/* $XFree86: xc/lib/X11/LabGcC.c,v 1.4 2003/04/13 19:22:16 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" - -extern Status _XcmsDIConvertColors(); +#include "Cv.h" /************************************************************************ diff --git a/src/xcms/LabGcL.c b/src/xcms/LabGcL.c index 4dc64a9..aac8d23 100644 --- a/src/xcms/LabGcL.c +++ b/src/xcms/LabGcL.c @@ -30,18 +30,11 @@ * Source for XcmsCIELabClipL() gamut compression routine. * */ -/* $XFree86: xc/lib/X11/LabGcL.c,v 1.3 2001/01/17 19:41:38 dawes Exp $ */ +/* $XFree86: xc/lib/X11/LabGcL.c,v 1.4 2003/04/13 19:22:16 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" - -/* - * EXTERNS - */ -extern Status _XcmsCIELabQueryMaxLCRGB(); - -/* CvCols.c */ -extern Status _XcmsDIConvertColors(); +#include "Cv.h" /************************************************************************ diff --git a/src/xcms/LabGcLC.c b/src/xcms/LabGcLC.c index d48972d..cf2cfca 100644 --- a/src/xcms/LabGcLC.c +++ b/src/xcms/LabGcLC.c @@ -30,11 +30,12 @@ * Source for XcmsCIELabClipLab() gamut * compression function. */ -/* $XFree86: xc/lib/X11/LabGcLC.c,v 1.3 2001/01/17 19:41:39 dawes Exp $ */ +/* $XFree86: xc/lib/X11/LabGcLC.c,v 1.4 2003/04/13 19:22:16 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" #include <math.h> +#include "Cv.h" /* * INTERNALS @@ -43,17 +44,6 @@ */ #define MAXBISECTCOUNT 100 -/* - * EXTERNS - */ -extern Status _XcmsCIELabQueryMaxLCRGB(); - -/* CvCols.c */ -extern Status _XcmsDIConvertColors(); - -/* CvColW.c */ -extern Status _XcmsConvertColorsWithWhitePt(); - /************************************************************************ * * diff --git a/src/xcms/LabMnL.c b/src/xcms/LabMnL.c index b616384..6c76ac9 100644 --- a/src/xcms/LabMnL.c +++ b/src/xcms/LabMnL.c @@ -31,11 +31,12 @@ * querying routine. * */ -/* $XFree86: xc/lib/X11/LabMnL.c,v 1.3 2001/01/17 19:41:39 dawes Exp $ */ +/* $XFree86: xc/lib/X11/LabMnL.c,v 1.4 2003/04/13 19:22:16 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" #include <math.h> +#include "Cv.h" /* * DEFINES @@ -44,14 +45,6 @@ #define EPS (XcmsFloat)0.001 #define START_L_STAR (XcmsFloat)40.0 -/* - * EXTERNS - */ -extern Status _XcmsCIELabQueryMaxLCRGB(); - -/* CvColW.c */ -extern Status _XcmsConvertColorsWithWhitePt(); - /************************************************************************ * * diff --git a/src/xcms/LabMxC.c b/src/xcms/LabMxC.c index 53e5c2e..337d5a8 100644 --- a/src/xcms/LabMxC.c +++ b/src/xcms/LabMxC.c @@ -33,11 +33,12 @@ * querying routine. * */ -/* $XFree86: xc/lib/X11/LabMxC.c,v 1.3 2001/01/17 19:41:39 dawes Exp $ */ +/* $XFree86: xc/lib/X11/LabMxC.c,v 1.4 2003/04/13 19:22:16 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" #include <math.h> +#include "Cv.h" /* * DEFINES @@ -47,14 +48,6 @@ #define START_CHROMA (XcmsFloat)3.6 #define TOPL (XcmsFloat)100.0 -/* - * EXTERNS - */ -extern Status _XcmsCIELabQueryMaxLCRGB(); - -/* CvColW.c */ -extern Status _XcmsConvertColorsWithWhitePt(); - /************************************************************************ * * diff --git a/src/xcms/LabMxL.c b/src/xcms/LabMxL.c index 8022a7d..7002a82 100644 --- a/src/xcms/LabMxL.c +++ b/src/xcms/LabMxL.c @@ -31,11 +31,12 @@ * querying routine. * */ -/* $XFree86: xc/lib/X11/LabMxL.c,v 1.3 2001/01/17 19:41:39 dawes Exp $ */ +/* $XFree86: xc/lib/X11/LabMxL.c,v 1.4 2003/04/13 19:22:16 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" #include <math.h> +#include "Cv.h" /* * DEFINES @@ -44,14 +45,6 @@ #define EPS (XcmsFloat)0.001 #define START_L_STAR (XcmsFloat)40 -/* - * EXTERNS - */ -extern Status _XcmsCIELabQueryMaxLCRGB(); - -/* CvColW.c */ -extern Status _XcmsConvertColorsWithWhitePt(); - /************************************************************************ * * diff --git a/src/xcms/LabMxLC.c b/src/xcms/LabMxLC.c index 6fdeeb1..81f2fa2 100644 --- a/src/xcms/LabMxLC.c +++ b/src/xcms/LabMxLC.c @@ -38,9 +38,11 @@ * Fred W. Billmeyer & Max Saltzman, "Principles of Color * Technology", John Wily & Sons, Inc, 1981. */ +/* $XFree86: xc/lib/X11/LabMxLC.c,v 1.2 2003/04/13 19:22:16 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" +#include "Cv.h" /* * DEFINES @@ -52,16 +54,6 @@ #define START_LSTAR (XcmsFloat)40.0 #define START_CHROMA (XcmsFloat)3.6 -/* - * EXTERNS - */ -extern Status _XcmsConvertColorsWithWhitePt(); - -/* - * FORWARD DECLARATIONS - */ -Status _XcmsCIELabQueryMaxLCRGB(); - /************************************************************************ * * @@ -76,12 +68,11 @@ Status _XcmsCIELabQueryMaxLCRGB(); * SYNOPSIS */ Status -_XcmsCIELabQueryMaxLCRGB(ccc, hue, pColor_return, pRGB_return) - XcmsCCC ccc; - XcmsFloat hue; /* hue in radians */ - XcmsColor *pColor_return; - XcmsRGBi *pRGB_return; - +_XcmsCIELabQueryMaxLCRGB( + XcmsCCC ccc, + XcmsFloat hue, /* hue in radians */ + XcmsColor *pColor_return, + XcmsRGBi *pRGB_return) /* * DESCRIPTION * Return the maximum psychometric chroma for a specified diff --git a/src/xcms/LabWpAj.c b/src/xcms/LabWpAj.c index b4fc4a3..89f576a 100644 --- a/src/xcms/LabWpAj.c +++ b/src/xcms/LabWpAj.c @@ -32,16 +32,16 @@ * adjustment of color specifications in the CIE L*a*b* color * space. */ +/* $XFree86: xc/lib/X11/LabWpAj.c,v 1.2 2003/04/13 19:22:16 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" +#include "Cv.h" /* * EXTERNS */ -extern Status _XcmsConvertColorsWithWhitePt(); - /************************************************************************ * * diff --git a/src/xcms/Luv.c b/src/xcms/Luv.c index 9569db0..8d14947 100644 --- a/src/xcms/Luv.c +++ b/src/xcms/Luv.c @@ -38,33 +38,22 @@ * Fred W. Billmeyer & Max Saltzman, "Principles of Color * Technology", John Wily & Sons, Inc, 1981. */ -/* $XFree86: xc/lib/X11/Luv.c,v 1.3 2001/01/17 19:41:39 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Luv.c,v 1.4 2003/04/13 19:22:16 dawes Exp $ */ #include <X11/Xos.h> #include "Xlibint.h" #include "Xcmsint.h" +#include "Cv.h" #include <stdio.h> /* sscanf */ -/* - * EXTERNS - */ - -extern char _XcmsCIELuv_prefix[]; - -/* CvCols.c */ -extern Status _XcmsDIConvertColors(); - -/* uvY.c */ -Status _XcmsCIEuvY_ValidSpec(); - /* * FORWARD DECLARATIONS */ -static int CIELuv_ParseString(); -static Status XcmsCIELuv_ValidSpec(); +static int CIELuv_ParseString(register char *spec, XcmsColor *pColor); +static Status XcmsCIELuv_ValidSpec(XcmsColor *pColor); /* * DEFINES @@ -131,9 +120,9 @@ XcmsColorSpace XcmsCIELuvColorSpace = * SYNOPSIS */ static int -CIELuv_ParseString(spec, pColor) - register char *spec; - XcmsColor *pColor; +CIELuv_ParseString( + register char *spec, + XcmsColor *pColor) /* * DESCRIPTION * This routines takes a string and attempts to convert @@ -194,8 +183,8 @@ CIELuv_ParseString(spec, pColor) * SYNOPSIS */ static Status -XcmsCIELuv_ValidSpec(pColor) - XcmsColor *pColor; +XcmsCIELuv_ValidSpec( + XcmsColor *pColor) /* * DESCRIPTION * Checks if color specification valid for CIE L*u*v*. diff --git a/src/xcms/LuvGcC.c b/src/xcms/LuvGcC.c index 67da68a..fdb5dcd 100644 --- a/src/xcms/LuvGcC.c +++ b/src/xcms/LuvGcC.c @@ -30,15 +30,11 @@ * Source for XcmsCIELuvClipuv() gamut compression routine. * */ -/* $XFree86: xc/lib/X11/LuvGcC.c,v 1.3 2001/01/17 19:41:39 dawes Exp $ */ +/* $XFree86: xc/lib/X11/LuvGcC.c,v 1.4 2003/04/13 19:22:16 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" - -/* EXTERNS */ - -/* CvCols.c */ -extern Status _XcmsDIConvertColors(); +#include "Cv.h" /************************************************************************ diff --git a/src/xcms/LuvGcL.c b/src/xcms/LuvGcL.c index 1ae8513..1c9d4f5 100644 --- a/src/xcms/LuvGcL.c +++ b/src/xcms/LuvGcL.c @@ -30,18 +30,11 @@ * Source for XcmsCIELuvClipL() gamut compression routine. * */ -/* $XFree86: xc/lib/X11/LuvGcL.c,v 1.3 2001/01/17 19:41:39 dawes Exp $ */ +/* $XFree86: xc/lib/X11/LuvGcL.c,v 1.4 2003/04/13 19:22:16 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" - -/* - * EXTERNS - */ -extern Status _XcmsCIELuvQueryMaxLCRGB(); - -/* CvCols.c */ -extern Status _XcmsDIConvertColors(); +#include "Cv.h" /************************************************************************ diff --git a/src/xcms/LuvGcLC.c b/src/xcms/LuvGcLC.c index 7db28f7..157a3de 100644 --- a/src/xcms/LuvGcLC.c +++ b/src/xcms/LuvGcLC.c @@ -30,11 +30,12 @@ * Source for XcmsCIELuvClipLuv() gamut * compression function. */ -/* $XFree86: xc/lib/X11/LuvGcLC.c,v 1.3 2001/01/17 19:41:39 dawes Exp $ */ +/* $XFree86: xc/lib/X11/LuvGcLC.c,v 1.4 2003/04/13 19:22:17 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" #include <math.h> +#include "Cv.h" /* * INTERNALS @@ -43,17 +44,6 @@ */ #define MAXBISECTCOUNT 100 -/* - * EXTERNS - */ -extern Status _XcmsCIELuvQueryMaxLCRGB(); - -/* CvCols.c */ -extern Status _XcmsDIConvertColors(); - -/* CvColW.c */ -extern Status _XcmsConvertColorsWithWhitePt(); - /************************************************************************ * * diff --git a/src/xcms/LuvMnL.c b/src/xcms/LuvMnL.c index c9e27eb..3f82402 100644 --- a/src/xcms/LuvMnL.c +++ b/src/xcms/LuvMnL.c @@ -31,11 +31,12 @@ * querying routine. * */ -/* $XFree86: xc/lib/X11/LuvMnL.c,v 1.3 2001/01/17 19:41:39 dawes Exp $ */ +/* $XFree86: xc/lib/X11/LuvMnL.c,v 1.4 2003/04/13 19:22:17 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" #include <math.h> +#include "Cv.h" /* * DEFINES @@ -44,14 +45,6 @@ #define EPS (XcmsFloat)0.001 #define START_L_STAR (XcmsFloat)40.0 -/* - * EXTERNS - */ -extern Status _XcmsCIELuvQueryMaxLCRGB(); - -/* CvColW.c */ -extern Status _XcmsConvertColorsWithWhitePt(); - /************************************************************************ * * diff --git a/src/xcms/LuvMxC.c b/src/xcms/LuvMxC.c index b3ede84..10088bb 100644 --- a/src/xcms/LuvMxC.c +++ b/src/xcms/LuvMxC.c @@ -33,11 +33,12 @@ * querying routine. * */ -/* $XFree86: xc/lib/X11/LuvMxC.c,v 1.3 2001/01/17 19:41:39 dawes Exp $ */ +/* $XFree86: xc/lib/X11/LuvMxC.c,v 1.4 2003/04/13 19:22:17 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" #include <math.h> +#include "Cv.h" /* * DEFINES @@ -46,13 +47,6 @@ #define EPS (XcmsFloat)0.001 #define START_CHROMA (XcmsFloat)2.2 #define TOPL (XcmsFloat)100.0 -/* - * EXTERNS - */ -extern Status _XcmsCIELuvQueryMaxLCRGB(); - -/* CvColW.c */ -extern Status _XcmsConvertColorsWithWhitePt(); /************************************************************************ diff --git a/src/xcms/LuvMxL.c b/src/xcms/LuvMxL.c index 932bc01..327227d 100644 --- a/src/xcms/LuvMxL.c +++ b/src/xcms/LuvMxL.c @@ -31,11 +31,12 @@ * querying routine. * */ -/* $XFree86: xc/lib/X11/LuvMxL.c,v 1.3 2001/01/17 19:41:40 dawes Exp $ */ +/* $XFree86: xc/lib/X11/LuvMxL.c,v 1.4 2003/04/13 19:22:17 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" #include <math.h> +#include "Cv.h" /* * DEFINES @@ -44,14 +45,6 @@ #define EPS (XcmsFloat)0.001 #define START_L_STAR (XcmsFloat)40.0 -/* - * EXTERNS - */ -extern Status _XcmsCIELuvQueryMaxLCRGB(); - -/* CvColW.c */ -extern Status _XcmsConvertColorsWithWhitePt(); - /************************************************************************ * * diff --git a/src/xcms/LuvMxLC.c b/src/xcms/LuvMxLC.c index 337bbbf..3a241a7 100644 --- a/src/xcms/LuvMxLC.c +++ b/src/xcms/LuvMxLC.c @@ -38,9 +38,11 @@ * Fred W. Billmeyer & Max Saltzman, "Principles of Color * Technology", John Wily & Sons, Inc, 1981. */ +/* $XFree86: xc/lib/X11/LuvMxLC.c,v 1.2 2003/04/13 19:22:17 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" +#include "Cv.h" /* * DEFINES @@ -52,16 +54,6 @@ #define START_LSTAR (XcmsFloat)40.0 #define START_CHROMA (XcmsFloat)2.2 -/* - * EXTERNS - */ -extern Status _XcmsConvertColorsWithWhitePt(); - -/* - * FORWARD DECLARATIONS - */ -Status _XcmsCIELuvQueryMaxLCRGB(); - /************************************************************************ * * @@ -76,12 +68,11 @@ Status _XcmsCIELuvQueryMaxLCRGB(); * SYNOPSIS */ Status -_XcmsCIELuvQueryMaxLCRGB(ccc, hue, pColor_return, pRGB_return) - XcmsCCC ccc; - XcmsFloat hue; /* hue in radians */ - XcmsColor *pColor_return; - XcmsRGBi *pRGB_return; - +_XcmsCIELuvQueryMaxLCRGB( + XcmsCCC ccc, + XcmsFloat hue, /* hue in radians */ + XcmsColor *pColor_return, + XcmsRGBi *pRGB_return) /* * DESCRIPTION * Return the maximum psychometric chroma for a specified diff --git a/src/xcms/LuvWpAj.c b/src/xcms/LuvWpAj.c index 5083ccb..5df6d8b 100644 --- a/src/xcms/LuvWpAj.c +++ b/src/xcms/LuvWpAj.c @@ -32,15 +32,11 @@ * adjustment of color specifications in the CIE CIELuv.color * space. */ +/* $XFree86: xc/lib/X11/LuvWpAj.c,v 1.2 2003/04/13 19:22:17 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" - -/* - * EXTERNS - */ - -extern Status _XcmsConvertColorsWithWhitePt(); +#include "Cv.h" diff --git a/src/xcms/PrOfId.c b/src/xcms/PrOfId.c index 7b301e4..8b5e43a 100644 --- a/src/xcms/PrOfId.c +++ b/src/xcms/PrOfId.c @@ -32,15 +32,11 @@ * * */ +/* $XFree86: xc/lib/X11/PrOfId.c,v 1.2 2003/04/13 19:22:17 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" - -/* - * EXTERNS - */ -extern XcmsColorSpace **_XcmsDIColorSpaces; -extern XcmsColorSpace **_XcmsDDColorSpaces; +#include "Cv.h" /* diff --git a/src/xcms/QuCol.c b/src/xcms/QuCol.c index 0df0e66..3f19a67 100644 --- a/src/xcms/QuCol.c +++ b/src/xcms/QuCol.c @@ -32,15 +32,11 @@ * * */ -/* $XFree86: xc/lib/X11/QuCol.c,v 1.3 2001/01/17 19:41:42 dawes Exp $ */ +/* $XFree86: xc/lib/X11/QuCol.c,v 1.4 2003/04/13 19:22:17 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" - -/* EXTERN */ - -/* SetGetCols.c */ -extern Status _XcmsSetGetColors(); +#include "Cv.h" /************************************************************************ @@ -76,6 +72,6 @@ XcmsQueryColor(dpy, colormap, pXcmsColor_in_out, result_format) * specified pixel. */ { - return(_XcmsSetGetColors (XQueryColor, dpy, colormap, - pXcmsColor_in_out, 1, result_format, (Bool *) NULL)); + return(_XcmsSetGetColor(XQueryColor, dpy, colormap, + pXcmsColor_in_out, result_format, (Bool *) NULL)); } diff --git a/src/xcms/QuCols.c b/src/xcms/QuCols.c index c857e46..f2ca1a2 100644 --- a/src/xcms/QuCols.c +++ b/src/xcms/QuCols.c @@ -32,15 +32,11 @@ * * */ -/* $XFree86: xc/lib/X11/QuCols.c,v 1.3 2001/01/17 19:41:42 dawes Exp $ */ +/* $XFree86: xc/lib/X11/QuCols.c,v 1.4 2003/04/13 19:22:17 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" - -/* EXTERNS */ - -/* SetGetCols.c */ -extern Status _XcmsSetGetColors(); +#include "Cv.h" /************************************************************************ @@ -76,6 +72,6 @@ XcmsQueryColors(dpy, colormap, pXcmsColors_in_out, nColors, result_format) * specified pixels. */ { - return(_XcmsSetGetColors (XQueryColors, dpy, colormap, + return(_XcmsSetGetColors(XQueryColors, dpy, colormap, pXcmsColors_in_out, nColors, result_format, (Bool *) NULL)); } diff --git a/src/xcms/SetCCC.c b/src/xcms/SetCCC.c index d58daf8..34d09ab 100644 --- a/src/xcms/SetCCC.c +++ b/src/xcms/SetCCC.c @@ -33,6 +33,7 @@ * * */ +/* $XFree86: xc/lib/X11/SetCCC.c,v 1.2 2003/11/17 22:20:08 dawes Exp $ */ #include "Xlibint.h" #include "Xcms.h" @@ -86,17 +87,10 @@ XcmsSetWhitePoint(ccc, pColor) */ XcmsCompressionProc -#if NeedFunctionPrototypes XcmsSetCompressionProc( XcmsCCC ccc, XcmsCompressionProc compression_proc, XPointer client_data) -#else -XcmsSetCompressionProc(ccc, compression_proc, client_data) - XcmsCCC ccc; - XcmsCompressionProc compression_proc; - XPointer client_data; -#endif /* * DESCRIPTION * Set the specified CCC's compression function and client data. @@ -122,17 +116,10 @@ XcmsSetCompressionProc(ccc, compression_proc, client_data) */ XcmsWhiteAdjustProc -#if NeedFunctionPrototypes XcmsSetWhiteAdjustProc( XcmsCCC ccc, XcmsWhiteAdjustProc white_adjust_proc, XPointer client_data ) -#else -XcmsSetWhiteAdjustProc(ccc, white_adjust_proc, client_data) - XcmsCCC ccc; - XcmsWhiteAdjustProc white_adjust_proc; - XPointer client_data; -#endif /* * DESCRIPTION * Set the specified CCC's white_adjust function and client data. diff --git a/src/xcms/SetGetCols.c b/src/xcms/SetGetCols.c index 5ee6898..4b425af 100644 --- a/src/xcms/SetGetCols.c +++ b/src/xcms/SetGetCols.c @@ -32,6 +32,7 @@ * * */ +/* $XFree86: xc/lib/X11/SetGetCols.c,v 1.2 2003/04/13 19:22:17 dawes Exp $ */ /* * EXTERNAL INCLUDES @@ -40,15 +41,7 @@ */ #include "Xlibint.h" #include "Xcmsint.h" - - -/* - * EXTERNS - */ - -extern void _XcmsRGB_to_XColor(); -extern void _XColor_to_XcmsRGB(); - +#include "Cv.h" /************************************************************************ @@ -59,27 +52,144 @@ extern void _XColor_to_XcmsRGB(); /* * NAME - * XcmsSetColors - + * XcmsSetColor - * * SYNOPSIS */ Status -_XcmsSetGetColors(xColorProc, dpy, cmap, pColors_in_out, nColors, - result_format, pCompressed) - Status (*xColorProc)(); - Display *dpy; - Colormap cmap; - XcmsColor *pColors_in_out; - unsigned int nColors; - XcmsColorFormat result_format; - Bool *pCompressed; +_XcmsSetGetColor( + Status (*xColorProc)( + Display* /* display */, + Colormap /* colormap */, + XColor* /* screen_in_out */), + Display *dpy, + Colormap cmap, + XcmsColor *pColors_in_out, + XcmsColorFormat result_format, + Bool *pCompressed) /* * DESCRIPTION * Routine containing code common to: * XcmsAllocColor * XcmsQueryColor - * XcmsQueryColors * XcmsStoreColor + * + * RETURNS + * XcmsFailure if failed; + * XcmsSuccess if it succeeded without gamut compression; + * XcmsSuccessWithCompression if it succeeded with gamut + * compression; + */ +{ + XcmsCCC ccc; + XColor XColors_in_out; + Status retval = XcmsSuccess; + + /* + * Argument Checking + * 1. Assume xColorProc is correct + * 2. Insure ccc not NULL + * 3. Assume cmap correct (should be checked by Server) + * 4. Insure pColors_in_out valid + * 5. Assume method_in is valid (should be checked by Server) + */ + + if (dpy == NULL) { + return(XcmsFailure); + } + + if (result_format == XcmsUndefinedFormat) { + return(XcmsFailure); + } + + if ( !((*xColorProc == XAllocColor) || (*xColorProc == XStoreColor) + || (*xColorProc == XQueryColor)) ) { + return(XcmsFailure); + } + + if ((ccc = XcmsCCCOfColormap(dpy, cmap)) == (XcmsCCC)NULL) { + return(XcmsFailure); + } + + if (*xColorProc == XQueryColor) { + goto Query; + } + + /* + * Convert to RGB, adjusting for white point differences if necessary. + */ + if ((retval = XcmsConvertColors(ccc, pColors_in_out, 1, XcmsRGBFormat, + pCompressed)) == XcmsFailure) { + return(XcmsFailure); + } + +Query: + /* + * Convert XcmsColor to XColor structures + */ + _XcmsRGB_to_XColor(pColors_in_out, &XColors_in_out, 1); + + /* + * Now make appropriate X Call + */ + if (*xColorProc == XAllocColor) { + if ((*xColorProc)(ccc->dpy, cmap, &XColors_in_out) == 0) { + return(XcmsFailure); + } + } else if ((*xColorProc == XQueryColor) || (*xColorProc == XStoreColor)) { + /* Note: XQueryColor and XStoreColor do not return any Status */ + (*xColorProc)(ccc->dpy, cmap, &XColors_in_out); + } else { + return(XcmsFailure); + } + + if ((*xColorProc == XStoreColor)) { + return(retval); + } + + /* + * Now, convert the returned XColor (i.e., rgb) to XcmsColor structures + */ + _XColor_to_XcmsRGB(ccc, &XColors_in_out, pColors_in_out, 1); + + /* + * Then, convert XcmsColor structures to the original specification + * format. Note that we must use NULL instead of passing + * pCompressed. + */ + + if (result_format != XcmsRGBFormat) { + if (XcmsConvertColors(ccc, pColors_in_out, 1, result_format, + (Bool *) NULL) == XcmsFailure) { + return(XcmsFailure); + } + } + return(retval); +} + +/* + * NAME + * XcmsSetColors - + * + * SYNOPSIS + */ +Status +_XcmsSetGetColors( + Status (*xColorProc)( + Display* /* display */, + Colormap /* colormap */, + XColor* /* screen_in_out */, + int /* nColors */), + Display *dpy, + Colormap cmap, + XcmsColor *pColors_in_out, + int nColors, + XcmsColorFormat result_format, + Bool *pCompressed) +/* + * DESCRIPTION + * Routine containing code common to: + * XcmsQueryColors * XcmsStoreColors * * RETURNS @@ -115,9 +225,7 @@ _XcmsSetGetColors(xColorProc, dpy, cmap, pColors_in_out, nColors, return(XcmsFailure); } - if (!((*xColorProc == XAllocColor) || (*xColorProc == XStoreColor) - || (*xColorProc == XStoreColors) || (*xColorProc == XQueryColor) - || (*xColorProc == XQueryColors))) { + if ( !((*xColorProc == XStoreColors) || (*xColorProc == XQueryColors)) ) { return(XcmsFailure); } @@ -125,11 +233,6 @@ _XcmsSetGetColors(xColorProc, dpy, cmap, pColors_in_out, nColors, return(XcmsFailure); } - if ((*xColorProc == XAllocColor) || (*xColorProc == XStoreColor) - || (*xColorProc == XQueryColor)) { - nColors = 1; - } - /* * Allocate space for XColors */ @@ -138,14 +241,16 @@ _XcmsSetGetColors(xColorProc, dpy, cmap, pColors_in_out, nColors, return(XcmsFailure); } - if ((*xColorProc == XQueryColor) || (*xColorProc == XQueryColors)) { + if (*xColorProc == XQueryColors) { goto Query; } + /* * Convert to RGB, adjusting for white point differences if necessary. */ if ((retval = XcmsConvertColors(ccc, pColors_in_out, nColors, XcmsRGBFormat, pCompressed)) == XcmsFailure) { + Xfree((char *)pXColors_in_out); return(XcmsFailure); } @@ -158,15 +263,7 @@ Query: /* * Now make appropriate X Call */ - if (*xColorProc == XAllocColor) { - if ((*xColorProc)(ccc->dpy, cmap, pXColors_in_out) == 0) { - Xfree((char *)pXColors_in_out); - return(XcmsFailure); - } - } else if ((*xColorProc == XQueryColor) || (*xColorProc == XStoreColor)) { - /* Note: XQueryColor and XStoreColor do not return any Status */ - (*xColorProc)(ccc->dpy, cmap, pXColors_in_out); - } else if ((*xColorProc == XQueryColors) || (*xColorProc == XStoreColors)){ + if ((*xColorProc == XQueryColors) || (*xColorProc == XStoreColors)){ /* Note: XQueryColors and XStoreColors do not return any Status */ (*xColorProc)(ccc->dpy, cmap, pXColors_in_out, nColors); } else { @@ -174,13 +271,13 @@ Query: return(XcmsFailure); } - if ((*xColorProc == XStoreColor) || (*xColorProc == XStoreColors)) { + if (*xColorProc == XStoreColors) { Xfree((char *)pXColors_in_out); return(retval); } /* - * Now, convert returned XColor(i.e., rgb) to XcmsColor structures + * Now, convert the returned XColor (i.e., rgb) to XcmsColor structures */ _XColor_to_XcmsRGB(ccc, pXColors_in_out, pColors_in_out, nColors); Xfree((char *)pXColors_in_out); @@ -190,12 +287,14 @@ Query: * format. Note that we must use NULL instead of passing * pCompressed. */ - if (result_format != XcmsRGBFormat) { if (XcmsConvertColors(ccc, pColors_in_out, nColors, result_format, (Bool *) NULL) == XcmsFailure) { return(XcmsFailure); } } + return(retval); } + +/* ### EOF ### */ diff --git a/src/xcms/StCol.c b/src/xcms/StCol.c index 5467686..0d845b9 100644 --- a/src/xcms/StCol.c +++ b/src/xcms/StCol.c @@ -32,15 +32,11 @@ * * */ -/* $XFree86: xc/lib/X11/StCol.c,v 1.3 2001/01/17 19:41:44 dawes Exp $ */ +/* $XFree86: xc/lib/X11/StCol.c,v 1.4 2003/04/13 19:22:17 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" - -/* EXTERN */ - -/* SetGetCols.c */ -extern Status _XcmsSetGetColors(); +#include "Cv.h" /************************************************************************ @@ -80,6 +76,6 @@ XcmsStoreColor(dpy, colormap, pColor_in) XcmsColor tmpColor; tmpColor = *pColor_in; - return(_XcmsSetGetColors (XStoreColor, dpy, colormap, - &tmpColor, 1, XcmsRGBFormat, (Bool *) NULL)); + return(_XcmsSetGetColor(XStoreColor, dpy, colormap, + &tmpColor, XcmsRGBFormat, (Bool *) NULL)); } diff --git a/src/xcms/StCols.c b/src/xcms/StCols.c index d35bd33..3d6b900 100644 --- a/src/xcms/StCols.c +++ b/src/xcms/StCols.c @@ -32,15 +32,11 @@ * * */ -/* $XFree86: xc/lib/X11/StCols.c,v 1.3 2001/01/17 19:41:44 dawes Exp $ */ +/* $XFree86: xc/lib/X11/StCols.c,v 1.4 2003/04/13 19:22:18 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" - -/* EXTERN */ - -/* SetGetCols.c */ -extern Status _XcmsSetGetColors(); +#include "Cv.h" /************************************************************************ diff --git a/src/xcms/UNDEFINED.c b/src/xcms/UNDEFINED.c index a4e0555..6c0656a 100644 --- a/src/xcms/UNDEFINED.c +++ b/src/xcms/UNDEFINED.c @@ -33,6 +33,7 @@ * * */ +/* $XFree86: xc/lib/X11/UNDEFINED.c,v 1.2 2003/04/13 19:22:18 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" @@ -40,21 +41,33 @@ /* * FORWARD DECLARATIONS */ -static int ReturnZero(); +static int DummyParseStringProc( + char* /* color_string */, + XcmsColor* /* color_return */ + ); +static Status ReturnZero( + XcmsCCC /* ccc */, + XcmsColor* /* white_point */, + XcmsColor* /* colors */, + unsigned int /* ncolors */ + ); /* * LOCALS VARIABLES */ -static Status (*(Fl_ReturnZero[]))() = { +static Status (*(Fl_ReturnZero[]))( + XcmsCCC /* ccc */, + XcmsColor* /* white_point */, + XcmsColor* /* colors */, + unsigned int /* ncolors */ + ) = { ReturnZero, NULL }; - - /* * GLOBALS * Variables declared in this package that are allowed @@ -67,7 +80,7 @@ XcmsColorSpace XcmsUNDEFINEDColorSpace = { "undefined", /* prefix */ XcmsUndefinedFormat, /* id */ - ReturnZero, /* parseString */ + &DummyParseStringProc, /* parseString */ Fl_ReturnZero, /* to_CIEXYZ */ Fl_ReturnZero /* from_CIEXYZ */ }; @@ -87,8 +100,13 @@ XcmsColorSpace XcmsUNDEFINEDColorSpace = * SYNOPSIS */ /* ARGSUSED */ -static int -ReturnZero() +static Status +ReturnZero( + XcmsCCC ccc /* ccc */, + XcmsColor* white /* white_point */, + XcmsColor* colors /* colors */, + unsigned int ncolors /* ncolors */ + ) /* * DESCRIPTION * Does nothing. @@ -100,3 +118,13 @@ ReturnZero() { return(0); } + +static int DummyParseStringProc( + char* color_string /* color_string */, + XcmsColor* color_return /* color_return */ + ) +{ + return(0); +} + +/* ### EOF ### */ diff --git a/src/xcms/XRGB.c b/src/xcms/XRGB.c index c4985a3..26d0ef9 100644 --- a/src/xcms/XRGB.c +++ b/src/xcms/XRGB.c @@ -33,10 +33,11 @@ * * */ -/* $XFree86: xc/lib/X11/XRGB.c,v 3.3 2001/07/29 05:01:11 tsi Exp $ */ +/* $XFree86: xc/lib/X11/XRGB.c,v 3.4 2003/04/13 19:22:19 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" +#include "Cv.h" /* * LOCAL VARIABLES @@ -77,10 +78,10 @@ static unsigned short const MASK[17] = { * SYNOPSIS */ void -_XcmsRGB_to_XColor(pColors, pXColors, nColors) - XcmsColor *pColors; - XColor *pXColors; - unsigned int nColors; +_XcmsRGB_to_XColor( + XcmsColor *pColors, + XColor *pXColors, + unsigned int nColors) /* * DESCRIPTION * Translates a color specification in XcmsRGBFormat in a XcmsColor @@ -107,11 +108,11 @@ _XcmsRGB_to_XColor(pColors, pXColors, nColors) * SYNOPSIS */ void -_XColor_to_XcmsRGB(ccc, pXColors, pColors, nColors) - XcmsCCC ccc; - XColor *pXColors; - XcmsColor *pColors; - unsigned int nColors; +_XColor_to_XcmsRGB( + XcmsCCC ccc, + XColor *pXColors, + XcmsColor *pColors, + unsigned int nColors) /* * DESCRIPTION * Translates an RGB color specification in an XColor @@ -145,9 +146,9 @@ _XColor_to_XcmsRGB(ccc, pXColors, pColors, nColors) * SYNOPSIS */ void -_XcmsResolveColor(ccc, pXcmsColor) - XcmsCCC ccc; - XcmsColor *pXcmsColor; +_XcmsResolveColor( + XcmsCCC ccc, + XcmsColor *pXcmsColor) /* * DESCRIPTION * Uses the X Server ResolveColor() algorithm to @@ -191,9 +192,9 @@ _XcmsResolveColor(ccc, pXcmsColor) * SYNOPSIS */ void -_XcmsUnresolveColor(ccc, pColor) - XcmsCCC ccc; - XcmsColor *pColor; +_XcmsUnresolveColor( + XcmsCCC ccc, + XcmsColor *pColor) /* * DESCRIPTION * Masks out insignificant bits. @@ -220,9 +221,9 @@ _XcmsUnresolveColor(ccc, pColor) * SYNOPSIS */ void -_XUnresolveColor(ccc, pXColor) - XcmsCCC ccc; - XColor *pXColor; +_XUnresolveColor( + XcmsCCC ccc, + XColor *pXColor) /* * DESCRIPTION * Masks out insignificant bits. diff --git a/src/xcms/XYZ.c b/src/xcms/XYZ.c index 55040cb..7a9c98e 100644 --- a/src/xcms/XYZ.c +++ b/src/xcms/XYZ.c @@ -33,23 +33,15 @@ * * */ -/* $XFree86: xc/lib/X11/XYZ.c,v 1.3 2001/01/17 19:41:49 dawes Exp $ */ +/* $XFree86: xc/lib/X11/XYZ.c,v 1.4 2003/04/13 19:22:19 dawes Exp $ */ #include <X11/Xos.h> #include "Xlibint.h" #include "Xcmsint.h" +#include "Cv.h" #include <stdio.h> /* sscanf */ - -/* - * EXTERNS - * External declarations required locally to this package - * that are not already declared in any of the included header - * files (external includes or internal includes). - */ -extern char _XcmsCIEXYZ_prefix[]; - /* * DEFINES * Internal definitions that need NOT be exported to any package @@ -64,9 +56,7 @@ extern char _XcmsCIEXYZ_prefix[]; /* * FORWARD DECLARATIONS */ -static int CIEXYZ_ParseString(); -Status _XcmsCIEXYZ_ValidSpec(); - +static int CIEXYZ_ParseString(register char *spec, XcmsColor *pColor); /* * LOCALS VARIABLES @@ -110,9 +100,9 @@ XcmsColorSpace XcmsCIEXYZColorSpace = * SYNOPSIS */ static int -CIEXYZ_ParseString(spec, pColor) - register char *spec; - XcmsColor *pColor; +CIEXYZ_ParseString( + register char *spec, + XcmsColor *pColor) /* * DESCRIPTION * This routines takes a string and attempts to convert @@ -172,8 +162,8 @@ CIEXYZ_ParseString(spec, pColor) * SYNOPSIS */ Status -_XcmsCIEXYZ_ValidSpec(pColor) - XcmsColor *pColor; +_XcmsCIEXYZ_ValidSpec( + XcmsColor *pColor) /* * DESCRIPTION * Checks if color specification valid for CIE XYZ diff --git a/src/xcms/Xcmsint.h b/src/xcms/Xcmsint.h index 5e14195..ca8e057 100644 --- a/src/xcms/Xcmsint.h +++ b/src/xcms/Xcmsint.h @@ -29,7 +29,7 @@ * (i.e., for API internal use only) * */ -/* $XFree86: xc/lib/X11/Xcmsint.h,v 3.3 2001/07/25 15:04:44 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Xcmsint.h,v 3.4 2003/04/13 19:22:19 dawes Exp $ */ #ifndef _XCMSINT_H_ #define _XCMSINT_H_ @@ -109,7 +109,7 @@ typedef struct _XcmsIntensityMap { VisualID visualID; XPointer screenData; /* pointer to corresponding Screen Color*/ /* Characterization Data */ - void (*pFreeScreenData)(); /* Function that frees a Screen */ + void (*pFreeScreenData)(XPointer pScreenDataTemp); /* Function that frees a Screen */ /* structure. */ struct _XcmsIntensityMap *pNext; } XcmsIntensityMap; @@ -176,6 +176,28 @@ typedef struct { IntensityTbl *pBlueTbl; } LINEAR_RGB_SCCData; +/* function prototypes */ +extern XcmsCmapRec * +_XcmsAddCmapRec( + Display *dpy, + Colormap cmap, + Window windowID, + Visual *visual); +extern void +_XcmsRGB_to_XColor( + XcmsColor *pColors, + XColor *pXColors, + unsigned int nColors); +extern Status +_XcmsResolveColorString ( + XcmsCCC ccc, + const char **color_string, + XcmsColor *pColor_exact_return, + XcmsColorFormat result_format); +extern void +_XUnresolveColor( + XcmsCCC ccc, + XColor *pXColor); /* * DESCRIPTION * Include file for defining the math macros used in the diff --git a/src/xcms/cmsAllCol.c b/src/xcms/cmsAllCol.c index 3cfce49..0bdeeeb 100644 --- a/src/xcms/cmsAllCol.c +++ b/src/xcms/cmsAllCol.c @@ -32,15 +32,11 @@ * * */ -/* $XFree86: xc/lib/X11/cmsAllCol.c,v 1.3 2001/01/17 19:41:50 dawes Exp $ */ +/* $XFree86: xc/lib/X11/cmsAllCol.c,v 1.4 2003/04/13 19:22:20 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" - -/* EXTERNS */ - -/* SetGetCols.c */ -extern Status _XcmsSetGetColors(); +#include "Cv.h" /* @@ -72,6 +68,6 @@ XcmsAllocColor(dpy, colormap, pXcmsColor_in_out, result_format) * */ { - return(_XcmsSetGetColors (XAllocColor, dpy, colormap, pXcmsColor_in_out, 1, + return(_XcmsSetGetColor(XAllocColor, dpy, colormap, pXcmsColor_in_out, result_format, (Bool *)NULL)); } diff --git a/src/xcms/cmsAllNCol.c b/src/xcms/cmsAllNCol.c index 2d5e46e..ffcb9df 100644 --- a/src/xcms/cmsAllNCol.c +++ b/src/xcms/cmsAllNCol.c @@ -32,21 +32,13 @@ * * */ -/* $XFree86: xc/lib/X11/cmsAllNCol.c,v 1.3 2001/01/17 19:41:50 dawes Exp $ */ +/* $XFree86: xc/lib/X11/cmsAllNCol.c,v 1.5 2003/11/17 22:20:11 dawes Exp $ */ #define NEED_REPLIES #include <stdio.h> #include "Xlibint.h" #include "Xcmsint.h" - -/* - * EXTERNS - */ -extern void _XColor_to_XcmsRGB(); -extern void _XcmsRGB_to_XColor(); - -/* cmsColNm.c */ -extern Status _XcmsResolveColorString(); +#include "Cv.h" /* @@ -55,7 +47,6 @@ extern Status _XcmsResolveColorString(); * * SYNOPSIS */ -#if NeedFunctionPrototypes Status XcmsAllocNamedColor ( Display *dpy, @@ -64,17 +55,6 @@ XcmsAllocNamedColor ( XcmsColor *pColor_scrn_return, XcmsColor *pColor_exact_return, XcmsColorFormat result_format) -#else -Status -XcmsAllocNamedColor(dpy, cmap, colorname, pColor_scrn_return, - pColor_exact_return, result_format) - Display *dpy; - Colormap cmap; - char *colorname; - XcmsColor *pColor_scrn_return; - XcmsColor *pColor_exact_return; - XcmsColorFormat result_format; -#endif /* * DESCRIPTION * Finds the color specification associated with the color diff --git a/src/xcms/cmsCmap.c b/src/xcms/cmsCmap.c index 84d60a4..0713497 100644 --- a/src/xcms/cmsCmap.c +++ b/src/xcms/cmsCmap.c @@ -33,18 +33,20 @@ * * */ +/* $XFree86: xc/lib/X11/cmsCmap.c,v 3.2 2003/04/13 19:22:20 dawes Exp $ */ #define NEED_EVENTS #define NEED_REPLIES #include "Xlibint.h" #include "Xcmsint.h" #include "Xutil.h" +#include "Cmap.h" +#include "Cv.h" /* * FORWARD DECLARATIONS */ -XcmsCmapRec *_XcmsAddCmapRec(); -static void _XcmsFreeClientCmaps(); +static void _XcmsFreeClientCmaps(Display *dpy); /************************************************************************ @@ -60,9 +62,9 @@ static void _XcmsFreeClientCmaps(); * SYNOPSIS */ static XcmsCmapRec * -CmapRecForColormap(dpy, cmap) - Display *dpy; - Colormap cmap; +CmapRecForColormap( + Display *dpy, + Colormap cmap) /* * DESCRIPTION * Find the corresponding XcmsCmapRec for cmap. In not found @@ -278,10 +280,10 @@ _XcmsAddCmapRec(dpy, cmap, windowID, visual) * SYNOPSIS */ XcmsCmapRec * -_XcmsCopyCmapRecAndFree(dpy, src_cmap, copy_cmap) - Display *dpy; - Colormap src_cmap; - Colormap copy_cmap; +_XcmsCopyCmapRecAndFree( + Display *dpy, + Colormap src_cmap, + Colormap copy_cmap) /* * DESCRIPTION * Augments Xlib's XCopyColormapAndFree() to copy @@ -317,9 +319,9 @@ _XcmsCopyCmapRecAndFree(dpy, src_cmap, copy_cmap) * SYNOPSIS */ void -_XcmsDeleteCmapRec(dpy, cmap) - Display *dpy; - Colormap cmap; +_XcmsDeleteCmapRec( + Display *dpy, + Colormap cmap) /* * DESCRIPTION * Removes and frees the specified XcmsCmapRec structure @@ -364,8 +366,8 @@ _XcmsDeleteCmapRec(dpy, cmap) * SYNOPSIS */ static void -_XcmsFreeClientCmaps(dpy) - Display *dpy; +_XcmsFreeClientCmaps( + Display *dpy) /* * DESCRIPTION * Frees all XcmsCmapRec structures in the linked list diff --git a/src/xcms/cmsColNm.c b/src/xcms/cmsColNm.c index e65faf9..67594c9 100644 --- a/src/xcms/cmsColNm.c +++ b/src/xcms/cmsColNm.c @@ -31,7 +31,7 @@ * * */ -/* $XFree86: xc/lib/X11/cmsColNm.c,v 3.10 2002/05/31 18:45:42 dawes Exp $ */ +/* $XFree86: xc/lib/X11/cmsColNm.c,v 3.12 2003/11/17 22:20:11 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" @@ -41,24 +41,10 @@ #include <ctype.h> #define XK_LATIN1 #include <X11/keysymdef.h> +#include "Cv.h" - -/* - * EXTERNS - * External declarations required locally to this package - * that are not already declared in any of the included header - * files (external includes or internal includes). - */ -extern XcmsColorSpace **_XcmsDIColorSpaces; - -/* CvCols.c */ -extern Status _XcmsDDConvertColors(); -extern int _XcmsEqualWhitePts(); -extern Status _XcmsDIConvertColors(); - - -static Status LoadColornameDB(); -void _XcmsCopyISOLatin1Lowered(); +/* forwards/locals */ +static Status LoadColornameDB(void); /* @@ -121,9 +107,9 @@ static const char whitePtStr[] = "WhitePoint"; * SYNOPSIS */ static XcmsColorSpace * -_XcmsColorSpaceOfString(ccc, color_string) - XcmsCCC ccc; - const char *color_string; +_XcmsColorSpaceOfString( + XcmsCCC ccc, + const char *color_string) /* * DESCRIPTION * Returns a pointer to the color space structure @@ -189,10 +175,10 @@ _XcmsColorSpaceOfString(ccc, color_string) * SYNOPSIS */ static int -_XcmsParseColorString(ccc, color_string, pColor) - XcmsCCC ccc; - const char *color_string; - XcmsColor *pColor; +_XcmsParseColorString( + XcmsCCC ccc, + const char *color_string, + XcmsColor *pColor) /* * DESCRIPTION * Assuming color_string contains a numerical string color @@ -254,8 +240,7 @@ _XcmsParseColorString(ccc, color_string, pColor) * SYNOPSIS */ static int -FirstCmp(p1, p2) - const void *p1, *p2; +FirstCmp(const void *p1, const void *p2) /* * DESCRIPTION * Compares the color names of XcmsColorTuples. @@ -280,7 +265,7 @@ FirstCmp(p1, p2) * SYNOPSIS */ static void -SetNoVisit() +SetNoVisit(void) /* * DESCRIPTION * @@ -309,11 +294,11 @@ SetNoVisit() * SYNOPSIS */ static int -field2(pBuf, delim, p1, p2) - char *pBuf; - char delim; /* in: field delimiter */ - char **p1; /* in/out: pointer to pointer to field 1 */ - char **p2; /* in/out: pointer to pointer to field 2 */ +field2( + char *pBuf, + char delim, /* in: field delimiter */ + char **p1, /* in/out: pointer to pointer to field 1 */ + char **p2) /* in/out: pointer to pointer to field 2 */ /* * DESCRIPTION * Extracts two fields from a "record". @@ -379,10 +364,10 @@ field2(pBuf, delim, p1, p2) * SYNOPSIS */ static Status -_XcmsLookupColorName(ccc, name, pColor) - XcmsCCC ccc; - const char **name; - XcmsColor *pColor; +_XcmsLookupColorName( + XcmsCCC ccc, + const char **name, + XcmsColor *pColor) /* * DESCRIPTION * Searches for an entry in the Device-Independent Color Name @@ -502,8 +487,8 @@ Retry: * SYNOPSIS */ static int -RemoveSpaces(pString) - char *pString; +RemoveSpaces( + char *pString) /* * DESCRIPTION * Removes spaces from string. @@ -536,10 +521,10 @@ RemoveSpaces(pString) * SYNOPSIS */ static int -stringSectionSize(stream, pNumEntries, pSectionSize) - FILE *stream; - int *pNumEntries; - int *pSectionSize; +stringSectionSize( + FILE *stream, + int *pNumEntries, + int *pSectionSize) /* * DESCRIPTION * Determines the amount of memory required to store the @@ -621,10 +606,10 @@ stringSectionSize(stream, pNumEntries, pSectionSize) * SYNOPSIS */ static Status -ReadColornameDB(stream, pRec, pString) - FILE *stream; - XcmsPair *pRec; - char *pString; +ReadColornameDB( + FILE *stream, + XcmsPair *pRec, + char *pString) /* * DESCRIPTION * Loads the Color Name Database from a text file. @@ -708,7 +693,7 @@ ReadColornameDB(stream, pRec, pString) * SYNOPSIS */ static Status -LoadColornameDB() +LoadColornameDB(void) /* * DESCRIPTION * Loads the Color Name Database from a text file. @@ -781,9 +766,9 @@ LoadColornameDB() * SYNOPSIS */ void -_XcmsCopyISOLatin1Lowered(dst, src) - char *dst; - const char *src; +_XcmsCopyISOLatin1Lowered( + char *dst, + const char *src) /* * DESCRIPTION * ISO Latin-1 case conversion routine @@ -824,21 +809,12 @@ _XcmsCopyISOLatin1Lowered(dst, src) * * SYNOPSIS */ -#if NeedFunctionPrototypes Status _XcmsResolveColorString ( XcmsCCC ccc, const char **color_string, XcmsColor *pColor_exact_return, XcmsColorFormat result_format) -#else -Status -_XcmsResolveColorString(ccc, color_string, pColor_exact_return, result_format) - XcmsCCC ccc; - const char **color_string; - XcmsColor *pColor_exact_return; - XcmsColorFormat result_format; -#endif /* * DESCRIPTION * The XcmsLookupColor function finds the color specification diff --git a/src/xcms/cmsGlobls.c b/src/xcms/cmsGlobls.c index accb6d8..ad4e45f 100644 --- a/src/xcms/cmsGlobls.c +++ b/src/xcms/cmsGlobls.c @@ -32,47 +32,11 @@ * * */ -/* $XFree86: xc/lib/X11/cmsGlobls.c,v 1.4 2001/01/17 19:41:51 dawes Exp $ */ +/* $XFree86: xc/lib/X11/cmsGlobls.c,v 1.5 2003/04/13 19:22:20 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" - -/* - * EXTERNS - * External declarations required locally to this package - * that are not already declared in any of the included header - * files (external includes or internal includes). - */ -extern XcmsFunctionSet XcmsLinearRGBFunctionSet; -#ifdef GRAY -extern XcmsFunctionSet XcmsGrayFunctionSet; -#endif /* GRAY */ - -/* UNDEFINED Color Space */ -extern XcmsColorSpace XcmsUNDEFINEDColorSpace; - -/* CIE XYZ Color Space */ -extern XcmsColorSpace XcmsCIEXYZColorSpace; - -/* CIE uvY Color Space */ -extern XcmsColorSpace XcmsCIEuvYColorSpace; - -/* CIE xyY Color Space */ -extern XcmsColorSpace XcmsCIExyYColorSpace; - -/* CIE Lab Color Space */ -extern XcmsColorSpace XcmsCIELabColorSpace; - -/* CIE Luv Color Space */ -extern XcmsColorSpace XcmsCIELuvColorSpace; - -/* TekHVC Color Space */ -extern XcmsColorSpace XcmsTekHVCColorSpace; - -/* Device Dependent Color Space Structures */ -extern XcmsColorSpace XcmsRGBiColorSpace; -extern XcmsColorSpace XcmsRGBColorSpace; - +#include "Cv.h" /* * GLOBALS diff --git a/src/xcms/cmsInt.c b/src/xcms/cmsInt.c index cf492a5..4881a69 100644 --- a/src/xcms/cmsInt.c +++ b/src/xcms/cmsInt.c @@ -34,32 +34,20 @@ * * */ -/* $XFree86: xc/lib/X11/cmsInt.c,v 1.3 2001/01/17 19:41:51 dawes Exp $ */ +/* $XFree86: xc/lib/X11/cmsInt.c,v 1.5 2003/04/17 02:06:31 dawes Exp $ */ /* #define NEED_EVENTS */ #include <stdio.h> #include "Xlibint.h" #include "Xcmsint.h" +#include "Cv.h" #ifndef XCMSCOMPPROC # define XCMSCOMPPROC XcmsTekHVCClipC #endif -/* - * EXTERNS - */ -extern XcmsColorSpace **_XcmsDIColorSpaces; -extern XcmsFunctionSet **_XcmsSCCFuncSets; - -/* LRGB.c */ -extern int _XcmsLRGB_InitScrnDefault(); - -static void _XcmsFreeDefaultCCCs(); - -/* - * GLOBALS - */ - +/* forward/static */ +static void _XcmsFreeDefaultCCCs(Display *dpy); /************************************************************************ @@ -75,8 +63,8 @@ static void _XcmsFreeDefaultCCCs(); * SYNOPSIS */ XPointer * -_XcmsCopyPointerArray(pap) - XPointer *pap; +_XcmsCopyPointerArray( + XPointer *pap) /* * DESCRIPTION * Copies an array of NULL terminated pointers. @@ -108,8 +96,8 @@ _XcmsCopyPointerArray(pap) * SYNOPSIS */ void -_XcmsFreePointerArray(pap) - XPointer *pap; +_XcmsFreePointerArray( + XPointer *pap) /* * DESCRIPTION * Frees an array of NULL terminated pointers. @@ -129,10 +117,10 @@ _XcmsFreePointerArray(pap) * SYNOPSIS */ XPointer * -_XcmsPushPointerArray(pap, p, papNoFree) - XPointer *pap; - XPointer p; - XPointer *papNoFree; +_XcmsPushPointerArray( + XPointer *pap, + XPointer p, + XPointer *papNoFree) /* * DESCRIPTION * Places the specified pointer at the head of an array of NULL @@ -171,8 +159,8 @@ _XcmsPushPointerArray(pap, p, papNoFree) * SYNOPSIS */ int -_XcmsInitDefaultCCCs(dpy) - Display *dpy; +_XcmsInitDefaultCCCs( + Display *dpy) /* * DESCRIPTION * Initializes the Xcms per Display Info structure @@ -232,8 +220,8 @@ _XcmsInitDefaultCCCs(dpy) * SYNOPSIS */ static void -_XcmsFreeDefaultCCCs(dpy) - Display *dpy; +_XcmsFreeDefaultCCCs( + Display *dpy) /* * DESCRIPTION * This routine frees the default XcmsCCC's associated with @@ -291,9 +279,9 @@ _XcmsFreeDefaultCCCs(dpy) * SYNOPSIS */ int -_XcmsInitScrnInfo(dpy, screenNumber) - register Display *dpy; - int screenNumber; +_XcmsInitScrnInfo( + register Display *dpy, + int screenNumber) /* * DESCRIPTION * Given a display and screen number, this routine attempts @@ -364,8 +352,8 @@ _XcmsInitScrnInfo(dpy, screenNumber) * SYNOPSIS */ void -_XcmsFreeIntensityMaps(dpy) - Display *dpy; +_XcmsFreeIntensityMaps( + Display *dpy) /* * DESCRIPTION * Frees all XcmsIntensityMap structures in the linked list @@ -397,9 +385,9 @@ _XcmsFreeIntensityMaps(dpy) * SYNOPSIS */ XcmsIntensityMap * -_XcmsGetIntensityMap(dpy, visual) - Display *dpy; - Visual *visual; +_XcmsGetIntensityMap( + Display *dpy, + Visual *visual) /* * DESCRIPTION * Attempts to return a per-Visual intensity map. diff --git a/src/xcms/cmsLkCol.c b/src/xcms/cmsLkCol.c index 16704e4..ff5e69e 100644 --- a/src/xcms/cmsLkCol.c +++ b/src/xcms/cmsLkCol.c @@ -32,23 +32,13 @@ * * */ -/* $XFree86: xc/lib/X11/cmsLkCol.c,v 1.4 2001/07/25 15:04:44 dawes Exp $ */ +/* $XFree86: xc/lib/X11/cmsLkCol.c,v 1.6 2003/11/17 22:20:11 dawes Exp $ */ #define NEED_REPLIES #include <stdio.h> #include "Xlibint.h" #include "Xcmsint.h" - -/* - * EXTERNS - */ -extern void _XColor_to_XcmsRGB(); -extern void _XcmsRGB_to_XColor(); -extern void _XcmsResolveColor(); -extern void _XcmsUnresolveColor(); - -/* cmsColNm.c */ -extern Status _XcmsResolveColorString(); +#include "Cv.h" /* @@ -57,7 +47,6 @@ extern Status _XcmsResolveColorString(); * * SYNOPSIS */ -#if NeedFunctionPrototypes Status XcmsLookupColor ( Display *dpy, @@ -66,17 +55,6 @@ XcmsLookupColor ( XcmsColor *pColor_exact_return, XcmsColor *pColor_scrn_return, XcmsColorFormat result_format) -#else -Status -XcmsLookupColor(dpy, cmap, colorname, pColor_exact_return, pColor_scrn_return, - result_format) - Display *dpy; - Colormap cmap; - char *colorname; - XcmsColor *pColor_exact_return; - XcmsColor *pColor_scrn_return; - XcmsColorFormat result_format; -#endif /* * DESCRIPTION * The XcmsLookupColor function finds the color specification diff --git a/src/xcms/cmsProp.c b/src/xcms/cmsProp.c index 28d7a88..dfa0307 100644 --- a/src/xcms/cmsProp.c +++ b/src/xcms/cmsProp.c @@ -31,10 +31,12 @@ * This utility routines for manipulating properties. * */ +/* $XFree86: xc/lib/X11/cmsProp.c,v 1.2 2003/04/13 19:22:20 dawes Exp $ */ #include <X11/Xatom.h> #include "Xlibint.h" #include "Xcmsint.h" +#include "Cv.h" /************************************************************************ @@ -51,10 +53,10 @@ * SYNOPSIS */ unsigned long -_XcmsGetElement (format, pValue, pCount) - int format; - char **pValue; - unsigned long *pCount; +_XcmsGetElement( + int format, + char **pValue, + unsigned long *pCount) /* * DESCRIPTION * Get the next element from the property and return it. @@ -97,14 +99,14 @@ _XcmsGetElement (format, pValue, pCount) * SYNOPSIS */ int -_XcmsGetProperty (pDpy, w, property, pFormat, pNItems, pNBytes, pValue) - Display *pDpy; - Window w; - Atom property; - int *pFormat; - unsigned long *pNItems; - unsigned long *pNBytes; - char **pValue; +_XcmsGetProperty( + Display *pDpy, + Window w, + Atom property, + int *pFormat, + unsigned long *pNItems, + unsigned long *pNBytes, + char **pValue) /* * DESCRIPTION * diff --git a/src/xcms/cmsTrig.c b/src/xcms/cmsTrig.c index 4db4456..f56c5e7 100644 --- a/src/xcms/cmsTrig.c +++ b/src/xcms/cmsTrig.c @@ -24,7 +24,7 @@ * CONNECTION WITH THE USE OR THE PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/lib/X11/cmsTrig.c,v 3.8 2001/10/28 03:32:34 tsi Exp $ */ +/* $XFree86: xc/lib/X11/cmsTrig.c,v 3.9 2003/04/13 19:22:20 dawes Exp $ */ /* * It should be pointed out that for simplicity's sake, the * environment parameters are defined as floating point constants, @@ -45,25 +45,22 @@ * */ -/* - * EXTERNS - */ -extern double _XcmsSquareRoot(); +#include "Xcmsint.h" -/* - * FORWARD DECLARATIONS - */ -double _XcmsCosine(); -static double _XcmsModulo(); -static double _XcmsModuloF(); -static double _XcmsPolynomial(); -double _XcmsSine(); -double _XcmsArcTangent(); +/* forward/static */ +static double _XcmsModulo(double value, double base); +static double _XcmsPolynomial( + register int order, + double const *coeffs, + double x); +static double +_XcmsModuloF( + double val, + register double *dp); /* * DEFINES */ - #define XCMS_MAXERROR 0.000001 #define XCMS_MAXITER 10000 #define XCMS_PI 3.14159265358979323846264338327950 @@ -228,8 +225,7 @@ static double const sin_qcoeffs[] = { * */ -double _XcmsCosine (x) -double x; +double _XcmsCosine(double x) { auto double y; auto double yt2; @@ -289,9 +285,7 @@ double x; * Fred Fish * */ -static double _XcmsModulo (value, base) -double value; -double base; +static double _XcmsModulo(double value, double base) { auto double intpart; @@ -312,9 +306,9 @@ double base; * defined in "math.h". */ static double -_XcmsModuloF(val, dp) -double val; -register double *dp; +_XcmsModuloF( + double val, + register double *dp) { register double abs; /* @@ -377,10 +371,10 @@ register double *dp; * */ -static double _XcmsPolynomial (order, coeffs, x) -register int order; -double const *coeffs; -double x; +static double _XcmsPolynomial( + register int order, + double const *coeffs, + double x) { auto double rtn_value; diff --git a/src/xcms/uvY.c b/src/xcms/uvY.c index a0509f3..b90ff68 100644 --- a/src/xcms/uvY.c +++ b/src/xcms/uvY.c @@ -35,33 +35,20 @@ * DOCUMENTATION * "TekColor Color Management System, System Implementor's Manual" */ -/* $XFree86: xc/lib/X11/uvY.c,v 1.3 2001/01/17 19:41:57 dawes Exp $ */ +/* $XFree86: xc/lib/X11/uvY.c,v 1.4 2003/04/13 19:22:22 dawes Exp $ */ #include <X11/Xos.h> #include "Xlibint.h" #include "Xcmsint.h" +#include "Cv.h" #include <stdio.h> - -/* - * EXTERNS - */ -extern char _XcmsCIEuvY_prefix[]; - -/* CvCols.c */ -extern Status _XcmsDIConvertColors(); - -/* XYZ.c */ -extern Status _XcmsCIEXYZ_ValidSpec(); - - /* * FORWARD DECLARATIONS */ +static int CIEuvY_ParseString(register char *spec, XcmsColor *pColor); -static int CIEuvY_ParseString(); -Status _XcmsCIEuvY_ValidSpec(); /* * DEFINES * Internal definitions that need NOT be exported to any package @@ -127,9 +114,9 @@ XcmsColorSpace XcmsCIEuvYColorSpace = * SYNOPSIS */ static int -CIEuvY_ParseString(spec, pColor) - register char *spec; - XcmsColor *pColor; +CIEuvY_ParseString( + register char *spec, + XcmsColor *pColor) /* * DESCRIPTION * This routines takes a string and attempts to convert @@ -190,8 +177,8 @@ CIEuvY_ParseString(spec, pColor) * SYNOPSIS */ Status -_XcmsCIEuvY_ValidSpec(pColor) - XcmsColor *pColor; +_XcmsCIEuvY_ValidSpec( + XcmsColor *pColor) /* * DESCRIPTION * Checks if color specification valid for CIE u'v'Y. diff --git a/src/xcms/xyY.c b/src/xcms/xyY.c index 7b1b773..8619c27 100644 --- a/src/xcms/xyY.c +++ b/src/xcms/xyY.c @@ -34,12 +34,13 @@ * DOCUMENTATION * "TekColor Color Management System, System Implementor's Manual" */ -/* $XFree86: xc/lib/X11/xyY.c,v 1.3 2001/01/17 19:41:57 dawes Exp $ */ +/* $XFree86: xc/lib/X11/xyY.c,v 1.4 2003/04/13 19:22:22 dawes Exp $ */ #include <stdio.h> #include <X11/Xos.h> #include "Xlibint.h" #include "Xcmsint.h" +#include "Cv.h" /* * DEFINES @@ -52,23 +53,11 @@ #endif /* - * EXTERNS - */ - -extern char _XcmsCIExyY_prefix[]; - -/* CvCols.c */ -extern Status _XcmsDIConvertColors(); - -/* XYZ.c */ -extern Status _XcmsCIEXYZ_ValidSpec(); - -/* * FORWARD DECLARATIONS */ -static int CIExyY_ParseString(); -static Status XcmsCIExyY_ValidSpec(); +static int CIExyY_ParseString(register char *spec, XcmsColor *pColor); +static Status XcmsCIExyY_ValidSpec(XcmsColor *pColor); /* @@ -124,9 +113,9 @@ XcmsColorSpace XcmsCIExyYColorSpace = * SYNOPSIS */ static int -CIExyY_ParseString(spec, pColor) - register char *spec; - XcmsColor *pColor; +CIExyY_ParseString( + register char *spec, + XcmsColor *pColor) /* * DESCRIPTION * This routines takes a string and attempts to convert @@ -188,8 +177,8 @@ CIExyY_ParseString(spec, pColor) * SYNOPSIS */ static Status -XcmsCIExyY_ValidSpec(pColor) - XcmsColor *pColor; +XcmsCIExyY_ValidSpec( + XcmsColor *pColor) /* * DESCRIPTION * Checks a valid CIExyY color specification. diff --git a/src/xkb/XKB.c b/src/xkb/XKB.c index b407bcc..8f81695 100644 --- a/src/xkb/XKB.c +++ b/src/xkb/XKB.c @@ -24,7 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/X11/XKB.c,v 1.7 2002/12/10 04:30:39 dawes Exp $ */ +/* $XFree86: xc/lib/X11/XKB.c,v 1.10 2003/11/17 22:20:09 dawes Exp $ */ #include <stdio.h> #define NEED_REPLIES @@ -37,23 +37,12 @@ XkbInternAtomFunc _XkbInternAtomFunc= XInternAtom; XkbGetAtomNameFunc _XkbGetAtomNameFunc= XGetAtomName; Bool -#if NeedFunctionPrototypes XkbQueryExtension( Display *dpy, int * opcodeReturn, int * eventBaseReturn, int * errorBaseReturn, int * majorReturn, int * minorReturn) -#else -XkbQueryExtension(dpy,opcodeReturn,eventBaseReturn,errorBaseReturn, - majorReturn,minorReturn) - Display *dpy; - int *opcodeReturn; - int *eventBaseReturn; - int *errorBaseReturn; - int *majorReturn; - int *minorReturn; -#endif { if (!XkbUseExtension(dpy,majorReturn,minorReturn)) return False; @@ -71,13 +60,7 @@ XkbQueryExtension(dpy,opcodeReturn,eventBaseReturn,errorBaseReturn, } Bool -#if NeedFunctionPrototypes XkbLibraryVersion(int *libMajorRtrn,int *libMinorRtrn) -#else -XkbLibraryVersion(libMajorRtrn,libMinorRtrn) - int *libMajorRtrn; - int *libMinorRtrn; -#endif { int supported; @@ -97,18 +80,10 @@ int supported; } Bool -#if NeedFunctionPrototypes XkbSelectEvents( Display * dpy, unsigned int deviceSpec, unsigned int affect, unsigned int selectAll) -#else -XkbSelectEvents(dpy,deviceSpec,affect,selectAll) - Display *dpy; - unsigned int deviceSpec; - unsigned int affect; - unsigned int selectAll; -#endif { register xkbSelectEventsReq *req; XkbInfoPtr xkbi; @@ -155,20 +130,11 @@ XkbSelectEvents(dpy,deviceSpec,affect,selectAll) } Bool -#if NeedFunctionPrototypes XkbSelectEventDetails( Display * dpy, unsigned deviceSpec, unsigned eventType, unsigned long int affect, unsigned long int details) -#else -XkbSelectEventDetails(dpy,deviceSpec,eventType,affect,details) - Display *dpy; - unsigned deviceSpec; - unsigned eventType; - unsigned long int affect; - unsigned long int details; -#endif { register xkbSelectEventsReq *req; XkbInfoPtr xkbi; @@ -256,18 +222,10 @@ XkbSelectEventDetails(dpy,deviceSpec,eventType,affect,details) } Bool -#if NeedFunctionPrototypes XkbLockModifiers( Display * dpy, unsigned int deviceSpec, unsigned int affect, unsigned int values) -#else -XkbLockModifiers(dpy,deviceSpec,affect,values) - Display *dpy; - unsigned int deviceSpec; - unsigned int affect; - unsigned int values; -#endif { register xkbLatchLockStateReq *req; XkbInfoPtr xkbi; @@ -295,18 +253,10 @@ XkbLockModifiers(dpy,deviceSpec,affect,values) } Bool -#if NeedFunctionPrototypes XkbLatchModifiers( Display * dpy, unsigned int deviceSpec, unsigned int affect, unsigned int values) -#else -XkbLatchModifiers(dpy,deviceSpec,affect,values) - Display *dpy; - unsigned int deviceSpec; - unsigned int affect; - unsigned int values; -#endif { register xkbLatchLockStateReq *req; XkbInfoPtr xkbi; @@ -336,14 +286,7 @@ XkbLatchModifiers(dpy,deviceSpec,affect,values) } Bool -#if NeedFunctionPrototypes XkbLockGroup(Display *dpy,unsigned int deviceSpec,unsigned int group) -#else -XkbLockGroup(dpy,deviceSpec,group) - Display *dpy; - unsigned int deviceSpec; - unsigned int group; -#endif { register xkbLatchLockStateReq *req; XkbInfoPtr xkbi; @@ -371,14 +314,7 @@ XkbLockGroup(dpy,deviceSpec,group) } Bool -#if NeedFunctionPrototypes XkbLatchGroup(Display *dpy,unsigned int deviceSpec,unsigned int group) -#else -XkbLatchGroup(dpy,deviceSpec,group) - Display *dpy; - unsigned int deviceSpec; - unsigned int group; -#endif { register xkbLatchLockStateReq *req; XkbInfoPtr xkbi; @@ -408,14 +344,7 @@ XkbLatchGroup(dpy,deviceSpec,group) } unsigned -#if NeedFunctionPrototypes XkbSetXlibControls(Display *dpy,unsigned affect,unsigned values) -#else -XkbSetXlibControls(dpy,affect,values) - Display * dpy; - unsigned affect; - unsigned values; -#endif { if (!dpy->xkb_info) XkbUseExtension(dpy,NULL,NULL); @@ -428,12 +357,7 @@ XkbSetXlibControls(dpy,affect,values) } unsigned -#if NeedFunctionPrototypes XkbGetXlibControls(Display *dpy) -#else -XkbGetXlibControls(dpy) - Display * dpy; -#endif { if (!dpy->xkb_info) XkbUseExtension(dpy,NULL,NULL); @@ -443,11 +367,7 @@ XkbGetXlibControls(dpy) } unsigned int -#if NeedFunctionPrototypes XkbXlibControlsImplemented(void) -#else -XkbXlibControlsImplemented() -#endif { #ifdef __sgi return XkbLC_AllControls; @@ -457,7 +377,6 @@ XkbXlibControlsImplemented() } Bool -#if NeedFunctionPrototypes XkbSetDebuggingFlags( Display * dpy, unsigned int mask, unsigned int flags, @@ -466,17 +385,6 @@ XkbSetDebuggingFlags( Display * dpy, unsigned int ctrls, unsigned int * rtrn_flags, unsigned int * rtrn_ctrls) -#else -XkbSetDebuggingFlags(dpy,mask,flags,msg,ctrls_mask,ctrls,rtrn_flags,rtrn_ctrls) - Display * dpy; - unsigned int mask; - unsigned int flags; - char * msg; - unsigned int ctrls_mask; - unsigned int ctrls; - unsigned int * rtrn_flags; - unsigned int * rtrn_ctrls; -#endif { register xkbSetDebuggingFlagsReq *req; xkbSetDebuggingFlagsReply rep; @@ -518,16 +426,9 @@ XkbSetDebuggingFlags(dpy,mask,flags,msg,ctrls_mask,ctrls,rtrn_flags,rtrn_ctrls) } Bool -#if NeedFunctionPrototypes XkbComputeEffectiveMap( XkbDescPtr xkb, XkbKeyTypePtr type, unsigned char * map_rtrn) -#else -XkbComputeEffectiveMap(xkb,type,map_rtrn) - XkbDescPtr xkb; - XkbKeyTypePtr type; - unsigned char * map_rtrn; -#endif { register int i; unsigned tmp; @@ -571,14 +472,7 @@ XkbKTMapEntryPtr entry = NULL; } Status -#if NeedFunctionPrototypes XkbGetState(Display *dpy,unsigned deviceSpec,XkbStatePtr rtrn) -#else -XkbGetState(dpy,deviceSpec,rtrn) - Display * dpy; - unsigned deviceSpec; - XkbStatePtr rtrn; -#endif { register xkbGetStateReq *req; xkbGetStateReply rep; @@ -618,14 +512,7 @@ XkbGetState(dpy,deviceSpec,rtrn) } Bool -#if NeedFunctionPrototypes XkbSetDetectableAutoRepeat(Display *dpy,Bool detectable,Bool *supported) -#else -XkbSetDetectableAutoRepeat(dpy,detectable,supported) - Display * dpy; - Bool detectable; - Bool * supported; -#endif { register xkbPerClientFlagsReq * req; xkbPerClientFlagsReply rep; @@ -658,13 +545,7 @@ XkbInfoPtr xkbi; } Bool -#if NeedFunctionPrototypes XkbGetDetectableAutoRepeat(Display *dpy,Bool *supported) -#else -XkbGetDetectableAutoRepeat(dpy,supported) - Display * dpy; - Bool * supported; -#endif { register xkbPerClientFlagsReq * req; xkbPerClientFlagsReply rep; @@ -695,18 +576,10 @@ XkbInfoPtr xkbi; } Bool -#if NeedFunctionPrototypes XkbSetAutoResetControls( Display * dpy, unsigned changes, unsigned * auto_ctrls, unsigned * auto_values) -#else -XkbSetAutoResetControls(dpy,changes,auto_ctrls,auto_values) - Display * dpy; - unsigned changes; - unsigned * auto_ctrls; - unsigned * auto_values; -#endif { register xkbPerClientFlagsReq * req; xkbPerClientFlagsReply rep; @@ -739,16 +612,9 @@ XkbInfoPtr xkbi; } Bool -#if NeedFunctionPrototypes XkbGetAutoResetControls( Display * dpy, unsigned * auto_ctrls, unsigned * auto_ctrl_values) -#else -XkbGetAutoResetControls(dpy,auto_ctrls,auto_ctrl_values) - Display * dpy; - unsigned * auto_ctrls; - unsigned * auto_ctrl_values; -#endif { register xkbPerClientFlagsReq * req; xkbPerClientFlagsReply rep; @@ -781,16 +647,9 @@ XkbInfoPtr xkbi; } Bool -#if NeedFunctionPrototypes XkbSetPerClientControls( Display * dpy, unsigned change, unsigned * values) -#else -XkbSetPerClientControls(dpy,change,values) - Display * dpy; - unsigned change; - unsigned * values; -#endif { register xkbPerClientFlagsReq * req; xkbPerClientFlagsReply rep; @@ -822,14 +681,8 @@ unsigned value_hold = *values; } Bool -#if NeedFunctionPrototypes XkbGetPerClientControls( Display * dpy, unsigned * ctrls) -#else -XkbGetPerClientControls(dpy,ctrls) - Display * dpy; - unsigned * ctrls; -#endif { register xkbPerClientFlagsReq * req; xkbPerClientFlagsReply rep; @@ -863,22 +716,12 @@ XkbInfoPtr xkbi; } Display * -#if NeedFunctionPrototypes XkbOpenDisplay( char * name, int * ev_rtrn, int * err_rtrn, int * major_rtrn, int * minor_rtrn, int * reason) -#else -XkbOpenDisplay(name,ev_rtrn,err_rtrn,major_rtrn,minor_rtrn,reason) - char * name; - int * ev_rtrn; - int * err_rtrn; - int * major_rtrn; - int * minor_rtrn; - int * reason; -#endif { Display* dpy; int major_num,minor_num; @@ -917,13 +760,7 @@ XkbOpenDisplay(name,ev_rtrn,err_rtrn,major_rtrn,minor_rtrn,reason) } void -#if NeedFunctionPrototypes XkbSetAtomFuncs(XkbInternAtomFunc getAtom,XkbGetAtomNameFunc getName) -#else -XkbSetAtomFuncs(getAtom,getName) - XkbInternAtomFunc getAtom; - XkbGetAtomNameFunc getName; -#endif { _XkbInternAtomFunc= (getAtom?getAtom:XInternAtom); _XkbGetAtomNameFunc= (getName?getName:XGetAtomName); diff --git a/src/xkb/XKBAlloc.c b/src/xkb/XKBAlloc.c index c6fd855..5bc7f65 100644 --- a/src/xkb/XKBAlloc.c +++ b/src/xkb/XKBAlloc.c @@ -24,7 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/X11/XKBAlloc.c,v 3.5 2001/01/17 19:41:48 dawes Exp $ */ +/* $XFree86: xc/lib/X11/XKBAlloc.c,v 3.6 2003/11/17 22:20:09 dawes Exp $ */ #ifndef XKB_IN_SERVER @@ -55,14 +55,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. /*ARGSUSED*/ Status -#if NeedFunctionPrototypes XkbAllocCompatMap(XkbDescPtr xkb,unsigned which,unsigned nSI) -#else -XkbAllocCompatMap(xkb,which,nSI) - XkbDescPtr xkb; - unsigned which; - unsigned nSI; -#endif { XkbCompatMapPtr compat; XkbSymInterpretRec *prev_interpret; @@ -109,14 +102,7 @@ XkbSymInterpretRec *prev_interpret; void -#if NeedFunctionPrototypes XkbFreeCompatMap(XkbDescPtr xkb,unsigned which,Bool freeMap) -#else -XkbFreeCompatMap(xkb,which,freeMap) - XkbDescPtr xkb; - unsigned which; - Bool freeMap; -#endif { register XkbCompatMapPtr compat; @@ -143,15 +129,7 @@ register XkbCompatMapPtr compat; /***===================================================================***/ Status -#if NeedFunctionPrototypes XkbAllocNames(XkbDescPtr xkb,unsigned which,int nTotalRG,int nTotalAliases) -#else -XkbAllocNames(xkb,which,nTotalRG,nTotalAliases) - XkbDescPtr xkb; - unsigned which; - int nTotalRG; - int nTotalAliases; -#endif { XkbNamesPtr names; @@ -231,14 +209,7 @@ XkbNamesPtr names; } void -#if NeedFunctionPrototypes XkbFreeNames(XkbDescPtr xkb,unsigned which,Bool freeMap) -#else -XkbFreeNames(xkb,which,freeMap) - XkbDescPtr xkb; - unsigned which; - Bool freeMap; -#endif { XkbNamesPtr names; @@ -287,13 +258,7 @@ XkbNamesPtr names; /*ARGSUSED*/ Status -#if NeedFunctionPrototypes XkbAllocControls(XkbDescPtr xkb,unsigned which) -#else -XkbAllocControls(xkb,which) - XkbDescPtr xkb; - unsigned which; -#endif { if (xkb==NULL) return BadMatch; @@ -308,14 +273,7 @@ XkbAllocControls(xkb,which) /*ARGSUSED*/ void -#if NeedFunctionPrototypes XkbFreeControls(XkbDescPtr xkb,unsigned which,Bool freeMap) -#else -XkbFreeControls(xkb,which,freeMap) - XkbDescPtr xkb; - unsigned which; - Bool freeMap; -#endif { if (freeMap && (xkb!=NULL) && (xkb->ctrls!=NULL)) { _XkbFree(xkb->ctrls); @@ -327,12 +285,7 @@ XkbFreeControls(xkb,which,freeMap) /***===================================================================***/ Status -#if NeedFunctionPrototypes XkbAllocIndicatorMaps(XkbDescPtr xkb) -#else -XkbAllocIndicatorMaps(xkb) - XkbDescPtr xkb; -#endif { if (xkb==NULL) return BadMatch; @@ -345,12 +298,7 @@ XkbAllocIndicatorMaps(xkb) } void -#if NeedFunctionPrototypes XkbFreeIndicatorMaps(XkbDescPtr xkb) -#else -XkbFreeIndicatorMaps(xkb) - XkbDescPtr xkb; -#endif { if ((xkb!=NULL)&&(xkb->indicators!=NULL)) { _XkbFree(xkb->indicators); @@ -362,11 +310,7 @@ XkbFreeIndicatorMaps(xkb) /***====================================================================***/ XkbDescRec * -#if NeedFunctionPrototypes XkbAllocKeyboard(void) -#else -XkbAllocKeyboard() -#endif { XkbDescRec *xkb; @@ -377,14 +321,7 @@ XkbDescRec *xkb; } void -#if NeedFunctionPrototypes XkbFreeKeyboard(XkbDescPtr xkb,unsigned which,Bool freeAll) -#else -XkbFreeKeyboard(xkb,which,freeAll) - XkbDescPtr xkb; - unsigned which; - Bool freeAll; -#endif { if (xkb==NULL) return; @@ -412,14 +349,7 @@ XkbFreeKeyboard(xkb,which,freeAll) /***====================================================================***/ XkbDeviceLedInfoPtr -#if NeedFunctionPrototypes XkbAddDeviceLedInfo(XkbDeviceInfoPtr devi,unsigned ledClass,unsigned ledId) -#else -XkbAddDeviceLedInfo(devi,ledClass,ledId) - XkbDeviceInfoPtr devi; - unsigned ledClass; - unsigned ledId; -#endif { XkbDeviceLedInfoPtr devli; register int i; @@ -457,13 +387,7 @@ register int i; } Status -#if NeedFunctionPrototypes XkbResizeDeviceButtonActions(XkbDeviceInfoPtr devi,unsigned newTotal) -#else -XkbResizeDeviceButtonActions(devi,newTotal) - XkbDeviceInfoPtr devi; - unsigned newTotal; -#endif { XkbAction *prev_btn_acts; @@ -497,14 +421,7 @@ XkbResizeDeviceButtonActions(devi,newTotal) /*ARGSUSED*/ XkbDeviceInfoPtr -#if NeedFunctionPrototypes XkbAllocDeviceInfo(unsigned deviceSpec,unsigned nButtons,unsigned szLeds) -#else -XkbAllocDeviceInfo(deviceSpec,nButtons,szLeds) - unsigned deviceSpec; - unsigned nButtons; - unsigned szLeds; -#endif { XkbDeviceInfoPtr devi; @@ -543,14 +460,7 @@ XkbDeviceInfoPtr devi; void -#if NeedFunctionPrototypes XkbFreeDeviceInfo(XkbDeviceInfoPtr devi,unsigned which,Bool freeDevI) -#else -XkbFreeDeviceInfo(devi,which,freeDevI) - XkbDeviceInfoPtr devi; - unsigned which; - Bool freeDevI; -#endif { if (devi) { if (freeDevI) { diff --git a/src/xkb/XKBBell.c b/src/xkb/XKBBell.c index 3b6bb85..a1d4d5f 100644 --- a/src/xkb/XKBBell.c +++ b/src/xkb/XKBBell.c @@ -24,6 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ +/* $XFree86: xc/lib/X11/XKBBell.c,v 1.2 2003/11/17 22:20:09 dawes Exp $ */ #include <stdio.h> #define NEED_REPLIES @@ -34,7 +35,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. Bool -#if NeedFunctionPrototypes XkbDeviceBell( Display * dpy, Window window, int deviceID, @@ -42,16 +42,6 @@ XkbDeviceBell( Display * dpy, int bellID, int percent, Atom name) -#else -XkbDeviceBell(dpy,window,deviceID,bellClass,bellID,percent,name) - Display *dpy; - Window window; - int deviceID; - int bellClass; - int bellID; - int percent; - Atom name; -#endif { register xkbBellReq *req; XkbInfoPtr xkbi; @@ -81,20 +71,11 @@ XkbDeviceBell(dpy,window,deviceID,bellClass,bellID,percent,name) } Bool -#if NeedFunctionPrototypes XkbForceDeviceBell( Display * dpy, int deviceID, int bellClass, int bellID, int percent) -#else -XkbForceDeviceBell(dpy,deviceID,bellClass,bellID,percent) - Display *dpy; - int deviceID; - int bellClass; - int bellID; - int percent; -#endif { register xkbBellReq *req; XkbInfoPtr xkbi; @@ -124,7 +105,6 @@ XkbForceDeviceBell(dpy,deviceID,bellClass,bellID,percent) } Bool -#if NeedFunctionPrototypes XkbDeviceBellEvent( Display * dpy, Window window, int deviceID, @@ -132,16 +112,6 @@ XkbDeviceBellEvent( Display * dpy, int bellID, int percent, Atom name) -#else -XkbDeviceBellEvent(dpy,window,deviceID,bellClass,bellID,percent,name) - Display *dpy; - Window window; - int deviceID; - int bellClass; - int bellID; - int percent; - Atom name; -#endif { register xkbBellReq *req; XkbInfoPtr xkbi; @@ -171,15 +141,7 @@ XkbDeviceBellEvent(dpy,window,deviceID,bellClass,bellID,percent,name) } Bool -#if NeedFunctionPrototypes XkbBell(Display *dpy,Window window,int percent,Atom name) -#else -XkbBell(dpy,window,percent,name) - Display *dpy; - Window window; - int percent; - Atom name; -#endif { if ((dpy->flags & XlibDisplayNoXkb) || (!dpy->xkb_info && !XkbUseExtension(dpy,NULL,NULL))) { @@ -191,13 +153,7 @@ XkbBell(dpy,window,percent,name) } Bool -#if NeedFunctionPrototypes XkbForceBell(Display *dpy,int percent) -#else -XkbForceBell(dpy,percent) - Display * dpy; - int percent; -#endif { if ((dpy->flags & XlibDisplayNoXkb) || (!dpy->xkb_info && !XkbUseExtension(dpy,NULL,NULL))) { @@ -209,15 +165,7 @@ XkbForceBell(dpy,percent) } Bool -#if NeedFunctionPrototypes XkbBellEvent(Display *dpy,Window window,int percent,Atom name) -#else -XkbBellEvent(dpy,window,percent,name) - Display *dpy; - Window window; - int percent; - Atom name; -#endif { if ((dpy->flags & XlibDisplayNoXkb) || (!dpy->xkb_info && !XkbUseExtension(dpy,NULL,NULL))) { diff --git a/src/xkb/XKBBind.c b/src/xkb/XKBBind.c index 138331d..7ab1f2d 100644 --- a/src/xkb/XKBBind.c +++ b/src/xkb/XKBBind.c @@ -26,11 +26,12 @@ other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/XKBBind.c,v 3.15 2003/02/15 17:49:01 dawes Exp $ */ +/* $XFree86: xc/lib/X11/XKBBind.c,v 3.20 2003/11/17 22:20:09 dawes Exp $ */ /* the new monsters ate the old ones */ #define NEED_EVENTS +#include "XKBlib.h" #include <X11/Xlibint.h> #include <X11/Xutil.h> #include <X11/keysym.h> @@ -49,9 +50,7 @@ from The Open Group. Mod1Mask|Mod2Mask|Mod3Mask|Mod4Mask|Mod5Mask) static int _XkbLoadDpy( -#if NeedFunctionPrototypes Display *dpy -#endif ); struct _XKeytrans { @@ -65,7 +64,6 @@ struct _XKeytrans { }; KeySym -#if NeedFunctionPrototypes XkbKeycodeToKeysym(Display *dpy, #if NeedWidePrototypes unsigned int kc, @@ -74,13 +72,6 @@ XkbKeycodeToKeysym(Display *dpy, #endif int group, int level) -#else -XkbKeycodeToKeysym(dpy, kc, group, level) - Display *dpy; - KeyCode kc; - int group; - int level; -#endif { XkbDescRec *xkb; @@ -109,7 +100,6 @@ XkbKeycodeToKeysym(dpy, kc, group, level) } KeySym -#if NeedFunctionPrototypes XKeycodeToKeysym(Display *dpy, #if NeedWidePrototypes unsigned int kc, @@ -117,12 +107,6 @@ XKeycodeToKeysym(Display *dpy, KeyCode kc, #endif int col) -#else -XKeycodeToKeysym(dpy, kc, col) - Display *dpy; - KeyCode kc; - int col; -#endif { XkbDescRec *xkb; @@ -167,13 +151,7 @@ XKeycodeToKeysym(dpy, kc, col) } KeyCode -#if NeedFunctionPrototypes XKeysymToKeycode(Display *dpy, KeySym ks) -#else -XKeysymToKeycode(dpy, ks) - Display *dpy; - KeySym ks; -#endif { register int i, j, gotOne; @@ -198,12 +176,7 @@ XKeysymToKeycode(dpy, ks) } static int -#if NeedFunctionPrototypes _XkbComputeModmap(Display *dpy) -#else -_XkbComputeModmap(dpy) - Display *dpy; -#endif { register XkbDescPtr xkb; @@ -214,13 +187,7 @@ register XkbDescPtr xkb; } unsigned -#if NeedFunctionPrototypes XkbKeysymToModifiers(Display *dpy,KeySym ks) -#else -XkbKeysymToModifiers(dpy,ks) - Display *dpy; - KeySym ks; -#endif { XkbDescRec *xkb; register int i,j; @@ -249,13 +216,7 @@ XkbKeysymToModifiers(dpy,ks) } KeySym -#if NeedFunctionPrototypes XLookupKeysym(register XKeyEvent *event, int col) -#else -XLookupKeysym(event, col) - register XKeyEvent *event; - int col; -#endif { Display *dpy = event->display; if (_XkbUnavailable(dpy)) @@ -270,39 +231,27 @@ XLookupKeysym(event, col) * version will continue to work in a shared library environment. */ int -#if NeedFunctionPrototypes +XkbTranslateKey( register Display * dpy, + KeyCode key, + register unsigned int mods, + unsigned int * mods_rtrn, + KeySym * keysym_rtrn); +int XkbTranslateKey( register Display * dpy, KeyCode key, register unsigned int mods, unsigned int * mods_rtrn, KeySym * keysym_rtrn) -#else -XkbTranslateKey(dpy, key, mods, mods_rtrn, keysym_rtrn) - register Display *dpy; - KeyCode key; - register unsigned int mods; - unsigned int *mods_rtrn; - KeySym *keysym_rtrn; -#endif { return XkbLookupKeySym(dpy,key,mods,mods_rtrn,keysym_rtrn); } Bool -#if NeedFunctionPrototypes XkbLookupKeySym( register Display * dpy, KeyCode key, register unsigned int mods, unsigned int * mods_rtrn, KeySym * keysym_rtrn) -#else -XkbLookupKeySym(dpy, key, mods, mods_rtrn, keysym_rtrn) - register Display *dpy; - KeyCode key; - register unsigned int mods; - unsigned int *mods_rtrn; - KeySym *keysym_rtrn; -#endif { if (_XkbUnavailable(dpy)) return _XTranslateKey(dpy, key, mods, mods_rtrn, keysym_rtrn); @@ -312,20 +261,11 @@ XkbLookupKeySym(dpy, key, mods, mods_rtrn, keysym_rtrn) } Bool -#if NeedFunctionPrototypes XkbTranslateKeyCode( register XkbDescPtr xkb, KeyCode key, register unsigned int mods, unsigned int * mods_rtrn, KeySym * keysym_rtrn) -#else -XkbTranslateKeyCode(xkb, key, mods, mods_rtrn, keysym_rtrn) - register XkbDescPtr xkb; - KeyCode key; - register unsigned int mods; - unsigned int *mods_rtrn; - KeySym *keysym_rtrn; -#endif { XkbKeyTypeRec *type; int col,nKeyGroups; @@ -400,12 +340,7 @@ XkbTranslateKeyCode(xkb, key, mods, mods_rtrn, keysym_rtrn) } Status -#if NeedFunctionPrototypes XkbRefreshKeyboardMapping(register XkbMapNotifyEvent *event) -#else -XkbRefreshKeyboardMapping(event) - register XkbMapNotifyEvent *event; -#endif { Display *dpy = event->display; XkbInfoPtr xkbi; @@ -448,12 +383,7 @@ XkbRefreshKeyboardMapping(event) } int -#if NeedFunctionPrototypes XRefreshKeyboardMapping(register XMappingEvent *event) -#else -XRefreshKeyboardMapping(event) - register XMappingEvent *event; -#endif { XkbEvent *xkbevent = (XkbEvent *)event; Display *dpy = event->display; @@ -537,6 +467,7 @@ XRefreshKeyboardMapping(event) UnlockDisplay(dpy); } if (event->request==MappingModifier) { + LockDisplay(dpy); if (xkbi->desc->map->modmap) { _XkbFree(xkbi->desc->map->modmap); xkbi->desc->map->modmap= NULL; @@ -561,12 +492,7 @@ XRefreshKeyboardMapping(event) } static int -#if NeedFunctionPrototypes _XkbLoadDpy(Display *dpy) -#else -_XkbLoadDpy(dpy) - Display *dpy; -#endif { XkbInfoPtr xkbi; unsigned query,oldEvents; @@ -603,12 +529,7 @@ _XkbLoadDpy(dpy) } void -#if NeedFunctionPrototypes _XkbReloadDpy(Display *dpy) -#else -_XkbReloadDpy(dpy) - Display *dpy; -#endif { XkbInfoPtr xkbi; XkbDescRec *desc; @@ -651,22 +572,12 @@ _XkbReloadDpy(dpy) } int -#if NeedFunctionPrototypes XkbTranslateKeySym( register Display * dpy, register KeySym * sym_rtrn, unsigned int mods, char * buffer, int nbytes, int * extra_rtrn) -#else -XkbTranslateKeySym(dpy, sym_rtrn, mods, buffer, nbytes, extra_rtrn) - register Display *dpy; - register KeySym *sym_rtrn; - unsigned int mods; - char *buffer; - int nbytes; - int *extra_rtrn; -#endif { register XkbInfoPtr xkb; XkbKSToMBFunc cvtr; @@ -740,34 +651,54 @@ XkbTranslateKeySym(dpy, sym_rtrn, mods, buffer, nbytes, extra_rtrn) } int -#if NeedFunctionPrototypes XLookupString ( register XKeyEvent * event, char * buffer, int nbytes, KeySym * keysym, XComposeStatus * status) -#else -XLookupString (event, buffer, nbytes, keysym, status) - register XKeyEvent *event; - char *buffer; /* buffer */ - int nbytes; /* space in buffer for characters */ - KeySym *keysym; - XComposeStatus *status; -#endif { KeySym dummy; int rtrnLen; unsigned int new_mods; Display *dpy = event->display; - XkbDescPtr xkb; if (keysym==NULL) keysym= &dummy; - xkb= dpy->xkb_info->desc; if (!XkbLookupKeySym(dpy,event->keycode,event->state, &new_mods,keysym)) return 0; new_mods= (event->state&(~new_mods)); + /* find the group where a symbol can be converted to control one */ + if (new_mods&ControlMask && *keysym > 0x7F && + (dpy->xkb_info->xlib_ctrls & XkbLC_ControlFallback)) { + XKeyEvent tmp_ev = *event; + KeySym tmp_keysym; + unsigned int tmp_new_mods; + if (_XkbUnavailable(dpy)) { + tmp_ev.state= event->state ^ dpy->mode_switch; + if (XkbLookupKeySym(dpy, tmp_ev.keycode, tmp_ev.state, + &tmp_new_mods, &tmp_keysym) && + tmp_keysym != NoSymbol && tmp_keysym < 0x80 ) { + *keysym = tmp_keysym; + } + } else { + int n = XkbKeyNumGroups(dpy->xkb_info->desc, tmp_ev.keycode); + int i; + for (i = 0; i < n; i++) { + if (XkbGroupForCoreState(event->state) == i) + continue; + tmp_ev.state= XkbBuildCoreState(tmp_ev.state, i); + if (XkbLookupKeySym(dpy, tmp_ev.keycode, tmp_ev.state, + &tmp_new_mods, &tmp_keysym) && + tmp_keysym != NoSymbol && tmp_keysym < 0x80 ) { + *keysym = tmp_keysym; + new_mods= (event->state&(~tmp_new_mods)); + break; + } + } + } + } + #ifdef USE_OWN_COMPOSE if ( status ) { static int been_here= 0; @@ -873,47 +804,17 @@ XLookupString (event, buffer, nbytes, keysym, status) if (rtrnLen>0) return rtrnLen; - rtrnLen = XkbTranslateKeySym(dpy,keysym,new_mods,buffer,nbytes,NULL); - - if ((event->state&ControlMask)&&(nbytes>0)&& - ((rtrnLen==0)|| - ((rtrnLen==1)&&((unsigned char) buffer[0]>=' ')))&& - (dpy->xkb_info->xlib_ctrls&XkbLC_ControlFallback)) { - XKeyEvent tmp_ev; - tmp_ev= *event; - if (_XkbUnavailable(dpy)) { - if (event->state & dpy->mode_switch) { - tmp_ev.state= event->state & ~dpy->mode_switch; - return XLookupString (&tmp_ev, buffer, nbytes, keysym, status); - } - } else { - if (XkbGroupForCoreState(event->state) != XkbGroup1Index) { - tmp_ev.state= XkbBuildCoreState(event->state,XkbGroup1Index); - return XLookupString (&tmp_ev, buffer, nbytes, keysym, status); - } - } - } - return rtrnLen; + return XkbTranslateKeySym(dpy,keysym,new_mods,buffer,nbytes,NULL); } int -#if NeedFunctionPrototypes XkbLookupKeyBinding( Display * dpy, register KeySym sym, unsigned int mods, char * buffer, int nbytes, int * extra_rtrn) -#else -XkbLookupKeyBinding(dpy, sym, mods, buffer, nbytes, extra_rtrn) - Display *dpy; - register KeySym sym; - unsigned int mods; - char *buffer; - int nbytes; - int * extra_rtrn; -#endif { register struct _XKeytrans *p; @@ -936,12 +837,7 @@ XkbLookupKeyBinding(dpy, sym, mods, buffer, nbytes, extra_rtrn) } char -#if NeedFunctionPrototypes XkbToControl( char ch ) -#else -XkbToControl( ch ) - char ch; -#endif { register char c = ch; diff --git a/src/xkb/XKBCompat.c b/src/xkb/XKBCompat.c index 73c7d76..9a0b8ec 100644 --- a/src/xkb/XKBCompat.c +++ b/src/xkb/XKBCompat.c @@ -24,6 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ +/* $XFree86: xc/lib/X11/XKBCompat.c,v 3.2 2003/11/17 22:20:09 dawes Exp $ */ #include <stdio.h> #define NEED_REPLIES @@ -34,18 +35,10 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "XKBlibint.h" Status -#if NeedFunctionPrototypes _XkbReadGetCompatMapReply( Display * dpy, xkbGetCompatMapReply * rep, XkbDescPtr xkb, int * nread_rtrn) -#else -_XkbReadGetCompatMapReply(dpy,rep,xkb,nread_rtrn) - Display * dpy; - xkbGetCompatMapReply * rep; - XkbDescPtr xkb; - int * nread_rtrn; -#endif { register int i; XkbReadBufferRec buf; @@ -114,14 +107,7 @@ BAILOUT: } Status -#if NeedFunctionPrototypes XkbGetCompatMap(Display *dpy,unsigned which,XkbDescPtr xkb) -#else -XkbGetCompatMap(dpy,which,xkb) - Display * dpy; - unsigned which; - XkbDescPtr xkb; -#endif { register xkbGetCompatMapReq *req; xkbGetCompatMapReply rep; @@ -164,14 +150,7 @@ XkbGetCompatMap(dpy,which,xkb) } static Bool -#if NeedFunctionPrototypes _XkbWriteSetCompatMap(Display *dpy,xkbSetCompatMapReq *req,XkbDescPtr xkb) -#else -_XkbWriteSetCompatMap(dpy,req,xkb) - Display * dpy; - xkbSetCompatMapReq *req; - XkbDescPtr xkb; -#endif { CARD16 firstSI; CARD16 nSI; @@ -229,15 +208,7 @@ char * buf; } Bool -#if NeedFunctionPrototypes XkbSetCompatMap(Display *dpy,unsigned which,XkbDescPtr xkb,Bool updateActions) -#else -XkbSetCompatMap(dpy,which,xkb,updateActions) - Display * dpy; - unsigned which; - XkbDescPtr xkb; - Bool updateActions; -#endif { register xkbSetCompatMapReq *req; Status ok; diff --git a/src/xkb/XKBCtrls.c b/src/xkb/XKBCtrls.c index de5ce36..485adc3 100644 --- a/src/xkb/XKBCtrls.c +++ b/src/xkb/XKBCtrls.c @@ -24,7 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/X11/XKBCtrls.c,v 1.4 2002/12/10 04:33:48 dawes Exp $ */ +/* $XFree86: xc/lib/X11/XKBCtrls.c,v 1.5 2003/11/17 22:20:09 dawes Exp $ */ #include <stdio.h> #define NEED_REPLIES @@ -35,14 +35,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. static xkbSetControlsReq * -#if NeedFunctionPrototypes _XkbGetSetControlsReq(Display *dpy,XkbInfoPtr xkbi,unsigned int deviceSpec) -#else -_XkbGetSetControlsReq(dpy,xkbi,deviceSpec) - Display * dpy; - XkbInfoPtr xkbi; - unsigned int deviceSpec; -#endif { xkbSetControlsReq *req; @@ -56,18 +49,10 @@ xkbSetControlsReq *req; } Bool -#if NeedFunctionPrototypes XkbSetAutoRepeatRate( Display *dpy, unsigned int deviceSpec, unsigned int timeout, unsigned int interval) -#else -XkbSetAutoRepeatRate(dpy, deviceSpec, timeout, interval) - Display *dpy; - unsigned int deviceSpec; - unsigned int timeout; - unsigned int interval; -#endif { register xkbSetControlsReq *req; @@ -85,18 +70,10 @@ XkbSetAutoRepeatRate(dpy, deviceSpec, timeout, interval) } Bool -#if NeedFunctionPrototypes XkbGetAutoRepeatRate( Display * dpy, unsigned int deviceSpec, unsigned int * timeoutp, unsigned int * intervalp) -#else -XkbGetAutoRepeatRate(dpy, deviceSpec, timeoutp, intervalp) - Display *dpy; - unsigned int deviceSpec; - unsigned int *timeoutp; - unsigned int *intervalp; -#endif { register xkbGetControlsReq *req; xkbGetControlsReply rep; @@ -125,23 +102,12 @@ XkbGetAutoRepeatRate(dpy, deviceSpec, timeoutp, intervalp) } Bool -#if NeedFunctionPrototypes XkbSetServerInternalMods( Display * dpy, unsigned deviceSpec, unsigned affectReal, unsigned realValues, unsigned affectVirtual, unsigned virtualValues) -#else -XkbSetServerInternalMods(dpy,deviceSpec, - affectReal,realValues,affectVirtual,virtualValues) - Display *dpy; - unsigned deviceSpec; - unsigned affectReal; - unsigned realValues; - unsigned affectVirtual; - unsigned virtualValues; -#endif { register xkbSetControlsReq *req; @@ -161,23 +127,12 @@ XkbSetServerInternalMods(dpy,deviceSpec, } Bool -#if NeedFunctionPrototypes XkbSetIgnoreLockMods( Display * dpy, unsigned int deviceSpec, unsigned affectReal, unsigned realValues, unsigned affectVirtual, unsigned virtualValues) -#else -XkbSetIgnoreLockMods(dpy,deviceSpec, - affectReal,realValues,affectVirtual,virtualValues) - Display *dpy; - unsigned int deviceSpec; - unsigned affectReal; - unsigned realValues; - unsigned affectVirtual; - unsigned virtualValues; -#endif { register xkbSetControlsReq *req; @@ -197,18 +152,10 @@ XkbSetIgnoreLockMods(dpy,deviceSpec, } Bool -#if NeedFunctionPrototypes XkbChangeEnabledControls( Display * dpy, unsigned deviceSpec, unsigned affect, unsigned values) -#else -XkbChangeEnabledControls(dpy,deviceSpec,affect,values) - Display * dpy; - unsigned deviceSpec; - unsigned affect; - unsigned values; -#endif { register xkbSetControlsReq *req; @@ -226,14 +173,7 @@ XkbChangeEnabledControls(dpy,deviceSpec,affect,values) } Status -#if NeedFunctionPrototypes XkbGetControls(Display *dpy, unsigned long which, XkbDescPtr xkb) -#else -XkbGetControls(dpy, which, xkb) - Display *dpy; - unsigned long which; - XkbDescPtr xkb; -#endif { register xkbGetControlsReq *req; xkbGetControlsReply rep; @@ -329,14 +269,7 @@ XkbGetControls(dpy, which, xkb) } Bool -#if NeedFunctionPrototypes XkbSetControls(Display *dpy, unsigned long which, XkbDescPtr xkb) -#else -XkbSetControls(dpy, which, xkb) - Display * dpy; - unsigned long which; - XkbDescPtr xkb; -#endif { register xkbSetControlsReq *req; XkbControlsPtr ctrls; @@ -408,16 +341,9 @@ XkbSetControls(dpy, which, xkb) /***====================================================================***/ void -#if NeedFunctionPrototypes XkbNoteControlsChanges( XkbControlsChangesPtr old, XkbControlsNotifyEvent * new, unsigned int wanted) -#else -XkbNoteControlsChanges(old,new,wanted) - XkbControlsChangesPtr old; - XkbControlsNotifyEvent * new; - unsigned int wanted; -#endif { old->changed_ctrls|= (new->changed_ctrls&wanted); if (new->changed_ctrls&XkbControlsEnabledMask&wanted) diff --git a/src/xkb/XKBCvt.c b/src/xkb/XKBCvt.c index c1a64dc..aa2af39 100644 --- a/src/xkb/XKBCvt.c +++ b/src/xkb/XKBCvt.c @@ -26,7 +26,7 @@ other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/XKBCvt.c,v 3.34 2002/10/08 23:31:35 dawes Exp $ */ +/* $XFree86: xc/lib/X11/XKBCvt.c,v 3.35 2003/11/17 22:20:09 dawes Exp $ */ #include <stdio.h> #include <sys/types.h> @@ -55,15 +55,7 @@ from The Open Group. #endif static int -#if NeedFunctionPrototypes _XkbHandleSpecialSym(KeySym keysym, char *buffer, int nbytes, int *extra_rtrn) -#else -_XkbHandleSpecialSym(keysym, buffer, nbytes, extra_rtrn) - KeySym keysym; - char *buffer; - int nbytes; - int * extra_rtrn; -#endif { /* try to convert to Latin-1, handling ctrl */ @@ -92,20 +84,11 @@ _XkbHandleSpecialSym(keysym, buffer, nbytes, extra_rtrn) /*ARGSUSED*/ static int -#if NeedFunctionPrototypes _XkbKSToKnownSet ( XPointer priv, KeySym keysym, char * buffer, int nbytes, int * extra_rtrn) -#else -_XkbKSToKnownSet (priv, keysym, buffer, nbytes, extra_rtrn) - XPointer priv; - KeySym keysym; - char *buffer; - int nbytes; - int *extra_rtrn; -#endif { char tbuf[8],*buf; @@ -152,15 +135,7 @@ typedef struct _XkbToKS { /*ARGSUSED*/ static KeySym -#if NeedFunctionPrototypes _XkbKnownSetToKS(XPointer priv,char *buffer,int nbytes,Status *status) -#else -_XkbKnownSetToKS(priv,buffer,nbytes,status) - XPointer priv; - char *buffer; - int nbytes; - Status *status; -#endif { if (nbytes!=1) return NoSymbol; @@ -178,12 +153,7 @@ _XkbKnownSetToKS(priv,buffer,nbytes,status) } static KeySym -#if NeedFunctionPrototypes __XkbDefaultToUpper(KeySym sym) -#else -__XkbDefaultToUpper(sym) - KeySym sym; -#endif { KeySym lower,upper; @@ -193,12 +163,7 @@ __XkbDefaultToUpper(sym) #ifdef XKB_EXTEND_LOOKUP_STRING static int -#if NeedFunctionPrototypes Strcmp(char *str1, char *str2) -#else -Strcmp(str1, str2) - char *str1, *str2; -#endif { char str[256]; char c, *s; @@ -221,13 +186,7 @@ Strcmp(str1, str2) #endif int -#if NeedFunctionPrototypes _XkbGetConverters(char *encoding_name, XkbConverters *cvt_rtrn) -#else -_XkbGetConverters(encoding_name, cvt_rtrn) - char *encoding_name; - XkbConverters *cvt_rtrn; -#endif { if ( !cvt_rtrn ) return 0; diff --git a/src/xkb/XKBExtDev.c b/src/xkb/XKBExtDev.c index b208199..9562c50 100644 --- a/src/xkb/XKBExtDev.c +++ b/src/xkb/XKBExtDev.c @@ -24,7 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/X11/XKBExtDev.c,v 3.4 2001/10/28 03:32:33 tsi Exp $ */ +/* $XFree86: xc/lib/X11/XKBExtDev.c,v 3.5 2003/11/17 22:20:09 dawes Exp $ */ #include <stdio.h> #define NEED_REPLIES @@ -38,16 +38,9 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. /***====================================================================***/ extern void -#if NeedFunctionPrototypes XkbNoteDeviceChanges( XkbDeviceChangesPtr old, XkbExtensionDeviceNotifyEvent * new, unsigned int wanted) -#else -XkbNoteDeviceChanges(old,new,wanted) - XkbDeviceChangesPtr old; - XkbExtensionDeviceNotifyEvent * new; - unsigned int wanted; -#endif { if ((!old)||(!new)||(!wanted)||((new->reason&wanted)==0)) return; @@ -114,16 +107,9 @@ XkbNoteDeviceChanges(old,new,wanted) /***====================================================================***/ static Status -#if NeedFunctionPrototypes _XkbReadDeviceLedInfo( XkbReadBufferPtr buf, unsigned present, XkbDeviceInfoPtr devi) -#else -_XkbReadDeviceLedInfo(buf,present,devi) - XkbReadBufferPtr buf; - unsigned present; - XkbDeviceInfoPtr devi; -#endif { register unsigned i,bit; XkbDeviceLedInfoPtr devli; @@ -179,16 +165,9 @@ xkbDeviceLedsWireDesc * wireli; } static Status -#if NeedFunctionPrototypes _XkbReadGetDeviceInfoReply( Display * dpy, xkbGetDeviceInfoReply * rep, XkbDeviceInfoPtr devi) -#else -_XkbReadGetDeviceInfoReply(dpy,rep,devi) - Display * dpy; - xkbGetDeviceInfoReply * rep; - XkbDeviceInfoPtr devi; -#endif { XkbReadBufferRec buf; XkbAction * act; @@ -236,20 +215,11 @@ BAILOUT: } XkbDeviceInfoPtr -#if NeedFunctionPrototypes XkbGetDeviceInfo( Display * dpy, unsigned which, unsigned deviceSpec, unsigned class, unsigned id) -#else -XkbGetDeviceInfo(dpy,which,deviceSpec,class,id) - Display * dpy; - unsigned which; - unsigned deviceSpec; - unsigned class; - unsigned id; -#endif { register xkbGetDeviceInfoReq * req; xkbGetDeviceInfoReply rep; @@ -294,16 +264,9 @@ XkbGetDeviceInfo(dpy,which,deviceSpec,class,id) } Status -#if NeedFunctionPrototypes XkbGetDeviceInfoChanges( Display * dpy, XkbDeviceInfoPtr devi, XkbDeviceChangesPtr changes) -#else -XkbGetDeviceInfoChanges(dpy,devi,changes) - Display * dpy; - XkbDeviceInfoPtr devi; - XkbDeviceChangesPtr changes; -#endif { register xkbGetDeviceInfoReq * req; xkbGetDeviceInfoReply rep; @@ -361,20 +324,11 @@ XkbGetDeviceInfoChanges(dpy,devi,changes) } Status -#if NeedFunctionPrototypes XkbGetDeviceButtonActions( Display * dpy, XkbDeviceInfoPtr devi, Bool all, unsigned int first, unsigned int num) -#else -XkbGetDeviceButtonActions(dpy,devi,all,first,num) - Display * dpy; - XkbDeviceInfoPtr devi; - Bool all; - unsigned int first; - unsigned int num; -#endif { register xkbGetDeviceInfoReq * req; xkbGetDeviceInfoReply rep; @@ -411,20 +365,11 @@ XkbGetDeviceButtonActions(dpy,devi,all,first,num) } Status -#if NeedFunctionPrototypes XkbGetDeviceLedInfo( Display * dpy, XkbDeviceInfoPtr devi, unsigned int ledClass, unsigned int ledId, unsigned int which) -#else -XkbGetDeviceLedInfo(dpy,devi,ledClass,ledId,which) - Display * dpy; - XkbDeviceInfoPtr devi; - unsigned int ledClass; - unsigned int ledId; - unsigned int which; -#endif { register xkbGetDeviceInfoReq * req; xkbGetDeviceInfoReply rep; @@ -478,14 +423,7 @@ typedef struct _SetLedStuff { } SetLedStuff; static void -#if NeedFunctionPrototypes _InitLedStuff(SetLedStuff *stuff,unsigned wanted,XkbDeviceInfoPtr devi) -#else -_InitLedStuff(stuff,wanted,devi) - SetLedStuff * stuff; - unsigned wanted; - XkbDeviceInfoPtr devi; -#endif { int i; register XkbDeviceLedInfoPtr devli; @@ -517,12 +455,7 @@ register XkbDeviceLedInfoPtr devli; } static void -#if NeedFunctionPrototypes _FreeLedStuff(SetLedStuff *stuff) -#else -_FreeLedStuff(stuff) - SetLedStuff *stuff; -#endif { if ((stuff->num_info>0)&&(stuff->info!=NULL)) _XkbFree(stuff->info); @@ -531,13 +464,7 @@ _FreeLedStuff(stuff) } static int -#if NeedFunctionPrototypes _XkbSizeLedInfo(unsigned changed,XkbDeviceLedInfoPtr devli) -#else -_XkbSizeLedInfo(changed,devli) - unsigned changed; - XkbDeviceLedInfoPtr devli; -#endif { register int i,size; register unsigned bit,namesNeeded,mapsNeeded; @@ -560,18 +487,10 @@ register unsigned bit,namesNeeded,mapsNeeded; } static Bool -#if NeedFunctionPrototypes _SizeMatches( SetLedStuff * stuff, XkbDeviceLedChangesPtr changes, int * sz_rtrn, int * nleds_rtrn) -#else -_SizeMatches(stuff,changes,sz_rtrn,nleds_rtrn) - SetLedStuff * stuff; - XkbDeviceLedChangesPtr changes; - int * sz_rtrn; - int * nleds_rtrn; -#endif { int i,nMatch,class,id; LedInfoStuff * linfo; @@ -613,20 +532,11 @@ Bool match; static Status -#if NeedFunctionPrototypes _XkbSetDeviceInfoSize( XkbDeviceInfoPtr devi, XkbDeviceChangesPtr changes, SetLedStuff * stuff, int * sz_rtrn, int * num_leds_rtrn) -#else -_XkbSetDeviceInfoSize(devi,changes,stuff,sz_rtrn,num_leds_rtrn) - XkbDeviceInfoPtr devi; - XkbDeviceChangesPtr changes; - SetLedStuff * stuff; - int * sz_rtrn; - int * num_leds_rtrn; -#endif { *sz_rtrn= 0; if ((changes->changed&XkbXI_ButtonActionsMask)&&(changes->num_btns>0)) { @@ -655,14 +565,7 @@ _XkbSetDeviceInfoSize(devi,changes,stuff,sz_rtrn,num_leds_rtrn) } static char * -#if NeedFunctionPrototypes _XkbWriteLedInfo(char *wire,unsigned changed,XkbDeviceLedInfoPtr devli) -#else -_XkbWriteLedInfo(wire,changed,devli) - char * wire; - unsigned changed; - XkbDeviceLedInfoPtr devli; -#endif { register int i; register unsigned bit,namesNeeded,mapsNeeded; @@ -719,18 +622,10 @@ xkbDeviceLedsWireDesc * lwire; static int -#if NeedFunctionPrototypes _XkbWriteSetDeviceInfo( char * wire, XkbDeviceChangesPtr changes, SetLedStuff * stuff, XkbDeviceInfoPtr devi) -#else -_XkbWriteSetDeviceInfo(wire,changes,stuff,devi) - char * wire; - XkbDeviceChangesPtr changes; - SetLedStuff * stuff; - XkbDeviceInfoPtr devi; -#endif { char *start; @@ -759,16 +654,9 @@ char *start; } Bool -#if NeedFunctionPrototypes XkbSetDeviceInfo( Display * dpy, unsigned which, XkbDeviceInfoPtr devi) -#else -XkbSetDeviceInfo(dpy,which,devi) - Display * dpy; - unsigned which; - XkbDeviceInfoPtr devi; -#endif { register xkbSetDeviceInfoReq *req; Status ok = 0; @@ -821,16 +709,9 @@ XkbSetDeviceInfo(dpy,which,devi) } Bool -#if NeedFunctionPrototypes XkbChangeDeviceInfo( Display * dpy, XkbDeviceInfoPtr devi, XkbDeviceChangesPtr changes) -#else -XkbChangeDeviceInfo(dpy,devi,changes) - Display * dpy; - XkbDeviceInfoPtr devi; - XkbDeviceChangesPtr changes; -#endif { register xkbSetDeviceInfoReq *req; Status ok = 0; @@ -876,37 +757,20 @@ XkbChangeDeviceInfo(dpy,devi,changes) } Bool -#if NeedFunctionPrototypes XkbSetDeviceLedInfo( Display * dpy, XkbDeviceInfoPtr devi, unsigned ledClass, unsigned ledID, unsigned which) -#else -XkbSetDeviceLedInfo(dpy,devi,ledClass,ledID,which) - Display * dpy; - XkbDeviceInfoPtr devi; - unsigned ledClass; - unsigned ledID; - unsigned which; -#endif { return False; } Bool -#if NeedFunctionPrototypes XkbSetDeviceButtonActions( Display * dpy, XkbDeviceInfoPtr devi, unsigned int first, unsigned int nBtns) -#else -XkbSetDeviceButtonActions(dpy,devi,first,nBtns) - Display * dpy; - XkbDeviceInfoPtr devi; - unsigned int first; - unsigned int nBtns; -#endif { register xkbSetDeviceInfoReq *req; Status ok = 0; diff --git a/src/xkb/XKBGAlloc.c b/src/xkb/XKBGAlloc.c index 44a74c6..209631e 100644 --- a/src/xkb/XKBGAlloc.c +++ b/src/xkb/XKBGAlloc.c @@ -24,7 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/X11/XKBGAlloc.c,v 3.4 2001/01/17 19:41:48 dawes Exp $ */ +/* $XFree86: xc/lib/X11/XKBGAlloc.c,v 3.5 2003/11/17 22:20:09 dawes Exp $ */ #define NEED_EVENTS #define NEED_REPLIES @@ -58,7 +58,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. /***====================================================================***/ static void -#if NeedFunctionPrototypes _XkbFreeGeomLeafElems( Bool freeAll, int first, int count, @@ -66,16 +65,6 @@ _XkbFreeGeomLeafElems( Bool freeAll, unsigned short * sz_inout, char ** elems, unsigned int elem_sz) -#else -_XkbFreeGeomLeafElems(freeAll,first,count,num_inout,sz_inout,elems,elem_sz) - Bool freeAll; - int first; - int count; - unsigned short * num_inout; - unsigned short * sz_inout; - char ** elems; - unsigned int elem_sz; -#endif { if ((freeAll)||(*elems==NULL)) { *num_inout= *sz_inout= 0; @@ -106,13 +95,10 @@ _XkbFreeGeomLeafElems(freeAll,first,count,num_inout,sz_inout,elems,elem_sz) } typedef void (*ContentsClearFunc)( -#if NeedFunctionPrototypes char * /* priv */ -#endif ); static void -#if NeedFunctionPrototypes _XkbFreeGeomNonLeafElems( Bool freeAll, int first, int count, @@ -121,18 +107,6 @@ _XkbFreeGeomNonLeafElems( Bool freeAll, char ** elems, unsigned int elem_sz, ContentsClearFunc freeFunc) -#else -_XkbFreeGeomNonLeafElems(freeAll,first,count,num_inout,sz_inout,elems,elem_sz, - freeFunc) - Bool freeAll; - int first; - int count; - unsigned short * num_inout; - unsigned short * sz_inout; - char ** elems; - unsigned int elem_sz; - ContentsClearFunc freeFunc; -#endif { register int i; register char *ptr; @@ -177,12 +151,7 @@ register char *ptr; /***====================================================================***/ static void -#if NeedFunctionPrototypes _XkbClearProperty(char *prop_in) -#else -_XkbClearProperty(prop_in) - char * prop_in; -#endif { XkbPropertyPtr prop= (XkbPropertyPtr)prop_in; @@ -198,18 +167,10 @@ XkbPropertyPtr prop= (XkbPropertyPtr)prop_in; } void -#if NeedFunctionPrototypes XkbFreeGeomProperties( XkbGeometryPtr geom, int first, int count, Bool freeAll) -#else -XkbFreeGeomProperties(geom,first,count,freeAll) - XkbGeometryPtr geom; - int first; - int count; - Bool freeAll; -#endif { _XkbFreeGeomNonLeafElems(freeAll,first,count, &geom->num_properties,&geom->sz_properties, @@ -221,18 +182,10 @@ XkbFreeGeomProperties(geom,first,count,freeAll) /***====================================================================***/ void -#if NeedFunctionPrototypes XkbFreeGeomKeyAliases( XkbGeometryPtr geom, int first, int count, Bool freeAll) -#else -XkbFreeGeomKeyAliases(geom,first,count,freeAll) - XkbGeometryPtr geom; - int first; - int count; - Bool freeAll; -#endif { _XkbFreeGeomLeafElems(freeAll,first,count, &geom->num_key_aliases,&geom->sz_key_aliases, @@ -244,12 +197,7 @@ XkbFreeGeomKeyAliases(geom,first,count,freeAll) /***====================================================================***/ static void -#if NeedFunctionPrototypes _XkbClearColor(char *color_in) -#else -_XkbClearColor(color_in) - char * color_in; -#endif { XkbColorPtr color= (XkbColorPtr)color_in; @@ -259,15 +207,7 @@ XkbColorPtr color= (XkbColorPtr)color_in; } void -#if NeedFunctionPrototypes XkbFreeGeomColors(XkbGeometryPtr geom,int first,int count,Bool freeAll) -#else -XkbFreeGeomColors(geom,first,count,freeAll) - XkbGeometryPtr geom; - int first; - int count; - Bool freeAll; -#endif { _XkbFreeGeomNonLeafElems(freeAll,first,count, &geom->num_colors,&geom->sz_colors, @@ -279,15 +219,7 @@ XkbFreeGeomColors(geom,first,count,freeAll) /***====================================================================***/ void -#if NeedFunctionPrototypes XkbFreeGeomPoints(XkbOutlinePtr outline,int first,int count,Bool freeAll) -#else -XkbFreeGeomPoints(outline,first,count,freeAll) - XkbOutlinePtr outline; - int first; - int count; - Bool freeAll; -#endif { _XkbFreeGeomLeafElems(freeAll,first,count, &outline->num_points,&outline->sz_points, @@ -299,12 +231,7 @@ XkbFreeGeomPoints(outline,first,count,freeAll) /***====================================================================***/ static void -#if NeedFunctionPrototypes _XkbClearOutline(char *outline_in) -#else -_XkbClearOutline(outline_in) - char * outline_in; -#endif { XkbOutlinePtr outline= (XkbOutlinePtr)outline_in; @@ -314,15 +241,7 @@ XkbOutlinePtr outline= (XkbOutlinePtr)outline_in; } void -#if NeedFunctionPrototypes XkbFreeGeomOutlines(XkbShapePtr shape,int first,int count,Bool freeAll) -#else -XkbFreeGeomOutlines(shape,first,count,freeAll) - XkbShapePtr shape; - int first; - int count; - Bool freeAll; -#endif { _XkbFreeGeomNonLeafElems(freeAll,first,count, &shape->num_outlines,&shape->sz_outlines, @@ -335,12 +254,7 @@ XkbFreeGeomOutlines(shape,first,count,freeAll) /***====================================================================***/ static void -#if NeedFunctionPrototypes _XkbClearShape(char *shape_in) -#else -_XkbClearShape(shape_in) - char * shape_in; -#endif { XkbShapePtr shape= (XkbShapePtr)shape_in; @@ -350,15 +264,7 @@ XkbShapePtr shape= (XkbShapePtr)shape_in; } void -#if NeedFunctionPrototypes XkbFreeGeomShapes(XkbGeometryPtr geom,int first,int count,Bool freeAll) -#else -XkbFreeGeomShapes(geom,first,count,freeAll) - XkbGeometryPtr geom; - int first; - int count; - Bool freeAll; -#endif { _XkbFreeGeomNonLeafElems(freeAll,first,count, &geom->num_shapes,&geom->sz_shapes, @@ -370,15 +276,7 @@ XkbFreeGeomShapes(geom,first,count,freeAll) /***====================================================================***/ void -#if NeedFunctionPrototypes XkbFreeGeomOverlayKeys(XkbOverlayRowPtr row,int first,int count,Bool freeAll) -#else -XkbFreeGeomOverlayKeys(row,first,count,freeAll) - XkbOverlayRowPtr row; - int first; - int count; - Bool freeAll; -#endif { _XkbFreeGeomLeafElems(freeAll,first,count, &row->num_keys,&row->sz_keys, @@ -390,12 +288,7 @@ XkbFreeGeomOverlayKeys(row,first,count,freeAll) /***====================================================================***/ static void -#if NeedFunctionPrototypes _XkbClearOverlayRow(char *row_in) -#else -_XkbClearOverlayRow(row_in) - char * row_in; -#endif { XkbOverlayRowPtr row= (XkbOverlayRowPtr)row_in; @@ -405,15 +298,7 @@ XkbOverlayRowPtr row= (XkbOverlayRowPtr)row_in; } void -#if NeedFunctionPrototypes XkbFreeGeomOverlayRows(XkbOverlayPtr overlay,int first,int count,Bool freeAll) -#else -XkbFreeGeomOverlayRows(overlay,first,count,freeAll) - XkbOverlayPtr overlay; - int first; - int count; - Bool freeAll; -#endif { _XkbFreeGeomNonLeafElems(freeAll,first,count, &overlay->num_rows,&overlay->sz_rows, @@ -425,12 +310,7 @@ XkbFreeGeomOverlayRows(overlay,first,count,freeAll) /***====================================================================***/ static void -#if NeedFunctionPrototypes _XkbClearOverlay(char *overlay_in) -#else -_XkbClearOverlay(overlay_in) - char * overlay_in; -#endif { XkbOverlayPtr overlay= (XkbOverlayPtr)overlay_in; @@ -440,15 +320,7 @@ XkbOverlayPtr overlay= (XkbOverlayPtr)overlay_in; } void -#if NeedFunctionPrototypes XkbFreeGeomOverlays(XkbSectionPtr section,int first,int count,Bool freeAll) -#else -XkbFreeGeomOverlays(section,first,count,freeAll) - XkbSectionPtr section; - int first; - int count; - Bool freeAll; -#endif { _XkbFreeGeomNonLeafElems(freeAll,first,count, §ion->num_overlays,§ion->sz_overlays, @@ -460,15 +332,7 @@ XkbFreeGeomOverlays(section,first,count,freeAll) /***====================================================================***/ void -#if NeedFunctionPrototypes XkbFreeGeomKeys(XkbRowPtr row,int first,int count,Bool freeAll) -#else -XkbFreeGeomKeys(row,first,count,freeAll) - XkbRowPtr row; - int first; - int count; - Bool freeAll; -#endif { _XkbFreeGeomLeafElems(freeAll,first,count, &row->num_keys,&row->sz_keys, @@ -480,12 +344,7 @@ XkbFreeGeomKeys(row,first,count,freeAll) /***====================================================================***/ static void -#if NeedFunctionPrototypes _XkbClearRow(char *row_in) -#else -_XkbClearRow(row_in) - char * row_in; -#endif { XkbRowPtr row= (XkbRowPtr)row_in; @@ -495,15 +354,7 @@ XkbRowPtr row= (XkbRowPtr)row_in; } void -#if NeedFunctionPrototypes XkbFreeGeomRows(XkbSectionPtr section,int first,int count,Bool freeAll) -#else -XkbFreeGeomRows(section,first,count,freeAll) - XkbSectionPtr section; - int first; - int count; - Bool freeAll; -#endif { _XkbFreeGeomNonLeafElems(freeAll,first,count, §ion->num_rows,§ion->sz_rows, @@ -514,12 +365,7 @@ XkbFreeGeomRows(section,first,count,freeAll) /***====================================================================***/ static void -#if NeedFunctionPrototypes _XkbClearSection(char *section_in) -#else -_XkbClearSection(section_in) - char * section_in; -#endif { XkbSectionPtr section= (XkbSectionPtr)section_in; @@ -533,15 +379,7 @@ XkbSectionPtr section= (XkbSectionPtr)section_in; } void -#if NeedFunctionPrototypes XkbFreeGeomSections(XkbGeometryPtr geom,int first,int count,Bool freeAll) -#else -XkbFreeGeomSections(geom,first,count,freeAll) - XkbGeometryPtr geom; - int first; - int count; - Bool freeAll; -#endif { _XkbFreeGeomNonLeafElems(freeAll,first,count, &geom->num_sections,&geom->sz_sections, @@ -553,12 +391,7 @@ XkbFreeGeomSections(geom,first,count,freeAll) /***====================================================================***/ static void -#if NeedFunctionPrototypes _XkbClearDoodad(char *doodad_in) -#else -_XkbClearDoodad(doodad_in) - char * doodad_in; -#endif { XkbDoodadPtr doodad= (XkbDoodadPtr)doodad_in; @@ -588,14 +421,7 @@ XkbDoodadPtr doodad= (XkbDoodadPtr)doodad_in; } void -#if NeedFunctionPrototypes XkbFreeGeomDoodads(XkbDoodadPtr doodads,int nDoodads,Bool freeAll) -#else -XkbFreeGeomDoodads(doodads,nDoodads,freeAll) - XkbDoodadPtr doodads; - int nDoodads; - Bool freeAll; -#endif { register int i; register XkbDoodadPtr doodad; @@ -611,14 +437,7 @@ register XkbDoodadPtr doodad; } void -#if NeedFunctionPrototypes XkbFreeGeometry(XkbGeometryPtr geom,unsigned which,Bool freeMap) -#else -XkbFreeGeometry(geom,which,freeMap) - XkbGeometryPtr geom; - unsigned which; - Bool freeMap; -#endif { if (geom==NULL) return; @@ -652,20 +471,11 @@ XkbFreeGeometry(geom,which,freeMap) /***====================================================================***/ static Status -#if NeedFunctionPrototypes _XkbGeomAlloc( XPointer * old, unsigned short * num, unsigned short * total, int num_new, Size_t sz_elem) -#else -_XkbGeomAlloc(old,num,total,num_new,sz_elem) - XPointer * old; - unsigned short * num; - unsigned short * total; - int num_new; - Size_t sz_elem; -#endif { if (num_new<1) return Success; @@ -733,181 +543,91 @@ _XkbGeomAlloc(old,num,total,num_new,sz_elem) (n),sizeof(XkbOverlayKeyRec)) Status -#if NeedFunctionPrototypes XkbAllocGeomProps(XkbGeometryPtr geom,int nProps) -#else -XkbAllocGeomProps(geom,nProps) - XkbGeometryPtr geom; - int nProps; -#endif { return _XkbAllocProps(geom,nProps); } Status -#if NeedFunctionPrototypes XkbAllocGeomColors(XkbGeometryPtr geom,int nColors) -#else -XkbAllocGeomColors(geom,nColors) - XkbGeometryPtr geom; - int nColors; -#endif { return _XkbAllocColors(geom,nColors); } Status -#if NeedFunctionPrototypes XkbAllocGeomKeyAliases(XkbGeometryPtr geom,int nKeyAliases) -#else -XkbAllocGeomKeyAliases(geom,nKeyAliases) - XkbGeometryPtr geom; - int nKeyAliases; -#endif { return _XkbAllocKeyAliases(geom,nKeyAliases); } Status -#if NeedFunctionPrototypes XkbAllocGeomShapes(XkbGeometryPtr geom,int nShapes) -#else -XkbAllocGeomShapes(geom,nShapes) - XkbGeometryPtr geom; - int nShapes; -#endif { return _XkbAllocShapes(geom,nShapes); } Status -#if NeedFunctionPrototypes XkbAllocGeomSections(XkbGeometryPtr geom,int nSections) -#else -XkbAllocGeomSections(geom,nSections) - XkbGeometryPtr geom; - int nSections; -#endif { return _XkbAllocSections(geom,nSections); } Status -#if NeedFunctionPrototypes XkbAllocGeomOverlays(XkbSectionPtr section,int nOverlays) -#else -XkbAllocGeomOverlays(section,nOverlays) - XkbSectionPtr section; - int nOverlays; -#endif { return _XkbAllocOverlays(section,nOverlays); } Status -#if NeedFunctionPrototypes XkbAllocGeomOverlayRows(XkbOverlayPtr overlay,int nRows) -#else -XkbAllocGeomOverlayRows(overlay,nRows) - XkbOverlayPtr overlay; - int nRows; -#endif { return _XkbAllocOverlayRows(overlay,nRows); } Status -#if NeedFunctionPrototypes XkbAllocGeomOverlayKeys(XkbOverlayRowPtr row,int nKeys) -#else -XkbAllocGeomOverlayKeys(row,nKeys) - XkbOverlayRowPtr row; - int nKeys; -#endif { return _XkbAllocOverlayKeys(row,nKeys); } Status -#if NeedFunctionPrototypes XkbAllocGeomDoodads(XkbGeometryPtr geom,int nDoodads) -#else -XkbAllocGeomDoodads(geom,nDoodads) - XkbGeometryPtr geom; - int nDoodads; -#endif { return _XkbAllocDoodads(geom,nDoodads); } Status -#if NeedFunctionPrototypes XkbAllocGeomSectionDoodads(XkbSectionPtr section,int nDoodads) -#else -XkbAllocGeomSectionDoodads(section,nDoodads) - XkbSectionPtr section; - int nDoodads; -#endif { return _XkbAllocDoodads(section,nDoodads); } Status -#if NeedFunctionPrototypes XkbAllocGeomOutlines(XkbShapePtr shape,int nOL) -#else -XkbAllocGeomOutlines(shape,nOL) - XkbShapePtr shape; - int nOL; -#endif { return _XkbAllocOutlines(shape,nOL); } Status -#if NeedFunctionPrototypes XkbAllocGeomRows(XkbSectionPtr section,int nRows) -#else -XkbAllocGeomRows(section,nRows) - XkbSectionPtr section; - int nRows; -#endif { return _XkbAllocRows(section,nRows); } Status -#if NeedFunctionPrototypes XkbAllocGeomPoints(XkbOutlinePtr ol,int nPts) -#else -XkbAllocGeomPoints(ol,nPts) - XkbOutlinePtr ol; - int nPts; -#endif { return _XkbAllocPoints(ol,nPts); } Status -#if NeedFunctionPrototypes XkbAllocGeomKeys(XkbRowPtr row,int nKeys) -#else -XkbAllocGeomKeys(row,nKeys) - XkbRowPtr row; - int nKeys; -#endif { return _XkbAllocKeys(row,nKeys); } Status -#if NeedFunctionPrototypes XkbAllocGeometry(XkbDescPtr xkb,XkbGeometrySizesPtr sizes) -#else -XkbAllocGeometry(xkb,sizes) - XkbDescPtr xkb; - XkbGeometrySizesPtr sizes; -#endif { XkbGeometryPtr geom; Status rtrn; @@ -952,14 +672,7 @@ BAIL: /***====================================================================***/ XkbPropertyPtr -#if NeedFunctionPrototypes XkbAddGeomProperty(XkbGeometryPtr geom,char *name,char *value) -#else -XkbAddGeomProperty(geom,name,value) - XkbGeometryPtr geom; - char * name; - char * value; -#endif { register int i; register XkbPropertyPtr prop; @@ -997,14 +710,7 @@ register XkbPropertyPtr prop; } XkbKeyAliasPtr -#if NeedFunctionPrototypes XkbAddGeomKeyAlias(XkbGeometryPtr geom,char *aliasStr,char *realStr) -#else -XkbAddGeomKeyAlias(geom,aliasStr,realStr) - XkbGeometryPtr geom; - char * aliasStr; - char * realStr; -#endif { register int i; register XkbKeyAliasPtr alias; @@ -1031,14 +737,7 @@ register XkbKeyAliasPtr alias; } XkbColorPtr -#if NeedFunctionPrototypes XkbAddGeomColor(XkbGeometryPtr geom,char *spec,unsigned int pixel) -#else -XkbAddGeomColor(geom,spec,pixel) - XkbGeometryPtr geom; - char * spec; - unsigned int pixel; -#endif { register int i; register XkbColorPtr color; @@ -1066,13 +765,7 @@ register XkbColorPtr color; } XkbOutlinePtr -#if NeedFunctionPrototypes XkbAddGeomOutline(XkbShapePtr shape,int sz_points) -#else -XkbAddGeomOutline(shape,sz_points) - XkbShapePtr shape; - int sz_points; -#endif { XkbOutlinePtr outline; @@ -1091,14 +784,7 @@ XkbOutlinePtr outline; } XkbShapePtr -#if NeedFunctionPrototypes XkbAddGeomShape(XkbGeometryPtr geom,Atom name,int sz_outlines) -#else -XkbAddGeomShape(geom,name,sz_outlines) - XkbGeometryPtr geom; - Atom name; - int sz_outlines; -#endif { XkbShapePtr shape; register int i; @@ -1125,12 +811,7 @@ register int i; } XkbKeyPtr -#if NeedFunctionPrototypes XkbAddGeomKey(XkbRowPtr row) -#else -XkbAddGeomKey(row) - XkbRowPtr row; -#endif { XkbKeyPtr key; if (!row) @@ -1143,13 +824,7 @@ XkbKeyPtr key; } XkbRowPtr -#if NeedFunctionPrototypes XkbAddGeomRow(XkbSectionPtr section,int sz_keys) -#else -XkbAddGeomRow(section,sz_keys) - XkbSectionPtr section; - int sz_keys; -#endif { XkbRowPtr row; @@ -1167,20 +842,11 @@ XkbRowPtr row; } XkbSectionPtr -#if NeedFunctionPrototypes XkbAddGeomSection( XkbGeometryPtr geom, Atom name, int sz_rows, int sz_doodads, int sz_over) -#else -XkbAddGeomSection(geom,name,sz_rows,sz_doodads,sz_over) - XkbGeometryPtr geom; - Atom name; - int sz_rows; - int sz_doodads; - int sz_over; -#endif { register int i; XkbSectionPtr section; @@ -1216,14 +882,7 @@ XkbSectionPtr section; } XkbDoodadPtr -#if NeedFunctionPrototypes XkbAddGeomDoodad(XkbGeometryPtr geom,XkbSectionPtr section,Atom name) -#else -XkbAddGeomDoodad(geom,section,name) - XkbGeometryPtr geom; - XkbSectionPtr section; - Atom name; -#endif { XkbDoodadPtr old,doodad; register int i,nDoodads; @@ -1261,18 +920,10 @@ register int i,nDoodads; } XkbOverlayKeyPtr -#if NeedFunctionPrototypes XkbAddGeomOverlayKey( XkbOverlayPtr overlay, XkbOverlayRowPtr row, char * over, char * under) -#else -XkbAddGeomOverlayKey(overlay,row,over,under) - XkbOverlayPtr overlay; - XkbOverlayRowPtr row; - char * over; - char * under; -#endif { register int i; XkbOverlayKeyPtr key; @@ -1304,14 +955,7 @@ Bool found; } XkbOverlayRowPtr -#if NeedFunctionPrototypes XkbAddGeomOverlayRow(XkbOverlayPtr overlay,int row_under,int sz_keys) -#else -XkbAddGeomOverlayRow(overlay,row_under,sz_keys) - XkbOverlayPtr overlay; - int row_under; - int sz_keys; -#endif { register int i; XkbOverlayRowPtr row; @@ -1343,14 +987,7 @@ XkbOverlayRowPtr row; } XkbOverlayPtr -#if NeedFunctionPrototypes XkbAddGeomOverlay(XkbSectionPtr section,Atom name,int sz_rows) -#else -XkbAddGeomOverlay(section,name,sz_rows) - XkbSectionPtr section; - Atom name; - int sz_rows; -#endif { register int i; XkbOverlayPtr overlay; diff --git a/src/xkb/XKBGeom.c b/src/xkb/XKBGeom.c index 9afc0c0..65109d7 100644 --- a/src/xkb/XKBGeom.c +++ b/src/xkb/XKBGeom.c @@ -24,7 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/X11/XKBGeom.c,v 1.4 2001/10/28 03:32:33 tsi Exp $ */ +/* $XFree86: xc/lib/X11/XKBGeom.c,v 1.6 2003/11/17 22:20:09 dawes Exp $ */ #ifdef DEBUG #include <stdio.h> @@ -32,10 +32,11 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #define NEED_EVENTS #define NEED_REPLIES +#define NEED_MAP_READERS #include "Xlibint.h" -#include "XKBlibint.h" #include <X11/extensions/XKBgeom.h> #include <X11/extensions/XKBproto.h> +#include "XKBlibint.h" #ifndef MINSHORT #define MINSHORT -32768 @@ -47,13 +48,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. /***====================================================================***/ static void -#if NeedFunctionPrototypes _XkbCheckBounds(XkbBoundsPtr bounds,int x,int y) -#else -_XkbCheckBounds(bounds,x,y) - XkbBoundsPtr bounds; - int x,y; -#endif { if (x<bounds->x1) bounds->x1= x; if (x>bounds->x2) bounds->x2= x; @@ -63,12 +58,7 @@ _XkbCheckBounds(bounds,x,y) } Bool -#if NeedFunctionPrototypes XkbComputeShapeBounds(XkbShapePtr shape) -#else -XkbComputeShapeBounds(shape) - XkbShapePtr shape; -#endif { register int o,p; XkbOutlinePtr outline; @@ -87,13 +77,7 @@ XkbPointPtr pt; } Bool -#if NeedFunctionPrototypes XkbComputeShapeTop(XkbShapePtr shape,XkbBoundsPtr bounds) -#else -XkbComputeShapeTop(shape,bounds) - XkbShapePtr shape; - XkbBoundsPtr bounds; -#endif { register int p; XkbOutlinePtr outline; @@ -118,14 +102,7 @@ XkbPointPtr pt; } Bool -#if NeedFunctionPrototypes XkbComputeRowBounds(XkbGeometryPtr geom,XkbSectionPtr section,XkbRowPtr row) -#else -XkbComputeRowBounds(geom,section,row) - XkbGeometryPtr geom; - XkbSectionPtr section; - XkbRowPtr row; -#endif { register int k,pos; XkbKeyPtr key; @@ -162,13 +139,7 @@ XkbBoundsPtr bounds,sbounds; } Bool -#if NeedFunctionPrototypes XkbComputeSectionBounds(XkbGeometryPtr geom,XkbSectionPtr section) -#else -XkbComputeSectionBounds(geom,section) - XkbGeometryPtr geom; - XkbSectionPtr section; -#endif { register int i; XkbShapePtr shape; @@ -224,14 +195,7 @@ XkbBoundsPtr bounds,rbounds=NULL; /***====================================================================***/ char * -#if NeedFunctionPrototypes XkbFindOverlayForKey(XkbGeometryPtr geom,XkbSectionPtr wanted,char *under) -#else -XkbFindOverlayForKey(geom,wanted,under) - XkbGeometryPtr geom; - XkbSectionPtr wanted; - char * under; -#endif { int s; XkbSectionPtr section; @@ -271,16 +235,9 @@ XkbSectionPtr section; /***====================================================================***/ static Status -#if NeedFunctionPrototypes _XkbReadGeomProperties( XkbReadBufferPtr buf, XkbGeometryPtr geom, xkbGetGeometryReply * rep) -#else -_XkbReadGeomProperties(buf,geom,rep) - XkbReadBufferPtr buf; - XkbGeometryPtr geom; - xkbGetGeometryReply * rep; -#endif { Status rtrn; @@ -303,16 +260,9 @@ Status rtrn; } static Status -#if NeedFunctionPrototypes _XkbReadGeomKeyAliases( XkbReadBufferPtr buf, XkbGeometryPtr geom, xkbGetGeometryReply * rep) -#else -_XkbReadGeomKeyAliases(buf,geom,rep) - XkbReadBufferPtr buf; - XkbGeometryPtr geom; - xkbGetGeometryReply * rep; -#endif { Status rtrn; @@ -332,16 +282,9 @@ Status rtrn; } static Status -#if NeedFunctionPrototypes _XkbReadGeomColors( XkbReadBufferPtr buf, XkbGeometryPtr geom, xkbGetGeometryReply * rep) -#else -_XkbReadGeomColors(buf,geom,rep) - XkbReadBufferPtr buf; - XkbGeometryPtr geom; - xkbGetGeometryReply * rep; -#endif { Status rtrn; @@ -362,16 +305,9 @@ Status rtrn; } static Status -#if NeedFunctionPrototypes _XkbReadGeomShapes( XkbReadBufferPtr buf, XkbGeometryPtr geom, xkbGetGeometryReply * rep) -#else -_XkbReadGeomShapes(buf,geom,rep) - XkbReadBufferPtr buf; - XkbGeometryPtr geom; - xkbGetGeometryReply * rep; -#endif { register int i; Status rtrn; @@ -427,16 +363,9 @@ Status rtrn; } static Status -#if NeedFunctionPrototypes _XkbReadGeomDoodad( XkbReadBufferPtr buf, XkbGeometryPtr geom, XkbSectionPtr section) -#else -_XkbReadGeomDoodad(buf,geom,section) - XkbReadBufferPtr buf; - XkbGeometryPtr geom; - XkbSectionPtr section; -#endif { XkbDoodadPtr doodad; xkbDoodadWireDesc * doodadWire; @@ -486,16 +415,9 @@ xkbDoodadWireDesc * doodadWire; } static Status -#if NeedFunctionPrototypes _XkbReadGeomOverlay( XkbReadBufferPtr buf, XkbGeometryPtr geom, XkbSectionPtr section) -#else -_XkbReadGeomOverlay(buf,geom,section) - XkbReadBufferPtr buf; - XkbGeometryPtr geom; - XkbSectionPtr section; -#endif { XkbOverlayPtr ol; xkbOverlayWireDesc * olWire; @@ -539,16 +461,9 @@ register int r; } static Status -#if NeedFunctionPrototypes _XkbReadGeomSections( XkbReadBufferPtr buf, XkbGeometryPtr geom, xkbGetGeometryReply * rep) -#else -_XkbReadGeomSections(buf,geom,rep) - XkbReadBufferPtr buf; - XkbGeometryPtr geom; - xkbGetGeometryReply * rep; -#endif { register int s; XkbSectionPtr section; @@ -629,16 +544,9 @@ Status rtrn; } static Status -#if NeedFunctionPrototypes _XkbReadGeomDoodads( XkbReadBufferPtr buf, XkbGeometryPtr geom, xkbGetGeometryReply * rep) -#else -_XkbReadGeomDoodads(buf,geom,rep) - XkbReadBufferPtr buf; - XkbGeometryPtr geom; - xkbGetGeometryReply * rep; -#endif { register int d; Status rtrn; @@ -655,18 +563,10 @@ Status rtrn; } Status -#if NeedFunctionPrototypes _XkbReadGetGeometryReply( Display * dpy, xkbGetGeometryReply * rep, XkbDescPtr xkb, int * nread_rtrn) -#else -_XkbReadGetGeometryReply(dpy,rep,xkb,nread_rtrn) - Display * dpy; - xkbGetGeometryReply * rep; - XkbDescPtr xkb; - int * nread_rtrn; -#endif { XkbGeometryPtr geom; @@ -722,13 +622,7 @@ XkbGeometryPtr geom; } Status -#if NeedFunctionPrototypes XkbGetGeometry(Display *dpy,XkbDescPtr xkb) -#else -XkbGetGeometry(dpy,xkb) - Display * dpy; - XkbDescPtr xkb; -#endif { xkbGetGeometryReq *req; xkbGetGeometryReply rep; @@ -750,14 +644,7 @@ xkbGetGeometryReply rep; } Status -#if NeedFunctionPrototypes XkbGetNamedGeometry(Display *dpy,XkbDescPtr xkb,Atom name) -#else -XkbGetNamedGeometry(dpy,xkb,name) - Display * dpy; - XkbDescPtr xkb; - Atom name; -#endif { xkbGetGeometryReq *req; xkbGetGeometryReply rep; diff --git a/src/xkb/XKBGetByName.c b/src/xkb/XKBGetByName.c index 411be96..b5785b5 100644 --- a/src/xkb/XKBGetByName.c +++ b/src/xkb/XKBGetByName.c @@ -24,6 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ +/* $XFree86: xc/lib/X11/XKBGetByName.c,v 1.2 2003/11/17 22:20:09 dawes Exp $ */ #define NEED_REPLIES #define NEED_EVENTS @@ -35,22 +36,12 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. /***====================================================================***/ XkbDescPtr -#if NeedFunctionPrototypes XkbGetKeyboardByName( Display * dpy, unsigned deviceSpec, XkbComponentNamesPtr names, unsigned want, unsigned need, Bool load) -#else -XkbGetKeyboardByName(dpy,deviceSpec,names,want,need,load) - Display * dpy; - unsigned deviceSpec; - XkbComponentNamesPtr names; - unsigned want; - unsigned need; - Bool load; -#endif { register xkbGetKbdByNameReq * req; xkbGetKbdByNameReply rep; @@ -218,14 +209,7 @@ BAILOUT: } XkbDescPtr -#if NeedFunctionPrototypes XkbGetKeyboard(Display *dpy,unsigned which,unsigned deviceSpec) -#else -XkbGetKeyboard(dpy,which,deviceSpec) - Display * dpy; - unsigned which; - unsigned deviceSpec; -#endif { return XkbGetKeyboardByName(dpy,deviceSpec,NULL,which,which,False); } diff --git a/src/xkb/XKBGetMap.c b/src/xkb/XKBGetMap.c index e0fe10e..4442fe6 100644 --- a/src/xkb/XKBGetMap.c +++ b/src/xkb/XKBGetMap.c @@ -25,7 +25,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/X11/XKBGetMap.c,v 1.7 2003/02/04 03:49:33 dawes Exp $ */ +/* $XFree86: xc/lib/X11/XKBGetMap.c,v 1.10 2003/11/17 22:20:09 dawes Exp $ */ #define NEED_REPLIES #define NEED_EVENTS @@ -35,14 +35,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "XKBlibint.h" static Status -#if NeedFunctionPrototypes _XkbReadKeyTypes(XkbReadBufferPtr buf,XkbDescPtr xkb,xkbGetMapReply *rep) -#else -_XkbReadKeyTypes(buf,xkb,rep) - XkbReadBufferPtr buf; - XkbDescPtr xkb; - xkbGetMapReply * rep; -#endif { int i,n,lastMapCount; XkbKeyTypePtr type; @@ -152,14 +145,7 @@ XkbKeyTypePtr type; } static Status -#if NeedFunctionPrototypes _XkbReadKeySyms(XkbReadBufferPtr buf,XkbDescPtr xkb,xkbGetMapReply *rep) -#else -_XkbReadKeySyms(buf,xkb,rep) - XkbReadBufferPtr buf; - XkbDescPtr xkb; - xkbGetMapReply * rep; -#endif { register int i; XkbClientMapPtr map; @@ -254,14 +240,7 @@ XkbClientMapPtr map; } static Status -#if NeedFunctionPrototypes _XkbReadKeyActions(XkbReadBufferPtr buf,XkbDescPtr info,xkbGetMapReply *rep) -#else -_XkbReadKeyActions(buf,info,rep) - XkbReadBufferPtr buf; - XkbDescPtr info; - xkbGetMapReply * rep; -#endif { int i; CARD8 numDescBuf[248]; @@ -313,14 +292,7 @@ done: } static Status -#if NeedFunctionPrototypes _XkbReadKeyBehaviors(XkbReadBufferPtr buf,XkbDescPtr xkb,xkbGetMapReply *rep) -#else -_XkbReadKeyBehaviors(buf,xkb,rep) - XkbReadBufferPtr buf; - XkbDescPtr xkb; - xkbGetMapReply * rep; -#endif { register int i; xkbBehaviorWireDesc *wire; @@ -349,14 +321,7 @@ xkbBehaviorWireDesc *wire; } static Status -#if NeedFunctionPrototypes _XkbReadVirtualMods(XkbReadBufferPtr buf,XkbDescPtr xkb,xkbGetMapReply *rep) -#else -_XkbReadVirtualMods(buf,xkb,rep) - XkbReadBufferPtr buf; - XkbDescPtr xkb; - xkbGetMapReply * rep; -#endif { if ( rep->virtualMods ) { register int i,bit,nVMods; @@ -380,16 +345,9 @@ _XkbReadVirtualMods(buf,xkb,rep) } static Status -#if NeedFunctionPrototypes _XkbReadExplicitComponents( XkbReadBufferPtr buf, XkbDescPtr xkb, xkbGetMapReply * rep) -#else -_XkbReadExplicitComponents(buf,xkb,rep) - XkbReadBufferPtr buf; - XkbDescPtr xkb; - xkbGetMapReply * rep; -#endif { register int i; unsigned char *wire; @@ -417,14 +375,7 @@ unsigned char *wire; } static Status -#if NeedFunctionPrototypes _XkbReadModifierMap(XkbReadBufferPtr buf,XkbDescPtr xkb,xkbGetMapReply *rep) -#else -_XkbReadModifierMap(buf,xkb,rep) - XkbReadBufferPtr buf; - XkbDescPtr xkb; - xkbGetMapReply * rep; -#endif { register int i; unsigned char *wire; @@ -449,14 +400,7 @@ unsigned char *wire; } static Status -#if NeedFunctionPrototypes _XkbReadVirtualModMap(XkbReadBufferPtr buf,XkbDescPtr xkb,xkbGetMapReply *rep) -#else -_XkbReadVirtualModMap(buf,xkb,rep) - XkbReadBufferPtr buf; - XkbDescPtr xkb; - xkbGetMapReply * rep; -#endif { register int i; xkbVModMapWireDesc * wire; @@ -488,13 +432,7 @@ XkbServerMapPtr srv; } static xkbGetMapReq * -#if NeedFunctionPrototypes _XkbGetGetMapReq(Display *dpy,XkbDescPtr xkb) -#else -_XkbGetGetMapReq(dpy,xkb) - Display * dpy; - XkbDescPtr xkb; -#endif { xkbGetMapReq *req; @@ -515,18 +453,10 @@ xkbGetMapReq *req; } Status -#if NeedFunctionPrototypes _XkbReadGetMapReply( Display * dpy, xkbGetMapReply *rep, XkbDescPtr xkb, int * nread_rtrn) -#else -_XkbReadGetMapReply(dpy,rep,xkb,nread_rtrn) - Display * dpy; - xkbGetMapReply * rep; - XkbDescPtr xkb; - int * nread_rtrn; -#endif { int extraData; unsigned mask; @@ -581,13 +511,7 @@ unsigned mask; } static Status -#if NeedFunctionPrototypes _XkbHandleGetMapReply(Display *dpy,XkbDescPtr xkb) -#else -_XkbHandleGetMapReply(dpy,xkb) - Display * dpy; - XkbDescPtr xkb; -#endif { xkbGetMapReply rep; @@ -600,14 +524,7 @@ xkbGetMapReply rep; } Status -#if NeedFunctionPrototypes XkbGetUpdatedMap(Display *dpy,unsigned which,XkbDescPtr xkb) -#else -XkbGetUpdatedMap(dpy,which,xkb) - Display * dpy; - unsigned which; - XkbDescPtr xkb; -#endif { if ((dpy->flags & XlibDisplayNoXkb) || (!dpy->xkb_info && !XkbUseExtension(dpy,NULL,NULL))) @@ -630,14 +547,7 @@ XkbGetUpdatedMap(dpy,which,xkb) } XkbDescPtr -#if NeedFunctionPrototypes XkbGetMap(Display *dpy,unsigned which,unsigned deviceSpec) -#else -XkbGetMap(dpy,which,deviceSpec) - Display *dpy; - unsigned which; - unsigned deviceSpec; -#endif { XkbDescPtr xkb; @@ -660,15 +570,7 @@ XkbDescPtr xkb; } Status -#if NeedFunctionPrototypes XkbGetKeyTypes(Display *dpy,unsigned first,unsigned num,XkbDescPtr xkb) -#else -XkbGetKeyTypes(dpy,first,num,xkb) - Display *dpy; - unsigned first; - unsigned num; - XkbDescPtr xkb; -#endif { register xkbGetMapReq *req; Status status; @@ -692,15 +594,7 @@ XkbGetKeyTypes(dpy,first,num,xkb) } Status -#if NeedFunctionPrototypes XkbGetKeyActions(Display *dpy,unsigned first,unsigned num,XkbDescPtr xkb) -#else -XkbGetKeyActions(dpy,first,num,xkb) - Display *dpy; - unsigned first; - unsigned num; - XkbDescPtr xkb; -#endif { register xkbGetMapReq *req; Status status; @@ -725,15 +619,7 @@ XkbGetKeyActions(dpy,first,num,xkb) } Status -#if NeedFunctionPrototypes XkbGetKeySyms(Display *dpy,unsigned first,unsigned num,XkbDescPtr xkb) -#else -XkbGetKeySyms(dpy,first,num,xkb) - Display *dpy; - unsigned first; - unsigned num; - XkbDescPtr xkb; -#endif { register xkbGetMapReq *req; Status status; @@ -759,15 +645,7 @@ XkbGetKeySyms(dpy,first,num,xkb) } Status -#if NeedFunctionPrototypes XkbGetKeyBehaviors(Display *dpy,unsigned first,unsigned num,XkbDescPtr xkb) -#else -XkbGetKeyBehaviors(dpy,first,num,xkb) - Display * dpy; - unsigned first; - unsigned num; - XkbDescPtr xkb; -#endif { register xkbGetMapReq *req; Status status; @@ -792,14 +670,7 @@ XkbGetKeyBehaviors(dpy,first,num,xkb) } Status -#if NeedFunctionPrototypes XkbGetVirtualMods(Display *dpy,unsigned which,XkbDescPtr xkb) -#else -XkbGetVirtualMods(dpy,which,xkb) - Display * dpy; - unsigned which; - XkbDescPtr xkb; -#endif { register xkbGetMapReq *req; Status status; @@ -820,18 +691,10 @@ XkbGetVirtualMods(dpy,which,xkb) } Status -#if NeedFunctionPrototypes XkbGetKeyExplicitComponents( Display * dpy, unsigned first, unsigned num, XkbDescPtr xkb) -#else -XkbGetKeyExplicitComponents(dpy,first,num,xkb) - Display *dpy; - unsigned first; - unsigned num; - XkbDescPtr xkb; -#endif { register xkbGetMapReq *req; Status status; @@ -860,15 +723,7 @@ XkbGetKeyExplicitComponents(dpy,first,num,xkb) } Status -#if NeedFunctionPrototypes XkbGetKeyModifierMap(Display *dpy,unsigned first,unsigned num,XkbDescPtr xkb) -#else -XkbGetKeyModifierMap(dpy,first,num,xkb) - Display * dpy; - unsigned first; - unsigned num; - XkbDescPtr xkb; -#endif { register xkbGetMapReq *req; Status status; @@ -897,15 +752,7 @@ XkbGetKeyModifierMap(dpy,first,num,xkb) } Status -#if NeedFunctionPrototypes XkbGetKeyVirtualModMap(Display *dpy,unsigned first,unsigned num,XkbDescPtr xkb) -#else -XkbGetKeyVirtualModMap(dpy,first,num,xkb) - Display *dpy; - unsigned first; - unsigned num; - XkbDescPtr xkb; -#endif { register xkbGetMapReq *req; Status status; @@ -934,14 +781,7 @@ XkbGetKeyVirtualModMap(dpy,first,num,xkb) } Status -#if NeedFunctionPrototypes XkbGetMapChanges(Display *dpy,XkbDescPtr xkb,XkbMapChangesPtr changes) -#else -XkbGetMapChanges(dpy,xkb,changes) - Display * dpy; - XkbDescPtr xkb; - XkbMapChangesPtr changes; -#endif { xkbGetMapReq *req; diff --git a/src/xkb/XKBList.c b/src/xkb/XKBList.c index 9f521a6..1f2b6e9 100644 --- a/src/xkb/XKBList.c +++ b/src/xkb/XKBList.c @@ -24,6 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ +/* $XFree86: xc/lib/X11/XKBList.c,v 1.2 2003/11/17 22:20:09 dawes Exp $ */ #define NEED_REPLIES #define NEED_EVENTS @@ -35,13 +36,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. /***====================================================================***/ static void -#if NeedFunctionPrototypes _FreeComponentNames(int num,XkbComponentNamePtr names) -#else -_FreeComponentNames(num,names) - int num; - XkbComponentNamePtr names; -#endif { int i; XkbComponentNamePtr tmp; @@ -61,14 +56,7 @@ XkbComponentNamePtr tmp; /***====================================================================***/ static XkbComponentNamePtr -#if NeedFunctionPrototypes _ReadListing(XkbReadBufferPtr buf,int count,Status *status_rtrn) -#else -_ReadListing(buf,count,status_rtrn) - XkbReadBufferPtr buf; - int count; - Status * status_rtrn; -#endif { XkbComponentNamePtr first,this; register int i; @@ -104,18 +92,10 @@ BAILOUT: /***====================================================================***/ XkbComponentListPtr -#if NeedFunctionPrototypes XkbListComponents( Display * dpy, unsigned deviceSpec, XkbComponentNamesPtr ptrns, int * max_inout) -#else -XkbListComponents(dpy,deviceSpec,ptrns,max_inout) - Display * dpy; - unsigned deviceSpec; - XkbComponentNamesPtr ptrns; - int * max_inout; -#endif { register xkbListComponentsReq* req; xkbListComponentsReply rep; @@ -246,12 +226,7 @@ BAILOUT: } void -#if NeedFunctionPrototypes XkbFreeComponentList(XkbComponentListPtr list) -#else -XkbFreeComponentList(list) - XkbComponentListPtr list; -#endif { if (list) { if (list->keymaps) diff --git a/src/xkb/XKBMAlloc.c b/src/xkb/XKBMAlloc.c index 29cdc3c..20def46 100644 --- a/src/xkb/XKBMAlloc.c +++ b/src/xkb/XKBMAlloc.c @@ -24,7 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/X11/XKBMAlloc.c,v 3.11 2001/01/17 19:41:48 dawes Exp $ */ +/* $XFree86: xc/lib/X11/XKBMAlloc.c,v 3.12 2003/11/17 22:20:09 dawes Exp $ */ #ifndef XKB_IN_SERVER @@ -54,14 +54,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. /***====================================================================***/ Status -#if NeedFunctionPrototypes XkbAllocClientMap(XkbDescPtr xkb,unsigned which,unsigned nTotalTypes) -#else -XkbAllocClientMap(xkb,which,nTotalTypes) - XkbDescPtr xkb; - unsigned which; - unsigned nTotalTypes; -#endif { register int i; XkbClientMapPtr map; @@ -144,14 +137,7 @@ fprintf(stderr,"bad keycode (%d,%d) in XkbAllocClientMap\n", } Status -#if NeedFunctionPrototypes XkbAllocServerMap(XkbDescPtr xkb,unsigned which,unsigned nNewActions) -#else -XkbAllocServerMap(xkb,which,nNewActions) - XkbDescPtr xkb; - unsigned which; - unsigned nNewActions; -#endif { register int i; XkbServerMapPtr map; @@ -245,13 +231,7 @@ XkbServerMapPtr map; /***====================================================================***/ Status -#if NeedFunctionPrototypes XkbCopyKeyType(XkbKeyTypePtr from,XkbKeyTypePtr into) -#else -XkbCopyKeyType(from,into) - XkbKeyTypePtr from; - XkbKeyTypePtr into; -#endif { if ((!from)||(!into)) return BadMatch; @@ -292,14 +272,7 @@ XkbCopyKeyType(from,into) } Status -#if NeedFunctionPrototypes XkbCopyKeyTypes(XkbKeyTypePtr from,XkbKeyTypePtr into,int num_types) -#else -XkbCopyKeyTypes(from,into,num_types) - XkbKeyTypePtr from; - XkbKeyTypePtr into; - int num_types; -#endif { register int i,rtrn; @@ -313,20 +286,11 @@ register int i,rtrn; } XkbKeyTypePtr -#if NeedFunctionPrototypes XkbAddKeyType( XkbDescPtr xkb, Atom name, int map_count, Bool want_preserve, int num_lvls) -#else -XkbAddKeyType(xkb,name,map_count,want_preserve,num_lvls) - XkbDescPtr xkb; - Atom name; - int map_count; - Bool want_preserve; - int num_lvls; -#endif { register int i; unsigned tmp; @@ -397,20 +361,11 @@ XkbClientMapPtr map; } Status -#if NeedFunctionPrototypes XkbResizeKeyType( XkbDescPtr xkb, int type_ndx, int map_count, Bool want_preserve, int new_num_lvls) -#else -XkbResizeKeyType(xkb,type_ndx,map_count,want_preserve,new_num_lvls) - XkbDescPtr xkb; - int type_ndx; - int map_count; - Bool want_preserve; - int new_num_lvls; -#endif { XkbKeyTypePtr type; KeyCode matchingKeys[XkbMaxKeyCount],nMatchingKeys; @@ -604,14 +559,7 @@ KeyCode matchingKeys[XkbMaxKeyCount],nMatchingKeys; } KeySym * -#if NeedFunctionPrototypes XkbResizeKeySyms(XkbDescPtr xkb,int key,int needed) -#else -XkbResizeKeySyms(xkb,key,needed) - XkbDescPtr xkb; - int key; - int needed; -#endif { register int i,nSyms,nKeySyms; unsigned nOldSyms; @@ -666,20 +614,11 @@ KeySym *newSyms; } static unsigned -#if NeedFunctionPrototypes _ExtendRange( unsigned int old_flags, unsigned int flag, KeyCode newKC, KeyCode * old_min, unsigned char * old_num) -#else -_ExtendRange(old_flags,flag,newKC,old_min,old_num) - unsigned int old_flags; - unsigned int flag; - KeyCode newKC; - KeyCode * old_min; - unsigned char * old_num; -#endif { if ((old_flags&flag)==0) { old_flags|= flag; @@ -700,18 +639,10 @@ _ExtendRange(old_flags,flag,newKC,old_min,old_num) } Status -#if NeedFunctionPrototypes XkbChangeKeycodeRange( XkbDescPtr xkb, int minKC, int maxKC, XkbChangesPtr changes) -#else -XkbChangeKeycodeRange(xkb,minKC,maxKC,changes) - XkbDescPtr xkb; - int minKC; - int maxKC; - XkbChangesPtr changes; -#endif { int tmp; @@ -908,14 +839,7 @@ int tmp; } XkbAction * -#if NeedFunctionPrototypes XkbResizeKeyActions(XkbDescPtr xkb,int key,int needed) -#else -XkbResizeKeyActions(xkb,key,needed) - XkbDescPtr xkb; - int key; - int needed; -#endif { register int i,nActs; XkbAction *newActs; @@ -965,14 +889,7 @@ XkbAction *newActs; } void -#if NeedFunctionPrototypes XkbFreeClientMap(XkbDescPtr xkb,unsigned what,Bool freeMap) -#else -XkbFreeClientMap(xkb,what,freeMap) - XkbDescPtr xkb; - unsigned what; - Bool freeMap; -#endif { XkbClientMapPtr map; @@ -1030,14 +947,7 @@ XkbClientMapPtr map; } void -#if NeedFunctionPrototypes XkbFreeServerMap(XkbDescPtr xkb,unsigned what,Bool freeMap) -#else -XkbFreeServerMap(xkb,what,freeMap) - XkbDescPtr xkb; - unsigned what; - Bool freeMap; -#endif { XkbServerMapPtr map; diff --git a/src/xkb/XKBMisc.c b/src/xkb/XKBMisc.c index f3de929..06660ff 100644 --- a/src/xkb/XKBMisc.c +++ b/src/xkb/XKBMisc.c @@ -24,7 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/X11/XKBMisc.c,v 3.5 2001/10/28 03:32:33 tsi Exp $ */ +/* $XFree86: xc/lib/X11/XKBMisc.c,v 3.6 2003/11/17 22:20:09 dawes Exp $ */ #ifndef XKB_IN_SERVER @@ -102,14 +102,7 @@ static XkbKeyTypeRec canonicalTypes[XkbNumRequiredTypes] = { }; Status -#if NeedFunctionPrototypes XkbInitCanonicalKeyTypes(XkbDescPtr xkb,unsigned which,int keypadVMod) -#else -XkbInitCanonicalKeyTypes(xkb,which,keypadVMod) - XkbDescPtr xkb; - unsigned which; - int keypadVMod; -#endif { XkbClientMapPtr map; XkbKeyTypePtr from,to; @@ -159,23 +152,12 @@ Status rtrn; #define XKB_OFFSET(g,l) (((g)*groupsWidth)+(l)) int -#if NeedFunctionPrototypes XkbKeyTypesForCoreSymbols( XkbDescPtr xkb, int map_width, KeySym * core_syms, unsigned int protected, int * types_inout, KeySym * xkb_syms_rtrn) -#else -XkbKeyTypesForCoreSymbols(xkb,map_width,core_syms,protected,types_inout, - xkb_syms_rtrn) - XkbDescPtr xkb; - int map_width; - KeySym * core_syms; - unsigned int protected; - int * types_inout; - KeySym * xkb_syms_rtrn; -#endif { register int i; unsigned int empty; @@ -340,18 +322,10 @@ int nGroups,tmp,groupsWidth; } static XkbSymInterpretPtr -#if NeedFunctionPrototypes _XkbFindMatchingInterp( XkbDescPtr xkb, KeySym sym, unsigned int real_mods, unsigned int level) -#else -_XkbFindMatchingInterp(xkb,sym,real_mods,level) - XkbDescPtr xkb; - KeySym sym; - unsigned int real_mods; - unsigned int level; -#endif { register unsigned i; XkbSymInterpretPtr interp,rtrn; @@ -399,14 +373,7 @@ CARD8 mods; } static void -#if NeedFunctionPrototypes _XkbAddKeyChange(KeyCode *pFirst,unsigned char *pNum,KeyCode newKey) -#else -_XkbAddKeyChange(pFirst,pNum,newKey) - KeyCode * pFirst; - unsigned char * pNum; - KeyCode newKey; -#endif { KeyCode last; @@ -422,14 +389,7 @@ KeyCode last; } static void -#if NeedFunctionPrototypes _XkbSetActionKeyMods(XkbDescPtr xkb,XkbAction *act,unsigned mods) -#else -_XkbSetActionKeyMods(xkb,act,mods) - XkbDescPtr xkb; - XkbAction * act; - unsigned mods; -#endif { unsigned tmp; @@ -457,14 +417,7 @@ unsigned tmp; #define IBUF_SIZE 8 Bool -#if NeedFunctionPrototypes XkbApplyCompatMapToKey(XkbDescPtr xkb,KeyCode key,XkbChangesPtr changes) -#else -XkbApplyCompatMapToKey(xkb,key,changes) - XkbDescPtr xkb; - KeyCode key; - XkbChangesPtr changes; -#endif { KeySym * syms; unsigned char explicit,mods; @@ -613,22 +566,12 @@ unsigned changed,tmp; } Bool -#if NeedFunctionPrototypes XkbUpdateMapFromCore( XkbDescPtr xkb, KeyCode first_key, int num_keys, int map_width, KeySym * core_keysyms, XkbChangesPtr changes) -#else -XkbUpdateMapFromCore(xkb,first_key,num_keys,map_width,core_keysyms,changes) - XkbDescPtr xkb; - KeyCode first_key; - int num_keys; - int map_width; - KeySym * core_keysyms; - XkbChangesPtr changes; -#endif { register int key,last_key; KeySym * syms; @@ -705,22 +648,12 @@ KeySym * syms; } Status -#if NeedFunctionPrototypes XkbChangeTypesOfKey( XkbDescPtr xkb, int key, int nGroups, unsigned groups, int * newTypesIn, XkbMapChangesPtr changes) -#else -XkbChangeTypesOfKey(xkb,key,nGroups,groups,newTypesIn,changes) - XkbDescPtr xkb; - int key; - int nGroups; - unsigned groups; - int * newTypesIn; - XkbMapChangesPtr changes; -#endif { XkbKeyTypePtr pOldType,pNewType; register int i; @@ -839,14 +772,7 @@ int width,nOldGroups,oldWidth,newTypes[XkbNumKbdGroups]; /***====================================================================***/ Bool -#if NeedFunctionPrototypes XkbVirtualModsToReal(XkbDescPtr xkb,unsigned virtual_mask,unsigned *mask_rtrn) -#else -XkbVirtualModsToReal(xkb,virtual_mask,mask_rtrn) - XkbDescPtr xkb; - unsigned virtual_mask; - unsigned * mask_rtrn; -#endif { register int i,bit; register unsigned mask; @@ -870,14 +796,7 @@ register unsigned mask; /***====================================================================***/ Bool -#if NeedFunctionPrototypes XkbUpdateActionVirtualMods(XkbDescPtr xkb,XkbAction *act,unsigned changed) -#else -XkbUpdateActionVirtualMods(xkb,act,changed) - XkbDescPtr xkb; - XkbAction * act; - unsigned changed; -#endif { unsigned int tmp; @@ -903,18 +822,10 @@ unsigned int tmp; } void -#if NeedFunctionPrototypes XkbUpdateKeyTypeVirtualMods( XkbDescPtr xkb, XkbKeyTypePtr type, unsigned int changed, XkbChangesPtr changes) -#else -XkbUpdateKeyTypeVirtualMods(xkb,type,changed,changes) - XkbDescPtr xkb; - XkbKeyTypePtr type; - unsigned int changed; - XkbChangesPtr changes; -#endif { register unsigned int i; unsigned int mask; @@ -959,14 +870,7 @@ unsigned int mask; } Bool -#if NeedFunctionPrototypes XkbApplyVirtualModChanges(XkbDescPtr xkb,unsigned changed,XkbChangesPtr changes) -#else -XkbApplyVirtualModChanges(xkb,changed,changes) - XkbDescPtr xkb; - unsigned changed; - XkbChangesPtr changes; -#endif { register int i; unsigned int checkState = 0; diff --git a/src/xkb/XKBNames.c b/src/xkb/XKBNames.c index a072bf8..9e8326d 100644 --- a/src/xkb/XKBNames.c +++ b/src/xkb/XKBNames.c @@ -24,28 +24,21 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/X11/XKBNames.c,v 1.4 2001/10/28 03:32:33 tsi Exp $ */ +/* $XFree86: xc/lib/X11/XKBNames.c,v 1.6 2003/11/17 22:20:09 dawes Exp $ */ #define NEED_REPLIES #define NEED_EVENTS +#define NEED_MAP_READERS #include "Xlibint.h" #include <X11/extensions/XKBproto.h> #include "XKBlibint.h" static Status -#if NeedFunctionPrototypes _XkbReadAtoms( XkbReadBufferPtr buf, Atom * atoms, int maxAtoms, CARD32 present) -#else -_XkbReadAtoms(buf,atoms,maxAtoms,present) - XkbReadBufferPtr buf; - Atom *atoms; - int maxAtoms; - CARD32 present; -#endif { register int i,bit; @@ -60,18 +53,10 @@ register int i,bit; } Status -#if NeedFunctionPrototypes _XkbReadGetNamesReply( Display * dpy, xkbGetNamesReply * rep, XkbDescPtr xkb, int * nread_rtrn) -#else -_XkbReadGetNamesReply(dpy,rep,xkb,nread_rtrn) - Display * dpy; - xkbGetNamesReply * rep; - XkbDescPtr xkb; - int * nread_rtrn; -#endif { int i,len; XkbReadBufferRec buf; @@ -244,14 +229,7 @@ BAILOUT: } Status -#if NeedFunctionPrototypes XkbGetNames(Display *dpy,unsigned which,XkbDescPtr xkb) -#else -XkbGetNames(dpy,which,xkb) - Display * dpy; - unsigned which; - XkbDescPtr xkb; -#endif { register xkbGetNamesReq *req; xkbGetNamesReply rep; @@ -291,13 +269,7 @@ XkbGetNames(dpy,which,xkb) /***====================================================================***/ static int -#if NeedFunctionPrototypes _XkbCountBits(int nBitsMax,unsigned long mask) -#else -_XkbCountBits(nBitsMax,mask) - int nBitsMax; - unsigned long mask; -#endif { register unsigned long y, nBits; @@ -310,14 +282,7 @@ register unsigned long y, nBits; } static CARD32 -#if NeedFunctionPrototypes _XkbCountAtoms(Atom *atoms,int maxAtoms,int *count) -#else -_XkbCountAtoms(atoms,maxAtoms,count) - Atom *atoms; - int maxAtoms; - int *count; -#endif { register unsigned int i,bit,nAtoms; register CARD32 atomsPresent; @@ -334,15 +299,7 @@ register CARD32 atomsPresent; } static void -#if NeedFunctionPrototypes _XkbCopyAtoms(Display *dpy,Atom *atoms,CARD32 mask,int maxAtoms) -#else -_XkbCopyAtoms(dpy,atoms,mask,maxAtoms) - Display * dpy; - Atom * atoms; - CARD32 mask; - int maxAtoms; -#endif { register unsigned int i,bit; @@ -354,20 +311,11 @@ register unsigned int i,bit; } Bool -#if NeedFunctionPrototypes XkbSetNames( Display * dpy, unsigned int which, unsigned int firstType, unsigned int nTypes, XkbDescPtr xkb) -#else -XkbSetNames(dpy,which,firstType,nTypes,xkb) - Display * dpy; - unsigned int which; - unsigned int firstType; - unsigned int nTypes; - XkbDescPtr xkb; -#endif { register xkbSetNamesReq *req; int nLvlNames = 0; @@ -589,14 +537,7 @@ XkbSetNames(dpy,which,firstType,nTypes,xkb) } Bool -#if NeedFunctionPrototypes XkbChangeNames(Display *dpy,XkbDescPtr xkb,XkbNameChangesPtr changes) -#else -XkbChangeNames(dpy,xkb,changes) - Display * dpy; - XkbDescPtr xkb; - XkbNameChangesPtr changes; -#endif { register xkbSetNamesReq *req; int nLvlNames = 0; @@ -852,16 +793,9 @@ XkbChangeNames(dpy,xkb,changes) } void -#if NeedFunctionPrototypes XkbNoteNameChanges( XkbNameChangesPtr old, XkbNamesNotifyEvent * new, unsigned int wanted) -#else -XkbNoteNameChanges(old,new,wanted) - XkbNameChangesPtr old; - XkbNamesNotifyEvent * new; - unsigned int wanted; -#endif { int first,last,old_last,new_last; diff --git a/src/xkb/XKBRdBuf.c b/src/xkb/XKBRdBuf.c index 5e962b1..8f688c0 100644 --- a/src/xkb/XKBRdBuf.c +++ b/src/xkb/XKBRdBuf.c @@ -24,7 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/X11/XKBRdBuf.c,v 1.2 2001/10/28 03:32:33 tsi Exp $ */ +/* $XFree86: xc/lib/X11/XKBRdBuf.c,v 1.3 2003/11/17 22:20:10 dawes Exp $ */ #include <stdio.h> #define NEED_REPLIES @@ -36,14 +36,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. /***====================================================================***/ int -#if NeedFunctionPrototypes _XkbInitReadBuffer(Display *dpy,XkbReadBufferPtr buf,int size) -#else -_XkbInitReadBuffer(dpy,buf,size) - Display *dpy; - XkbReadBufferPtr buf; - int size; -#endif { if ((dpy!=NULL) && (buf!=NULL) && (size>0)) { buf->error= 0; @@ -60,13 +53,7 @@ _XkbInitReadBuffer(dpy,buf,size) #define _XkbReadBufferDataLeft(b) (((b)->size)-((b)->data-(b)->start)) int -#if NeedFunctionPrototypes _XkbSkipReadBufferData(XkbReadBufferPtr from,int size) -#else -_XkbSkipReadBufferData(from,size) - XkbReadBufferPtr from; - int size; -#endif { if (size==0) return 1; @@ -78,14 +65,7 @@ _XkbSkipReadBufferData(from,size) } int -#if NeedFunctionPrototypes _XkbCopyFromReadBuffer(XkbReadBufferPtr from,char *to,int size) -#else -_XkbCopyFromReadBuffer(from,to,size) - XkbReadBufferPtr from; - char *to; - int size; -#endif { if (size==0) return 1; @@ -99,14 +79,7 @@ _XkbCopyFromReadBuffer(from,to,size) #ifdef XKB_FORCE_INT_KEYSYM int -#if NeedFunctionPrototypes _XkbReadCopyKeySyms(int *wire,KeySym *to,int num_words) -#else -_XkbReadCopyKeySyms(wire,to,num_words) - int * wire; - KeySym * to; - int num_words; -#endif { while (num_words-->0) { *to++= *wire++; @@ -115,14 +88,7 @@ _XkbReadCopyKeySyms(wire,to,num_words) } int -#if NeedFunctionPrototypes _XkbReadBufferCopyKeySyms(XkbReadBufferPtr from,KeySym *to,int num_words) -#else -_XkbReadBufferCopyKeySyms(from,to,num_words) - XkbReadBufferPtr from; - KeySym * to; - int num_words; -#endif { if ((unsigned)(num_words*4)>_XkbReadBufferDataLeft(from)) return 0; @@ -132,14 +98,7 @@ _XkbReadBufferCopyKeySyms(from,to,num_words) } int -#if NeedFunctionPrototypes _XkbWriteCopyKeySyms (register KeySym *from,CARD32 *to,int len) -#else -_XkbWriteCopyKeySyms (from,to,len) - register KeySym * from; - CARD32 * to; - int len; -#endif { while (len-->0) { @@ -151,14 +110,7 @@ _XkbWriteCopyKeySyms (from,to,len) #ifdef LONG64 int -#if NeedFunctionPrototypes _XkbReadCopyData32(int *wire,long *to,int num_words) -#else -_XkbReadCopyData32(wire,to,num_words) - int * wire; - long * to; - int num_words; -#endif { while (num_words-->0) { *to++= *wire++; @@ -168,14 +120,7 @@ _XkbReadCopyData32(wire,to,num_words) #endif #ifdef WORD64 int -#if NeedFunctionPrototypes _XkbReadCopyData32(int *from,long *lp,int num_words) -#else -_XkbReadCopyData32(from,lp,num_words) - int * from; - long * lp; - int num_words; -#endif { long *lpack; long mask32 = 0x00000000ffffffff; @@ -197,14 +142,7 @@ long maskw, i, bits; #if defined(LONG64) || defined(WORD64) int -#if NeedFunctionPrototypes _XkbReadBufferCopy32(XkbReadBufferPtr from,long *to,int num_words) -#else -_XkbReadBufferCopy32(from,to,num_words) - XkbReadBufferPtr from; - long * to; - int num_words; -#endif { if ((unsigned)(num_words*4)>_XkbReadBufferDataLeft(from)) return 0; @@ -216,14 +154,7 @@ _XkbReadBufferCopy32(from,to,num_words) #ifdef LONG64 int -#if NeedFunctionPrototypes _XkbWriteCopyData32 (register unsigned long *from,CARD32 *to,int len) -#else -_XkbWriteCopyData32 (from,to,len) - register unsigned long * from; - CARD32 * to; - int len; -#endif { while (len-->0) { @@ -238,13 +169,7 @@ _XkbWriteCopyData32 Not Implemented Yet for sizeof(int)==8 #endif char * -#if NeedFunctionPrototypes _XkbPeekAtReadBuffer(XkbReadBufferPtr from,int size) -#else -_XkbPeekAtReadBuffer(from,size) - XkbReadBufferPtr from; - int size; -#endif { if ((from==NULL)||(from->error)||(size<1)|| (_XkbReadBufferDataLeft(from)<size)) @@ -253,13 +178,7 @@ _XkbPeekAtReadBuffer(from,size) } char * -#if NeedFunctionPrototypes _XkbGetReadBufferPtr(XkbReadBufferPtr from,int size) -#else -_XkbGetReadBufferPtr(from,size) - XkbReadBufferPtr from; - int size; -#endif { char *ptr; if ((from==NULL)||(from->error)||(size<1)|| @@ -272,12 +191,7 @@ char *ptr; int -#if NeedFunctionPrototypes _XkbFreeReadBuffer(XkbReadBufferPtr buf) -#else -_XkbFreeReadBuffer(buf) - XkbReadBufferPtr buf; -#endif { if ((buf!=NULL) && (buf->start!=NULL)) { int left; @@ -292,13 +206,7 @@ _XkbFreeReadBuffer(buf) } Bool -#if NeedFunctionPrototypes _XkbGetReadBufferCountedString(XkbReadBufferPtr buf,char **rtrn) -#else -_XkbGetReadBufferCountedString(buf,rtrn) - XkbReadBufferPtr buf; - char ** rtrn; -#endif { CARD16 len,*pLen; int left; diff --git a/src/xkb/XKBSetGeom.c b/src/xkb/XKBSetGeom.c index 72d7f3d..d792b5e 100644 --- a/src/xkb/XKBSetGeom.c +++ b/src/xkb/XKBSetGeom.c @@ -24,6 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ +/* $XFree86: xc/lib/X11/XKBSetGeom.c,v 3.6 2003/11/17 22:20:10 dawes Exp $ */ #ifdef DEBUG #include <stdio.h> @@ -48,13 +49,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #define _SizeCountedString(s) ((s)?XkbPaddedSize(2+strlen(s)):4) static char * -#if NeedFunctionPrototypes _WriteCountedString(char *wire,char *str) -#else -_WriteCountedString(wire,str) - char * wire; - char * str; -#endif { CARD16 len,*pLen; @@ -68,12 +63,7 @@ CARD16 len,*pLen; } static int -#if NeedFunctionPrototypes _SizeGeomProperties(XkbGeometryPtr geom) -#else -_SizeGeomProperties(geom) - XkbGeometryPtr geom; -#endif { register int i,size; XkbPropertyPtr prop; @@ -86,12 +76,7 @@ XkbPropertyPtr prop; } static int -#if NeedFunctionPrototypes _SizeGeomColors(XkbGeometryPtr geom) -#else -_SizeGeomColors(geom) - XkbGeometryPtr geom; -#endif { register int i,size; register XkbColorPtr color; @@ -103,12 +88,7 @@ register XkbColorPtr color; } static int -#if NeedFunctionPrototypes _SizeGeomShapes(XkbGeometryPtr geom) -#else -_SizeGeomShapes(geom) - XkbGeometryPtr geom; -#endif { register int i,size; register XkbShapePtr shape; @@ -126,13 +106,7 @@ register XkbShapePtr shape; } static int -#if NeedFunctionPrototypes _SizeGeomDoodads(int num_doodads,XkbDoodadPtr doodad) -#else -_SizeGeomDoodads(num_doodads,doodad) - int num_doodads; - XkbDoodadPtr doodad; -#endif { register int i,size; @@ -150,12 +124,7 @@ register int i,size; } static int -#if NeedFunctionPrototypes _SizeGeomSections(XkbGeometryPtr geom) -#else -_SizeGeomSections(geom) - XkbGeometryPtr geom; -#endif { register int i,size; XkbSectionPtr section; @@ -190,12 +159,7 @@ XkbSectionPtr section; } static int -#if NeedFunctionPrototypes _SizeGeomKeyAliases(XkbGeometryPtr geom) -#else -_SizeGeomKeyAliases(geom) - XkbGeometryPtr geom; -#endif { return geom->num_key_aliases*(2*XkbKeyNameLength); } @@ -203,13 +167,7 @@ _SizeGeomKeyAliases(geom) /***====================================================================***/ static char * -#if NeedFunctionPrototypes _WriteGeomProperties(char *wire,XkbGeometryPtr geom) -#else -_WriteGeomProperties(wire,geom) - char * wire; - XkbGeometryPtr geom; -#endif { register int i; register XkbPropertyPtr prop; @@ -222,13 +180,7 @@ register XkbPropertyPtr prop; } static char * -#if NeedFunctionPrototypes _WriteGeomColors(char *wire,XkbGeometryPtr geom) -#else -_WriteGeomColors(wire,geom) - char * wire; - XkbGeometryPtr geom; -#endif { register int i; register XkbColorPtr color; @@ -240,13 +192,7 @@ register XkbColorPtr color; } static char * -#if NeedFunctionPrototypes _WriteGeomShapes(char *wire,XkbGeometryPtr geom) -#else -_WriteGeomShapes(wire,geom) - char * wire; - XkbGeometryPtr geom; -#endif { int i; XkbShapePtr shape; @@ -286,14 +232,7 @@ xkbShapeWireDesc * shapeWire; } static char * -#if NeedFunctionPrototypes _WriteGeomDoodads(char *wire,int num_doodads,XkbDoodadPtr doodad) -#else -_WriteGeomDoodads(wire,num_doodads,doodad) - char * wire; - int num_doodads; - XkbDoodadPtr doodad; -#endif { register int i; xkbDoodadWireDesc * doodadWire; @@ -340,13 +279,7 @@ xkbDoodadWireDesc * doodadWire; } static char * -#if NeedFunctionPrototypes _WriteGeomOverlay(char *wire,XkbOverlayPtr ol) -#else -_WriteGeomOverlay(wire,ol) - char * wire; - XkbOverlayPtr ol; -#endif { register int r; XkbOverlayRowPtr row; @@ -376,13 +309,7 @@ xkbOverlayWireDesc * olWire; } static char * -#if NeedFunctionPrototypes _WriteGeomSections(char *wire,XkbGeometryPtr geom) -#else -_WriteGeomSections(wire,geom) - char * wire; - XkbGeometryPtr geom; -#endif { register int i; XkbSectionPtr section; @@ -444,13 +371,7 @@ xkbSectionWireDesc * sectionWire; } static char * -#if NeedFunctionPrototypes _WriteGeomKeyAliases(char *wire,XkbGeometryPtr geom) -#else -_WriteGeomKeyAliases(wire,geom) - char * wire; - XkbGeometryPtr geom; -#endif { register int sz; @@ -465,16 +386,8 @@ register int sz; /***====================================================================***/ static Status -#if NeedFunctionPrototypes _SendSetGeometry(Display *dpy,XkbGeometryPtr geom,xkbSetGeometryReq *req) -#else -_SendSetGeometry(dpy,geom,req) - Display * dpy; - XkbGeometryPtr geom; - xkbSetGeometryReq * req; -#endif { -xkbSetGeometryReq tmp; int sz; char * wire,*tbuf; @@ -487,7 +400,6 @@ char * wire,*tbuf; sz+= _SizeGeomDoodads(geom->num_doodads,geom->doodads); sz+= _SizeGeomKeyAliases(geom); req->length+= (sz/4); - tmp= *req; if (sz<BUFSIZE) { BufAlloc(char *,wire,sz); tbuf= NULL; @@ -521,14 +433,7 @@ char * wire,*tbuf; /***====================================================================***/ Status -#if NeedFunctionPrototypes XkbSetGeometry(Display *dpy,unsigned deviceSpec,XkbGeometryPtr geom) -#else -XkbSetGeometry(dpy,deviceSpec,geom) - Display * dpy; - unsigned deviceSpec; - XkbGeometryPtr geom; -#endif { xkbSetGeometryReq *req; Status ret; diff --git a/src/xkb/XKBSetMap.c b/src/xkb/XKBSetMap.c index 331ad40..53bb566 100644 --- a/src/xkb/XKBSetMap.c +++ b/src/xkb/XKBSetMap.c @@ -24,7 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/X11/XKBSetMap.c,v 3.2 2001/01/17 19:41:49 dawes Exp $ */ +/* $XFree86: xc/lib/X11/XKBSetMap.c,v 3.3 2003/11/17 22:20:10 dawes Exp $ */ #include <stdio.h> #define NEED_REPLIES @@ -34,13 +34,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "XKBlibint.h" static int -#if NeedFunctionPrototypes _XkbSizeKeyTypes(XkbDescPtr xkb,xkbSetMapReq *req) -#else -_XkbSizeKeyTypes(xkb,req) - XkbDescPtr xkb; - xkbSetMapReq * req; -#endif { XkbKeyTypePtr map; int i,len; @@ -62,14 +56,7 @@ _XkbSizeKeyTypes(xkb,req) } static void -#if NeedFunctionPrototypes _XkbWriteKeyTypes(Display *dpy,XkbDescPtr xkb,xkbSetMapReq *req) -#else -_XkbWriteKeyTypes(dpy,xkb,req) - Display * dpy; - XkbDescPtr xkb; - xkbSetMapReq * req; -#endif { char * buf; XkbKeyTypePtr type; @@ -115,13 +102,7 @@ _XkbWriteKeyTypes(dpy,xkb,req) } static int -#if NeedFunctionPrototypes _XkbSizeKeySyms(XkbDescPtr xkb,xkbSetMapReq *req) -#else -_XkbSizeKeySyms(xkb,req) - XkbDescPtr xkb; - xkbSetMapReq * req; -#endif { int i,len; unsigned nSyms; @@ -142,14 +123,7 @@ _XkbSizeKeySyms(xkb,req) } static void -#if NeedFunctionPrototypes _XkbWriteKeySyms(Display *dpy,XkbDescPtr xkb,xkbSetMapReq *req) -#else -_XkbWriteKeySyms(dpy,xkb,req) - Display * dpy; - XkbDescPtr xkb; - xkbSetMapReq * req; -#endif { register KeySym * pSym; CARD32 * outSym; @@ -181,13 +155,7 @@ register int i; } static int -#if NeedFunctionPrototypes _XkbSizeKeyActions(XkbDescPtr xkb,xkbSetMapReq *req) -#else -_XkbSizeKeyActions(xkb,req) - XkbDescPtr xkb; - xkbSetMapReq * req; -#endif { int i,len,nActs; @@ -207,14 +175,7 @@ _XkbSizeKeyActions(xkb,req) } static void -#if NeedFunctionPrototypes _XkbWriteKeyActions(Display *dpy,XkbDescPtr xkb,xkbSetMapReq *req) -#else -_XkbWriteKeyActions(dpy,xkb,req) - Display * dpy; - XkbDescPtr xkb; - xkbSetMapReq * req; -#endif { register int i; int n; @@ -245,13 +206,7 @@ _XkbWriteKeyActions(dpy,xkb,req) } static int -#if NeedFunctionPrototypes _XkbSizeKeyBehaviors(XkbDescPtr xkb,xkbSetMapReq *req) -#else -_XkbSizeKeyBehaviors(xkb,req) - XkbDescPtr xkb; - xkbSetMapReq * req; -#endif { register int i,first,last,nFound; @@ -272,14 +227,7 @@ register int i,first,last,nFound; } static void -#if NeedFunctionPrototypes _XkbWriteKeyBehaviors(Display *dpy,XkbDescPtr xkb,xkbSetMapReq *req) -#else -_XkbWriteKeyBehaviors(dpy,xkb,req) - Display * dpy; - XkbDescPtr xkb; - xkbSetMapReq * req; -#endif { register int i,first,last; xkbBehaviorWireDesc * wire; @@ -306,12 +254,7 @@ char * buf; } static unsigned -#if NeedFunctionPrototypes _XkbSizeVirtualMods(xkbSetMapReq *req) -#else -_XkbSizeVirtualMods(req) - xkbSetMapReq * req; -#endif { register int i,bit,nMods; @@ -328,18 +271,10 @@ register int i,bit,nMods; } static void -#if NeedFunctionPrototypes _XkbWriteVirtualMods( Display * dpy, XkbDescPtr xkb, xkbSetMapReq * req, unsigned size) -#else -_XkbWriteVirtualMods(dpy,xkb,req,size) - Display * dpy; - XkbDescPtr xkb; - xkbSetMapReq * req; - unsigned size; -#endif { register int i,bit; CARD8 *vmods; @@ -356,13 +291,7 @@ _XkbWriteVirtualMods(dpy,xkb,req,size) } static int -#if NeedFunctionPrototypes _XkbSizeKeyExplicit(XkbDescPtr xkb,xkbSetMapReq *req) -#else -_XkbSizeKeyExplicit(xkb,req) - XkbDescPtr xkb; - xkbSetMapReq * req; -#endif { register int i,first,last,nFound; @@ -384,14 +313,7 @@ register int i,first,last,nFound; } static void -#if NeedFunctionPrototypes _XkbWriteKeyExplicit(Display *dpy,XkbDescPtr xkb,xkbSetMapReq *req) -#else -_XkbWriteKeyExplicit(dpy,xkb,req) - Display * dpy; - XkbDescPtr xkb; - xkbSetMapReq * req; -#endif { register int i,first,last; CARD8 * wire; @@ -413,13 +335,7 @@ CARD8 * wire; } static int -#if NeedFunctionPrototypes _XkbSizeModifierMap(XkbDescPtr xkb,xkbSetMapReq *req) -#else -_XkbSizeModifierMap(xkb,req) - XkbDescPtr xkb; - xkbSetMapReq * req; -#endif { register int i,first,last,nFound; @@ -441,14 +357,7 @@ register int i,first,last,nFound; } static void -#if NeedFunctionPrototypes _XkbWriteModifierMap(Display *dpy,XkbDescPtr xkb,xkbSetMapReq *req) -#else -_XkbWriteModifierMap(dpy,xkb,req) - Display * dpy; - XkbDescPtr xkb; - xkbSetMapReq * req; -#endif { register int i,first,last; CARD8 * wire; @@ -472,13 +381,7 @@ CARD8 * wire; } static int -#if NeedFunctionPrototypes _XkbSizeVirtualModMap(XkbDescPtr xkb,xkbSetMapReq *req) -#else -_XkbSizeVirtualModMap(xkb,req) - XkbDescPtr xkb; - xkbSetMapReq * req; -#endif { register int i,first,last,nFound; @@ -500,14 +403,7 @@ register int i,first,last,nFound; } static void -#if NeedFunctionPrototypes _XkbWriteVirtualModMap(Display *dpy,XkbDescPtr xkb,xkbSetMapReq *req) -#else -_XkbWriteVirtualModMap(dpy,xkb,req) - Display * dpy; - XkbDescPtr xkb; - xkbSetMapReq * req; -#endif { register int i,first,last; xkbVModMapWireDesc * wire; @@ -531,14 +427,7 @@ xkbVModMapWireDesc * wire; } static void -#if NeedFunctionPrototypes SendSetMap(Display *dpy,XkbDescPtr xkb,xkbSetMapReq *req) -#else -SendSetMap(dpy,xkb,req) - Display * dpy; - XkbDescPtr xkb; - xkbSetMapReq * req; -#endif { xkbSetMapReq tmp; unsigned szMods; @@ -574,14 +463,7 @@ unsigned szMods; } Bool -#if NeedFunctionPrototypes XkbSetMap(Display *dpy,unsigned which,XkbDescPtr xkb) -#else -XkbSetMap(dpy,which,xkb) - Display * dpy; - unsigned which; - XkbDescPtr xkb; -#endif { register xkbSetMapReq * req; XkbInfoPtr xkbi; @@ -651,14 +533,7 @@ XkbClientMapPtr map; } Bool -#if NeedFunctionPrototypes XkbChangeMap(Display *dpy,XkbDescPtr xkb,XkbMapChangesPtr changes) -#else -XkbChangeMap(dpy,xkb,changes) - Display * dpy; - XkbDescPtr xkb; - XkbMapChangesPtr changes; -#endif { register xkbSetMapReq * req; XkbInfoPtr xkbi; diff --git a/src/xkb/XKBUse.c b/src/xkb/XKBUse.c index 9e7966b..bfbb9ff 100644 --- a/src/xkb/XKBUse.c +++ b/src/xkb/XKBUse.c @@ -24,7 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/X11/XKBUse.c,v 3.6 2001/08/13 17:46:02 dawes Exp $ */ +/* $XFree86: xc/lib/X11/XKBUse.c,v 3.8 2003/11/17 22:20:10 dawes Exp $ */ #include <stdio.h> #include <ctype.h> @@ -37,14 +37,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. static Bool _XkbIgnoreExtension = False; void -#if NeedFunctionPrototypes XkbNoteMapChanges(XkbMapChangesPtr old,XkbMapNotifyEvent *new,unsigned wanted) -#else -XkbNoteMapChanges(old,new,wanted) - XkbMapChangesPtr old; - XkbMapNotifyEvent * new; - unsigned int wanted; -#endif { int first,oldLast,newLast; wanted&= new->changed; @@ -183,16 +176,9 @@ XkbNoteMapChanges(old,new,wanted) } void -#if NeedFunctionPrototypes _XkbNoteCoreMapChanges( XkbMapChangesPtr old, XMappingEvent * new, unsigned int wanted) -#else -_XkbNoteCoreMapChanges(old,new,wanted) - XkbMapChangesPtr old; - XMappingEvent * new; - unsigned int wanted; -#endif { int first,oldLast,newLast; @@ -219,14 +205,7 @@ _XkbNoteCoreMapChanges(old,new,wanted) } static Bool -#if NeedFunctionPrototypes wire_to_event(Display *dpy,XEvent *re,xEvent *event) -#else -wire_to_event(dpy,re,event) - Display *dpy; - XEvent *re; - xEvent *event; -#endif { xkbEvent *xkbevent= (xkbEvent *)event; XkbInfoPtr xkbi; @@ -612,12 +591,7 @@ wire_to_event(dpy,re,event) } Bool -#if NeedFunctionPrototypes XkbIgnoreExtension(Bool ignore) -#else -XkbIgnoreExtension(ignore) - Bool ignore; -#endif { if (getenv("XKB_FORCE")!=NULL) { #ifdef DEBUG @@ -635,12 +609,7 @@ XkbIgnoreExtension(ignore) } static void -#if NeedFunctionPrototypes _XkbFreeInfo(Display *dpy) -#else -_XkbFreeInfo(dpy) - Display *dpy; -#endif { XkbInfoPtr xkbi = dpy->xkb_info; if (xkbi) { @@ -651,14 +620,7 @@ _XkbFreeInfo(dpy) } Bool -#if NeedFunctionPrototypes XkbUseExtension(Display *dpy,int *major_rtrn,int *minor_rtrn) -#else -XkbUseExtension(dpy,major_rtrn,minor_rtrn) - Display * dpy; - int * major_rtrn; - int * minor_rtrn; -#endif { xkbUseExtensionReply rep; register xkbUseExtensionReq *req; @@ -669,7 +631,7 @@ XkbUseExtension(dpy,major_rtrn,minor_rtrn) static int debugMsg; static int been_here= 0; - if ( dpy->xkb_info && (!dpy->flags&XlibDisplayNoXkb)) { + if ( dpy->xkb_info && !(dpy->flags & XlibDisplayNoXkb)) { if (major_rtrn) *major_rtrn= dpy->xkb_info->srv_major; if (minor_rtrn) *minor_rtrn= dpy->xkb_info->srv_minor; return True; diff --git a/src/xkb/XKBleds.c b/src/xkb/XKBleds.c index aa6ba3d..41b4f41 100644 --- a/src/xkb/XKBleds.c +++ b/src/xkb/XKBleds.c @@ -24,23 +24,17 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/X11/XKBleds.c,v 1.3 2001/02/21 15:18:03 tsi Exp $ */ +/* $XFree86: xc/lib/X11/XKBleds.c,v 1.5 2003/11/17 22:20:10 dawes Exp $ */ #define NEED_REPLIES #define NEED_EVENTS +#define NEED_MAP_READERS #include "Xlibint.h" #include <X11/extensions/XKBproto.h> #include "XKBlibint.h" Status -#if NeedFunctionPrototypes XkbGetIndicatorState(Display *dpy,unsigned deviceSpec,unsigned *pStateRtrn) -#else -XkbGetIndicatorState(dpy,deviceSpec,pStateRtrn) - Display * dpy; - unsigned int deviceSpec; - unsigned int * pStateRtrn; -#endif { register xkbGetIndicatorStateReq *req; xkbGetIndicatorStateReply rep; @@ -65,18 +59,10 @@ XkbGetIndicatorState(dpy,deviceSpec,pStateRtrn) } Status -#if NeedFunctionPrototypes _XkbReadGetIndicatorMapReply( Display * dpy, xkbGetIndicatorMapReply * rep, XkbDescPtr xkb, int * nread_rtrn) -#else -_XkbReadGetIndicatorMapReply(dpy,rep,xkb,nread_rtrn) - Display * dpy; - xkbGetIndicatorMapReply * rep; - XkbDescPtr xkb; - int * nread_rtrn; -#endif { XkbIndicatorPtr leds; XkbReadBufferRec buf; @@ -123,14 +109,7 @@ XkbReadBufferRec buf; } Bool -#if NeedFunctionPrototypes XkbGetIndicatorMap(Display *dpy,unsigned long which,XkbDescPtr xkb) -#else -XkbGetIndicatorMap(dpy,which,xkb) - Display * dpy; - unsigned long which; - XkbDescPtr xkb; -#endif { register xkbGetIndicatorMapReq * req; xkbGetIndicatorMapReply rep; @@ -170,14 +149,7 @@ XkbGetIndicatorMap(dpy,which,xkb) } Bool -#if NeedFunctionPrototypes XkbSetIndicatorMap(Display *dpy,unsigned long which,XkbDescPtr xkb) -#else -XkbSetIndicatorMap(dpy,which,xkb) - Display * dpy; - unsigned long which; - XkbDescPtr xkb; -#endif { register xkbSetIndicatorMapReq *req; register int i,bit; @@ -222,7 +194,6 @@ XkbSetIndicatorMap(dpy,which,xkb) } Bool -#if NeedFunctionPrototypes XkbGetNamedDeviceIndicator( Display * dpy, unsigned device, unsigned class, @@ -232,19 +203,6 @@ XkbGetNamedDeviceIndicator( Display * dpy, Bool * pStateRtrn, XkbIndicatorMapPtr pMapRtrn, Bool * pRealRtrn) -#else -XkbGetNamedDeviceIndicator(dpy,device,class,id,name,pNdxRtrn,pStateRtrn, - pMapRtrn,pRealRtrn) - Display * dpy; - unsigned device; - unsigned class; - unsigned id; - Atom name; - int * pNdxRtrn; - Bool * pStateRtrn; - XkbIndicatorMapPtr pMapRtrn; - Bool * pRealRtrn; -#endif { register xkbGetNamedIndicatorReq *req; xkbGetNamedIndicatorReply rep; @@ -289,22 +247,12 @@ XkbGetNamedDeviceIndicator(dpy,device,class,id,name,pNdxRtrn,pStateRtrn, } Bool -#if NeedFunctionPrototypes XkbGetNamedIndicator( Display * dpy, Atom name, int * pNdxRtrn, Bool * pStateRtrn, XkbIndicatorMapPtr pMapRtrn, Bool * pRealRtrn) -#else -XkbGetNamedIndicator(dpy,name,pNdxRtrn,pStateRtrn,pMapRtrn,pRealRtrn) - Display * dpy; - Atom name; - int * pNdxRtrn; - Bool * pStateRtrn; - XkbIndicatorMapPtr pMapRtrn; - Bool * pRealRtrn; -#endif { return XkbGetNamedDeviceIndicator(dpy,XkbUseCoreKbd, XkbDfltXIClass,XkbDfltXIId, @@ -313,7 +261,6 @@ XkbGetNamedIndicator(dpy,name,pNdxRtrn,pStateRtrn,pMapRtrn,pRealRtrn) } Bool -#if NeedFunctionPrototypes XkbSetNamedDeviceIndicator( Display * dpy, unsigned device, unsigned class, @@ -323,19 +270,6 @@ XkbSetNamedDeviceIndicator( Display * dpy, Bool state, Bool createNewMap, XkbIndicatorMapPtr pMap) -#else -XkbSetNamedDeviceIndicator(dpy,device,class,id,name,changeState, - state,createNewMap,pMap) - Display * dpy; - unsigned device; - unsigned class; - unsigned id; - Atom name; - Bool changeState; - Bool state; - Bool createNewMap; - XkbIndicatorMapPtr pMap; -#endif { register xkbSetNamedIndicatorReq *req; XkbInfoPtr xkbi; @@ -384,22 +318,12 @@ XkbSetNamedDeviceIndicator(dpy,device,class,id,name,changeState, } Bool -#if NeedFunctionPrototypes XkbSetNamedIndicator( Display * dpy, Atom name, Bool changeState, Bool state, Bool createNewMap, XkbIndicatorMapPtr pMap) -#else -XkbSetNamedIndicator(dpy,name,changeState,state,createNewMap,pMap) - Display * dpy; - Atom name; - Bool changeState; - Bool state; - Bool createNewMap; - XkbIndicatorMapPtr pMap; -#endif { return XkbSetNamedDeviceIndicator(dpy,XkbUseCoreKbd, XkbDfltXIClass,XkbDfltXIId, diff --git a/src/xkb/XKBlibint.h b/src/xkb/XKBlibint.h index b287cf6..06d8d48 100644 --- a/src/xkb/XKBlibint.h +++ b/src/xkb/XKBlibint.h @@ -24,7 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/X11/XKBlibint.h,v 3.4 2001/01/17 19:41:49 dawes Exp $ */ +/* $XFree86: xc/lib/X11/XKBlibint.h,v 3.6 2003/11/17 22:20:10 dawes Exp $ */ #ifndef _XKBLIBINT_H_ #define _XKBLIBINT_H_ @@ -36,28 +36,22 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #define XkbXlibNewKeyboard (1<<1) typedef int (*XkbKSToMBFunc)( -#if NeedFunctionPrototypes XPointer /* priv */, KeySym /* sym */, char * /* buf */, int /* len */, int * /* extra_rtrn */ -#endif ); typedef KeySym (*XkbMBToKSFunc)( -#if NeedFunctionPrototypes XPointer /* priv */, char * /* buf */, int /* len */, Status * /* status */ -#endif ); typedef KeySym (*XkbToUpperFunc)( -#if NeedFunctionPrototypes KeySym /* sym */ -#endif ); typedef struct _XkbConverters { @@ -141,131 +135,103 @@ typedef struct _XkbReadBuffer { _XFUNCPROTOBEGIN extern void _XkbReloadDpy( -#if NeedFunctionPrototypes Display * /* dpy */ -#endif ); extern KeySym _XKeycodeToKeysym( -#if NeedFunctionPrototypes Display* /* display */, +#if NeedWidePrototypes + unsigned int /* keycode */, +#else KeyCode /* keycode */, - int /* index */ #endif + int /* index */ ); extern KeyCode _XKeysymToKeycode( -#if NeedFunctionPrototypes Display* /* display */, KeySym /* keysym */ -#endif ); extern KeySym _XLookupKeysym( -#if NeedFunctionPrototypes XKeyEvent* /* key_event */, int /* index */ -#endif ); extern int _XRefreshKeyboardMapping( -#if NeedFunctionPrototypes XMappingEvent* /* event_map */ -#endif ); extern unsigned _XKeysymToModifiers( -#if NeedFunctionPrototypes Display * /* dpy */, KeySym /* ks */ -#endif ); extern int _XTranslateKey( -#if NeedFunctionPrototypes register Display * /* dpy */, KeyCode /* keycode */, register unsigned int /* modifiers */, unsigned int * /* modifiers_return */, KeySym * /* keysym_return */ -#endif ); extern int _XTranslateKeySym( -#if NeedFunctionPrototypes Display * /* dpy */, register KeySym /* symbol */, unsigned int /* modifiers */, char * /* buffer */, int /* nbytes */ -#endif ); extern int _XLookupString( -#if NeedFunctionPrototypes register XKeyEvent * /* event */, char * /* buffer */, int /* nbytes */, KeySym * /* keysym */, XComposeStatus * /* status */ -#endif ); extern void _XkbNoteCoreMapChanges( -#if NeedFunctionPrototypes XkbMapChangesRec * /* old */, XMappingEvent * /* new */, unsigned int /* wanted */ -#endif ); extern int _XkbInitReadBuffer( -#if NeedFunctionPrototypes Display * /* dpy */, XkbReadBufferPtr /* buf */, int /* size */ -#endif ); extern int _XkbSkipReadBufferData( -#if NeedFunctionPrototypes XkbReadBufferPtr /* from */, int /* size */ -#endif ); extern int _XkbCopyFromReadBuffer( -#if NeedFunctionPrototypes XkbReadBufferPtr /* from */, char * /* to */, int /* size */ -#endif ); #if defined(WORD64) || defined(LONG64) extern int _XkbReadCopyData32( -#if NeedFunctionPrototypes int * /* from */, long * /* to */, int /* num_words */ -#endif ); extern int _XkbWriteCopyData32( -#if NeedFunctionPrototypes unsigned long * /* from */, CARD32 * /* to */, int /* num_words */ -#endif ); extern int _XkbReadBufferCopy32( -#if NeedFunctionPrototypes XkbReadBufferPtr /* from */, long * /* to */, int /* size */ -#endif ); #else #define _XkbReadCopyData32(f,t,s) memcpy((char *)(t),(char *)(f),(s)*4) @@ -279,23 +245,18 @@ extern int _XkbReadBufferCopy32( #ifdef XKB_FORCE_INT_KEYSYM extern int _XkbReadCopyKeySyms( -#if NeedFunctionPrototypes int * /* from */, KeySym * /* to */, int /* num_words */ -#endif ); extern int _XkbWriteCopyKeySyms( -#if NeedFunctionPrototypes KeySym * /* from */, CARD32 * /* to */, int /* num_words */ -#endif ); extern int _XkbReadBufferCopyKeySyms( -#if NeedFunctionPrototypes XkbReadBufferPtr /* from */, #ifndef NO_DEC_BUG_FIX KeySym * /* to */, @@ -303,7 +264,6 @@ extern int _XkbReadBufferCopyKeySyms( long * /* to */, #endif int /* size */ -#endif ); #else #define _XkbReadCopyKeySyms(f,t,n) _XkbReadCopyData32(f,t,n) @@ -312,92 +272,70 @@ extern int _XkbReadBufferCopyKeySyms( #endif extern char *_XkbPeekAtReadBuffer( -#if NeedFunctionPrototypes XkbReadBufferPtr /* from */, int /* size */ -#endif ); extern char *_XkbGetReadBufferPtr( -#if NeedFunctionPrototypes XkbReadBufferPtr /* from */, int /* size */ -#endif ); #define _XkbGetTypedRdBufPtr(b,n,t) ((t *)_XkbGetReadBufferPtr(b,(n)*SIZEOF(t))) extern int _XkbFreeReadBuffer( -#if NeedFunctionPrototypes XkbReadBufferPtr /* buf */ -#endif ); extern Bool _XkbGetReadBufferCountedString( -#if NeedFunctionPrototypes XkbReadBufferPtr /* buf */, char ** /* rtrn */ -#endif ); extern char *_XkbGetCharset( -#if NeedFunctionPrototypes void -#endif ); extern int _XkbGetConverters( -#if NeedFunctionPrototypes char * /* encoding_name */, XkbConverters * /* cvt_rtrn */ -#endif ); #ifdef NEED_MAP_READERS extern Status _XkbReadGetMapReply( -#if NeedFunctionPrototypes Display * /* dpy */, xkbGetMapReply * /* rep */, XkbDescRec * /* xkb */, int * /* nread_rtrn */ -#endif ); extern Status _XkbReadGetCompatMapReply( -#if NeedFunctionPrototypes Display * /* dpy */, xkbGetCompatMapReply * /* rep */, XkbDescPtr /* xkb */, int * /* nread_rtrn */ -#endif ); extern Status _XkbReadGetIndicatorMapReply( -#if NeedFunctionPrototypes Display * /* dpy */, xkbGetIndicatorMapReply * /* rep */, XkbDescPtr /* xkb */, int * /* nread_rtrn */ -#endif ); extern Status _XkbReadGetNamesReply( -#if NeedFunctionPrototypes Display * /* dpy */, xkbGetNamesReply * /* rep */, XkbDescPtr /* xkb */, int * /* nread_rtrn */ -#endif ); extern Status _XkbReadGetGeometryReply( -#if NeedFunctionPrototypes Display * /* dpy */, xkbGetGeometryReply * /* rep */, XkbDescPtr /* xkb */, int * /* nread_rtrn */ -#endif ); #endif diff --git a/src/xlibi18n/ICWrap.c b/src/xlibi18n/ICWrap.c index fcd2563..9b63519 100644 --- a/src/xlibi18n/ICWrap.c +++ b/src/xlibi18n/ICWrap.c @@ -64,16 +64,16 @@ other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/ICWrap.c,v 1.8 2002/11/25 14:04:53 eich Exp $ */ +/* $XFree86: xc/lib/X11/ICWrap.c,v 1.10 2003/04/25 14:12:38 tsi Exp $ */ #define NEED_EVENTS #include "Xlibint.h" #include "Xlcint.h" static int -_XIMNestedListToNestedList(nlist, list) - XIMArg *nlist; /* This is the new list */ - XIMArg *list; /* The original list */ +_XIMNestedListToNestedList( + XIMArg *nlist, /* This is the new list */ + XIMArg *list) /* The original list */ { register XIMArg *ptr = list; @@ -91,9 +91,9 @@ _XIMNestedListToNestedList(nlist, list) } static void -_XIMCountNestedList(args, total_count) - XIMArg *args; - int *total_count; +_XIMCountNestedList( + XIMArg *args, + int *total_count) { for (; args->name; args++) { if (!strcmp(args->name, XNVaNestedList)) @@ -395,9 +395,9 @@ Xutf8ResetIC(ic) XIC ic; { if (ic->core.im) { - if (*ic->methods->utf8_reset) + if (ic->methods->utf8_reset) return (*ic->methods->utf8_reset)(ic); - else if (*ic->methods->mb_reset) + else if (ic->methods->mb_reset) return (*ic->methods->mb_reset)(ic); } return (char *)NULL; @@ -443,10 +443,10 @@ Xutf8LookupString(ic, ev, buffer, nbytes, keysym, status) Status *status; { if (ic->core.im) { - if (*ic->methods->utf8_lookup_string) + if (ic->methods->utf8_lookup_string) return (*ic->methods->utf8_lookup_string) (ic, ev, buffer, nbytes, keysym, status); - else if (*ic->methods->mb_lookup_string) + else if (ic->methods->mb_lookup_string) return (*ic->methods->mb_lookup_string) (ic, ev, buffer, nbytes, keysym, status); } diff --git a/src/xlibi18n/IMWrap.c b/src/xlibi18n/IMWrap.c index b9f8f60..59524a4 100644 --- a/src/xlibi18n/IMWrap.c +++ b/src/xlibi18n/IMWrap.c @@ -57,7 +57,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/IMWrap.c,v 3.8 2001/12/14 19:54:01 dawes Exp $ */ +/* $XFree86: xc/lib/X11/IMWrap.c,v 3.9 2003/11/17 22:20:07 dawes Exp $ */ #include "Xlibint.h" #include "Xlcint.h" @@ -176,7 +176,6 @@ XLocaleOfIM(im) * on-demand input method instantiation. */ Bool -#if NeedFunctionPrototypes XRegisterIMInstantiateCallback( Display *display, XrmDatabase rdb, @@ -184,16 +183,6 @@ XRegisterIMInstantiateCallback( char *res_class, XIDProc callback, XPointer client_data) -#else -XRegisterIMInstantiateCallback( display, rdb, res_name, res_class, callback, - client_data) - Display *display; - XrmDatabase rdb; - char *res_name; - char *res_class; - XIDProc callback; - XPointer client_data; -#endif { XLCd lcd = _XOpenLC( (char *)NULL ); @@ -208,7 +197,6 @@ XRegisterIMInstantiateCallback( display, rdb, res_name, res_class, callback, * Unregister to a input method instantiation callback. */ Bool -#if NeedFunctionPrototypes XUnregisterIMInstantiateCallback( Display *display, XrmDatabase rdb, @@ -216,16 +204,6 @@ XUnregisterIMInstantiateCallback( char *res_class, XIDProc callback, XPointer client_data) -#else -XUnregisterIMInstantiateCallback( display, rdb, res_name, res_class, callback, - client_data ) - Display *display; - XrmDatabase rdb; - char *res_name; - char *res_class; - XIDProc callback; - XPointer client_data; -#endif { XLCd lcd = _XlcCurrentLC(); diff --git a/src/xlibi18n/XDefaultIMIF.c b/src/xlibi18n/XDefaultIMIF.c index bf2e701..5295abe 100644 --- a/src/xlibi18n/XDefaultIMIF.c +++ b/src/xlibi18n/XDefaultIMIF.c @@ -41,7 +41,7 @@ interest in or to any trademark, service mark, logo or trade name of Sun Microsystems, Inc. or its licensors is granted. */ -/* $XFree86: xc/lib/X11/XDefaultIMIF.c,v 1.2 2001/11/19 15:33:38 tsi Exp $ */ +/* $XFree86: xc/lib/X11/XDefaultIMIF.c,v 1.4 2003/11/17 22:20:08 dawes Exp $ */ #include <stdio.h> #define NEED_EVENTS @@ -74,27 +74,19 @@ typedef struct _StaticXIM { } StaticXIMRec; static Status _CloseIM( -#if NeedFunctionPrototypes XIM -#endif ); static char *_SetIMValues( -#if NeedFunctionPrototypes XIM, XIMArg * -#endif ); static char *_GetIMValues( -#if NeedFunctionPrototypes XIM, XIMArg* -#endif ); static XIC _CreateIC( -#if NeedFunctionPrototypes XIM, XIMArg* -#endif ); static _Xconst XIMMethodsRec local_im_methods = { @@ -107,49 +99,31 @@ static _Xconst XIMMethodsRec local_im_methods = { }; static void _DestroyIC( -#if NeedFunctionPrototypes XIC -#endif ); static void _SetFocus( -#if NeedFunctionPrototypes XIC -#endif ); static void _UnsetFocus( -#if NeedFunctionPrototypes XIC -#endif ); static char* _SetICValues( -#if NeedFunctionPrototypes XIC, XIMArg * -#endif ); static char* _GetICValues( -#if NeedFunctionPrototypes XIC, XIMArg * -#endif ); static char *_MbReset( -#if NeedFunctionPrototypes XIC -#endif ); static wchar_t *_WcReset( -#if NeedFunctionPrototypes XIC -#endif ); static int _MbLookupString( -#if NeedFunctionPrototypes XIC, XKeyEvent *, char *, int, KeySym *, Status * -#endif ); static int _WcLookupString( -#if NeedFunctionPrototypes XIC, XKeyEvent *, wchar_t *, int, KeySym *, Status * -#endif ); static _Xconst XICMethodsRec local_ic_methods = { @@ -167,11 +141,12 @@ static _Xconst XICMethodsRec local_ic_methods = { }; XIM -_XDefaultOpenIM(lcd, dpy, rdb, res_name, res_class) -XLCd lcd; -Display *dpy; -XrmDatabase rdb; -char *res_name, *res_class; +_XDefaultOpenIM( + XLCd lcd, + Display *dpy, + XrmDatabase rdb, + char *res_name, + char *res_class) { StaticXIM im; XIMStaticXIMRec *local_impart; @@ -251,8 +226,7 @@ Error2 : } static Status -_CloseIM(xim) -XIM xim; +_CloseIM(XIM xim) { StaticXIM im = (StaticXIM)xim; _XlcCloseConverter(im->private->ctom_conv); @@ -296,10 +270,7 @@ XIMArg *values; } static char* -_SetICValueData(ic, values, mode) -XIC ic; -XIMArg *values; -XICOp_t mode; +_SetICValueData(XIC ic, XIMArg *values, XICOp_t mode) { XIMArg *p; char *return_name = NULL; @@ -325,10 +296,7 @@ XICOp_t mode; } static char* -_GetICValueData(ic, values, mode) -XIC ic; -XIMArg *values; -XICOp_t mode; +_GetICValueData(XIC ic, XIMArg *values, XICOp_t mode) { XIMArg *p; char *return_name = NULL; @@ -355,9 +323,7 @@ XICOp_t mode; } static XIC -_CreateIC(im, arg) -XIM im; -XIMArg *arg; +_CreateIC(XIM im, XIMArg *arg) { XIC ic; @@ -381,9 +347,8 @@ err_return: return ((XIC)NULL); } -static void -_DestroyIC(ic) -XIC ic; +static void +_DestroyIC(XIC ic) { /*BugId4255571. This Xfree() should be removed because XDestroyIC() still need ic after invoking _DestroyIC() and there is a XFree(ic) at the end of XDestroyIC() already. if(ic) @@ -397,15 +362,12 @@ XIC ic; } static void -_UnsetFocus(ic) -XIC ic; +_UnsetFocus(XIC ic) { } static char* -_SetICValues(ic, args) -XIC ic; -XIMArg *args; +_SetICValues(XIC ic, XIMArg *args) { char *ret = NULL; if (!ic) { @@ -416,9 +378,7 @@ XIMArg *args; } static char* -_GetICValues(ic, args) -XIC ic; -XIMArg *args; +_GetICValues(XIC ic, XIMArg *args) { char *ret = NULL; if (!ic) { @@ -429,27 +389,25 @@ XIMArg *args; } static char * -_MbReset(xic) -XIC xic; +_MbReset(XIC xic) { return(NULL); } static wchar_t * -_WcReset(xic) -XIC xic; +_WcReset(XIC xic) { return(NULL); } static int -_MbLookupString(xic, ev, buffer, bytes, keysym, status) -XIC xic; -XKeyEvent *ev; -char * buffer; -int bytes; -KeySym *keysym; -Status *status; +_MbLookupString( + XIC xic, + XKeyEvent *ev, + char * buffer, + int bytes, + KeySym *keysym, + Status *status) { XComposeStatus NotSupportedYet ; int length; @@ -467,13 +425,13 @@ Status *status; } static int -_WcLookupString(xic, ev, buffer, wlen, keysym, status) -XIC xic; -XKeyEvent *ev; -wchar_t * buffer; -int wlen; -KeySym *keysym; -Status *status; +_WcLookupString( + XIC xic, + XKeyEvent *ev, + wchar_t * buffer, + int wlen, + KeySym *keysym, + Status *status) { XComposeStatus NotSupportedYet ; int length; diff --git a/src/xlibi18n/XDefaultOMIF.c b/src/xlibi18n/XDefaultOMIF.c index 15e6b82..ce5e474 100644 --- a/src/xlibi18n/XDefaultOMIF.c +++ b/src/xlibi18n/XDefaultOMIF.c @@ -41,7 +41,7 @@ interest in or to any trademark, service mark, logo or trade name of Sun Microsystems, Inc. or its licensors is granted. */ -/* $XFree86: xc/lib/X11/XDefaultOMIF.c,v 1.3 2002/09/18 17:11:42 tsi Exp $ */ +/* $XFree86: xc/lib/X11/XDefaultOMIF.c,v 1.6 2003/11/17 22:20:09 dawes Exp $ */ #include "Xlibint.h" #include "Xlcint.h" @@ -99,8 +99,8 @@ typedef struct _XOCGenericRec { } XOCGenericRec, *XOCGeneric; static Bool -init_fontset(oc) - XOC oc; +init_fontset( + XOC oc) { XOCGenericPart *gen; FontSet font_set; @@ -123,9 +123,9 @@ init_fontset(oc) } static char * -get_prop_name(dpy, fs) - Display *dpy; - XFontStruct *fs; +get_prop_name( + Display *dpy, + XFontStruct *fs) { unsigned long fp; @@ -136,9 +136,9 @@ get_prop_name(dpy, fs) } static FontData -check_charset(font_set, font_name) - FontSet font_set; - char *font_name; +check_charset( + FontSet font_set, + char *font_name) { FontData font_data; char *last; @@ -165,9 +165,9 @@ check_charset(font_set, font_name) #if 0 /* Unused */ static int -check_fontname(oc, name) -XOC oc; -char *name; +check_fontname( + XOC oc, + char *name) { Display *dpy = oc->core.om->core.display; XOCGenericPart *gen = XOC_GENERIC(oc); @@ -220,8 +220,8 @@ char *name; #endif static Bool -load_font(oc) - XOC oc; +load_font( + XOC oc) { Display *dpy = oc->core.om->core.display; XOCGenericPart *gen = XOC_GENERIC(oc); @@ -238,9 +238,10 @@ load_font(oc) return True; } +#if 0 static Bool -load_font_info(oc) - XOC oc; +load_font_info( + XOC oc) { Display *dpy = oc->core.om->core.display; XOCGenericPart *gen = XOC_GENERIC(oc); @@ -263,10 +264,11 @@ load_font_info(oc) } return True; } +#endif static void -set_fontset_extents(oc) - XOC oc; +set_fontset_extents( + XOC oc) { XRectangle *ink = &oc->core.font_set_extents.max_ink_extent; XRectangle *logical = &oc->core.font_set_extents.max_logical_extent; @@ -293,8 +295,8 @@ set_fontset_extents(oc) } static Bool -init_core_part(oc) - XOC oc; +init_core_part( + XOC oc) { XOCGenericPart *gen = XOC_GENERIC(oc); FontSet font_set; @@ -355,9 +357,9 @@ err: } static char * -get_font_name(oc, pattern) - XOC oc; - char *pattern; +get_font_name( + XOC oc, + char *pattern) { char **list, *name, *prop_name; int count; @@ -388,8 +390,8 @@ get_font_name(oc, pattern) } static int -parse_fontname(oc) - XOC oc; +parse_fontname( + XOC oc) { XOCGenericPart *gen = XOC_GENERIC(oc); FontSet font_set; @@ -550,8 +552,8 @@ err: } static Bool -set_missing_list(oc) - XOC oc; +set_missing_list( + XOC oc) { XOCGenericPart *gen = XOC_GENERIC(oc); FontSet font_set; @@ -592,8 +594,8 @@ set_missing_list(oc) } static Bool -create_fontset(oc) - XOC oc; +create_fontset( + XOC oc) { int found_num; @@ -620,8 +622,8 @@ create_fontset(oc) } static void -destroy_oc(oc) - XOC oc; +destroy_oc( + XOC oc) { Display *dpy = oc->core.om->core.display; XOCGenericPart *gen = XOC_GENERIC(oc); @@ -660,10 +662,10 @@ destroy_oc(oc) } static char * -set_oc_values(oc, args, num_args) - XOC oc; - XlcArgList args; - int num_args; +set_oc_values( + XOC oc, + XlcArgList args, + int num_args) { if (oc->core.resources == NULL) return NULL; @@ -673,10 +675,10 @@ set_oc_values(oc, args, num_args) } static char * -get_oc_values(oc, args, num_args) - XOC oc; - XlcArgList args; - int num_args; +get_oc_values( + XOC oc, + XlcArgList args, + int num_args) { if (oc->core.resources == NULL) return NULL; @@ -686,11 +688,11 @@ get_oc_values(oc, args, num_args) } static Bool -wcs_to_mbs(oc, to, from, length) - XOC oc; - char *to; - _Xconst wchar_t *from; - int length; +wcs_to_mbs( + XOC oc, + char *to, + _Xconst wchar_t *from, + int length) { XlcConv conv = XOC_GENERIC(oc)->wcs_to_cs; XLCd lcd; @@ -714,27 +716,13 @@ wcs_to_mbs(oc, to, from, length) } static int -#if NeedFunctionPrototypes _XmbDefaultTextEscapement(XOC oc, _Xconst char *text, int length) -#else -_XmbDefaultTextEscapement(oc, text, length) - XOC oc; - char *text; - int length; -#endif { return XTextWidth(*oc->core.font_info.font_struct_list, text, length); } static int -#if NeedFunctionPrototypes _XwcDefaultTextEscapement(XOC oc, _Xconst wchar_t *text, int length) -#else -_XwcDefaultTextEscapement(oc, text, length) - XOC oc; - wchar_t *text; - int length; -#endif { DefineLocalBuf; char *buf = AllocLocalBuf(length); @@ -755,17 +743,8 @@ err: } static int -#if NeedFunctionPrototypes _XmbDefaultTextExtents(XOC oc, _Xconst char *text, int length, XRectangle *overall_ink, XRectangle *overall_logical) -#else -_XmbDefaultTextExtents(oc, text, length, overall_ink, overall_logical) - XOC oc; - char *text; - int length; - XRectangle *overall_ink; - XRectangle *overall_logical; -#endif { int direction, logical_ascent, logical_descent; XCharStruct overall; @@ -791,17 +770,8 @@ _XmbDefaultTextExtents(oc, text, length, overall_ink, overall_logical) } static int -#if NeedFunctionPrototypes _XwcDefaultTextExtents(XOC oc, _Xconst wchar_t *text, int length, XRectangle *overall_ink, XRectangle *overall_logical) -#else -_XwcDefaultTextExtents(oc, text, length, overall_ink, overall_logical) - XOC oc; - wchar_t *text; - int length; - XRectangle *overall_ink; - XRectangle *overall_logical; -#endif { DefineLocalBuf; char *buf = AllocLocalBuf(length); @@ -822,25 +792,11 @@ err: } static Status -#if NeedFunctionPrototypes _XmbDefaultTextPerCharExtents(XOC oc, _Xconst char *text, int length, XRectangle *ink_buf, XRectangle *logical_buf, int buf_size, int *num_chars, XRectangle *overall_ink, XRectangle *overall_logical) -#else -_XmbDefaultTextPerCharExtents(oc, text, length, ink_buf, logical_buf, buf_size, - num_chars, overall_ink, overall_logical) - XOC oc; - char *text; - int length; - XRectangle *ink_buf; - XRectangle *logical_buf; - int buf_size; - int *num_chars; - XRectangle *overall_ink; - XRectangle *overall_logical; -#endif { XFontStruct *font = *oc->core.font_info.font_struct_list; XCharStruct *def, *cs, overall; @@ -905,25 +861,11 @@ _XmbDefaultTextPerCharExtents(oc, text, length, ink_buf, logical_buf, buf_size, } static Status -#if NeedFunctionPrototypes _XwcDefaultTextPerCharExtents(XOC oc, _Xconst wchar_t *text, int length, XRectangle *ink_buf, XRectangle *logical_buf, int buf_size, int *num_chars, XRectangle *overall_ink, XRectangle *overall_logical) -#else -_XwcDefaultTextPerCharExtents(oc, text, length, ink_buf, logical_buf, buf_size, - num_chars, overall_ink, overall_logical) - XOC oc; - wchar_t *text; - int length; - XRectangle *ink_buf; - XRectangle *logical_buf; - int buf_size; - int *num_chars; - XRectangle *overall_ink; - XRectangle *overall_logical; -#endif { DefineLocalBuf; char *buf = AllocLocalBuf(length); @@ -946,19 +888,8 @@ err: } static int -#if NeedFunctionPrototypes _XmbDefaultDrawString(Display *dpy, Drawable d, XOC oc, GC gc, int x, int y, _Xconst char *text, int length) -#else -_XmbDefaultDrawString(dpy, d, oc, gc, x, y, text, length) - Display *dpy; - Drawable d; - XOC oc; - GC gc; - int x, y; - char *text; - int length; -#endif { XFontStruct *font = *oc->core.font_info.font_struct_list; @@ -969,19 +900,8 @@ _XmbDefaultDrawString(dpy, d, oc, gc, x, y, text, length) } static int -#if NeedFunctionPrototypes _XwcDefaultDrawString(Display *dpy, Drawable d, XOC oc, GC gc, int x, int y, _Xconst wchar_t *text, int length) -#else -_XwcDefaultDrawString(dpy, d, oc, gc, x, y, text, length) - Display *dpy; - Drawable d; - XOC oc; - GC gc; - int x, y; - wchar_t *text; - int length; -#endif { DefineLocalBuf; char *buf = AllocLocalBuf(length); @@ -1002,38 +922,16 @@ err: } static void -#if NeedFunctionPrototypes _XmbDefaultDrawImageString(Display *dpy, Drawable d, XOC oc, GC gc, int x, int y, _Xconst char *text, int length) -#else -_XmbDefaultDrawImageString(dpy, d, oc, gc, x, y, text, length) - Display *dpy; - Drawable d; - XOC oc; - GC gc; - int x, y; - char *text; - int length; -#endif { XSetFont(dpy, gc, (*oc->core.font_info.font_struct_list)->fid); XDrawImageString(dpy, d, gc, x, y, text, length); } static void -#if NeedFunctionPrototypes _XwcDefaultDrawImageString(Display *dpy, Drawable d, XOC oc, GC gc, int x, int y, _Xconst wchar_t *text, int length) -#else -_XwcDefaultDrawImageString(dpy, d, oc, gc, x, y, text, length) - Display *dpy; - Drawable d; - XOC oc; - GC gc; - int x, y; - wchar_t *text; - int length; -#endif { DefineLocalBuf; char *buf = AllocLocalBuf(length); @@ -1086,10 +984,10 @@ static XlcResource oc_resources[] = { }; static XOC -create_oc(om, args, num_args) - XOM om; - XlcArgList args; - int num_args; +create_oc( + XOM om, + XlcArgList args, + int num_args) { XOC oc; @@ -1127,8 +1025,8 @@ err: } static Status -close_om(om) - XOM om; +close_om( + XOM om) { XOMGenericPart *gen = XOM_GENERIC(om); OMData data; @@ -1164,10 +1062,10 @@ close_om(om) } static char * -set_om_values(om, args, num_args) - XOM om; - XlcArgList args; - int num_args; +set_om_values( + XOM om, + XlcArgList args, + int num_args) { if (om->core.resources == NULL) return NULL; @@ -1177,10 +1075,10 @@ set_om_values(om, args, num_args) } static char * -get_om_values(om, args, num_args) - XOM om; - XlcArgList args; - int num_args; +get_om_values( + XOM om, + XlcArgList args, + int num_args) { if (om->core.resources == NULL) return NULL; @@ -1208,8 +1106,8 @@ static XlcResource om_resources[] = { }; static OMData -add_data(om) - XOM om; +add_data( + XOM om) { XOMGenericPart *gen = XOM_GENERIC(om); OMData new; @@ -1238,8 +1136,8 @@ static _Xconst char *supported_charset_list[] = { }; static Bool -init_om(om) - XOM om; +init_om( + XOM om) { XOMGenericPart *gen = XOM_GENERIC(om); OMData data; @@ -1320,17 +1218,8 @@ supported_charset_list[]. } XOM -#if NeedFunctionPrototypes _XDefaultOpenOM(XLCd lcd, Display *dpy, XrmDatabase rdb, _Xconst char *res_name, _Xconst char *res_class) -#else -_XDefaultOpenOM(lcd, dpy, rdb, res_name, res_class) -XLCd lcd; -Display *dpy; -XrmDatabase rdb; -char *res_name; -char *res_class; -#endif { XOM om; diff --git a/src/xlibi18n/XimImSw.h b/src/xlibi18n/XimImSw.h index eac2784..00e5ef3 100644 --- a/src/xlibi18n/XimImSw.h +++ b/src/xlibi18n/XimImSw.h @@ -26,25 +26,20 @@ PERFORMANCE OF THIS SOFTWARE. fujiwara@a80.tech.yk.fujitsu.co.jp ******************************************************************/ +/* $XFree86: xc/lib/X11/XimImSw.h,v 1.2 2003/11/17 22:20:10 dawes Exp $ */ #ifndef _XIMIMSW_H #define _XIMIMSW_H typedef struct { Bool (*checkprocessing)( -#if NeedNestedPrototypes Xim im -#endif ); Bool (*im_open)( -#if NeedNestedPrototypes Xim im -#endif ); void (*im_free)( -#if NeedNestedPrototypes Xim im -#endif ); } XimImsportSW; diff --git a/src/xlibi18n/XimThai.h b/src/xlibi18n/XimThai.h index a53ce62..0e75e82 100644 --- a/src/xlibi18n/XimThai.h +++ b/src/xlibi18n/XimThai.h @@ -45,7 +45,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/X11/XimThai.h,v 1.5 2001/12/14 19:54:08 dawes Exp $ */ +/* $XFree86: xc/lib/X11/XimThai.h,v 1.6 2003/04/17 02:39:56 dawes Exp $ */ /* **++ @@ -109,96 +109,4 @@ SOFTWARE. #define NOISC 255 /* No ISC */ -/* Function prototypes (thaisub.c) */ - -Private -int THAI_chtype ( /* returns classification of a char */ -#if NeedFunctionPrototypes - unsigned char ch -#endif -); - -Private -int THAI_chlevel ( /* returns the display level */ -#if NeedFunctionPrototypes - unsigned char ch -#endif -); - -Private -Bool THAI_isdead ( /* return True if char is non-spacing */ -#if NeedFunctionPrototypes - unsigned char ch -#endif -); - -Private -Bool THAI_iscons ( /* return True if char is consonant */ -#if NeedFunctionPrototypes - unsigned char ch -#endif -); - -Private -Bool THAI_isvowel ( /* return True if char is vowel */ -#if NeedFunctionPrototypes - unsigned char ch -#endif -); - -Private -Bool THAI_istone ( /* return True if char is tonemark */ -#if NeedFunctionPrototypes - unsigned char ch -#endif -); - -Private -Bool THAI_iscomposible ( -#if NeedFunctionPrototypes - unsigned char follow_ch, - unsigned char lead_ch -#endif -); - -Private -Bool THAI_isaccepted ( -#if NeedFunctionPrototypes - unsigned char follow_ch, - unsigned char lead_ch, - unsigned char isc_mode -#endif -); - -#if 0 -Private -void THAI_apply_write_rules ( -#if NeedFunctionPrototypes - unsigned char *instr, - unsigned char *outstr, - unsigned char insert_ch, - int *num_insert_ch -#endif -); - -Private -int THAI_find_chtype ( -#if NeedFunctionPrototypes - unsigned char *instr, - int chtype -#endif -); -#endif - -Private -int THAI_apply_scm ( -#if NeedFunctionPrototypes - unsigned char *instr, - unsigned char *outstr, - unsigned char spec_ch, - int num_sp, - unsigned char insert_ch -#endif -); - #endif /* _XIMTHAI_H_ */ diff --git a/src/xlibi18n/XimTrInt.h b/src/xlibi18n/XimTrInt.h index b10898b..9bdcba7 100644 --- a/src/xlibi18n/XimTrInt.h +++ b/src/xlibi18n/XimTrInt.h @@ -28,21 +28,18 @@ OR PERFORMANCE OF THIS SOFTWARE. fujiwara@a80.tech.yk.fujitsu.co.jp ******************************************************************/ +/* $XFree86: xc/lib/X11/XimTrInt.h,v 1.2 2003/11/17 22:20:10 dawes Exp $ */ #ifndef _XIMTRINT_H #define _XIMTRINT_H -#if NeedFunctionPrototypes #include "Ximint.h" -#endif typedef struct { char *transportname; Bool (*config)( -#if NeedFunctionPrototypes Xim, char * -#endif ); } TransportSW; @@ -53,19 +50,15 @@ extern TransportSW _XimTransportRec[]; */ extern Bool _XimXConf( -#if NeedFunctionPrototypes Xim im, char *address -#endif ); #if defined(TCPCONN) || defined(UNIXCONN) || defined(DNETCONN) || defined(STREAMSCONN) extern Bool _XimTransConf( -#if NeedFunctionPrototypes Xim im, char *address -#endif ); #endif diff --git a/src/xlibi18n/XimTrX.h b/src/xlibi18n/XimTrX.h index 489a0e3..b269766 100644 --- a/src/xlibi18n/XimTrX.h +++ b/src/xlibi18n/XimTrX.h @@ -28,6 +28,7 @@ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. fujiwara@a80.tech.yk.fujitsu.co.jp ******************************************************************/ +/* $XFree86: xc/lib/X11/XimTrX.h,v 1.2 2003/11/17 22:20:10 dawes Exp $ */ #ifndef _XIMTRX_H #define _XIMTRX_H @@ -36,9 +37,7 @@ typedef struct _XIntrCallbackRec *XIntrCallbackPtr; typedef struct _XIntrCallbackRec { Bool (*func)( -#if NeedNestedPrototypes Xim, INT16, XPointer, XPointer -#endif ); XPointer call_data; XIntrCallbackPtr next; diff --git a/src/xlibi18n/XimTrans.h b/src/xlibi18n/XimTrans.h index 6914190..03119cd 100644 --- a/src/xlibi18n/XimTrans.h +++ b/src/xlibi18n/XimTrans.h @@ -28,6 +28,7 @@ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. fujiwara@a80.tech.yk.fujitsu.co.jp ******************************************************************/ +/* $XFree86: xc/lib/X11/XimTrans.h,v 1.4 2003/11/17 22:20:10 dawes Exp $ */ #ifndef _XIMTRANS_H #define _XIMTRANS_H @@ -36,9 +37,7 @@ typedef struct _TransIntrCallbackRec *TransIntrCallbackPtr; typedef struct _TransIntrCallbackRec { Bool (*func)( -#if NeedNestedPrototypes Xim, INT16, XPointer, XPointer -#endif ); XPointer call_data; TransIntrCallbackPtr next; @@ -58,70 +57,67 @@ typedef struct { * Prototypes */ +extern Bool _XimTransRegisterDispatcher( + Xim im, + Bool (*callback)( + Xim, INT16, XPointer, XPointer + ), + XPointer call_data +); + + extern Bool _XimTransIntrCallback( -#if NeedFunctionPrototypes Xim im, Bool (*callback)( -#if NeedNestedPrototypes Xim, INT16, XPointer, XPointer -#endif ), XPointer call_data -#endif +); + +extern Bool _XimTransCallDispatcher( + Xim im, + INT16 len, + XPointer data ); extern void _XimFreeTransIntrCallback( -#if NeedFunctionPrototypes Xim im -#endif ); extern Bool _XimTransIntrCallbackCheck( -#if NeedFunctionPrototypes Xim im, INT16 len, XPointer data -#endif ); extern Bool _XimTransFilterWaitEvent( -#if NeedFunctionPrototypes Display *d, Window w, XEvent *ev, XPointer arg -#endif ); extern void _XimTransInternalConnection( -#if NeedFunctionPrototypes Display *d, int fd, XPointer arg -#endif ); extern Bool _XimTransWrite( -#if NeedFunctionPrototypes Xim im, INT16 len, XPointer data -#endif ); extern Bool _XimTransRead( -#if NeedFunctionPrototypes Xim im, XPointer recv_buf, int buf_len, int *ret_len -#endif ); extern void _XimTransFlush( -#if NeedFunctionPrototypes Xim im -#endif ); #endif /* _XIMTRANS__H */ diff --git a/src/xlibi18n/Ximint.h b/src/xlibi18n/Ximint.h index c7f917c..3809c65 100644 --- a/src/xlibi18n/Ximint.h +++ b/src/xlibi18n/Ximint.h @@ -30,7 +30,7 @@ PERFORMANCE OF THIS SOFTWARE. makoto@sm.sony.co.jp ******************************************************************/ -/* $XFree86: xc/lib/X11/Ximint.h,v 3.10 2001/07/25 15:04:44 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Ximint.h,v 3.14 2003/11/17 22:20:10 dawes Exp $ */ #ifndef _XIMINT_H #define _XIMINT_H @@ -185,274 +185,201 @@ typedef struct _XimDefICValues { */ XPointer _XimGetLocaleCode ( -#if NeedFunctionPrototypes const char *encoding_name -#endif ); int _XimGetCharCode ( -#if NeedFunctionPrototypes XPointer conv, KeySym keysym, unsigned char *buf, int nbytes -#endif ); unsigned int KeySymToUcs4 ( -#if NeedFunctionPrototypes KeySym keysym -#endif ); extern Bool _XimSetIMResourceList( -#if NeedFunctionPrototypes XIMResourceList *res_list, unsigned int *list_num -#endif ); extern Bool _XimSetICResourceList( -#if NeedFunctionPrototypes XIMResourceList *res_list, unsigned int *list_num -#endif ); extern Bool _XimSetInnerIMResourceList( -#if NeedFunctionPrototypes XIMResourceList *res_list, unsigned int *list_num -#endif ); extern Bool _XimSetInnerICResourceList( -#if NeedFunctionPrototypes XIMResourceList *res_list, unsigned int *list_num -#endif ); -extern Bool cw_XimCheckCreateICValues( -#if NeedFunctionPrototypes +extern Bool _XimCheckCreateICValues( XIMResourceList res_list, unsigned int list_num -#endif ); extern XIMResourceList _XimGetResourceListRec( -#if NeedFunctionPrototypes XIMResourceList res_list, unsigned int list_num, char *name -#endif ); extern void _XimSetIMMode( -#if NeedFunctionPrototypes XIMResourceList res_list, unsigned int list_num -#endif ); extern void _XimSetICMode( -#if NeedFunctionPrototypes XIMResourceList res_list, unsigned int list_num, XIMStyle style -#endif ); extern int _XimCheckIMMode( -#if NeedFunctionPrototypes XIMResourceList res_list, unsigned long mode -#endif ); extern int _XimCheckICMode( -#if NeedFunctionPrototypes XIMResourceList res_list, unsigned long mode -#endif ); extern Bool _XimSetLocalIMDefaults( -#if NeedFunctionPrototypes Xim im, XPointer top, XIMResourceList res_list, unsigned int list_num -#endif ); extern Bool _XimSetICDefaults( -#if NeedFunctionPrototypes Xic ic, XPointer top, unsigned long mode, XIMResourceList res_list, unsigned int list_num -#endif ); extern Bool _XimEncodeLocalIMAttr( -#if NeedFunctionPrototypes XIMResourceList res, XPointer top, XPointer val -#endif ); extern Bool _XimEncodeLocalICAttr( -#if NeedFunctionPrototypes Xic ic, XIMResourceList res, XPointer top, XIMArg *arg, unsigned long mode -#endif ); extern Bool _XimCheckLocalInputStyle( -#if NeedFunctionPrototypes Xic ic, XPointer top, XIMArg *values, XIMStyles *styles, XIMResourceList res_list, unsigned int list_num -#endif ); extern Bool _XimDecodeLocalIMAttr( -#if NeedFunctionPrototypes XIMResourceList res, XPointer top, XPointer val -#endif ); extern Bool _XimDecodeLocalICAttr( -#if NeedFunctionPrototypes XIMResourceList res, XPointer top, XPointer val, unsigned long mode -#endif ); extern void _XimGetCurrentIMValues( -#if NeedFunctionPrototypes Xim im, XimDefIMValues *im_values -#endif ); extern void _XimSetCurrentIMValues( -#if NeedFunctionPrototypes Xim im, XimDefIMValues *im_values -#endif ); extern void _XimGetCurrentICValues( -#if NeedFunctionPrototypes Xic ic, XimDefICValues *ic_values -#endif ); extern void _XimSetCurrentICValues( -#if NeedFunctionPrototypes Xic ic, XimDefICValues *ic_values -#endif ); extern void _XimInitialResourceInfo( -#if NeedFunctionPrototypes void -#endif ); extern void _XimParseStringFile( -#if NeedFunctionPrototypes FILE *fp, - DefTree **ptop -#endif + Xim im ); extern Bool _XimCheckIfLocalProcessing( -#if NeedFunctionPrototypes Xim im -#endif ); extern Bool _XimCheckIfThaiProcessing( -#if NeedFunctionPrototypes Xim im -#endif ); extern Bool _XimLocalOpenIM( -#if NeedFunctionPrototypes Xim im -#endif ); extern Bool _XimThaiOpenIM( -#if NeedFunctionPrototypes Xim im -#endif ); extern Bool _XimProtoOpenIM( -#if NeedFunctionPrototypes Xim im -#endif ); extern void _XimLocalIMFree( -#if NeedFunctionPrototypes Xim im -#endif ); extern void _XimThaiIMFree( -#if NeedFunctionPrototypes Xim im -#endif ); extern void _XimProtoIMFree( -#if NeedFunctionPrototypes Xim im -#endif ); extern char * _XimSetIMValueData( -#if NeedFunctionPrototypes Xim im, XPointer top, XIMArg *arg, XIMResourceList res_list, unsigned int list_num -#endif ); extern char * _XimGetIMValueData( -#if NeedFunctionPrototypes Xim im, XPointer top, XIMArg *arg, XIMResourceList res_list, unsigned int list_num -#endif ); extern char * _XimSetICValueData( -#if NeedFunctionPrototypes Xic ic, XPointer top, XIMResourceList res_list, @@ -460,68 +387,50 @@ extern char * _XimSetICValueData( XIMArg *arg, unsigned long mode, Bool flag -#endif ); extern char * _XimGetICValueData( -#if NeedFunctionPrototypes Xic ic, XPointer top, XIMResourceList res_list, unsigned int list_num, XIMArg *arg, unsigned long mode -#endif ); extern char * _XimLocalSetIMValues( -#if NeedFunctionPrototypes XIM im, XIMArg *arg -#endif ); extern char * _XimLocalGetIMValues( -#if NeedFunctionPrototypes XIM im, XIMArg *arg -#endif ); extern XIC _XimLocalCreateIC( -#if NeedFunctionPrototypes XIM im, XIMArg *arg -#endif ); extern Bool _XimDispatchInit( -#if NeedFunctionPrototypes Xim im -#endif ); extern Bool _XimGetAttributeID( -#if NeedFunctionPrototypes Xim im, CARD16 *buf -#endif ); extern Bool _XimExtension( -#if NeedFunctionPrototypes Xim im -#endif ); extern void _XimDestroyIMStructureList( -#if NeedFunctionPrototypes Xim im -#endif ); extern char * _XimMakeIMAttrIDList( -#if NeedFunctionPrototypes Xim im, XIMResourceList res_list, unsigned int res_num, @@ -529,11 +438,9 @@ extern char * _XimMakeIMAttrIDList( CARD16 *buf, INT16 *len, unsigned long mode -#endif ); extern char * _XimMakeICAttrIDList( -#if NeedFunctionPrototypes Xic ic, XIMResourceList res_list, unsigned int res_num, @@ -541,11 +448,9 @@ extern char * _XimMakeICAttrIDList( CARD16 *idList, INT16 *num, unsigned long mode -#endif ); extern char * _XimDecodeIMATTRIBUTE( -#if NeedFunctionPrototypes Xim im, XIMResourceList res_list, unsigned int res_num, @@ -553,11 +458,9 @@ extern char * _XimDecodeIMATTRIBUTE( INT16 buf_len, XIMArg *arg, BITMASK32 mode -#endif ); extern char * _XimDecodeICATTRIBUTE( -#if NeedFunctionPrototypes Xic ic, XIMResourceList res_list, unsigned int res_num, @@ -565,158 +468,118 @@ extern char * _XimDecodeICATTRIBUTE( INT16 buf_len, XIMArg *arg, BITMASK32 mode -#endif ); extern Bool _XimRegProtoIntrCallback( -#if NeedFunctionPrototypes Xim im, CARD16 major_code, CARD16 minor_code, Bool (*proc)( -#if NeedNestedPrototypes Xim, INT16, XPointer, XPointer -#endif ), XPointer call_data -#endif ); extern Bool _XimErrorCallback( -#if NeedFunctionPrototypes Xim im, INT16 len, XPointer data, XPointer call_data -#endif ); extern Bool _XimError( -#if NeedFunctionPrototypes Xim im, Xic ic, CARD16 error_code, INT16 detail_length, CARD16 type, char *detail -#endif ); extern Bool _XimRegisterTriggerKeysCallback( -#if NeedFunctionPrototypes Xim im, INT16 len, XPointer data, XPointer call_data -#endif ); extern Bool _XimSetEventMaskCallback( -#if NeedFunctionPrototypes Xim im, INT16 len, XPointer data, XPointer call_data -#endif ); extern Bool _XimForwardEventCallback( -#if NeedFunctionPrototypes Xim im, INT16 len, XPointer data, XPointer call_data -#endif ); extern Bool _XimCommitCallback( -#if NeedFunctionPrototypes Xim im, INT16 len, XPointer data, XPointer call_data -#endif ); extern Bool _XimSyncCallback( -#if NeedFunctionPrototypes Xim im, INT16 len, XPointer data, XPointer call_data -#endif ); extern void _XimFreeProtoIntrCallback( -#if NeedFunctionPrototypes Xim im -#endif ); extern XIC _XimProtoCreateIC( -#if NeedFunctionPrototypes XIM im, XIMArg *arg -#endif ); extern void _XimRegisterServerFilter( -#if NeedFunctionPrototypes Xim im -#endif ); extern void _XimUnregisterServerFilter( -#if NeedFunctionPrototypes Xim im -#endif ); extern Bool _XimTriggerNotify( -#if NeedFunctionPrototypes Xim im, Xic ic, int mode, CARD32 idx -#endif ); extern Bool _XimProcSyncReply( -#if NeedFunctionPrototypes Xim im, Xic ic -#endif ); extern void _XimSendSetFocus( -#if NeedFunctionPrototypes Xim im, Xic ic -#endif ); extern Bool _XimForwardEvent( -#if NeedFunctionPrototypes Xic ic, XEvent *ev, Bool sync -#endif ); extern void _XimFreeRemakeArg( -#if NeedFunctionPrototypes XIMArg *arg -#endif ); extern void _XimServerDestroy( -#if NeedFunctionPrototypes Xim im -#endif ); extern char * _XimEncodeIMATTRIBUTE( -#if NeedFunctionPrototypes Xim im, XIMResourceList res_list, unsigned int res_num, @@ -727,11 +590,9 @@ extern char * _XimEncodeIMATTRIBUTE( int *ret_len, XPointer top, unsigned long mode -#endif ); extern char * _XimEncodeICATTRIBUTE( -#if NeedFunctionPrototypes Xic ic, XIMResourceList res_list, unsigned int res_num, @@ -743,234 +604,189 @@ extern char * _XimEncodeICATTRIBUTE( XPointer top, BITMASK32 *flag, unsigned long mode -#endif ); #ifdef EXT_MOVE extern Bool _XimExtenMove( -#if NeedFunctionPrototypes Xim im, Xic ic, CARD32 flag, CARD16 *buf, INT16 length -#endif ); #endif extern int _Ximctstombs( -#if NeedFunctionPrototypes XIM im, char *from, int from_len, char *to, int to_len, Status *state -#endif ); extern int _Ximctstowcs( -#if NeedFunctionPrototypes XIM im, char *from, int from_len, wchar_t *to, int to_len, Status *state -#endif ); extern int _Ximctstoutf8( -#if NeedFunctionPrototypes XIM im, char *from, int from_len, char *to, int to_len, Status *state -#endif ); extern int _XimLcctstombs( -#if NeedFunctionPrototypes XIM im, char *from, int from_len, char *to, int to_len, Status *state -#endif ); extern int _XimLcctstowcs( -#if NeedFunctionPrototypes XIM im, char *from, int from_len, wchar_t *to, int to_len, Status *state -#endif ); extern int _XimLcctstoutf8( -#if NeedFunctionPrototypes XIM im, char *from, int from_len, char *to, int to_len, Status *state -#endif +); + +extern int _XimCheckDataSize( + XPointer buf, + int len ); extern void _XimSetHeader( -#if NeedFunctionPrototypes XPointer buf, CARD8 major_opcode, CARD8 minor_opcode, INT16 *len -#endif ); extern Bool _XimSync( -#if NeedFunctionPrototypes Xim im, Xic ic -#endif ); extern int _XimProtoMbLookupString( -#if NeedFunctionPrototypes XIC xic, XKeyEvent *ev, char *buffer, int bytes, KeySym *keysym, Status *state -#endif ); extern int _XimProtoWcLookupString( -#if NeedFunctionPrototypes XIC xic, XKeyEvent *ev, wchar_t *buffer, int bytes, KeySym *keysym, Status *state -#endif ); extern int _XimProtoUtf8LookupString( -#if NeedFunctionPrototypes XIC xic, XKeyEvent *ev, char *buffer, int bytes, KeySym *keysym, Status *state -#endif ); extern void _XimRegisterFilter( -#if NeedFunctionPrototypes Xic ic -#endif ); extern void _XimUnregisterFilter( -#if NeedFunctionPrototypes Xic ic -#endif ); extern void _XimReregisterFilter( -#if NeedFunctionPrototypes Xic ic -#endif ); extern Status _XimProtoEventToWire( -#if NeedFunctionPrototypes XEvent *re, xEvent *event, Bool sw -#endif ); extern Bool _XimProtoWireToEvent( -#if NeedFunctionPrototypes XEvent *re, xEvent *event, Bool sw -#endif ); #ifdef EXT_FORWARD extern Bool _XimExtForwardKeyEvent( -#if NeedFunctionPrototypes Xic ic, XKeyEvent *ev, Bool sync -#endif ); #endif extern int _XimLookupMBText( -#if NeedFunctionPrototypes Xic ic, XKeyEvent *event, char *buffer, int nbytes, KeySym *keysym, XComposeStatus *status -#endif ); extern int _XimLookupWCText( -#if NeedFunctionPrototypes Xic ic, XKeyEvent *event, wchar_t *buffer, int nbytes, KeySym *keysym, XComposeStatus *status -#endif ); extern int _XimLookupUTF8Text( -#if NeedFunctionPrototypes Xic ic, XKeyEvent *event, char *buffer, int nbytes, KeySym *keysym, XComposeStatus *status -#endif ); extern EVENTMASK _XimGetWindowEventmask( -#if NeedFunctionPrototypes Xic ic -#endif ); extern Xic _XimICOfXICID( -#if NeedFunctionPrototypes Xim im, XICID icid -#endif ); extern void _XimResetIMInstantiateCallback( -#if NeedFunctionPrototypes Xim xim -#endif ); extern Bool _XimRegisterIMInstantiateCallback( -#if NeedFunctionPrototypes XLCd lcd, Display *display, XrmDatabase rdb, @@ -978,11 +794,9 @@ extern Bool _XimRegisterIMInstantiateCallback( char *res_class, XIDProc callback, XPointer client_data -#endif ); extern Bool _XimUnRegisterIMInstantiateCallback( -#if NeedFunctionPrototypes XLCd lcd, Display *display, XrmDatabase rdb, @@ -990,224 +804,164 @@ extern Bool _XimUnRegisterIMInstantiateCallback( char *res_class, XIDProc callback, XPointer client_data -#endif ); extern void _XimFreeCommitInfo( -#if NeedFunctionPrototypes Xic ic -#endif ); extern Bool _XimConnect( -#if NeedFunctionPrototypes Xim im -#endif ); extern Bool _XimShutdown( -#if NeedFunctionPrototypes Xim im -#endif ); extern Bool _XimWrite( -#if NeedFunctionPrototypes Xim im, INT16 len, XPointer data -#endif ); extern Bool _XimRead( -#if NeedFunctionPrototypes Xim im, INT16 *len, XPointer data, int data_len, Bool (*predicate)( -#if NeedNestedPrototypes Xim, INT16, XPointer, XPointer -#endif ), XPointer arg -#endif ); extern Bool _XimIntrCallback( -#if NeedFunctionPrototypes Xim im, Bool (*callback)( -#if NeedNestedPrototypes Xim, INT16, XPointer, XPointer -#endif ), XPointer call_data -#endif ); extern void _XimFlush( -#if NeedFunctionPrototypes Xim im -#endif ); extern Bool _XimFilterWaitEvent( -#if NeedFunctionPrototypes Xim im -#endif ); extern void _XimProcError( -#if NeedFunctionPrototypes Xim im, Xic ic, XPointer data -#endif ); #ifdef EXT_MOVE extern CARD32 _XimExtenArgCheck( -#if NeedFunctionProtoTypes XIMArg *arg -#endif ); #endif extern Bool _XimCbDispatch( -#if NeedFunctionPrototypes Xim im, INT16 len, XPointer data, XPointer call_data -#endif ); extern Bool _XimLocalFilter( -#if NeedFunctionPrototypes Display *d, Window w, XEvent *ev, XPointer client_data -#endif ); extern XIMResourceList _XimGetResourceListRecByQuark( -#if NeedFunctionPrototypes XIMResourceList res_list, unsigned int list_num, XrmQuark quark -#endif ); extern Bool _XimReconnectModeCreateIC( -#if NeedFunctionPrototypes Xic ic -#endif ); extern char *_XimLocalSetICValues( -#if NeedFunctionPrototypes XIC ic, XIMArg *values -#endif ); extern char * _XimLocalGetICValues( -#if NeedFunctionPrototypes XIC ic, XIMArg *values -#endif ); extern int _XimLocalMbLookupString( -#if NeedFunctionPrototypes XIC ic, XKeyEvent *ev, char *buffer, int bytes, KeySym *keysym, Status *status -#endif ); extern int _XimLocalWcLookupString( -#if NeedFunctionPrototypes XIC ic, XKeyEvent *ev, wchar_t *buffer, int bytes, KeySym *keysym, Status *status -#endif ); extern int _XimLocalUtf8LookupString( -#if NeedFunctionPrototypes XIC ic, XKeyEvent *ev, char *buffer, int bytes, KeySym *keysym, Status *status -#endif ); extern Bool _XimThaiFilter( -#if NeedFunctionPrototypes Display *d, Window w, XEvent *ev, XPointer client_data -#endif ); extern XIC _XimThaiCreateIC( -#if NeedFunctionPrototypes XIM im, XIMArg *values -#endif ); extern Status _XimThaiCloseIM( -#if NeedFunctionPrototypes XIM xim -#endif ); #ifdef XIM_CONNECTABLE extern void _XimSetProtoResource( -#if NeedFunctionPrototypes Xim im -#endif ); extern Bool _XimConnectServer( -#if NeedFunctionPrototypes Xim im -#endif ); extern Bool _XimDelayModeSetAttr( -#if NeedFunctionPrototypes Xim im -#endif ); extern void _XimServerReconectableDestroy( -#if NeedFunctionPrototypes void -#endif ); extern Bool _XimReCreateIC( -#if NeedFunctionPrototypes Xic ic -#endif ); extern Bool _XimEncodeSavedIMATTRIBUTE( -#if NeedFunctionPrototypes Xim im, XIMResourceList res_list, unsigned int res_num, @@ -1217,11 +971,9 @@ extern Bool _XimEncodeSavedIMATTRIBUTE( int *ret_len, XPointer top, unsigned long mode -#endif ); extern Bool _XimEncodeSavedICATTRIBUTE( -#if NeedFunctionPrototypes Xic ic, XIMResourceList res_list, unsigned int res_num, @@ -1231,8 +983,20 @@ extern Bool _XimEncodeSavedICATTRIBUTE( int *ret_len, XPointer top, unsigned long mode -#endif ); #endif +extern Public Bool +_XimRegisterDispatcher( + Xim im, + Bool (*callback)( + Xim, INT16, XPointer, XPointer + ), + XPointer call_data); + +extern Public Bool +_XimRespSyncReply( + Xic ic, + BITMASK16 mode); + #endif /* _XIMINT_H */ diff --git a/src/xlibi18n/XimintP.h b/src/xlibi18n/XimintP.h index b56fe17..38c4ed6 100644 --- a/src/xlibi18n/XimintP.h +++ b/src/xlibi18n/XimintP.h @@ -35,7 +35,7 @@ PERFORMANCE OF THIS SOFTWARE. miyamoto@jrd.dec.com ******************************************************************/ -/* $XFree86: xc/lib/X11/XimintP.h,v 1.7 2001/01/17 19:41:49 dawes Exp $ */ +/* $XFree86: xc/lib/X11/XimintP.h,v 1.8 2003/11/17 22:20:10 dawes Exp $ */ #ifndef _XIMINTP_H #define _XIMINTP_H @@ -47,9 +47,7 @@ PERFORMANCE OF THIS SOFTWARE. * for protocol layer callback function */ typedef Bool (*XimProtoIntrProc)( -#if NeedFunctionPrototypes Xim, INT16, XPointer, XPointer -#endif ); typedef struct _XimProtoIntrRec { XimProtoIntrProc func; @@ -63,39 +61,25 @@ typedef struct _XimProtoIntrRec { * for transport layer methods */ typedef Bool (*XimTransConnectProc)( -#if NeedFunctionPrototypes Xim -#endif ); typedef Bool (*XimTransShutdownProc)( -#if NeedFunctionPrototypes Xim -#endif ); typedef Bool (*XimTransWriteProc)( -#if NeedFunctionPrototypes Xim, INT16, XPointer -#endif ); typedef Bool (*XimTransReadProc)( -#if NeedFunctionPrototypes Xim, XPointer, int, int * -#endif ); typedef void (*XimTransFlushProc)( -#if NeedFunctionPrototypes Xim -#endif ); typedef Bool (*XimTransRegDispatcher)( -#if NeedNestedPrototypes Xim, Bool (*)(Xim, INT16, XPointer, XPointer), XPointer -#endif ); typedef Bool (*XimTransCallDispatcher)( -#if NeedFunctionPrototypes Xim, INT16, XPointer -#endif ); /* diff --git a/src/xlibi18n/XlcDL.c b/src/xlibi18n/XlcDL.c index 126cbff..24200f5 100644 --- a/src/xlibi18n/XlcDL.c +++ b/src/xlibi18n/XlcDL.c @@ -41,7 +41,7 @@ interest in or to any trademark, service mark, logo or trade name of Sun Microsystems, Inc. or its licensors is granted. */ -/* $XFree86: xc/lib/X11/XlcDL.c,v 1.9.2.1 2003/03/11 23:18:49 herrb Exp $ */ +/* $XFree86: xc/lib/X11/XlcDL.c,v 1.13 2003/11/17 22:20:10 dawes Exp $ */ #include <stdio.h> #if defined(hpux) @@ -55,18 +55,15 @@ Sun Microsystems, Inc. or its licensors is granted. #include "XlcPublic.h" #include "XlcPubI.h" -#ifdef _LP64 -# if defined(__sparcv9) -# define _MACH64_NAME "sparcv9" -# elif defined(__ia64__) -# undef MACH64_NAME -# else -# error "Unknown architecture" -# endif /* defined(__sparcv9) */ -# ifdef _MACH64_NAME +#if defined(_LP64) && defined(__sparcv9) +# define _MACH64_NAME "sparcv9" +#else +# undef _MACH64_NAME +#endif /* defined(_LP64) && defined(__sparcv9) */ + +#ifdef _MACH64_NAME # define _MACH64_NAME_LEN (sizeof (_MACH64_NAME) - 1) -# endif -#endif /* _LP64 */ +#endif #define XI18N_DLREL 2 @@ -102,10 +99,7 @@ static XI18NObjectsListRec *xi18n_objects_list = NULL; static int lc_count = 0; static int -parse_line(line, argv, argsize) -char *line; -char **argv; -int argsize; +parse_line(char *line, char **argv, int argsize) { int argc = 0; char *p = line; @@ -162,9 +156,7 @@ try_both_dlsym (void *handle, char *name) #endif static void -resolve_object(path, lc_name) -char *path; -char *lc_name; +resolve_object(char *path, const char *lc_name) { char filename[BUFSIZ]; FILE *fp; @@ -235,9 +227,7 @@ Limit the length of path to prevent stack buffer corruption. } static char* -__lc_path(dl_name, lc_dir) -const char *dl_name; -const char *lc_dir; +__lc_path(const char *dl_name, const char *lc_dir) { char *path; size_t len; @@ -313,9 +303,9 @@ const char *lc_dir; * in XLCd */ static Bool -open_object (object, lc_dir) - XI18NObjectsList object; - char *lc_dir; +open_object( + XI18NObjectsList object, + char *lc_dir) { char *path; @@ -339,9 +329,9 @@ open_object (object, lc_dir) } static void * -fetch_symbol (object, symbol) - XI18NObjectsList object; - char *symbol; +fetch_symbol( + XI18NObjectsList object, + char *symbol) { void *result = NULL; #if defined(hpux) @@ -374,8 +364,7 @@ fetch_symbol (object, symbol) } static void -close_object (object) - XI18NObjectsList object; +close_object(XI18NObjectsList object) { object->refcount--; if (object->refcount == 0) @@ -390,16 +379,13 @@ close_object (object) } +typedef XLCd (*dynamicLoadProc)(const char *); + XLCd -#if NeedFunctionPrototypes _XlcDynamicLoad(const char *lc_name) -#else -_XlcDynamicLoad(lc_name) - const char *lc_name; -#endif { XLCd lcd = (XLCd)NULL; - XLCd (*lc_loader)() = (XLCd(*)())NULL; + dynamicLoadProc lc_loader = (dynamicLoadProc)NULL; int count; XI18NObjectsList objects_list; char lc_dir[BUFSIZE]; @@ -419,7 +405,7 @@ _XlcDynamicLoad(lc_name) if (!open_object (objects_list, lc_dir)) continue; - lc_loader = (XLCd(*)())fetch_symbol (objects_list, objects_list->open); + lc_loader = (dynamicLoadProc)fetch_symbol (objects_list, objects_list->open); if (!lc_loader) continue; lcd = (*lc_loader)(lc_name); if (lcd != (XLCd)NULL) { @@ -431,22 +417,17 @@ _XlcDynamicLoad(lc_name) return (XLCd)lcd; } + +typedef XIM (*dynamicOpenProcp)(XLCd, Display *, XrmDatabase, char *, char *); + static XIM -#if NeedFunctionPrototypes _XDynamicOpenIM(XLCd lcd, Display *display, XrmDatabase rdb, char *res_name, char *res_class) -#else -_XDynamicOpenIM(lcd, display, rdb, res_name, res_class) -XLCd lcd; -Display *display; -XrmDatabase rdb; -char *res_name, *res_class; -#endif { XIM im = (XIM)NULL; char lc_dir[BUFSIZE]; char *lc_name; - XIM (*im_openIM)() = (XIM(*)())NULL; + dynamicOpenProcp im_openIM = (dynamicOpenProcp)NULL; int count; XI18NObjectsList objects_list = xi18n_objects_list; @@ -462,7 +443,7 @@ char *res_name, *res_class; if (!open_object (objects_list, lc_dir)) continue; - im_openIM = (XIM(*)())fetch_symbol(objects_list, objects_list->open); + im_openIM = (dynamicOpenProcp)fetch_symbol(objects_list, objects_list->open); if (!im_openIM) continue; im = (*im_openIM)(lcd, display, rdb, res_name, res_class); if (im != (XIM)NULL) { @@ -474,20 +455,22 @@ char *res_name, *res_class; return (XIM)im; } +typedef Bool (*dynamicRegisterCBProcp)( + XLCd, Display *, XrmDatabase, char *, char *, XIDProc, XPointer); + static Bool -_XDynamicRegisterIMInstantiateCallback(lcd, display, rdb, - res_name, res_class, - callback, client_data) -XLCd lcd; -Display *display; -XrmDatabase rdb; -char *res_name, *res_class; -XIMProc callback; -XPointer *client_data; +_XDynamicRegisterIMInstantiateCallback( + XLCd lcd, + Display *display, + XrmDatabase rdb, + char *res_name, + char *res_class, + XIDProc callback, + XPointer client_data) { char lc_dir[BUFSIZE]; char *lc_name; - Bool (*im_registerIM)() = (Bool(*)())NULL; + dynamicRegisterCBProcp im_registerIM = (dynamicRegisterCBProcp)NULL; Bool ret_flag = False; int count; XI18NObjectsList objects_list = xi18n_objects_list; @@ -507,7 +490,7 @@ XPointer *client_data; if (!open_object (objects_list, lc_dir)) continue; - im_registerIM = (Bool(*)())fetch_symbol(objects_list, + im_registerIM = (dynamicRegisterCBProcp)fetch_symbol(objects_list, objects_list->im_register); if (!im_registerIM) continue; ret_flag = (*im_registerIM)(lcd, display, rdb, @@ -520,20 +503,22 @@ XPointer *client_data; return (Bool)ret_flag; } +typedef Bool (*dynamicUnregisterProcp)( + XLCd, Display *, XrmDatabase, char *, char *, XIDProc, XPointer); + static Bool -_XDynamicUnRegisterIMInstantiateCallback(lcd, display, rdb, - res_name, res_class, - callback, client_data) -XLCd lcd; -Display *display; -XrmDatabase rdb; -char *res_name, *res_class; -XIMProc callback; -XPointer *client_data; +_XDynamicUnRegisterIMInstantiateCallback( + XLCd lcd, + Display *display, + XrmDatabase rdb, + char *res_name, + char *res_class, + XIDProc callback, + XPointer client_data) { char lc_dir[BUFSIZE]; char *lc_name; - Bool (*im_unregisterIM)() = (Bool(*)())NULL; + dynamicUnregisterProcp im_unregisterIM = (dynamicUnregisterProcp)NULL; Bool ret_flag = False; int count; XI18NObjectsList objects_list = xi18n_objects_list; @@ -553,7 +538,7 @@ XPointer *client_data; if (!objects_list->refcount) /* Must already be opened */ continue; - im_unregisterIM = (Bool(*)())fetch_symbol(objects_list, + im_unregisterIM = (dynamicUnregisterProcp)fetch_symbol(objects_list, objects_list->im_unregister); if (!im_unregisterIM) continue; @@ -569,12 +554,7 @@ XPointer *client_data; } Bool -#if NeedFunctionPrototypes _XInitDynamicIM(XLCd lcd) -#else -_XInitDynamicIM(lcd) -XLCd lcd; -#endif { if(lcd == (XLCd)NULL) return False; @@ -584,24 +564,19 @@ XLCd lcd; return True; } + +typedef XOM (*dynamicIOpenProcp)( + XLCd, Display *, XrmDatabase, _Xconst char *, _Xconst char *); + static XOM -#if NeedFunctionPrototypes _XDynamicOpenOM(XLCd lcd, Display *display, XrmDatabase rdb, _Xconst char *res_name, _Xconst char *res_class) -#else -_XDynamicOpenOM(lcd, display, rdb, res_name, res_class) -XLCd lcd; -Display *display; -XrmDatabase rdb; -char *res_name; -char *res_class; -#endif { XOM om = (XOM)NULL; int count; char lc_dir[BUFSIZE]; char *lc_name; - XOM (*om_openOM)() = (XOM(*)())NULL; + dynamicIOpenProcp om_openOM = (dynamicIOpenProcp)NULL; XI18NObjectsList objects_list = xi18n_objects_list; #if defined(hpux) int getsyms_cnt, i; @@ -619,7 +594,7 @@ char *res_class; if (!open_object (objects_list, lc_dir)) continue; - om_openOM = (XOM(*)())fetch_symbol(objects_list, objects_list->open); + om_openOM = (dynamicIOpenProcp)fetch_symbol(objects_list, objects_list->open); if (!om_openOM) continue; om = (*om_openOM)(lcd, display, rdb, res_name, res_class); if (om != (XOM)NULL) { @@ -631,12 +606,7 @@ char *res_class; } Bool -#if NeedFunctionPrototypes _XInitDynamicOM(XLCd lcd) -#else -_XInitDynamicOM(lcd) - XLCd lcd; -#endif { if(lcd == (XLCd)NULL) return False; diff --git a/src/xlibi18n/XlcGeneric.h b/src/xlibi18n/XlcGeneric.h index a762917..45dd66f 100644 --- a/src/xlibi18n/XlcGeneric.h +++ b/src/xlibi18n/XlcGeneric.h @@ -31,7 +31,7 @@ * Modifier: Takanori Tateno FUJITSU LIMITED * */ -/* $XFree86: xc/lib/X11/XlcGeneric.h,v 1.4 2001/07/25 15:04:44 dawes Exp $ */ +/* $XFree86: xc/lib/X11/XlcGeneric.h,v 1.5 2003/04/13 19:22:19 dawes Exp $ */ #ifndef _XLCGENERIC_H_ #define _XLCGENERIC_H_ @@ -143,4 +143,22 @@ typedef struct _XLCdGenericRec { extern XLCdMethods _XlcGenericMethods; +extern FontScope +_XlcParse_scopemaps( + const char *str, + int *size); +extern void +_XlcDbg_printValue( + const char *str, + char **value, + int num); + +extern XIM +_XDefaultOpenIM( + XLCd lcd, + Display *dpy, + XrmDatabase rdb, + char *res_name, + char *res_class); + #endif /* _XLCGENERIC_H_ */ diff --git a/src/xlibi18n/XlcPubI.h b/src/xlibi18n/XlcPubI.h index 0fbe337..64504ea 100644 --- a/src/xlibi18n/XlcPubI.h +++ b/src/xlibi18n/XlcPubI.h @@ -23,7 +23,7 @@ * Author: Katsuhisa Yano TOSHIBA Corp. * mopi@osa.ilab.toshiba.co.jp */ -/* $XFree86: xc/lib/X11/XlcPubI.h,v 3.9.6.1 2003/03/11 23:18:49 herrb Exp $ */ +/* $XFree86: xc/lib/X11/XlcPubI.h,v 3.14 2003/11/17 22:20:10 dawes Exp $ */ #ifndef _XLCPUBLICI_H_ #define _XLCPUBLICI_H_ @@ -165,43 +165,35 @@ extern int _Xutf8TextPropertyToTextList( ); extern int _XmbTextListToTextProperty( -#if NeedFunctionPrototypes XLCd /* lcd */, Display* /* dpy */, char** /* list */, int /* count */, XICCEncodingStyle /* style */, XTextProperty* /* text_prop */ -#endif ); extern int _XwcTextListToTextProperty( -#if NeedFunctionPrototypes XLCd /* lcd */, Display* /* dpy */, wchar_t** /* list */, int /* count */, XICCEncodingStyle /* style */, XTextProperty* /* text_prop */ -#endif ); extern int _Xutf8TextListToTextProperty( -#if NeedFunctionPrototypes XLCd /* lcd */, Display* /* dpy */, char** /* list */, int /* count */, XICCEncodingStyle /* style */, XTextProperty* /* text_prop */ -#endif ); extern void _XwcFreeStringList( -#if NeedFunctionPrototypes XLCd /* lcd */, wchar_t** /* list */ -#endif ); extern int _XlcResolveLocaleName( @@ -215,11 +207,9 @@ extern int _XlcResolveI18NPath( ); extern char *_XlcLocaleDirName( -#if NeedFunctionPrototypes char* /* dir_name */, size_t, /* dir_len */ char* /* lc_name */ -#endif ); extern XPointer _XlcCreateLocaleDataBase( @@ -238,6 +228,68 @@ extern void _XlcGetLocaleDataBase( int* /* count */ ); +#ifdef X_LOCALE +extern char * +_Xsetlocale( + int category, + _Xconst char *name); +#else +extern char *_XlcMapOSLocaleName( + char *osname, + char *siname); +#endif + +extern int +_Xmbstoutf8( + char *ustr, + const char *str, + int len); +extern int +_Xlcmbstoutf8( + XLCd lcd, + char *ustr, + const char *str, + int len); +extern int +_Xmbstowcs( + wchar_t *wstr, + char *str, + int len); +extern int +_Xlcwcstombs( + XLCd lcd, + char *str, + wchar_t *wstr, + int len); +extern int +_Xlcmbstowcs( + XLCd lcd, + wchar_t *wstr, + char *str, + int len); +extern int +_Xwcstombs( + char *str, + wchar_t *wstr, + int len); +extern int +_Xlcmbtowc( + XLCd lcd, + wchar_t *wstr, + char *str, + int len); +extern int +_Xlcwctomb( + XLCd lcd, + char *str, + wchar_t wc); + + + +extern XPointer +_Utf8GetConvByName( + const char *name); + _XFUNCPROTOEND #endif /* _XLCPUBLICI_H_ */ diff --git a/src/xlibi18n/XlcPublic.h b/src/xlibi18n/XlcPublic.h index dc86670..72df4c8 100644 --- a/src/xlibi18n/XlcPublic.h +++ b/src/xlibi18n/XlcPublic.h @@ -31,7 +31,7 @@ * Modifier: Takanori Tateno FUJITSU LIMITED * */ -/* $XFree86: xc/lib/X11/XlcPublic.h,v 1.9 2001/01/17 19:41:49 dawes Exp $ */ +/* $XFree86: xc/lib/X11/XlcPublic.h,v 1.12 2003/11/17 22:20:10 dawes Exp $ */ /* * Most of this API is documented in i18n/Framework.PS */ @@ -140,10 +140,8 @@ extern Bool _XlcAddCharSet( Return NULL if successful, otherwise the name of the first argument specifiying a nonexistent attribute. */ extern char *_XlcGetCSValues( -#if NeedVarargsPrototypes XlcCharSet charset, ... -#endif ); _XFUNCPROTOEND @@ -177,13 +175,10 @@ typedef XlcConv (*XlcOpenConverterProc)( ); typedef void (*XlcCloseConverterProc)( -#if NeedFunctionPrototypes XlcConv /* conv */ -#endif ); typedef int (*XlcConvertProc)( -#if NeedFunctionPrototypes XlcConv /* conv */, XPointer* /* from */, int* /* from_left */, @@ -191,13 +186,10 @@ typedef int (*XlcConvertProc)( int* /* to_left */, XPointer* /* args */, int /* num_args */ -#endif ); typedef void (*XlcResetConverterProc)( -#if NeedFunctionPrototypes XlcConv /* conv */ -#endif ); typedef struct _XlcConvMethodsRec{ @@ -230,22 +222,24 @@ typedef struct _XlcConvRec { _XFUNCPROTOBEGIN extern Bool _XInitOM( -#if NeedFunctionPrototypes XLCd /* lcd */ -#endif ); extern Bool _XInitIM( -#if NeedFunctionPrototypes XLCd /* lcd */ -#endif +); + +extern XIM _XimOpenIM( + XLCd /* lcd */, + Display * /* dpy */, + XrmDatabase /* rdb */, + char * /* res_name */, + char * /* res_class */ ); extern char *_XGetLCValues( -#if NeedVarargsPrototypes XLCd /* lcd */, ... -#endif ); extern XlcConv _XlcOpenConverter( @@ -295,18 +289,18 @@ extern char *_XlcFileName( ); extern int _Xwcslen( -#if NeedFunctionPrototypes wchar_t* /* wstr */ -#endif ); extern wchar_t *_Xwcscpy( -#if NeedFunctionPrototypes wchar_t* /* wstr1 */, wchar_t* /* wstr2 */ -#endif ); +extern wchar_t *_Xwcsncpy(wchar_t *wstr1, wchar_t *wstr2, int len); +extern int _Xwcscmp(wchar_t *wstr1, wchar_t *wstr2); +extern int _Xwcsncmp(wchar_t *wstr1, wchar_t *wstr2, int len); + /* Compares two ISO 8859-1 strings, ignoring case of ASCII letters. Like strcasecmp in an ASCII locale. */ extern int _XlcCompareISOLatin1( @@ -322,6 +316,11 @@ extern int _XlcNCompareISOLatin1( int len ); +extern XOM +_XDefaultOpenOM( + XLCd lcd, Display *dpy, XrmDatabase rdb, + _Xconst char *res_name, _Xconst char *res_class); + _XFUNCPROTOEND #endif /* _XLCPUBLIC_H_ */ diff --git a/src/xlibi18n/XlcSL.c b/src/xlibi18n/XlcSL.c index 12391b1..c3f0005 100644 --- a/src/xlibi18n/XlcSL.c +++ b/src/xlibi18n/XlcSL.c @@ -41,14 +41,13 @@ interest in or to any trademark, service mark, logo or trade name of Sun Microsystems, Inc. or its licensors is granted. */ +/* $XFree86: xc/lib/X11/XlcSL.c,v 1.2 2003/11/17 22:20:10 dawes Exp $ */ #include "Xlibint.h" #include "Xlcint.h" extern XIM _XDefaultOpenIM( -#if NeedNestedPrototypes XLCd, Display *, XrmDatabase, char *, char * -#endif ); Bool @@ -65,9 +64,7 @@ XLCd lcd; } extern XOM _XDefaultOpenOM( -#if NeedFunctionPrototypes XLCd, Display*, XrmDatabase, _Xconst char*, _Xconst char* -#endif ); Bool diff --git a/src/xlibi18n/Xlcint.h b/src/xlibi18n/Xlcint.h index a216dba..fe3b8c9 100644 --- a/src/xlibi18n/Xlcint.h +++ b/src/xlibi18n/Xlcint.h @@ -26,7 +26,7 @@ other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/Xlcint.h,v 3.14 2002/11/01 13:43:31 alanh Exp $ */ +/* $XFree86: xc/lib/X11/Xlcint.h,v 3.17 2003/11/17 22:20:10 dawes Exp $ */ /* * Copyright 1990, 1991 by OMRON Corporation, NTT Software Corporation, @@ -79,12 +79,10 @@ from The Open Group. #include <stdarg.h> typedef Bool (*XFilterEventProc)( -#if NeedFunctionPrototypes Display* /* display */, Window /* window */, XEvent* /* event */, XPointer /* client_data */ -#endif ); typedef struct _XIMFilter { @@ -221,41 +219,32 @@ typedef struct _XLCd *XLCd; /* need forward reference */ */ typedef void (*XCloseLCProc)( -#if NeedFunctionPrototypes XLCd /* lcd */ -#endif ); typedef char* (*XlcMapModifiersProc)( -#if NeedFunctionPrototypes XLCd /* lcd */, _Xconst char* /* user_mods */, _Xconst char* /* prog_mods */ -#endif ); typedef XOM (*XOpenOMProc)( -#if NeedFunctionPrototypes XLCd /* lcd */, Display* /* display */, XrmDatabase /* rdb */, _Xconst char* /* res_name */, _Xconst char* /* res_class */ -#endif ); typedef XIM (*XOpenIMProc)( -#if NeedFunctionPrototypes XLCd /* lcd */, Display* /* display */, XrmDatabase /* rdb */, char* /* res_name */, char* /* res_class */ -#endif ); typedef Bool (*XRegisterIMInstantiateCBProc)( -#if NeedFunctionPrototypes XLCd /* lcd */, Display* /* display */, XrmDatabase /* rdb */, @@ -263,11 +252,9 @@ typedef Bool (*XRegisterIMInstantiateCBProc)( char* /* res_class */, XIDProc /* callback */, XPointer /* client_data */ -#endif ); typedef Bool (*XUnregisterIMInstantiateCBProc)( -#if NeedFunctionPrototypes XLCd /* lcd */, Display* /* display */, XrmDatabase /* rdb */, @@ -275,14 +262,11 @@ typedef Bool (*XUnregisterIMInstantiateCBProc)( char* /* res_class */, XIDProc /* callback */, XPointer /* client_data */ -#endif ); typedef XrmMethods (*XrmInitParseInfoProc)( -#if NeedFunctionPrototypes XLCd /* lcd */, XPointer* /* state */ -#endif ); typedef int (*XmbTextPropertyToTextListProc)( @@ -386,33 +370,25 @@ typedef struct _XlcResource { #define XlcNumber(arr) (sizeof(arr) / sizeof(arr[0])) typedef Status (*XCloseOMProc)( -#if NeedFunctionPrototypes XOM /* om */ -#endif ); typedef char* (*XSetOMValuesProc)( -#if NeedFunctionPrototypes XOM /* om */, XlcArgList /* args */, int /* num_args */ -#endif ); typedef char* (*XGetOMValuesProc)( -#if NeedFunctionPrototypes XOM /* om */, XlcArgList /* args */, int /* num_args */ -#endif ); typedef XOC (*XCreateOCProc)( -#if NeedFunctionPrototypes XOM /* om */, XlcArgList /* args */, int /* num_args */ -#endif ); typedef struct _XOMMethodsRec { @@ -444,25 +420,19 @@ typedef struct _XOM { } XOMRec; typedef void (*XDestroyOCProc)( -#if NeedFunctionPrototypes XOC /* oc */ -#endif ); typedef char* (*XSetOCValuesProc)( -#if NeedFunctionPrototypes XOC /* oc */, XlcArgList /* args */, int /* num_args */ -#endif ); typedef char* (*XGetOCValuesProc)( -#if NeedFunctionPrototypes XOC /* oc */, XlcArgList /* args */, int /* num_args */ -#endif ); /* @@ -475,25 +445,20 @@ typedef char* (*XGetOCValuesProc)( */ typedef int (*XmbTextEscapementProc)( -#if NeedFunctionPrototypes XFontSet /* font_set */, _Xconst char* /* text */, int /* text_len */ -#endif ); typedef int (*XmbTextExtentsProc)( -#if NeedFunctionPrototypes XFontSet /* font_set */, _Xconst char* /* text */, int /* text_len */, XRectangle* /* overall_ink_extents */, XRectangle* /* overall_logical_extents */ -#endif ); typedef Status (*XmbTextPerCharExtentsProc)( -#if NeedFunctionPrototypes XFontSet /* font_set */, _Xconst char* /* text */, int /* text_len */, @@ -503,11 +468,9 @@ typedef Status (*XmbTextPerCharExtentsProc)( int* /* num_chars */, XRectangle* /* max_ink_extents */, XRectangle* /* max_logical_extents */ -#endif ); typedef int (*XmbDrawStringProc)( -#if NeedFunctionPrototypes Display* /* display */, Drawable /* drawable */, XFontSet /* font_set */, @@ -516,11 +479,9 @@ typedef int (*XmbDrawStringProc)( int /* y */, _Xconst char* /* text */, int /* text_len */ -#endif ); typedef void (*XmbDrawImageStringProc)( -#if NeedFunctionPrototypes Display* /* display */, Drawable /* drawable */, XFontSet /* font_set */, @@ -529,29 +490,23 @@ typedef void (*XmbDrawImageStringProc)( int /* y */, _Xconst char* /* text */, int /* text_len */ -#endif ); typedef int (*XwcTextEscapementProc)( -#if NeedFunctionPrototypes XFontSet /* font_set */, _Xconst wchar_t* /* text */, int /* text_len */ -#endif ); typedef int (*XwcTextExtentsProc)( -#if NeedFunctionPrototypes XFontSet /* font_set */, _Xconst wchar_t* /* text */, int /* text_len */, XRectangle* /* overall_ink_extents */, XRectangle* /* overall_logical_extents */ -#endif ); typedef Status (*XwcTextPerCharExtentsProc)( -#if NeedFunctionPrototypes XFontSet /* font_set */, _Xconst wchar_t* /* text */, int /* text_len */, @@ -561,11 +516,9 @@ typedef Status (*XwcTextPerCharExtentsProc)( int* /* num_chars */, XRectangle* /* max_ink_extents */, XRectangle* /* max_logical_extents */ -#endif ); typedef int (*XwcDrawStringProc)( -#if NeedFunctionPrototypes Display* /* display */, Drawable /* drawable */, XFontSet /* font_set */, @@ -574,11 +527,9 @@ typedef int (*XwcDrawStringProc)( int /* y */, _Xconst wchar_t* /* text */, int /* text_len */ -#endif ); typedef void (*XwcDrawImageStringProc)( -#if NeedFunctionPrototypes Display* /* display */, Drawable /* drawable */, XFontSet /* font_set */, @@ -587,7 +538,6 @@ typedef void (*XwcDrawImageStringProc)( int /* y */, _Xconst wchar_t* /* text */, int /* text_len */ -#endif ); typedef struct { @@ -647,12 +597,6 @@ typedef struct _XOC { } XOCRec; -/* current Ultrix compiler gets horribly confused */ -#if defined(FUNCPROTO) && defined(ultrix) -#undef NeedFunctionPrototypes -#endif - - /* * X Input Managers are an instantiable object, so we define it, the * object itself, a method list and data. @@ -663,39 +607,25 @@ typedef struct _XOC { */ typedef struct { Status (*close)( -#if NeedFunctionPrototypes XIM -#endif ); char* (*set_values)( -#if NeedFunctionPrototypes XIM, XIMArg* -#endif ); char* (*get_values)( -#if NeedFunctionPrototypes XIM, XIMArg* -#endif ); XIC (*create_ic)( -#if NeedFunctionPrototypes XIM, XIMArg* -#endif ); int (*ctstombs)( -#if NeedFunctionPrototypes XIM, char*, int, char*, int, Status * -#endif ); int (*ctstowcs)( -#if NeedFunctionPrototypes XIM, char*, int, wchar_t*, int, Status * -#endif ); int (*ctstoutf8)( -#if NeedFunctionPrototypes XIM, char*, int, char*, int, Status * -#endif ); } XIMMethodsRec, *XIMMethods; @@ -746,59 +676,37 @@ typedef struct _XIM { */ typedef struct { void (*destroy)( -#if NeedFunctionPrototypes XIC -#endif ); void (*set_focus)( -#if NeedFunctionPrototypes XIC -#endif ); void (*unset_focus)( -#if NeedFunctionPrototypes XIC -#endif ); char* (*set_values)( -#if NeedFunctionPrototypes XIC, XIMArg* -#endif ); char* (*get_values)( -#if NeedFunctionPrototypes XIC, XIMArg* -#endif ); char* (*mb_reset)( -#if NeedFunctionPrototypes XIC -#endif ); wchar_t* (*wc_reset)( -#if NeedFunctionPrototypes XIC -#endif ); char* (*utf8_reset)( -#if NeedFunctionPrototypes XIC -#endif ); int (*mb_lookup_string)( -#if NeedFunctionPrototypes XIC, XKeyEvent*, char*, int, KeySym*, Status* -#endif ); int (*wc_lookup_string)( -#if NeedFunctionPrototypes XIC, XKeyEvent*, wchar_t*, int, KeySym*, Status* -#endif ); int (*utf8_lookup_string)( -#if NeedFunctionPrototypes XIC, XKeyEvent*, char*, int, KeySym*, Status* -#endif ); } XICMethodsRec, *XICMethods; @@ -840,10 +748,6 @@ typedef struct _XIC { XICCoreRec core; /* data of this IC */ } XICRec; -/* current Ultrix compiler gets horribly confused */ -#if !defined(NeedFunctionPrototypes) && defined(FUNCPROTO) -#define NeedFunctionPrototypes 1 -#endif /* If the argument 'name' is appropriate for this loader, it instantiates an XLCd object with appropriate locale methods and returns it. May return @@ -855,7 +759,7 @@ typedef XLCd (*XLCdLoadProc)( _XFUNCPROTOBEGIN extern XLCd _XOpenLC( - const char* name + char* name ); extern void _XCloseLC( @@ -876,25 +780,19 @@ extern char *_XlcDefaultMapModifiers( ); extern void _XIMCompileResourceList( -#if NeedFunctionPrototypes XIMResourceList /* res */, unsigned int /* num_res */ -#endif ); extern void _XCopyToArg( -#if NeedFunctionPrototypes XPointer /* src */, XPointer* /* dst */, unsigned int /* size */ -#endif ); extern char ** _XParseBaseFontNameList( -#if NeedFunctionPrototypes char* /* str */, int* /* num */ -#endif ); extern XrmMethods _XrmInitParseInfo( @@ -902,54 +800,42 @@ extern XrmMethods _XrmInitParseInfo( ); extern void _XRegisterFilterByMask( -#if NeedFunctionPrototypes Display* /* dpy */, Window /* window */, unsigned long /* event_mask */, Bool (*)( -#if NeedNestedPrototypes Display* /* display */, Window /* window */, XEvent* /* event */, XPointer /* client_data */ -#endif ) /* filter */, XPointer /* client_data */ -#endif ); extern void _XRegisterFilterByType( -#if NeedFunctionPrototypes Display* /* dpy */, Window /* window */, int /* start_type */, int /* end_type */, Bool (*)( -#if NeedNestedPrototypes Display* /* display */, Window /* window */, XEvent* /* event */, XPointer /* client_data */ -#endif ) /* filter */, XPointer /* client_data */ -#endif ); extern void _XUnregisterFilter( -#if NeedFunctionPrototypes Display* /* dpy */, Window /* window */, Bool (*)( -#if NeedNestedPrototypes Display* /* display */, Window /* window */, XEvent* /* event */, XPointer /* client_data */ -#endif ) /* filter */, XPointer /* client_data */ -#endif ); extern void _XlcCountVaList( @@ -963,6 +849,19 @@ extern void _XlcVaToArgList( XlcArgList* args_return ); + +extern void _XlcCopyFromArg( + char * src, + char * dst, + int size +); + +extern void _XlcCopyToArg( + char * src, + char ** dst, + int size +); + extern void _XlcCompileResourceList( XlcResourceList resources, int num_resources diff --git a/src/xlibi18n/imKStoUCS.c b/src/xlibi18n/imKStoUCS.c index 693db4a..56ec7e2 100644 --- a/src/xlibi18n/imKStoUCS.c +++ b/src/xlibi18n/imKStoUCS.c @@ -1,6 +1,7 @@ -/* $XFree86: xc/lib/X11/imKStoUCS.c,v 1.2 2001/07/25 15:04:45 dawes Exp $ */ +/* $XFree86: xc/lib/X11/imKStoUCS.c,v 1.5 2003/11/17 22:20:11 dawes Exp $ */ #include "Xlibint.h" +#include "Ximint.h" static unsigned short const keysym_to_unicode_1a1_1ff[] = { 0x0104, 0x02d8, 0x0141, 0x0000, 0x013d, 0x015a, 0x0000, /* 0x01a0-0x01a7 */ @@ -233,8 +234,8 @@ static unsigned short keysym_to_unicode_15d0_15f6[] = { static unsigned short keysym_to_unicode_16a0_16f6[] = { 0x0000, 0x0000, 0xf0a2, 0x1e8a, 0x0000, 0xf0a5, 0x012c, 0xf0a7, /* 0x16a0-0x16a7 */ 0xf0a8, 0x01b5, 0x01e6, 0x0000, 0x0000, 0x0000, 0x0000, 0x019f, /* 0x16a8-0x16af */ - 0x0000, 0x017e, 0xf0b2, 0x1e8b, 0x01d1, 0xf0b5, 0x012d, 0xf0b7, /* 0x16b0-0x16b7 */ - 0xf0b8, 0x01b6, 0x01e7, 0x01d2, 0x0000, 0x0000, 0x0000, 0x0275, /* 0x16b8-0x16bf */ + 0x0000, 0x0000, 0xf0b2, 0x1e8b, 0x01d1, 0xf0b5, 0x012d, 0xf0b7, /* 0x16b0-0x16b7 */ + 0xf0b8, 0x01b6, 0x01e7, 0x0000, 0x0000, 0x01d2, 0x0000, 0x0275, /* 0x16b8-0x16bf */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x018f, 0x0000, /* 0x16c0-0x16c7 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x16c8-0x16cf */ 0x0000, 0x1e36, 0xf0d2, 0xf0d3, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x16d0-0x16d7 */ @@ -266,12 +267,7 @@ static unsigned short const keysym_to_unicode_20a0_20ac[] = { }; unsigned int -#if NeedFunctionPrototypes KeySymToUcs4(KeySym keysym) -#else -KeySymToUcs4(keysym) - KeySym keysym; -#endif { /* 'Unicode keysym' */ if ((keysym & 0xff000000) == 0x01000000) @@ -316,7 +312,7 @@ KeySymToUcs4(keysym) else if (keysym > 0x169f && keysym < 0x16f7) return keysym_to_unicode_16a0_16f6[keysym - 0x16a0]; else if (keysym > 0x1e9e && keysym < 0x1f00) - return keysym_to_unicode_1e9f_1eff[keysym - 0x1ea0]; + return keysym_to_unicode_1e9f_1eff[keysym - 0x1e9f]; else if (keysym > 0x209f && keysym < 0x20ad) return keysym_to_unicode_20a0_20ac[keysym - 0x20a0]; else diff --git a/src/xlibi18n/lcCT.c b/src/xlibi18n/lcCT.c index fcaca22..cae3f6f 100644 --- a/src/xlibi18n/lcCT.c +++ b/src/xlibi18n/lcCT.c @@ -36,7 +36,7 @@ * Modifier: Ivan Pascal The XFree86 Project * Modifier: Bruno Haible The XFree86 Project */ -/* $XFree86: xc/lib/X11/lcCT.c,v 3.27 2002/10/08 23:31:35 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcCT.c,v 3.28 2003/08/04 10:32:20 eich Exp $ */ #include "Xlibint.h" #include "XlcPubI.h" @@ -116,8 +116,10 @@ static CTDataRec default_ct_data[] = defined in XLC_LOCALE files, using "\033%/1" or "\033%/2". */ /* Backward compatibility with XFree86 3.x */ +#if 1 { "ISO8859-14:GR", "\033%/1" }, { "ISO8859-15:GR", "\033%/1" }, +#endif /* For use by utf8 -> ctext */ { "BIG5-0:GLGR", "\033%/2"}, /* used by Emacs, but not backed by ISO-IR */ @@ -400,7 +402,7 @@ typedef struct _CTInfoRec { * at runtime through _XlcAddCT. */ static CTInfo ct_list = NULL; -static CTInfo *ct_list_end = &ct_list; +static CTInfo ct_list_end = NULL; /* * Returns a Compound Text info record for an ESC sequence. @@ -534,8 +536,12 @@ _XlcAddCT( /* Insert it at the end. If there are duplicates CTinfo entries for the same XlcCharSet, we want the first (standard) one to override the second (user defined) one. */ - ct_info->next = *ct_list_end; - *ct_list_end = ct_info; + ct_info->next = NULL; + if (ct_list_end) + ct_list_end->next = ct_info; + else + ct_list = ct_info; + ct_list_end = ct_info; } else { if (existing_info->charset != charset /* We have a conflict, with one exception: JISX0208.1983-0 and diff --git a/src/xlibi18n/lcDB.c b/src/xlibi18n/lcDB.c index 8e12a69..4a88ea3 100644 --- a/src/xlibi18n/lcDB.c +++ b/src/xlibi18n/lcDB.c @@ -28,7 +28,7 @@ * This is source code modified by FUJITSU LIMITED under the Joint * Development Agreement for the CDE/Motif PST. */ -/* $XFree86: xc/lib/X11/lcDB.c,v 3.15 2002/05/31 18:45:42 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcDB.c,v 3.16 2003/05/27 22:26:26 tsi Exp $ */ @@ -126,8 +126,7 @@ static TokenTable token_tbl[] = { { T_NUMERIC_HEX, "\\x", 2, f_numeric }, { T_NUMERIC_DEC, "\\d", 2, f_numeric }, { T_NUMERIC_OCT, "\\o", 2, f_numeric }, - { T_DEFAULT, " ", 1, f_default }, /* any character */ - {0} + { T_DEFAULT, " ", 1, f_default } /* any character */ }; #define SYM_CR '\r' diff --git a/src/xlibi18n/lcFile.c b/src/xlibi18n/lcFile.c index d94045d..5ef493b 100644 --- a/src/xlibi18n/lcFile.c +++ b/src/xlibi18n/lcFile.c @@ -23,7 +23,7 @@ * SOFTWARE. * */ -/* $XFree86: xc/lib/X11/lcFile.c,v 3.30.2.1 2003/03/11 23:18:49 herrb Exp $ */ +/* $XFree86: xc/lib/X11/lcFile.c,v 3.33 2003/07/16 01:38:26 dawes Exp $ */ #include <stdlib.h> #include <stdio.h> @@ -31,9 +31,17 @@ #include "Xlibint.h" #include "XlcPubI.h" #include <X11/Xos.h> +#if 0 +#include <unistd.h> /* in theory delivers getresuid/gid prototypes, + * in practice only the Linux syscall wrapper is there. */ +#endif + /************************************************************************/ +#ifdef __UNIXOS2__ +# define seteuid setuid +#endif #define iscomment(ch) ((ch) == '#' || (ch) == '\0') #if defined(WIN32) #define isreadable(f) (_XAccessFile(f)) @@ -109,6 +117,41 @@ parse_line( return argc; } +#ifdef __UNIXOS2__ + +/* fg021216: entries in locale files are separated by colons while under + OS/2, path entries are separated by semicolon, so we need two functions */ + +static int +parse_line1( + char *line, + char **argv, + int argsize) +{ + int argc = 0; + char *p = line; + + while (argc < argsize) { + while (isspace(*p)) { + ++p; + } + if (*p == '\0') { + break; + } + argv[argc++] = p; + while (*p != ';' && *p != '\n' && *p != '\0') { + ++p; + } + if (*p == '\0') { + break; + } + *p++ = '\0'; + } + + return argc; +} +#endif /* __UNIXOS2__ */ + /* Splits a colon separated list of directories, and returns the constituent paths (without trailing slash). At most argsize constituents are stored at argv[0..argsize-1]. The number of stored constituents is returned. */ @@ -121,7 +164,11 @@ _XlcParsePath( char *p = path; int n, i; +#ifndef __UNIXOS2__ n = parse_line(path, argv, argsize); +#else + n = parse_line1(path, argv, argsize); +#endif for (i = 0; i < n; ++i) { int len; p = argv[i]; diff --git a/src/xlibi18n/lcGeneric.c b/src/xlibi18n/lcGeneric.c index 06d370d..8eaf498 100644 --- a/src/xlibi18n/lcGeneric.c +++ b/src/xlibi18n/lcGeneric.c @@ -28,7 +28,7 @@ * This is source code modified by FUJITSU LIMITED under the Joint * Development Agreement for the CDE/Motif PST. */ -/* $XFree86: xc/lib/X11/lcGeneric.c,v 3.17 2003/02/03 22:11:58 paulo Exp $ */ +/* $XFree86: xc/lib/X11/lcGeneric.c,v 3.20 2003/09/24 02:43:12 dawes Exp $ */ #include <stdio.h> #include "Xlibint.h" @@ -787,7 +787,7 @@ load_generic( if (num > 0) { static struct { const char *str; - int type; + EncodingType type; } shifts[] = { {"<SS>", E_SS}, {"<LSL>", E_LSL}, @@ -801,7 +801,7 @@ load_generic( for ( ; num-- > 0; value++) { char encoding[256]; char *tmp = *value; - int type = E_SS; /* for BC */ + EncodingType type = E_SS; /* for BC */ for (j = 0; shifts[j].str; j++) { if (!_XlcNCompareISOLatin1(tmp, shifts[j].str, strlen(shifts[j].str))) { @@ -868,7 +868,7 @@ load_generic( /* For VW/UDC */ /***** 3.4.2 byteM (1 <= M <= length)*****/ for (M=1; M-1 < codeset->length; M++) { - long start,end; + unsigned long start,end; ByteInfo tmpb; sprintf(name,"%s.%s%d",cs,"byte",M); @@ -992,8 +992,8 @@ err: super_class's initialize method() */ static Bool -initialize_core(lcd) - XLCd lcd; +initialize_core( + XLCd lcd) { _XInitDynamicOM(lcd); diff --git a/src/xlibi18n/lcPrTxt.c b/src/xlibi18n/lcPrTxt.c index 8998ff2..9078b9b 100644 --- a/src/xlibi18n/lcPrTxt.c +++ b/src/xlibi18n/lcPrTxt.c @@ -23,7 +23,7 @@ * Author: Katsuhisa Yano TOSHIBA Corp. * mopi@osa.ilab.toshiba.co.jp */ -/* $XFree86: xc/lib/X11/lcPrTxt.c,v 1.8 2002/06/03 22:36:00 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcPrTxt.c,v 1.10 2003/05/29 13:22:51 pascal Exp $ */ #include "Xlibint.h" #include "XlcPubI.h" @@ -154,7 +154,6 @@ _XTextPropertyToTextList( buf_len = text_prop->nitems * 6 + 1; else buf_len = text_prop->nitems * XLC_PUBLIC(lcd, mb_cur_max) + 1; - buf = (XPointer) Xmalloc(buf_len); } buf = (XPointer) Xmalloc(buf_len); if (buf == NULL) @@ -213,7 +212,8 @@ _XTextPropertyToTextList( to++; to_left--; } - _XlcResetConverter(conv); + if (! do_strcpy) + _XlcResetConverter(conv); } else str_ptr++; diff --git a/src/xlibi18n/lcPublic.c b/src/xlibi18n/lcPublic.c index 853ed8f..80459d6 100644 --- a/src/xlibi18n/lcPublic.c +++ b/src/xlibi18n/lcPublic.c @@ -23,7 +23,7 @@ * Author: Katsuhisa Yano TOSHIBA Corp. * mopi@osa.ilab.toshiba.co.jp */ -/* $XFree86: xc/lib/X11/lcPublic.c,v 1.11 2001/11/16 00:52:28 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcPublic.c,v 1.12 2003/04/13 19:22:21 dawes Exp $ */ #include <stdio.h> #include "Xlibint.h" @@ -206,7 +206,6 @@ initialize( int len; char sinamebuf[256]; char* siname; - char *_XlcMapOSLocaleName(); #endif _XlcInitCTInfo(); diff --git a/src/xlibi18n/lcStd.c b/src/xlibi18n/lcStd.c index 9a07bbb..b8e5ae4 100644 --- a/src/xlibi18n/lcStd.c +++ b/src/xlibi18n/lcStd.c @@ -23,17 +23,17 @@ * Author: Katsuhisa Yano TOSHIBA Corp. * mopi@osa.ilab.toshiba.co.jp */ -/* $XFree86: xc/lib/X11/lcStd.c,v 1.5 2001/01/17 19:41:55 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcStd.c,v 1.7 2003/04/17 02:06:32 dawes Exp $ */ #include "Xlibint.h" #include "XlcPubI.h" int -_Xlcmbtowc(lcd, wstr, str, len) - XLCd lcd; - wchar_t *wstr; - char *str; - int len; +_Xlcmbtowc( + XLCd lcd, + wchar_t *wstr, + char *str, + int len) { static XLCd last_lcd = NULL; static XlcConv conv = NULL; @@ -74,10 +74,10 @@ _Xlcmbtowc(lcd, wstr, str, len) } int -_Xlcwctomb(lcd, str, wc) - XLCd lcd; - char *str; - wchar_t wc; +_Xlcwctomb( + XLCd lcd, + char *str, + wchar_t wc) { static XLCd last_lcd = NULL; static XlcConv conv = NULL; @@ -117,11 +117,11 @@ _Xlcwctomb(lcd, str, wc) } int -_Xlcmbstowcs(lcd, wstr, str, len) - XLCd lcd; - wchar_t *wstr; - char *str; - int len; +_Xlcmbstowcs( + XLCd lcd, + wchar_t *wstr, + char *str, + int len) { XlcConv conv; XPointer from, to; @@ -156,11 +156,11 @@ _Xlcmbstowcs(lcd, wstr, str, len) } int -_Xlcwcstombs(lcd, str, wstr, len) - XLCd lcd; - char *str; - wchar_t *wstr; - int len; +_Xlcwcstombs( + XLCd lcd, + char *str, + wchar_t *wstr, + int len) { XlcConv conv; XPointer from, to; @@ -196,61 +196,63 @@ _Xlcwcstombs(lcd, str, wstr, len) int -_Xmbtowc(wstr, str, len) - wchar_t *wstr; +_Xmbtowc( + wchar_t *wstr, #ifdef ISC - char const *str; - size_t len; + char const *str, + size_t len #else - char *str; - int len; + char *str, + int len #endif + ) { return _Xlcmbtowc((XLCd) NULL, wstr, str, len); } int -_Xmblen(str, len) +_Xmblen( #ifdef ISC - char const *str; - size_t len; + char const *str, + size_t len #else - char *str; - int len; + char *str, + int len #endif + ) { return _Xmbtowc((wchar_t *) NULL, str, len); } int -_Xwctomb(str, wc) - char *str; - wchar_t wc; +_Xwctomb( + char *str, + wchar_t wc) { return _Xlcwctomb((XLCd) NULL, str, wc); } int -_Xmbstowcs(wstr, str, len) - wchar_t *wstr; - char *str; - int len; +_Xmbstowcs( + wchar_t *wstr, + char *str, + int len) { return _Xlcmbstowcs((XLCd) NULL, wstr, str, len); } int -_Xwcstombs(str, wstr, len) - char *str; - wchar_t *wstr; - int len; +_Xwcstombs( + char *str, + wchar_t *wstr, + int len) { return _Xlcwcstombs((XLCd) NULL, str, wstr, len); } wchar_t * -_Xwcscpy(wstr1, wstr2) - register wchar_t *wstr1, *wstr2; +_Xwcscpy( + register wchar_t *wstr1, register wchar_t *wstr2) { wchar_t *wstr_tmp = wstr1; @@ -261,9 +263,9 @@ _Xwcscpy(wstr1, wstr2) } wchar_t * -_Xwcsncpy(wstr1, wstr2, len) - register wchar_t *wstr1, *wstr2; - register int len; +_Xwcsncpy( + register wchar_t *wstr1, register wchar_t *wstr2, + register int len) { wchar_t *wstr_tmp = wstr1; @@ -278,8 +280,8 @@ _Xwcsncpy(wstr1, wstr2, len) } int -_Xwcslen(wstr) - register wchar_t *wstr; +_Xwcslen( + register wchar_t *wstr) { register wchar_t *wstr_ptr = wstr; @@ -290,8 +292,8 @@ _Xwcslen(wstr) } int -_Xwcscmp(wstr1, wstr2) - register wchar_t *wstr1, *wstr2; +_Xwcscmp( + register wchar_t *wstr1, register wchar_t *wstr2) { for ( ; *wstr1 && *wstr2; wstr1++, wstr2++) if (*wstr1 != *wstr2) @@ -301,9 +303,9 @@ _Xwcscmp(wstr1, wstr2) } int -_Xwcsncmp(wstr1, wstr2, len) - register wchar_t *wstr1, *wstr2; - register int len; +_Xwcsncmp( + register wchar_t *wstr1, register wchar_t *wstr2, + register int len) { for ( ; *wstr1 && *wstr2 && len > 0; wstr1++, wstr2++, len--) if (*wstr1 != *wstr2) @@ -317,11 +319,11 @@ _Xwcsncmp(wstr1, wstr2, len) int -_Xlcmbstoutf8(lcd, ustr, str, len) - XLCd lcd; - char *ustr; - const char *str; - int len; +_Xlcmbstoutf8( + XLCd lcd, + char *ustr, + const char *str, + int len) { XlcConv conv; XPointer from, to; @@ -356,10 +358,10 @@ _Xlcmbstoutf8(lcd, ustr, str, len) } int -_Xmbstoutf8(ustr, str, len) - char *ustr; - const char *str; - int len; +_Xmbstoutf8( + char *ustr, + const char *str, + int len) { return _Xlcmbstoutf8((XLCd) NULL, ustr, str, len); } diff --git a/src/xlibi18n/lcUTF8.c b/src/xlibi18n/lcUTF8.c index 1f40704..cc51c30 100644 --- a/src/xlibi18n/lcUTF8.c +++ b/src/xlibi18n/lcUTF8.c @@ -24,7 +24,7 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/X11/lcUTF8.c,v 1.15 2002/10/08 23:31:36 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcUTF8.c,v 1.16 2003/11/17 22:20:12 dawes Exp $ */ /* * This file contains: @@ -129,16 +129,8 @@ typedef unsigned int ucs4_t; typedef struct _Utf8ConvRec { const char *name; XrmQuark xrm_name; -#if NeedFunctionPrototypes int (* cstowc) (XlcConv, ucs4_t *, unsigned char const *, int); -#else - int (* cstowc) (); -#endif -#if NeedFunctionPrototypes int (* wctocs) (XlcConv, unsigned char *, ucs4_t, int); -#else - int (* wctocs) (); -#endif } Utf8ConvRec, *Utf8Conv; /* diff --git a/src/xlibi18n/lcUniConv/README b/src/xlibi18n/lcUniConv/README index 844f090..6ce59c7 100644 --- a/src/xlibi18n/lcUniConv/README +++ b/src/xlibi18n/lcUniConv/README @@ -1,3 +1,5 @@ +$XFree86: xc/lib/X11/lcUniConv/README,v 1.3 2003/10/24 15:34:01 tsi Exp $ + The files in this directory are taken from the libiconv-1.1 package. The *.h files were generated from tables (mostly from ftp.unicode.org) using @@ -6,5 +8,5 @@ optimizations were applied by hand. If you find a bug in these files, instead of modifying them in XFree86 and let it diverge from libiconv, please notify the libiconv maintainer -(currently <haible@clisp.cons.org>) so he can fix both in synch. +(currently <bruno@clisp.org>) so he can fix both in synch. diff --git a/src/xlibi18n/lcUniConv/armscii_8.h b/src/xlibi18n/lcUniConv/armscii_8.h index 32b4e9c..6f8c10c 100644 --- a/src/xlibi18n/lcUniConv/armscii_8.h +++ b/src/xlibi18n/lcUniConv/armscii_8.h @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/X11/lcUniConv/armscii_8.h,v 1.3 2000/11/29 17:40:28 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcUniConv/armscii_8.h,v 1.4 2003/07/15 17:33:45 pascal Exp $ */ /* * ARMSCII-8 @@ -6,8 +6,8 @@ static const unsigned short armscii_8_2uni[96] = { /* 0xa0 */ - 0x00a0, 0x2741, 0x00a7, 0x0589, 0x0029, 0x0028, 0x00bb, 0x00ab, - 0x2014, 0x002e, 0x055d, 0x002c, 0x002d, 0x055f, 0x2026, 0x055c, + 0x00a0, 0xfffd, 0x0587, 0x0589, 0x0029, 0x0028, 0x00bb, 0x00ab, + 0x2014, 0x002e, 0x055d, 0x002c, 0x002d, 0x058a, 0x2026, 0x055c, /* 0xb0 */ 0x055b, 0x055e, 0x0531, 0x0561, 0x0532, 0x0562, 0x0533, 0x0563, 0x0534, 0x0564, 0x0535, 0x0565, 0x0536, 0x0566, 0x0537, 0x0567, @@ -22,26 +22,32 @@ static const unsigned short armscii_8_2uni[96] = { 0x054c, 0x057c, 0x054d, 0x057d, 0x054e, 0x057e, 0x054f, 0x057f, /* 0xf0 */ 0x0550, 0x0580, 0x0551, 0x0581, 0x0552, 0x0582, 0x0553, 0x0583, - 0x0554, 0x0584, 0x0555, 0x0585, 0x0556, 0x0586, 0x2019, 0x0027, + 0x0554, 0x0584, 0x0555, 0x0585, 0x0556, 0x0586, 0x055a, 0xfffd, }; static int armscii_8_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n) { unsigned char c = *s; - if (c < 0xa0) + if (c < 0xa0) { *pwc = (ucs4_t) c; - else - *pwc = (ucs4_t) armscii_8_2uni[c-0xa0]; - return 1; + return 1; + } + else { + unsigned short wc = armscii_8_2uni[c-0xa0]; + if (wc != 0xfffd) { + *pwc = (ucs4_t) wc; + return 1; + } + } + return RET_ILSEQ; } -static const unsigned char armscii_8_page00[16] = { - 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0xff, /* 0x20-0x27 */ +static const unsigned char armscii_8_page00[8] = { 0xa5, 0xa4, 0x2a, 0x2b, 0xab, 0xac, 0xa9, 0x2f, /* 0x28-0x2f */ }; static const unsigned char armscii_8_page00_1[32] = { - 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa2, /* 0xa0-0xa7 */ + 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa0-0xa7 */ 0x00, 0x00, 0x00, 0xa7, 0x00, 0x00, 0x00, 0x00, /* 0xa8-0xaf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xb0-0xb7 */ 0x00, 0x00, 0x00, 0xa6, 0x00, 0x00, 0x00, 0x00, /* 0xb8-0xbf */ @@ -52,17 +58,17 @@ static const unsigned char armscii_8_page05[96] = { 0xd0, 0xd2, 0xd4, 0xd6, 0xd8, 0xda, 0xdc, 0xde, /* 0x40-0x47 */ 0xe0, 0xe2, 0xe4, 0xe6, 0xe8, 0xea, 0xec, 0xee, /* 0x48-0x4f */ 0xf0, 0xf2, 0xf4, 0xf6, 0xf8, 0xfa, 0xfc, 0x00, /* 0x50-0x57 */ - 0x00, 0x00, 0x00, 0xb0, 0xaf, 0xaa, 0xb1, 0xad, /* 0x58-0x5f */ + 0x00, 0x00, 0xfe, 0xb0, 0xaf, 0xaa, 0xb1, 0x00, /* 0x58-0x5f */ 0x00, 0xb3, 0xb5, 0xb7, 0xb9, 0xbb, 0xbd, 0xbf, /* 0x60-0x67 */ 0xc1, 0xc3, 0xc5, 0xc7, 0xc9, 0xcb, 0xcd, 0xcf, /* 0x68-0x6f */ 0xd1, 0xd3, 0xd5, 0xd7, 0xd9, 0xdb, 0xdd, 0xdf, /* 0x70-0x77 */ 0xe1, 0xe3, 0xe5, 0xe7, 0xe9, 0xeb, 0xed, 0xef, /* 0x78-0x7f */ - 0xf1, 0xf3, 0xf5, 0xf7, 0xf9, 0xfb, 0xfd, 0x00, /* 0x80-0x87 */ - 0x00, 0xa3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x88-0x8f */ + 0xf1, 0xf3, 0xf5, 0xf7, 0xf9, 0xfb, 0xfd, 0xa2, /* 0x80-0x87 */ + 0x00, 0xa3, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x88-0x8f */ }; static const unsigned char armscii_8_page20[24] = { 0x00, 0x00, 0x00, 0x00, 0xa8, 0x00, 0x00, 0x00, /* 0x10-0x17 */ - 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x18-0x1f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x18-0x1f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xae, 0x00, /* 0x20-0x27 */ }; @@ -70,12 +76,12 @@ static int armscii_8_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) { unsigned char c = 0; - if (wc < 0x0020) { + if (wc < 0x0028) { *r = wc; return 1; } - else if (wc >= 0x0020 && wc < 0x0030) - c = armscii_8_page00[wc-0x0020]; + else if (wc >= 0x0028 && wc < 0x0030) + c = armscii_8_page00[wc-0x0028]; else if (wc >= 0x0030 && wc < 0x00a0) c = wc; else if (wc >= 0x00a0 && wc < 0x00c0) @@ -84,8 +90,6 @@ armscii_8_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) c = armscii_8_page05[wc-0x0530]; else if (wc >= 0x2010 && wc < 0x2028) c = armscii_8_page20[wc-0x2010]; - else if (wc == 0x2741) - c = 0xa1; if (c != 0) { *r = c; return 1; diff --git a/src/xlibi18n/lcUniConv/big5.h b/src/xlibi18n/lcUniConv/big5.h index 83e5f40..deff866 100644 --- a/src/xlibi18n/lcUniConv/big5.h +++ b/src/xlibi18n/lcUniConv/big5.h @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/X11/lcUniConv/big5.h,v 1.1 2000/11/28 18:50:03 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcUniConv/big5.h,v 1.2 2003/05/27 22:26:28 tsi Exp $ */ /* * BIG5 @@ -4103,7 +4103,7 @@ big5_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) { if (n >= 2) { const Summary16 *summary = NULL; - if (wc >= 0x0000 && wc < 0x0100) + if (wc < 0x0100) summary = &big5_uni2indx_page00[(wc>>4)]; else if (wc >= 0x0200 && wc < 0x0460) summary = &big5_uni2indx_page02[(wc>>4)-0x020]; diff --git a/src/xlibi18n/lcUniConv/gb2312.h b/src/xlibi18n/lcUniConv/gb2312.h index 7337e0b..3c0c359 100644 --- a/src/xlibi18n/lcUniConv/gb2312.h +++ b/src/xlibi18n/lcUniConv/gb2312.h @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/X11/lcUniConv/gb2312.h,v 1.4 2001/08/09 19:14:07 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcUniConv/gb2312.h,v 1.5 2003/05/27 22:26:29 tsi Exp $ */ /* * GB2312.1980-0 @@ -2518,7 +2518,7 @@ gb2312_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) { if (n >= 2) { const Summary16 *summary = NULL; - if (wc >= 0x0000 && wc < 0x0460) + if (wc < 0x0460) summary = &gb2312_uni2indx_page00[(wc>>4)]; else if (wc >= 0x2000 && wc < 0x2650) summary = &gb2312_uni2indx_page20[(wc>>4)-0x200]; diff --git a/src/xlibi18n/lcUniConv/iso8859_16.h b/src/xlibi18n/lcUniConv/iso8859_16.h index 3efe2ff..5b3f870 100644 --- a/src/xlibi18n/lcUniConv/iso8859_16.h +++ b/src/xlibi18n/lcUniConv/iso8859_16.h @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/X11/lcUniConv/iso8859_16.h,v 1.3 2000/11/29 17:40:31 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcUniConv/iso8859_16.h,v 1.4 2003/07/15 17:33:45 pascal Exp $ */ /* * ISO-8859-16 @@ -6,8 +6,8 @@ static const unsigned short iso8859_16_2uni[96] = { /* 0xa0 */ - 0x00a0, 0x0104, 0x0105, 0x0141, 0x20ac, 0x00ab, 0x0160, 0x00a7, - 0x0161, 0x00a9, 0x0218, 0x201e, 0x0179, 0x00ad, 0x017a, 0x017b, + 0x00a0, 0x0104, 0x0105, 0x0141, 0x20ac, 0x201e, 0x0160, 0x00a7, + 0x0161, 0x00a9, 0x0218, 0x00ab, 0x0179, 0x00ad, 0x017a, 0x017b, /* 0xb0 */ 0x00b0, 0x00b1, 0x010c, 0x0142, 0x017d, 0x201d, 0x00b6, 0x00b7, 0x017e, 0x010d, 0x0219, 0x00bb, 0x0152, 0x0153, 0x0178, 0x017c, @@ -38,7 +38,7 @@ iso8859_16_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n) static const unsigned char iso8859_16_page00[224] = { 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa7, /* 0xa0-0xa7 */ - 0x00, 0xa9, 0x00, 0xa5, 0x00, 0xad, 0x00, 0x00, /* 0xa8-0xaf */ + 0x00, 0xa9, 0x00, 0xab, 0x00, 0xad, 0x00, 0x00, /* 0xa8-0xaf */ 0xb0, 0xb1, 0x00, 0x00, 0x00, 0x00, 0xb6, 0xb7, /* 0xb0-0xb7 */ 0x00, 0x00, 0x00, 0xbb, 0x00, 0x00, 0x00, 0x00, /* 0xb8-0xbf */ 0xc0, 0xc1, 0xc2, 0x00, 0xc4, 0x00, 0xc6, 0xc7, /* 0xc0-0xc7 */ @@ -71,7 +71,7 @@ static const unsigned char iso8859_16_page02[8] = { 0xaa, 0xba, 0xde, 0xfe, 0x00, 0x00, 0x00, 0x00, /* 0x18-0x1f */ }; static const unsigned char iso8859_16_page20[8] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0xb5, 0xab, 0x00, /* 0x18-0x1f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0xb5, 0xa5, 0x00, /* 0x18-0x1f */ }; static int diff --git a/src/xlibi18n/lcUniConv/jisx0208.h b/src/xlibi18n/lcUniConv/jisx0208.h index ea07547..9c08052 100644 --- a/src/xlibi18n/lcUniConv/jisx0208.h +++ b/src/xlibi18n/lcUniConv/jisx0208.h @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/X11/lcUniConv/jisx0208.h,v 1.5 2001/11/21 21:20:56 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcUniConv/jisx0208.h,v 1.6 2003/05/27 22:26:31 tsi Exp $ */ /* * JISX0208.1990-0 @@ -2360,7 +2360,7 @@ jisx0208_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) { if (n >= 2) { const Summary16 *summary = NULL; - if (wc >= 0x0000 && wc < 0x0100) + if (wc < 0x0100) summary = &jisx0208_uni2indx_page00[(wc>>4)]; else if (wc >= 0x0300 && wc < 0x0460) summary = &jisx0208_uni2indx_page03[(wc>>4)-0x030]; diff --git a/src/xlibi18n/lcUniConv/jisx0212.h b/src/xlibi18n/lcUniConv/jisx0212.h index 3b7e6dc..a4857b9 100644 --- a/src/xlibi18n/lcUniConv/jisx0212.h +++ b/src/xlibi18n/lcUniConv/jisx0212.h @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/X11/lcUniConv/jisx0212.h,v 1.4 2001/08/09 19:14:08 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcUniConv/jisx0212.h,v 1.5 2003/05/27 22:26:31 tsi Exp $ */ /* * JISX0212.1990-0 @@ -2135,7 +2135,7 @@ jisx0212_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) { if (n >= 2) { const Summary16 *summary = NULL; - if (wc >= 0x0000 && wc < 0x0460) + if (wc < 0x0460) summary = &jisx0212_uni2indx_page00[(wc>>4)]; else if (wc >= 0x2100 && wc < 0x2130) summary = &jisx0212_uni2indx_page21[(wc>>4)-0x210]; diff --git a/src/xlibi18n/lcUniConv/ksc5601.h b/src/xlibi18n/lcUniConv/ksc5601.h index c7dab1e..62ac66d 100644 --- a/src/xlibi18n/lcUniConv/ksc5601.h +++ b/src/xlibi18n/lcUniConv/ksc5601.h @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/X11/lcUniConv/ksc5601.h,v 1.4 2001/08/09 19:14:09 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcUniConv/ksc5601.h,v 1.5 2003/05/27 22:26:34 tsi Exp $ */ /* * KSC5601.1987-0 @@ -2966,7 +2966,7 @@ ksc5601_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) { if (n >= 2) { const Summary16 *summary = NULL; - if (wc >= 0x0000 && wc < 0x0460) + if (wc < 0x0460) summary = &ksc5601_uni2indx_page00[(wc>>4)]; else if (wc >= 0x2000 && wc < 0x2670) summary = &ksc5601_uni2indx_page20[(wc>>4)-0x200]; diff --git a/src/xlibi18n/lcWrap.c b/src/xlibi18n/lcWrap.c index 373c436..ef20342 100644 --- a/src/xlibi18n/lcWrap.c +++ b/src/xlibi18n/lcWrap.c @@ -53,7 +53,7 @@ from The Open Group. * * Katsuhisa Yano TOSHIBA Corp. */ -/* $XFree86: xc/lib/X11/lcWrap.c,v 3.14 2002/11/01 13:43:31 alanh Exp $ */ +/* $XFree86: xc/lib/X11/lcWrap.c,v 3.16 2003/04/17 02:06:32 dawes Exp $ */ #include <stdlib.h> #include "Xlibint.h" @@ -64,6 +64,7 @@ from The Open Group. #undef close #endif #include <X11/Xutil.h> +#include "XlcPubI.h" #ifdef XTHREADS LockInfoPtr _Xi18n_lock; @@ -242,7 +243,7 @@ _XlcAddLoader( XLCd _XOpenLC( - const char *name) + char *name) { XLCd lcd; XlcLoaderList loader; @@ -251,7 +252,6 @@ _XOpenLC( int len; char sinamebuf[256]; char* siname = sinamebuf; - char *_XlcMapOSLocaleName(); #endif if (name == NULL) { diff --git a/src/xlibi18n/mbWMProps.c b/src/xlibi18n/mbWMProps.c index 642f393..637ffee 100644 --- a/src/xlibi18n/mbWMProps.c +++ b/src/xlibi18n/mbWMProps.c @@ -26,15 +26,15 @@ other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/mbWMProps.c,v 1.5 2001/12/14 19:54:10 dawes Exp $ */ +/* $XFree86: xc/lib/X11/mbWMProps.c,v 1.6 2003/11/17 22:20:12 dawes Exp $ */ #include <X11/Xlibint.h> #include <X11/Xutil.h> #include <X11/Xatom.h> #include <X11/Xlocale.h> -#if NeedFunctionPrototypes -void XmbSetWMProperties ( +void +XmbSetWMProperties ( Display *dpy, Window w, _Xconst char *windowName, @@ -44,19 +44,6 @@ void XmbSetWMProperties ( XSizeHints *sizeHints, XWMHints *wmHints, XClassHint *classHints) -#else -void XmbSetWMProperties (dpy, w, windowName, iconName, argv, argc, sizeHints, - wmHints, classHints) - Display *dpy; - Window w; /* window to decorate */ - _Xconst char *windowName; /* name of application */ - _Xconst char *iconName; /* name string for icon */ - char **argv; /* command line */ - int argc; /* size of command line */ - XSizeHints *sizeHints; /* size hints for window in its normal state */ - XWMHints *wmHints; /* miscelaneous window manager hints */ - XClassHint *classHints; /* resource name and class */ -#endif { XTextProperty wname, iname; XTextProperty *wprop = NULL; diff --git a/src/xlibi18n/mbWrap.c b/src/xlibi18n/mbWrap.c index 97181fd..07099f7 100644 --- a/src/xlibi18n/mbWrap.c +++ b/src/xlibi18n/mbWrap.c @@ -50,12 +50,11 @@ from The Open Group. * * M. Collins OSF */ -/* $XFree86: xc/lib/X11/mbWrap.c,v 1.6 2001/12/14 19:54:10 dawes Exp $ */ +/* $XFree86: xc/lib/X11/mbWrap.c,v 1.7 2003/11/17 22:20:12 dawes Exp $ */ #include "Xlibint.h" #include "Xlcint.h" -#if NeedFunctionPrototypes void XmbDrawText( Display *dpy, @@ -65,16 +64,6 @@ XmbDrawText( int y, XmbTextItem *text_items, int nitems) -#else -void -XmbDrawText(dpy, d, gc, x, y, text_items, nitems) - Display *dpy; - Drawable d; - GC gc; - int x, y; - XmbTextItem *text_items; - int nitems; -#endif { register XFontSet fs = NULL; register XmbTextItem *p = text_items; @@ -99,7 +88,6 @@ XmbDrawText(dpy, d, gc, x, y, text_items, nitems) } } -#if NeedFunctionPrototypes void XmbDrawString( Display *dpy, @@ -110,24 +98,12 @@ XmbDrawString( int y, _Xconst char *text, int text_len) -#else -void -XmbDrawString(dpy, d, font_set, gc, x, y, text, text_len) - Display *dpy; - Drawable d; - XFontSet font_set; - GC gc; - int x, y; - _Xconst char *text; - int text_len; -#endif { (void)(*font_set->methods->mb_draw_string) (dpy, d, font_set, gc, x, y, (char *)text, text_len); } -#if NeedFunctionPrototypes void XmbDrawImageString( Display *dpy, @@ -138,41 +114,21 @@ XmbDrawImageString( int y, _Xconst char *text, int text_len) -#else -void -XmbDrawImageString(dpy, d, font_set, gc, x, y, text, text_len) - Display *dpy; - Drawable d; - XFontSet font_set; - GC gc; - int x, y; - _Xconst char *text; - int text_len; -#endif { (*font_set->methods->mb_draw_image_string) (dpy, d, font_set, gc, x, y, (char *)text, text_len); } -#if NeedFunctionPrototypes int XmbTextEscapement( XFontSet font_set, _Xconst char *text, int text_len) -#else -int -XmbTextEscapement(font_set, text, text_len) - XFontSet font_set; - _Xconst char *text; - int text_len; -#endif { return (*font_set->methods->mb_escapement) (font_set, (char *)text, text_len); } -#if NeedFunctionPrototypes int XmbTextExtents( XFontSet font_set, @@ -180,16 +136,6 @@ XmbTextExtents( int text_len, XRectangle *overall_ink_extents, XRectangle *overall_logical_extents) -#else -int -XmbTextExtents(font_set, text, text_len, - overall_ink_extents, overall_logical_extents) - XFontSet font_set; - _Xconst char *text; - int text_len; - XRectangle *overall_ink_extents; - XRectangle *overall_logical_extents; -#endif { return (*font_set->methods->mb_extents) (font_set, (char *)text, text_len, @@ -197,7 +143,6 @@ XmbTextExtents(font_set, text, text_len, overall_logical_extents); } -#if NeedFunctionPrototypes Status XmbTextPerCharExtents( XFontSet font_set, @@ -209,22 +154,6 @@ XmbTextPerCharExtents( int *num_chars, XRectangle *max_ink_extents, XRectangle *max_logical_extents) -#else -Status -XmbTextPerCharExtents(font_set, text, text_len, - ink_extents_buffer, logical_extents_buffer, - buffer_size, num_chars, - max_ink_extents, max_logical_extents) - XFontSet font_set; - _Xconst char *text; - int text_len; - XRectangle *ink_extents_buffer; - XRectangle *logical_extents_buffer; - int buffer_size; - int *num_chars; - XRectangle *max_ink_extents; - XRectangle *max_logical_extents; -#endif { return (*font_set->methods->mb_extents_per_char) (font_set, (char *)text, text_len, diff --git a/src/xlibi18n/utf8WMProps.c b/src/xlibi18n/utf8WMProps.c index bed3858..11a224d 100644 --- a/src/xlibi18n/utf8WMProps.c +++ b/src/xlibi18n/utf8WMProps.c @@ -48,15 +48,15 @@ from The Open Group. * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE * OR PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/lib/X11/utf8WMProps.c,v 1.2 2001/12/14 19:54:11 dawes Exp $ */ +/* $XFree86: xc/lib/X11/utf8WMProps.c,v 1.3 2003/11/17 22:20:12 dawes Exp $ */ #include <X11/Xlibint.h> #include <X11/Xutil.h> #include <X11/Xatom.h> #include <X11/Xlocale.h> -#if NeedFunctionPrototypes -void Xutf8SetWMProperties ( +void +Xutf8SetWMProperties ( Display *dpy, Window w, _Xconst char *windowName, @@ -66,19 +66,6 @@ void Xutf8SetWMProperties ( XSizeHints *sizeHints, XWMHints *wmHints, XClassHint *classHints) -#else -void Xutf8SetWMProperties (dpy, w, windowName, iconName, argv, argc, sizeHints, - wmHints, classHints) - Display *dpy; - Window w; /* window to decorate */ - _Xconst char *windowName; /* name of application */ - _Xconst char *iconName; /* name string for icon */ - char **argv; /* command line */ - int argc; /* size of command line */ - XSizeHints *sizeHints; /* size hints for window in its normal state */ - XWMHints *wmHints; /* miscelaneous window manager hints */ - XClassHint *classHints; /* resource name and class */ -#endif { XTextProperty wname, iname; XTextProperty *wprop = NULL; diff --git a/src/xlibi18n/utf8Wrap.c b/src/xlibi18n/utf8Wrap.c index bde4647..70cc8a6 100644 --- a/src/xlibi18n/utf8Wrap.c +++ b/src/xlibi18n/utf8Wrap.c @@ -72,12 +72,11 @@ from The Open Group. * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE * OR PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/lib/X11/utf8Wrap.c,v 1.3 2001/12/14 19:54:11 dawes Exp $ */ +/* $XFree86: xc/lib/X11/utf8Wrap.c,v 1.4 2003/11/17 22:20:12 dawes Exp $ */ #include "Xlibint.h" #include "Xlcint.h" -#if NeedFunctionPrototypes void Xutf8DrawText( Display *dpy, @@ -87,16 +86,6 @@ Xutf8DrawText( int y, XmbTextItem *text_items, int nitems) -#else -void -Xutf8DrawText(dpy, d, gc, x, y, text_items, nitems) - Display *dpy; - Drawable d; - GC gc; - int x, y; - XmbTextItem *text_items; - int nitems; -#endif { register XFontSet fs = NULL; register XmbTextItem *p = text_items; @@ -121,7 +110,6 @@ Xutf8DrawText(dpy, d, gc, x, y, text_items, nitems) } } -#if NeedFunctionPrototypes void Xutf8DrawString( Display *dpy, @@ -132,24 +120,12 @@ Xutf8DrawString( int y, _Xconst char *text, int text_len) -#else -void -Xutf8DrawString(dpy, d, font_set, gc, x, y, text, text_len) - Display *dpy; - Drawable d; - XFontSet font_set; - GC gc; - int x, y; - _Xconst char *text; - int text_len; -#endif { (void)(*font_set->methods->utf8_draw_string) (dpy, d, font_set, gc, x, y, (char *)text, text_len); } -#if NeedFunctionPrototypes void Xutf8DrawImageString( Display *dpy, @@ -160,41 +136,21 @@ Xutf8DrawImageString( int y, _Xconst char *text, int text_len) -#else -void -Xutf8DrawImageString(dpy, d, font_set, gc, x, y, text, text_len) - Display *dpy; - Drawable d; - XFontSet font_set; - GC gc; - int x, y; - _Xconst char *text; - int text_len; -#endif { (*font_set->methods->utf8_draw_image_string) (dpy, d, font_set, gc, x, y, (char *)text, text_len); } -#if NeedFunctionPrototypes int Xutf8TextEscapement( XFontSet font_set, _Xconst char *text, int text_len) -#else -int -Xutf8TextEscapement(font_set, text, text_len) - XFontSet font_set; - _Xconst char *text; - int text_len; -#endif { return (*font_set->methods->utf8_escapement) (font_set, (char *)text, text_len); } -#if NeedFunctionPrototypes int Xutf8TextExtents( XFontSet font_set, @@ -202,16 +158,6 @@ Xutf8TextExtents( int text_len, XRectangle *overall_ink_extents, XRectangle *overall_logical_extents) -#else -int -Xutf8TextExtents(font_set, text, text_len, - overall_ink_extents, overall_logical_extents) - XFontSet font_set; - _Xconst char *text; - int text_len; - XRectangle *overall_ink_extents; - XRectangle *overall_logical_extents; -#endif { return (*font_set->methods->utf8_extents) (font_set, (char *)text, text_len, @@ -219,7 +165,6 @@ Xutf8TextExtents(font_set, text, text_len, overall_logical_extents); } -#if NeedFunctionPrototypes Status Xutf8TextPerCharExtents( XFontSet font_set, @@ -231,22 +176,6 @@ Xutf8TextPerCharExtents( int *num_chars, XRectangle *max_ink_extents, XRectangle *max_logical_extents) -#else -Status -Xutf8TextPerCharExtents(font_set, text, text_len, - ink_extents_buffer, logical_extents_buffer, - buffer_size, num_chars, - max_ink_extents, max_logical_extents) - XFontSet font_set; - _Xconst char *text; - int text_len; - XRectangle *ink_extents_buffer; - XRectangle *logical_extents_buffer; - int buffer_size; - int *num_chars; - XRectangle *max_ink_extents; - XRectangle *max_logical_extents; -#endif { return (*font_set->methods->utf8_extents_per_char) (font_set, (char *)text, text_len, diff --git a/src/xlibi18n/wcWrap.c b/src/xlibi18n/wcWrap.c index 0f1a5ee..6d8f1aa 100644 --- a/src/xlibi18n/wcWrap.c +++ b/src/xlibi18n/wcWrap.c @@ -51,12 +51,11 @@ from The Open Group. * * M. Collins OSF */ -/* $XFree86: xc/lib/X11/wcWrap.c,v 1.6 2001/12/14 19:54:11 dawes Exp $ */ +/* $XFree86: xc/lib/X11/wcWrap.c,v 1.7 2003/11/17 22:20:12 dawes Exp $ */ #include "Xlibint.h" #include "Xlcint.h" -#if NeedFunctionPrototypes void XwcDrawText( Display *dpy, @@ -66,16 +65,6 @@ XwcDrawText( int y, XwcTextItem *text_items, int nitems) -#else -void -XwcDrawText(dpy, d, gc, x, y, text_items, nitems) - Display *dpy; - Drawable d; - GC gc; - int x, y; - XwcTextItem *text_items; - int nitems; -#endif { register XFontSet fs = NULL; register XwcTextItem *p = text_items; @@ -100,7 +89,6 @@ XwcDrawText(dpy, d, gc, x, y, text_items, nitems) } } -#if NeedFunctionPrototypes void XwcDrawString( Display *dpy, @@ -111,23 +99,11 @@ XwcDrawString( int y, _Xconst wchar_t *text, int text_len) -#else -void -XwcDrawString(dpy, d, font_set, gc, x, y, text, text_len) - Display *dpy; - Drawable d; - XFontSet font_set; - GC gc; - int x, y; - _Xconst wchar_t *text; - int text_len; -#endif { (void)(*font_set->methods->wc_draw_string) (dpy, d, font_set, gc, x, y, text, text_len); } -#if NeedFunctionPrototypes void XwcDrawImageString( Display *dpy, @@ -138,40 +114,20 @@ XwcDrawImageString( int y, _Xconst wchar_t *text, int text_len) -#else -void -XwcDrawImageString(dpy, d, font_set, gc, x, y, text, text_len) - Display *dpy; - Drawable d; - XFontSet font_set; - GC gc; - int x, y; - _Xconst wchar_t *text; - int text_len; -#endif { (*font_set->methods->wc_draw_image_string) (dpy, d, font_set, gc, x, y, text, text_len); } -#if NeedFunctionPrototypes int XwcTextEscapement( XFontSet font_set, _Xconst wchar_t *text, int text_len) -#else -int -XwcTextEscapement(font_set, text, text_len) - XFontSet font_set; - _Xconst wchar_t *text; - int text_len; -#endif { return (*font_set->methods->wc_escapement) (font_set, text, text_len); } -#if NeedFunctionPrototypes int XwcTextExtents( XFontSet font_set, @@ -179,23 +135,12 @@ XwcTextExtents( int text_len, XRectangle *overall_ink_extents, XRectangle *overall_logical_extents) -#else -int -XwcTextExtents(font_set, text, text_len, - overall_ink_extents, overall_logical_extents) - XFontSet font_set; - _Xconst wchar_t *text; - int text_len; - XRectangle *overall_ink_extents; - XRectangle *overall_logical_extents; -#endif { return (*font_set->methods->wc_extents) (font_set, text, text_len, overall_ink_extents, overall_logical_extents); } -#if NeedFunctionPrototypes Status XwcTextPerCharExtents( XFontSet font_set, @@ -207,22 +152,6 @@ XwcTextPerCharExtents( int *num_chars, XRectangle *max_ink_extents, XRectangle *max_logical_extents) -#else -Status -XwcTextPerCharExtents(font_set, text, text_len, - ink_extents_buffer, logical_extents_buffer, - buffer_size, num_chars, - max_ink_extents, max_logical_extents) - XFontSet font_set; - _Xconst wchar_t *text; - int text_len; - XRectangle *ink_extents_buffer; - XRectangle *logical_extents_buffer; - int buffer_size; - int *num_chars; - XRectangle *max_ink_extents; - XRectangle *max_logical_extents; -#endif { return (*font_set->methods->wc_extents_per_char) (font_set, text, text_len, |