diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Callback.c | 51 | ||||
-rw-r--r-- | src/Convert.c | 72 | ||||
-rw-r--r-- | src/Converters.c | 17 | ||||
-rw-r--r-- | src/Create.c | 51 | ||||
-rw-r--r-- | src/Display.c | 57 | ||||
-rw-r--r-- | src/Error.c | 141 | ||||
-rw-r--r-- | src/Event.c | 134 | ||||
-rw-r--r-- | src/EventUtil.c | 11 | ||||
-rw-r--r-- | src/Geometry.c | 48 | ||||
-rw-r--r-- | src/Hooks.c | 12 | ||||
-rw-r--r-- | src/Initialize.c | 106 | ||||
-rw-r--r-- | src/Intrinsic.c | 80 | ||||
-rw-r--r-- | src/Manage.c | 33 | ||||
-rw-r--r-- | src/NextEvent.c | 28 | ||||
-rw-r--r-- | src/PassivGrab.c | 83 | ||||
-rw-r--r-- | src/Popup.c | 17 | ||||
-rw-r--r-- | src/Resources.c | 68 | ||||
-rw-r--r-- | src/Selection.c | 8 | ||||
-rw-r--r-- | src/SetSens.c | 11 | ||||
-rw-r--r-- | src/Shell.c | 16 | ||||
-rw-r--r-- | src/TMaction.c | 24 | ||||
-rw-r--r-- | src/TMgrab.c | 14 | ||||
-rw-r--r-- | src/TMkey.c | 29 | ||||
-rw-r--r-- | src/TMparse.c | 32 | ||||
-rw-r--r-- | src/TMprint.c | 13 | ||||
-rw-r--r-- | src/TMstate.c | 9 | ||||
-rw-r--r-- | src/Threads.c | 69 | ||||
-rw-r--r-- | src/Varargs.c | 43 | ||||
-rw-r--r-- | src/sharedlib.c | 94 |
29 files changed, 169 insertions, 1202 deletions
diff --git a/src/Callback.c b/src/Callback.c index 84129a2..fb03874 100644 --- a/src/Callback.c +++ b/src/Callback.c @@ -58,7 +58,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/Xt/Callback.c,v 1.8 2001/12/14 19:56:08 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/Callback.c,v 1.9 2003/04/21 16:34:26 herrb Exp $ */ #include "IntrinsicI.h" @@ -144,20 +144,12 @@ void _XtAddCallbackOnce(callbacks, callback, closure) _XtAddCallback(callbacks, callback, closure); } /* _XtAddCallbackOnce */ -#if NeedFunctionPrototypes void XtAddCallback( Widget widget, _Xconst char* name, XtCallbackProc callback, XtPointer closure ) -#else -void XtAddCallback(widget, name, callback, closure) - Widget widget; - String name; - XtCallbackProc callback; - XtPointer closure; -#endif { InternalCallbackList *callbacks; Widget hookobj; @@ -222,18 +214,11 @@ static void AddCallbacks( *cl++ = *newcallbacks++; } /* AddCallbacks */ -#if NeedFunctionPrototypes void XtAddCallbacks( Widget widget, _Xconst char* name, XtCallbackList xtcallbacks ) -#else -void XtAddCallbacks(widget, name, xtcallbacks) - Widget widget; - String name; - XtCallbackList xtcallbacks; -#endif { InternalCallbackList* callbacks; Widget hookobj; @@ -320,20 +305,12 @@ void _XtRemoveCallback (callbacks, callback, closure) } } /* _XtRemoveCallback */ -#if NeedFunctionPrototypes void XtRemoveCallback ( Widget widget, _Xconst char* name, XtCallbackProc callback, XtPointer closure ) -#else -void XtRemoveCallback (widget, name, callback, closure) - Widget widget; - String name; - XtCallbackProc callback; - XtPointer closure; -#endif { InternalCallbackList *callbacks; Widget hookobj; @@ -365,17 +342,10 @@ void XtRemoveCallback (widget, name, callback, closure) } /* XtRemoveCallback */ -#if NeedFunctionPrototypes void XtRemoveCallbacks (widget, name, xtcallbacks) Widget widget; _Xconst char* name; XtCallbackList xtcallbacks; -#else -void XtRemoveCallbacks (widget, name, xtcallbacks) - Widget widget; - String name; - XtCallbackList xtcallbacks; -#endif { InternalCallbackList *callbacks; Widget hookobj; @@ -461,15 +431,9 @@ void _XtRemoveAllCallbacks (callbacks) } } /* _XtRemoveAllCallbacks */ -#if NeedFunctionPrototypes void XtRemoveAllCallbacks(widget, name) Widget widget; _Xconst char* name; -#else -void XtRemoveAllCallbacks(widget, name) - Widget widget; - String name; -#endif { InternalCallbackList *callbacks; Widget hookobj; @@ -560,18 +524,11 @@ XtCallbackList _XtGetCallbackList(callbacks) return ToList(icl); } -#if NeedFunctionPrototypes void XtCallCallbacks( Widget widget, _Xconst char* name, XtPointer call_data ) -#else -void XtCallCallbacks(widget, name, call_data) - Widget widget; - String name; - XtPointer call_data; -#endif { InternalCallbackList *callbacks; InternalCallbackList icl; @@ -616,16 +573,10 @@ void XtCallCallbacks(widget, name, call_data) } /* XtCallCallbacks */ -#if NeedFunctionPrototypes XtCallbackStatus XtHasCallbacks( Widget widget, _Xconst char* callback_name ) -#else -XtCallbackStatus XtHasCallbacks(widget, callback_name) - Widget widget; - String callback_name; -#endif { InternalCallbackList *callbacks; XtCallbackStatus retval = XtCallbackHasSome; diff --git a/src/Convert.c b/src/Convert.c index 544eb80..256240c 100644 --- a/src/Convert.c +++ b/src/Convert.c @@ -32,7 +32,7 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xt/Convert.c,v 3.7 2001/12/14 19:56:09 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/Convert.c,v 3.8 2003/04/21 16:34:26 herrb Exp $ */ /* @@ -171,7 +171,6 @@ typedef CachePtr CacheHashTable[CACHEHASHSIZE]; static CacheHashTable cacheHashTable; -#if NeedFunctionPrototypes void _XtTableAddConverter( ConverterTable table, XrmRepresentation from_type, @@ -183,19 +182,6 @@ void _XtTableAddConverter( XtCacheType cache_type, XtDestructor destructor, _XtBoolean global) -#else -void _XtTableAddConverter(table, from_type, to_type, converter, convert_args, - num_args, new_style, cache_type, destructor, global) - ConverterTable table; - XrmRepresentation from_type, to_type; - XtTypeConverter converter; - XtConvertArgList convert_args; - Cardinal num_args; - Boolean new_style; - XtCacheType cache_type; - XtDestructor destructor; - Boolean global; -#endif { register ConverterPtr *pp; register ConverterPtr p; @@ -234,7 +220,6 @@ void _XtTableAddConverter(table, from_type, to_type, converter, convert_args, } } -#if NeedFunctionPrototypes void XtSetTypeConverter( register _Xconst char* from_type, register _Xconst char* to_type, @@ -244,15 +229,6 @@ void XtSetTypeConverter( XtCacheType cache_type, XtDestructor destructor ) -#else -void XtSetTypeConverter(from_type, to_type, converter, convert_args, num_args, cache_type, destructor) - register String from_type, to_type; - XtTypeConverter converter; - XtConvertArgList convert_args; - Cardinal num_args; - XtCacheType cache_type; - XtDestructor destructor; -#endif { ProcessContext process; XtAppContext app; @@ -281,7 +257,6 @@ void XtSetTypeConverter(from_type, to_type, converter, convert_args, num_args, c UNLOCK_PROCESS; } -#if NeedFunctionPrototypes void XtAppSetTypeConverter( XtAppContext app, register _Xconst char* from_type, @@ -292,16 +267,6 @@ void XtAppSetTypeConverter( XtCacheType cache_type, XtDestructor destructor ) -#else -void XtAppSetTypeConverter(app, from_type, to_type, converter, convert_args, num_args, cache_type, destructor) - XtAppContext app; - register String from_type, to_type; - XtTypeConverter converter; - XtConvertArgList convert_args; - Cardinal num_args; - XtCacheType cache_type; - XtDestructor destructor; -#endif { LOCK_PROCESS; _XtTableAddConverter(app->converterTable, @@ -313,7 +278,6 @@ void XtAppSetTypeConverter(app, from_type, to_type, converter, convert_args, num } /* old interface */ -#if NeedFunctionPrototypes void XtAddConverter( register _Xconst char* from_type, register _Xconst char* to_type, @@ -321,13 +285,6 @@ void XtAddConverter( XtConvertArgList convert_args, Cardinal num_args ) -#else -void XtAddConverter(from_type, to_type, converter, convert_args, num_args) - register String from_type, to_type; - XtConverter converter; - XtConvertArgList convert_args; - Cardinal num_args; -#endif { ProcessContext process; XtAppContext app; @@ -358,7 +315,6 @@ void XtAddConverter(from_type, to_type, converter, convert_args, num_args) } /* old interface */ -#if NeedFunctionPrototypes void XtAppAddConverter( XtAppContext app, register _Xconst char* from_type, @@ -367,14 +323,6 @@ void XtAppAddConverter( XtConvertArgList convert_args, Cardinal num_args ) -#else -void XtAppAddConverter(app, from_type, to_type, converter, convert_args, num_args) - XtAppContext app; - register String from_type, to_type; - XtConverter converter; - XtConvertArgList convert_args; - Cardinal num_args; -#endif { LOCK_PROCESS; _XtTableAddConverter(app->converterTable, @@ -992,7 +940,6 @@ Boolean _XtConvert(widget, from_type, from, to_type, to, cache_ref_return) return False; } -#if NeedFunctionPrototypes void XtConvert( Widget widget, _Xconst char* from_type_str, @@ -1000,14 +947,6 @@ void XtConvert( _Xconst char* to_type_str, XrmValuePtr to ) -#else -void XtConvert(widget, from_type_str, from, to_type_str, to) - Widget widget; - String from_type_str; - XrmValuePtr from; - String to_type_str; - XrmValuePtr to; -#endif { XrmQuark from_type, to_type; WIDGET_TO_APPCON(widget); @@ -1036,7 +975,6 @@ void XtConvert(widget, from_type_str, from, to_type_str, to) UNLOCK_APP(app); } -#if NeedFunctionPrototypes Boolean XtConvertAndStore( Widget object, _Xconst char* from_type_str, @@ -1044,14 +982,6 @@ Boolean XtConvertAndStore( _Xconst char* to_type_str, XrmValuePtr to ) -#else -Boolean XtConvertAndStore(object, from_type_str, from, to_type_str, to) - Widget object; - String from_type_str; - XrmValuePtr from; - String to_type_str; - XrmValuePtr to; -#endif { XrmQuark from_type, to_type; WIDGET_TO_APPCON(object); diff --git a/src/Converters.c b/src/Converters.c index 95a88e0..801279a 100644 --- a/src/Converters.c +++ b/src/Converters.c @@ -32,7 +32,7 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xt/Converters.c,v 3.13 2002/06/03 20:59:19 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/Converters.c,v 3.15 2003/05/27 22:26:42 tsi Exp $ */ /* @@ -171,17 +171,11 @@ void _XtConvertInitialize() return True; \ } -#if NeedFunctionPrototypes void XtDisplayStringConversionWarning( Display* dpy, _Xconst char* from, _Xconst char* toType ) -#else -void XtDisplayStringConversionWarning(dpy, from, toType) - Display* dpy; - String from, toType; -#endif { #ifndef NO_MIT_HACKS /* Allow suppression of conversion warnings. %%% Not specified. */ @@ -238,15 +232,10 @@ void XtDisplayStringConversionWarning(dpy, from, toType) UNLOCK_APP(app); } -#if NeedFunctionPrototypes void XtStringConversionWarning( _Xconst char* from, _Xconst char* toType ) -#else -void XtStringConversionWarning(from, toType) - String from, toType; -#endif { String params[2]; Cardinal num_params = 2; @@ -1645,7 +1634,7 @@ Boolean XtCvtStringToCommandArgArray(dpy, args, num_args, fromVal, toVal, XtPointer *closure_ret; { String *strarray, *ptr; - char *src, *src_str; + char *src; char *dst, *dst_str; char *start; int tokens, len; @@ -1656,7 +1645,7 @@ Boolean XtCvtStringToCommandArgArray(dpy, args, num_args, fromVal, toVal, "String to CommandArgArray conversion needs no extra arguments", (String *)NULL, (Cardinal *)NULL); - src = src_str = fromVal->addr; + src = fromVal->addr; dst = dst_str = __XtMalloc((unsigned) strlen(src) + 1); tokens = 0; diff --git a/src/Create.c b/src/Create.c index a172e52..6a95016 100644 --- a/src/Create.c +++ b/src/Create.c @@ -32,7 +32,7 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xt/Create.c,v 3.10 2002/12/17 04:50:58 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/Create.c,v 3.11 2003/04/21 16:34:26 herrb Exp $ */ /* @@ -563,7 +563,6 @@ _XtCreateWidget( return (widget); } -#if NeedFunctionPrototypes Widget XtCreateWidget( _Xconst char* name, @@ -572,15 +571,6 @@ XtCreateWidget( ArgList args, Cardinal num_args ) -#else -Widget -XtCreateWidget(name, widget_class, parent, args, num_args) - String name; - WidgetClass widget_class; - Widget parent; - ArgList args; - Cardinal num_args; -#endif { Widget retval; WIDGET_TO_APPCON(parent); @@ -593,7 +583,6 @@ XtCreateWidget(name, widget_class, parent, args, num_args) } -#if NeedFunctionPrototypes Widget XtCreateManagedWidget( _Xconst char* name, @@ -602,15 +591,6 @@ XtCreateManagedWidget( ArgList args, Cardinal num_args ) -#else -Widget -XtCreateManagedWidget(name, widget_class, parent, args, num_args) - String name; - WidgetClass widget_class; - Widget parent; - ArgList args; - Cardinal num_args; -#endif { register Widget widget; WIDGET_TO_APPCON(parent); @@ -673,7 +653,6 @@ _XtCreatePopupShell(name, widget_class, parent, args, num_args, return(widget); } -#if NeedFunctionPrototypes Widget XtCreatePopupShell( _Xconst char* name, @@ -682,15 +661,6 @@ XtCreatePopupShell( ArgList args, Cardinal num_args ) -#else -Widget -XtCreatePopupShell(name, widget_class, parent, args, num_args) - String name; - WidgetClass widget_class; - Widget parent; - ArgList args; - Cardinal num_args; -#endif { Widget retval; WIDGET_TO_APPCON(parent); @@ -736,7 +706,6 @@ _XtAppCreateShell(name, class, widget_class, display, args, num_args, return shell; } -#if NeedFunctionPrototypes Widget XtAppCreateShell( _Xconst char* name, @@ -746,15 +715,6 @@ XtAppCreateShell( ArgList args, Cardinal num_args ) -#else -Widget -XtAppCreateShell(name, class, widget_class, display, args, num_args) - String name, class; - WidgetClass widget_class; - Display *display; - ArgList args; - Cardinal num_args; -#endif { Widget retval; DPY_TO_APPCON(display); @@ -767,7 +727,6 @@ XtAppCreateShell(name, class, widget_class, display, args, num_args) } /* ARGSUSED */ -#if NeedFunctionPrototypes Widget XtCreateApplicationShell( _Xconst char* name, /* unused in R3 and later */ @@ -775,14 +734,6 @@ XtCreateApplicationShell( ArgList args, Cardinal num_args ) -#else -Widget -XtCreateApplicationShell(name, widget_class, args, num_args) - String name; /* unused in R3 and later */ - WidgetClass widget_class; - ArgList args; - Cardinal num_args; -#endif { Widget retval; Display* dpy; diff --git a/src/Display.c b/src/Display.c index d5f8157..f39bb83 100644 --- a/src/Display.c +++ b/src/Display.c @@ -32,7 +32,7 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xt/Display.c,v 3.15 2002/09/18 01:25:01 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/Display.c,v 3.16 2003/04/21 16:34:26 herrb Exp $ */ /* @@ -230,7 +230,6 @@ static XtPerDisplay InitPerDisplay(dpy, app, name, classname) return pd; } -#if NeedFunctionPrototypes Display *XtOpenDisplay( XtAppContext app, _Xconst char* displayName, @@ -241,16 +240,6 @@ Display *XtOpenDisplay( int *argc, String *argv ) -#else -Display *XtOpenDisplay(app, displayName, applName, className, - urlist, num_urs, argc, argv) - XtAppContext app; - String displayName, applName, className; - XrmOptionDescRec *urlist; - Cardinal num_urs; - int *argc; - String *argv; -#endif { Display *d; XrmDatabase db = 0; @@ -353,7 +342,6 @@ String **argv_in_out, * fallback_resources; return dpy; } -#if NeedFunctionPrototypes void XtDisplayInitialize( XtAppContext app, @@ -365,17 +353,6 @@ XtDisplayInitialize( int *argc, String *argv ) -#else -void -XtDisplayInitialize(app, dpy, name, classname, urlist, num_urs, argc, argv) - XtAppContext app; - Display *dpy; - String name, classname; - XrmOptionDescRec *urlist; - Cardinal num_urs; - int *argc; - String *argv; -#endif { XtPerDisplay pd; XrmDatabase db = 0; @@ -457,26 +434,16 @@ XtAppContext XtCreateApplicationContext() return app; } -#if NeedFunctionPrototypes void XtAppSetExitFlag ( XtAppContext app) -#else -void XtAppSetExitFlag (app) - XtAppContext app; -#endif { LOCK_APP(app); app->exit_flag = TRUE; UNLOCK_APP(app); } -#if NeedFunctionPrototypes Boolean XtAppGetExitFlag ( XtAppContext app) -#else -Boolean XtAppGetExitFlag (app) - XtAppContext app; -#endif { Boolean retval; LOCK_APP(app); @@ -726,13 +693,8 @@ void XtCloseDisplay(dpy) UNLOCK_APP(app); } -#if NeedFunctionPrototypes void _XtCloseDisplays( XtAppContext app) -#else -void _XtCloseDisplays(app) - XtAppContext app; -#endif { int i; @@ -768,13 +730,8 @@ void XtGetApplicationNameAndClass(dpy, name_return, class_return) *class_return = XrmQuarkToString(pd->class); } -#if NeedFunctionPrototypes XtPerDisplay _XtGetPerDisplay ( Display* display) -#else -XtPerDisplay _XtGetPerDisplay (display) - Display* display; -#endif { XtPerDisplay retval; @@ -787,13 +744,8 @@ XtPerDisplay _XtGetPerDisplay (display) return retval; } -#if NeedFunctionPrototypes XtPerDisplayInputRec* _XtGetPerDisplayInput( Display* display) -#else -XtPerDisplayInputRec* _XtGetPerDisplayInput(display) - Display* display; -#endif { XtPerDisplayInputRec* retval; LOCK_PROCESS; @@ -805,17 +757,10 @@ XtPerDisplayInputRec* _XtGetPerDisplayInput(display) return retval; } -#if NeedFunctionPrototypes void XtGetDisplays( XtAppContext app_context, Display*** dpy_return, Cardinal* num_dpy_return) -#else -void XtGetDisplays(app_context, dpy_return, num_dpy_return) - XtAppContext app_context; - Display*** dpy_return; - Cardinal* num_dpy_return; -#endif { int ii; LOCK_APP(app_context); diff --git a/src/Error.c b/src/Error.c index 5dc5224..498ddfd 100644 --- a/src/Error.c +++ b/src/Error.c @@ -32,7 +32,7 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xt/Error.c,v 3.12 2001/12/14 19:56:11 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/Error.c,v 3.14 2003/05/27 22:26:42 tsi Exp $ */ /* @@ -84,7 +84,7 @@ static XtErrorHandler errorHandler = _XtDefaultError; static XtErrorHandler warningHandler = _XtDefaultWarning; #endif /* GLOBALERRORS */ -XrmDatabase *XtGetErrorDatabase() +XrmDatabase *XtGetErrorDatabase(void) { XrmDatabase* retval; #if GLOBALERRORS @@ -113,22 +113,13 @@ XrmDatabase *XtAppGetErrorDatabase(app) return retval; } -#if NeedFunctionPrototypes void XtGetErrorDatabaseText( register _Xconst char* name, register _Xconst char* type, register _Xconst char* class, _Xconst char* defaultp, String buffer, - int nbytes - ) -#else -void XtGetErrorDatabaseText(name,type,class,defaultp, buffer, nbytes) - register String name, type, class; - String defaultp; - String buffer; - int nbytes; -#endif + int nbytes) { #if GLOBALERRORS XtAppGetErrorDatabaseText(NULL, @@ -139,7 +130,6 @@ void XtGetErrorDatabaseText(name,type,class,defaultp, buffer, nbytes) #endif /* GLOBALERRORS */ } -#if NeedFunctionPrototypes void XtAppGetErrorDatabaseText( XtAppContext app, register _Xconst char* name, @@ -148,18 +138,7 @@ void XtAppGetErrorDatabaseText( _Xconst char* defaultp, String buffer, int nbytes, - XrmDatabase db - ) -#else -void XtAppGetErrorDatabaseText(app, name,type,class,defaultp, - buffer, nbytes, db) - XtAppContext app; - register String name, type, class; - String defaultp; - String buffer; - int nbytes; - XrmDatabase db; -#endif + XrmDatabase db) { String str_class; String type_str; @@ -235,7 +214,7 @@ static void DefaultMsg (name,type,class,defaultp,params,num_params,error,fn) String* params; Cardinal* num_params; Bool error; - void (*fn)(String); + void (*fn)(_Xconst _XtString); { #define BIGBUF 1024 #ifdef notyet /* older versions don't, might want to wait until more do */ @@ -344,21 +323,13 @@ void _XtDefaultWarningMsg (name,type,class,defaultp,params,num_params) DefaultMsg (name,type,class,defaultp,params,num_params,False,XtWarning); } -#if NeedFunctionPrototypes void XtErrorMsg( _Xconst char* name, _Xconst char* type, _Xconst char* class, _Xconst char* defaultp, String* params, - Cardinal* num_params - ) -#else -void XtErrorMsg(name,type,class,defaultp,params,num_params) - String name,type,class,defaultp; - String* params; - Cardinal* num_params; -#endif + Cardinal* num_params) { #if GLOBALERRORS LOCK_PROCESS; @@ -371,7 +342,6 @@ void XtErrorMsg(name,type,class,defaultp,params,num_params) #endif /* GLOBALERRORS */ } -#if NeedFunctionPrototypes void XtAppErrorMsg( XtAppContext app, _Xconst char* name, @@ -379,15 +349,7 @@ void XtAppErrorMsg( _Xconst char* class, _Xconst char* defaultp, String* params, - Cardinal* num_params - ) -#else -void XtAppErrorMsg(app, name,type,class,defaultp,params,num_params) - XtAppContext app; - String name,type,class,defaultp; - String* params; - Cardinal* num_params; -#endif + Cardinal* num_params) { #if GLOBALERRORS LOCK_PROCESS; @@ -401,21 +363,13 @@ void XtAppErrorMsg(app, name,type,class,defaultp,params,num_params) #endif /* GLOBALERRORS */ } -#if NeedFunctionPrototypes void XtWarningMsg( _Xconst char* name, _Xconst char* type, _Xconst char* class, _Xconst char* defaultp, String* params, - Cardinal* num_params - ) -#else -void XtWarningMsg(name,type,class,defaultp,params,num_params) - String name,type,class,defaultp; - String* params; - Cardinal* num_params; -#endif + Cardinal* num_params) { #if GLOBALERRORS LOCK_PROCESS; @@ -428,7 +382,6 @@ void XtWarningMsg(name,type,class,defaultp,params,num_params) #endif /* GLOBALERRORS */ } -#if NeedFunctionPrototypes void XtAppWarningMsg( XtAppContext app, _Xconst char* name, @@ -436,15 +389,7 @@ void XtAppWarningMsg( _Xconst char* class, _Xconst char* defaultp, String* params, - Cardinal* num_params - ) -#else -void XtAppWarningMsg(app,name,type,class,defaultp,params,num_params) - XtAppContext app; - String name,type,class,defaultp; - String* params; - Cardinal* num_params; -#endif + Cardinal* num_params) { #if GLOBALERRORS LOCK_PROCESS; @@ -471,15 +416,9 @@ void XtSetErrorMsgHandler(handler) #endif /* GLOBALERRORS */ } -#if NeedFunctionPrototypes XtErrorMsgHandler XtAppSetErrorMsgHandler( XtAppContext app, XtErrorMsgHandler handler) -#else -XtErrorMsgHandler XtAppSetErrorMsgHandler(app,handler) - XtAppContext app; - XtErrorMsgHandler handler; -#endif { XtErrorMsgHandler old; #if GLOBALERRORS @@ -511,15 +450,9 @@ void XtSetWarningMsgHandler(handler) #endif /* GLOBALERRORS */ } -#if NeedFunctionPrototypes XtErrorMsgHandler XtAppSetWarningMsgHandler( XtAppContext app, XtErrorMsgHandler handler) -#else -XtErrorMsgHandler XtAppSetWarningMsgHandler(app,handler) - XtAppContext app; - XtErrorMsgHandler handler; -#endif { XtErrorMsgHandler old; #if GLOBALERRORS @@ -554,14 +487,8 @@ void _XtDefaultWarning(message) return; } -#if NeedFunctionPrototypes void XtError( - _Xconst char* message - ) -#else -void XtError(message) - String message; -#endif + _Xconst char* message) { #if GLOBALERRORS LOCK_PROCESS; @@ -572,16 +499,9 @@ void XtError(message) #endif /* GLOBALERRORS */ } -#if NeedFunctionPrototypes void XtAppError( XtAppContext app, - _Xconst char* message - ) -#else -void XtAppError(app,message) - XtAppContext app; - String message; -#endif + _Xconst char* message) { #if GLOBALERRORS LOCK_PROCESS; @@ -594,14 +514,8 @@ void XtAppError(app,message) #endif /* GLOBALERRORS */ } -#if NeedFunctionPrototypes void XtWarning( - _Xconst char* message - ) -#else -void XtWarning(message) - String message; -#endif + _Xconst char* message) { #if GLOBALERRORS LOCK_PROCESS; @@ -612,16 +526,9 @@ void XtWarning(message) #endif /* GLOBALERRORS */ } -#if NeedFunctionPrototypes void XtAppWarning( XtAppContext app, - _Xconst char* message - ) -#else -void XtAppWarning(app,message) - XtAppContext app; - String message; -#endif + _Xconst char* message) { #if GLOBALERRORS LOCK_PROCESS; @@ -634,12 +541,7 @@ void XtAppWarning(app,message) #endif /* GLOBALERRORS */ } -#if NeedFunctionPrototypes void XtSetErrorHandler(XtErrorHandler handler) -#else -void XtSetErrorHandler(handler) - XtErrorHandler handler; -#endif { #if GLOBALERRORS LOCK_PROCESS; @@ -651,15 +553,9 @@ void XtSetErrorHandler(handler) #endif /* GLOBALERRORS */ } -#if NeedFunctionPrototypes XtErrorHandler XtAppSetErrorHandler( XtAppContext app, XtErrorHandler handler) -#else -XtErrorHandler XtAppSetErrorHandler(app,handler) - XtAppContext app; - XtErrorHandler handler; -#endif { XtErrorHandler old; #if GLOBALERRORS @@ -678,12 +574,7 @@ XtErrorHandler XtAppSetErrorHandler(app,handler) return old; } -#if NeedFunctionPrototypes void XtSetWarningHandler(XtErrorHandler handler) -#else -void XtSetWarningHandler(handler) - XtErrorHandler handler; -#endif { #if GLOBALERRORS LOCK_PROCESS; @@ -695,15 +586,9 @@ void XtSetWarningHandler(handler) #endif /* GLOBALERRORS */ } -#if NeedFunctionPrototypes XtErrorHandler XtAppSetWarningHandler( XtAppContext app, XtErrorHandler handler) -#else -XtErrorHandler XtAppSetWarningHandler(app,handler) - XtAppContext app; - XtErrorHandler handler; -#endif { XtErrorHandler old; #if GLOBALERRORS diff --git a/src/Event.c b/src/Event.c index fa08dd0..e7dadc8 100644 --- a/src/Event.c +++ b/src/Event.c @@ -58,7 +58,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/Xt/Event.c,v 3.10 2001/12/14 19:56:11 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/Event.c,v 3.11 2003/04/21 16:34:27 herrb Exp $ */ #include "IntrinsicI.h" #include "Shell.h" @@ -367,22 +367,12 @@ AddEventHandler(widget, select_data, type, has_type_specifier, other, proc, } } -#if NeedFunctionPrototypes void XtRemoveEventHandler( Widget widget, EventMask eventMask, _XtBoolean other, XtEventHandler proc, - XtPointer closure - ) -#else -void XtRemoveEventHandler(widget, eventMask, other, proc, closure) - Widget widget; - EventMask eventMask; - Boolean other; - XtEventHandler proc; - XtPointer closure; -#endif + XtPointer closure) { WIDGET_TO_APPCON(widget); LOCK_APP(app); @@ -391,22 +381,12 @@ void XtRemoveEventHandler(widget, eventMask, other, proc, closure) UNLOCK_APP(app); } -#if NeedFunctionPrototypes void XtAddEventHandler( Widget widget, EventMask eventMask, _XtBoolean other, XtEventHandler proc, - XtPointer closure - ) -#else -void XtAddEventHandler(widget, eventMask, other, proc, closure) - Widget widget; - EventMask eventMask; - Boolean other; - XtEventHandler proc; - XtPointer closure; -#endif + XtPointer closure) { WIDGET_TO_APPCON(widget); LOCK_APP(app); @@ -415,24 +395,13 @@ void XtAddEventHandler(widget, eventMask, other, proc, closure) UNLOCK_APP(app); } -#if NeedFunctionPrototypes void XtInsertEventHandler( Widget widget, EventMask eventMask, _XtBoolean other, XtEventHandler proc, XtPointer closure, - XtListPosition position - ) -#else -void XtInsertEventHandler(widget, eventMask, other, proc, closure, position) - Widget widget; - EventMask eventMask; - Boolean other; - XtEventHandler proc; - XtPointer closure; - XtListPosition position; -#endif + XtListPosition position) { WIDGET_TO_APPCON(widget); LOCK_APP(app); @@ -441,22 +410,12 @@ void XtInsertEventHandler(widget, eventMask, other, proc, closure, position) UNLOCK_APP(app); } -#if NeedFunctionPrototypes void XtRemoveRawEventHandler( Widget widget, EventMask eventMask, _XtBoolean other, XtEventHandler proc, - XtPointer closure - ) -#else -void XtRemoveRawEventHandler(widget, eventMask, other, proc, closure) - Widget widget; - EventMask eventMask; - Boolean other; - XtEventHandler proc; - XtPointer closure; -#endif + XtPointer closure) { WIDGET_TO_APPCON(widget); LOCK_APP(app); @@ -465,24 +424,13 @@ void XtRemoveRawEventHandler(widget, eventMask, other, proc, closure) UNLOCK_APP(app); } -#if NeedFunctionPrototypes void XtInsertRawEventHandler( Widget widget, EventMask eventMask, _XtBoolean other, XtEventHandler proc, XtPointer closure, - XtListPosition position - ) -#else -void XtInsertRawEventHandler(widget, eventMask, other, proc, closure, position) - Widget widget; - EventMask eventMask; - Boolean other; - XtEventHandler proc; - XtPointer closure; - XtListPosition position; -#endif + XtListPosition position) { WIDGET_TO_APPCON(widget); LOCK_APP(app); @@ -491,22 +439,12 @@ void XtInsertRawEventHandler(widget, eventMask, other, proc, closure, position) UNLOCK_APP(app); } -#if NeedFunctionPrototypes void XtAddRawEventHandler( Widget widget, EventMask eventMask, _XtBoolean other, XtEventHandler proc, - XtPointer closure - ) -#else -void XtAddRawEventHandler(widget, eventMask, other, proc, closure) - Widget widget; - EventMask eventMask; - Boolean other; - XtEventHandler proc; - XtPointer closure; -#endif + XtPointer closure) { WIDGET_TO_APPCON(widget); LOCK_APP(app); @@ -515,21 +453,12 @@ void XtAddRawEventHandler(widget, eventMask, other, proc, closure) UNLOCK_APP(app); } -#if NeedFunctionPrototypes void XtRemoveEventTypeHandler( Widget widget, int type, XtPointer select_data, XtEventHandler proc, XtPointer closure) -#else -void XtRemoveEventTypeHandler(widget, type, select_data, proc, closure) - Widget widget; - int type; - XtPointer select_data; - XtEventHandler proc; - XtPointer closure; -#endif { WIDGET_TO_APPCON(widget); LOCK_APP(app); @@ -538,7 +467,6 @@ void XtRemoveEventTypeHandler(widget, type, select_data, proc, closure) UNLOCK_APP(app); } -#if NeedFunctionPrototypes void XtInsertEventTypeHandler( Widget widget, int type, @@ -546,15 +474,6 @@ void XtInsertEventTypeHandler( XtEventHandler proc, XtPointer closure, XtListPosition position) -#else -void XtInsertEventTypeHandler(widget, type, select_data, proc, closure, position) - Widget widget; - int type; - XtPointer select_data; - XtEventHandler proc; - XtPointer closure; - XtListPosition position; -#endif { WIDGET_TO_APPCON(widget); LOCK_APP(app); @@ -853,15 +772,9 @@ static void CompressExposures(); /* because some compilers allocate all local locals on procedure entry */ #define EHSIZE 4 -#if NeedFunctionPrototypes Boolean XtDispatchEventToWidget( Widget widget, XEvent* event) -#else -Boolean XtDispatchEventToWidget(widget, event) - Widget widget; - XEvent* event; -#endif { register XtEventRec *p; Boolean was_dispatched = False; @@ -1544,18 +1457,10 @@ static XtGrabRec *NewGrabRec(widget, exclusive, spring_loaded) return gl; } -#if NeedFunctionPrototypes void XtAddGrab( Widget widget, _XtBoolean exclusive, - _XtBoolean spring_loaded - ) -#else -void XtAddGrab(widget, exclusive, spring_loaded) - Widget widget; - Boolean exclusive; - Boolean spring_loaded; -#endif + _XtBoolean spring_loaded) { register XtGrabList gl; XtGrabList *grabListPtr; @@ -1718,18 +1623,10 @@ static XtEventDispatchProc* NewDispatcherList() return l; } -#if NeedFunctionPrototypes XtEventDispatchProc XtSetEventDispatcher( Display *dpy, int event_type, - XtEventDispatchProc proc - ) -#else -XtEventDispatchProc XtSetEventDispatcher(dpy, event_type, proc) - Display *dpy; - int event_type; - XtEventDispatchProc proc; -#endif + XtEventDispatchProc proc) { XtEventDispatchProc *list; XtEventDispatchProc old_proc; @@ -1753,23 +1650,12 @@ XtEventDispatchProc XtSetEventDispatcher(dpy, event_type, proc) return old_proc; } -#if NeedFunctionPrototypes void XtRegisterExtensionSelector( Display *dpy, int min_event_type, int max_event_type, XtExtensionSelectProc proc, - XtPointer client_data - ) -#else -void XtRegisterExtensionSelector(dpy, min_event_type, max_event_type, - proc, client_data) - Display *dpy; - int min_event_type; - int max_event_type; - XtExtensionSelectProc proc; - XtPointer client_data; -#endif + XtPointer client_data) { ExtSelectRec *e; XtPerDisplay pd; diff --git a/src/EventUtil.c b/src/EventUtil.c index d14f952..92a1af4 100644 --- a/src/EventUtil.c +++ b/src/EventUtil.c @@ -59,7 +59,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/Xt/EventUtil.c,v 1.6 2001/12/14 19:56:13 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/EventUtil.c,v 1.7 2003/04/21 16:34:27 herrb Exp $ */ #include "IntrinsicI.h" #include "PassivGraI.h" @@ -85,16 +85,9 @@ void _XtFreePerWidgetInput(w, pwi) * This routine gets the passive list associated with the widget * from the context manager. */ -#if NeedFunctionPrototypes XtPerWidgetInput _XtGetPerWidgetInput( Widget widget, - _XtBoolean create - ) -#else -XtPerWidgetInput _XtGetPerWidgetInput(widget, create) - Widget widget; - Boolean create; -#endif + _XtBoolean create) { XtPerWidgetInput pwi = NULL; Display *dpy = widget->core.screen->display; diff --git a/src/Geometry.c b/src/Geometry.c index d07f1e1..f25c2e4 100644 --- a/src/Geometry.c +++ b/src/Geometry.c @@ -58,7 +58,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/Xt/Geometry.c,v 1.12 2001/12/14 19:56:15 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/Geometry.c,v 1.13 2003/04/21 16:34:27 herrb Exp $ */ #include "IntrinsicI.h" #include "ShellP.h" @@ -492,7 +492,6 @@ XtGeometryResult XtMakeGeometryRequest (widget, request, reply) return ((r == XtGeometryDone) ? XtGeometryYes : r); } -#if NeedFunctionPrototypes XtGeometryResult XtMakeResizeRequest( Widget widget, @@ -500,13 +499,6 @@ XtMakeResizeRequest( _XtDimension height, Dimension *replyWidth, Dimension *replyHeight) -#else -XtGeometryResult -XtMakeResizeRequest (widget, width, height, replyWidth, replyHeight) - Widget widget; - Dimension width, height; - Dimension *replyWidth, *replyHeight; -#endif { XtWidgetGeometry request, reply; XtGeometryResult r; @@ -580,37 +572,22 @@ void XtResizeWindow(w) UNLOCK_APP(app); } /* XtResizeWindow */ -#if NeedFunctionPrototypes void XtResizeWidget( Widget w, _XtDimension width, _XtDimension height, - _XtDimension borderWidth - ) -#else -void XtResizeWidget(w, width, height, borderWidth) - Widget w; - Dimension width, height, borderWidth; -#endif + _XtDimension borderWidth) { XtConfigureWidget(w, w->core.x, w->core.y, width, height, borderWidth); } /* XtResizeWidget */ -#if NeedFunctionPrototypes void XtConfigureWidget( Widget w, _XtPosition x, _XtPosition y, _XtDimension width, _XtDimension height, - _XtDimension borderWidth - ) -#else -void XtConfigureWidget(w, x, y, width, height, borderWidth) - Widget w; - Position x, y; - Dimension width, height, borderWidth; -#endif + _XtDimension borderWidth) { XtConfigureHookDataRec req; Widget hookobj; @@ -699,36 +676,21 @@ void XtConfigureWidget(w, x, y, width, height, borderWidth) UNLOCK_APP(app); } /* XtConfigureWidget */ -#if NeedFunctionPrototypes void XtMoveWidget( Widget w, _XtPosition x, - _XtPosition y - ) -#else -void XtMoveWidget(w, x, y) - Widget w; - Position x, y; -#endif + _XtPosition y) { XtConfigureWidget(w, x, y, w->core.width, w->core.height, w->core.border_width); } /* XtMoveWidget */ -#if NeedFunctionPrototypes void XtTranslateCoords( register Widget w, _XtPosition x, _XtPosition y, register Position *rootx, /* return */ - register Position *rooty /* return */ - ) -#else -void XtTranslateCoords(w, x, y, rootx, rooty) - register Widget w; - Position x, y; - register Position *rootx, *rooty; /* return */ -#endif + register Position *rooty) /* return */ { Position garbagex, garbagey; XtAppContext app = XtWidgetToApplicationContext(w); diff --git a/src/Hooks.c b/src/Hooks.c index ad4cc19..71f9ab0 100644 --- a/src/Hooks.c +++ b/src/Hooks.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/Xt/Hooks.c,v 1.3 2001/12/14 19:56:18 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/Hooks.c,v 1.4 2003/04/21 16:34:27 herrb Exp $ */ /*LINTLIBRARY*/ @@ -113,13 +113,8 @@ static void DeleteShellFromHookObj( #define SHELL_INCR 4 -#if NeedFunctionPrototypes void _XtAddShellToHookObj( Widget shell) -#else -void _XtAddShellToHookObj(shell) - Widget shell; -#endif { /* app_con is locked when this function is called */ HookObject ho = (HookObject) XtHooksOfDisplay(XtDisplay(shell)); @@ -136,13 +131,8 @@ void _XtAddShellToHookObj(shell) (XtPointer)ho); } -#if NeedFunctionPrototypes Boolean _XtIsHookObject( Widget widget) -#else -Boolean _XtIsHookObject(widget) - Widget widget; -#endif { return (widget->core.widget_class == hookObjectClass); } diff --git a/src/Initialize.c b/src/Initialize.c index 6c2a300..c79ddc2 100644 --- a/src/Initialize.c +++ b/src/Initialize.c @@ -32,7 +32,7 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xt/Initialize.c,v 3.20 2002/04/10 16:20:07 tsi Exp $ */ +/* $XFree86: xc/lib/Xt/Initialize.c,v 3.21 2003/04/21 16:34:27 herrb Exp $ */ /* @@ -404,18 +404,10 @@ static String _XtDefaultLanguageProc( return setlocale(LC_ALL, NULL); /* re-query in case overwritten */ } -#if NeedFunctionPrototypes XtLanguageProc XtSetLanguageProc( XtAppContext app, XtLanguageProc proc, - XtPointer closure - ) -#else -XtLanguageProc XtSetLanguageProc(app, proc, closure) - XtAppContext app; - XtLanguageProc proc; - XtPointer closure; -#endif + XtPointer closure) { XtLanguageProc old; @@ -788,7 +780,6 @@ static void ConnectionWatch ( } } -#if NeedFunctionPrototypes void _XtDisplayInitialize( Display *dpy, XtPerDisplay pd, @@ -797,16 +788,6 @@ void _XtDisplayInitialize( Cardinal num_urs, int *argc, char **argv) -#else -void _XtDisplayInitialize(dpy, pd, name, urlist, num_urs, argc, argv) - Display *dpy; - XtPerDisplay pd; - String name; - XrmOptionDescRec *urlist; - Cardinal num_urs; - int *argc; - char **argv; -#endif { Boolean tmp_bool; XrmValue value; @@ -901,18 +882,10 @@ void _XtDisplayInitialize(dpy, pd, name, urlist, num_urs, argc, argv) * Returns: none. */ -#if NeedFunctionPrototypes void XtAppSetFallbackResources( -XtAppContext app_context, -String *specification_list -) -#else -void -XtAppSetFallbackResources(app_context, specification_list) -XtAppContext app_context; -String *specification_list; -#endif + XtAppContext app_context, + String *specification_list) { LOCK_APP(app_context); app_context->fallback_resources = specification_list; @@ -920,27 +893,12 @@ String *specification_list; } -#if NeedFunctionPrototypes Widget XtOpenApplication(XtAppContext *app_context_return, _Xconst char *application_class, XrmOptionDescRec *options, Cardinal num_options, int *argc_in_out, String *argv_in_out, String *fallback_resources, WidgetClass widget_class, ArgList args_in, Cardinal num_args_in) -#else -Widget XtOpenApplication(app_context_return, application_class, - options, num_options, argc_in_out, argv_in_out, - fallback_resources, widget_class, - args_in, num_args_in) - XtAppContext *app_context_return; - String application_class; - XrmOptionDescRec *options; - Cardinal num_options, num_args_in; - int *argc_in_out; - String *argv_in_out, *fallback_resources; - WidgetClass widget_class; - ArgList args_in; -#endif { XtAppContext app_con; Display * dpy; @@ -975,32 +933,17 @@ Widget XtOpenApplication(app_context_return, application_class, } -#if NeedFunctionPrototypes Widget XtAppInitialize( -XtAppContext * app_context_return, -_Xconst char* application_class, -XrmOptionDescRec *options, -Cardinal num_options, -int *argc_in_out, -String *argv_in_out, -String *fallback_resources, -ArgList args_in, -Cardinal num_args_in -) -#else -Widget -XtAppInitialize(app_context_return, application_class, options, num_options, - argc_in_out, argv_in_out, fallback_resources, - args_in, num_args_in) -XtAppContext * app_context_return; -String application_class; -XrmOptionDescRec *options; -Cardinal num_options, num_args_in; -int *argc_in_out; -String *argv_in_out, * fallback_resources; -ArgList args_in; -#endif + XtAppContext * app_context_return, + _Xconst char* application_class, + XrmOptionDescRec *options, + Cardinal num_options, + int *argc_in_out, + String *argv_in_out, + String *fallback_resources, + ArgList args_in, + Cardinal num_args_in) { return XtOpenApplication(app_context_return, application_class, options, num_options, @@ -1011,25 +954,14 @@ ArgList args_in; /*ARGSUSED*/ -#if NeedFunctionPrototypes Widget XtInitialize( -_Xconst char* name, -_Xconst char* classname, -XrmOptionDescRec *options, -Cardinal num_options, -int *argc, -String *argv -) -#else -Widget -XtInitialize(name, classname, options, num_options, argc, argv) -String name, classname; -XrmOptionDescRec *options; -Cardinal num_options; -String *argv; -int *argc; -#endif + _Xconst char* name, + _Xconst char* classname, + XrmOptionDescRec *options, + Cardinal num_options, + int *argc, + String *argv) { Widget root; XtAppContext app_con; diff --git a/src/Intrinsic.c b/src/Intrinsic.c index 2629775..98bfa43 100644 --- a/src/Intrinsic.c +++ b/src/Intrinsic.c @@ -32,7 +32,7 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xt/Intrinsic.c,v 3.22 2003/01/12 03:55:46 tsi Exp $ */ +/* $XFree86: xc/lib/Xt/Intrinsic.c,v 3.23 2003/04/21 16:34:27 herrb Exp $ */ /* @@ -96,16 +96,9 @@ Boolean XtIsSubclass(widget, widgetClass) } /* XtIsSubclass */ -#if NeedFunctionPrototypes Boolean _XtCheckSubclassFlag( Widget object, - _XtXtEnum flag - ) -#else -Boolean _XtCheckSubclassFlag(object, flag) - Widget object; - XtEnum flag; -#endif + _XtXtEnum flag) { Boolean retval; @@ -119,19 +112,11 @@ Boolean _XtCheckSubclassFlag(object, flag) } /*_XtVerifySubclass */ -#if NeedFunctionPrototypes Boolean _XtIsSubclassOf( Widget object, WidgetClass widgetClass, WidgetClass superClass, - _XtXtEnum flag - ) -#else -Boolean _XtIsSubclassOf(object, widgetClass, superClass, flag) - Widget object; - WidgetClass widgetClass, superClass; - XtEnum flag; -#endif + _XtXtEnum flag) { LOCK_PROCESS; if (!(object->core.widget_class->core_class.class_inited & flag)) { @@ -152,23 +137,12 @@ Boolean _XtIsSubclassOf(object, widgetClass, superClass, flag) } /*_XtIsSubclassOf */ -#if NeedFunctionPrototypes XtPointer XtGetClassExtension( WidgetClass object_class, Cardinal byte_offset, XrmQuark type, long version, - Cardinal record_size - ) -#else -XtPointer XtGetClassExtension(object_class, byte_offset, type, version, - record_size) - WidgetClass object_class; - Cardinal byte_offset; - XrmQuark type; - long version; - Cardinal record_size; -#endif + Cardinal record_size) { ObjectClassExtension ext; LOCK_PROCESS; @@ -633,16 +607,9 @@ static Widget NameListToWidget(root, names, bindings, } } /* NameListToWidget */ -#if NeedFunctionPrototypes Widget XtNameToWidget( Widget root, - _Xconst char* name - ) -#else -Widget XtNameToWidget(root, name) - Widget root; - String name; -#endif + _Xconst char* name) { XrmName *names; XrmBinding *bindings; @@ -1080,20 +1047,11 @@ static Boolean Resolve(source, len, sub, num, buf, collapse) } -#if NeedFunctionPrototypes String XtFindFile( _Xconst char* path, Substitution substitutions, Cardinal num_substitutions, - XtFilePredicate predicate - ) -#else -String XtFindFile(path, substitutions, num_substitutions, predicate) - String path; - Substitution substitutions; - Cardinal num_substitutions; - XtFilePredicate predicate; -#endif + XtFilePredicate predicate) { char *buf, *buf1, *buf2, *colon; int len; @@ -1348,11 +1306,7 @@ static void FillInLangSubs(subs, pd) * The exact value should be documented in the implementation * notes for any Xt implementation. */ -#if NeedFunctionPrototypes static char *implementation_default_path(void) -#else -static char *implementation_default_path() -#endif { #if defined(WIN32) || defined(__UNIXOS2__) /* if you know how to pass % thru the compiler let me know */ @@ -1384,7 +1338,6 @@ static SubstitutionRec defaultSubs[] = { }; -#if NeedFunctionPrototypes String XtResolvePathname( Display *dpy, _Xconst char* type, @@ -1393,17 +1346,7 @@ String XtResolvePathname( _Xconst char* path, Substitution substitutions, Cardinal num_substitutions, - XtFilePredicate predicate - ) -#else -String XtResolvePathname(dpy, type, filename, suffix, path, substitutions, - num_substitutions, predicate) - Display *dpy; - String type, filename, suffix, path; - Substitution substitutions; - Cardinal num_substitutions; - XtFilePredicate predicate; -#endif + XtFilePredicate predicate) { XtPerDisplay pd; static char *defaultPath = NULL; @@ -1604,11 +1547,7 @@ static XtResource geo_resources[] = { /************************************************************************ This function uses XtGetSubresources to find out if a widget needs to be geo-spied by the caller. */ -#if NeedFunctionPrototypes static Boolean IsTattled (Widget widget) -#else -static Boolean IsTattled (widget) Widget widget ; -#endif { GeoDataRec geo_data ; @@ -1624,12 +1563,7 @@ static Boolean IsTattled (widget) Widget widget ; static int n_tab = 0 ; /* not MT for now */ void -#if NeedFunctionPrototypes _XtGeoTab (int direction) /* +1 or -1 */ -#else -_XtGeoTab (direction) -int direction ; -#endif { n_tab += direction ; } diff --git a/src/Manage.c b/src/Manage.c index 03c1472..04a779b 100644 --- a/src/Manage.c +++ b/src/Manage.c @@ -32,7 +32,7 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xt/Manage.c,v 3.8 2001/12/14 19:56:26 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/Manage.c,v 3.11 2003/08/27 21:39:38 tsi Exp $ */ /* @@ -150,7 +150,9 @@ void XtUnmanageChildren (children, num_children) { Widget parent, hookobj; Cardinal ii; +#ifdef XTHREADS XtAppContext app; +#endif if (num_children == 0) return; if (children[0] == NULL) { @@ -159,7 +161,9 @@ void XtUnmanageChildren (children, num_children) (String *)NULL, (Cardinal *)NULL); return; } +#ifdef XTHREADS app = XtWidgetToApplicationContext(children[0]); +#endif LOCK_APP(app); parent = children[0]->core.parent; if (parent->core.being_destroyed) { @@ -302,7 +306,9 @@ void XtManageChildren(children, num_children) Cardinal num_children; { Widget parent, hookobj; +#ifdef XTHREADS XtAppContext app; +#endif if (num_children == 0) return; if (children[0] == NULL) { @@ -311,7 +317,9 @@ void XtManageChildren(children, num_children) (String*)NULL, (Cardinal*)NULL); return; } +#ifdef XTHREADS app = XtWidgetToApplicationContext(children[0]); +#endif LOCK_APP(app); parent = children[0]->core.parent; if (parent->core.being_destroyed) { @@ -342,16 +350,9 @@ void XtManageChild(child) } /* XtManageChild */ -#if NeedFunctionPrototypes void XtSetMappedWhenManaged( Widget widget, - _XtBoolean mapped_when_managed - ) -#else -void XtSetMappedWhenManaged(widget, mapped_when_managed) - Widget widget; - Boolean mapped_when_managed; -#endif + _XtBoolean mapped_when_managed) { Widget hookobj; WIDGET_TO_APPCON(widget); @@ -391,25 +392,13 @@ void XtSetMappedWhenManaged(widget, mapped_when_managed) } /* XtSetMappedWhenManaged */ -#if NeedFunctionPrototypes void XtChangeManagedSet( WidgetList unmanage_children, Cardinal num_unmanage, XtDoChangeProc do_change_proc, XtPointer client_data, WidgetList manage_children, - Cardinal num_manage -) -#else -void XtChangeManagedSet(unmanage_children, num_unmanage, do_change_proc, - client_data, manage_children, num_manage) - WidgetList unmanage_children; - Cardinal num_unmanage; - XtDoChangeProc do_change_proc; - XtPointer client_data; - WidgetList manage_children; - Cardinal num_manage; -#endif + Cardinal num_manage) { WidgetList childp; Widget parent; diff --git a/src/NextEvent.c b/src/NextEvent.c index 098bd16..c588a9c 100644 --- a/src/NextEvent.c +++ b/src/NextEvent.c @@ -58,7 +58,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/Xt/NextEvent.c,v 3.26 2002/06/04 21:55:42 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/NextEvent.c,v 3.27 2003/04/21 16:34:28 herrb Exp $ */ #include "IntrinsicI.h" #include <stdio.h> @@ -540,7 +540,6 @@ ENDILOOP: ; * entering select/poll. It is illegal for drop_lock to be FALSE if * ignoreTimers, ignoreInputs, or ignoreSignals is FALSE. */ -#if NeedFunctionPrototypes int _XtWaitForSomething( XtAppContext app, _XtBoolean ignoreEvents, @@ -552,25 +551,6 @@ int _XtWaitForSomething( _XtBoolean drop_lock, #endif unsigned long *howlong) -#else -int _XtWaitForSomething(app, - ignoreEvents, ignoreTimers, ignoreInputs, ignoreSignals, - block, -#ifdef XTHREADS - drop_lock, -#endif - howlong) - XtAppContext app; - Boolean ignoreEvents; - Boolean ignoreTimers; - Boolean ignoreInputs; - Boolean ignoreSignals; - Boolean block; -#ifdef XTHREADS - Boolean drop_lock; -#endif - unsigned long *howlong; -#endif { wait_times_t wt; wait_fds_t wf; @@ -1216,15 +1196,9 @@ void XtNextEvent(event) XtAppNextEvent(_XtDefaultAppContext(), event); } -#if NeedFunctionPrototypes void _XtRefreshMapping( XEvent* event, _XtBoolean dispatch) -#else -void _XtRefreshMapping(event, dispatch) - XEvent *event; - Boolean dispatch; -#endif { XtPerDisplay pd; diff --git a/src/PassivGrab.c b/src/PassivGrab.c index 4242ea6..9f76806 100644 --- a/src/PassivGrab.c +++ b/src/PassivGrab.c @@ -33,6 +33,7 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ +/* $XFree86: xc/lib/Xt/PassivGrab.c,v 3.7 2003/10/24 15:47:35 tsi Exp $ */ /* @@ -527,18 +528,10 @@ void _XtDestroyServerGrabs(w, closure, call_data) * the grab. The grab will remain in effect until the key is released. */ -#if NeedFunctionPrototypes XtServerGrabPtr _XtCheckServerGrabsOnWidget ( XEvent *event, Widget widget, - _XtBoolean isKeyboard - ) -#else -XtServerGrabPtr _XtCheckServerGrabsOnWidget (event, widget, isKeyboard) - XEvent *event; - Widget widget; - Boolean isKeyboard; -#endif + _XtBoolean isKeyboard) { register XtServerGrabPtr grab; XtServerGrabRec tempGrab; @@ -809,25 +802,13 @@ void UngrabKeyOrButton (widget, keyOrButton, modifiers, isKeyboard) &tempGrab); } -#if NeedFunctionPrototypes void XtGrabKey ( Widget widget, _XtKeyCode keycode, Modifiers modifiers, _XtBoolean owner_events, int pointer_mode, - int keyboard_mode - ) -#else -void XtGrabKey (widget, keycode, modifiers, owner_events, - pointer_mode, keyboard_mode) - Widget widget; - KeyCode keycode; - Modifiers modifiers; - Boolean owner_events; - int pointer_mode; - int keyboard_mode; -#endif + int keyboard_mode) { WIDGET_TO_APPCON(widget); @@ -838,7 +819,6 @@ void XtGrabKey (widget, keycode, modifiers, owner_events, UNLOCK_APP(app); } -#if NeedFunctionPrototypes void XtGrabButton( Widget widget, int button, @@ -848,22 +828,7 @@ void XtGrabButton( int pointer_mode, int keyboard_mode, Window confine_to, - Cursor cursor - ) -#else -void XtGrabButton(widget, button, modifiers, owner_events, - event_mask, pointer_mode, keyboard_mode, - confine_to, cursor) - Widget widget; - int button; - Modifiers modifiers; - Boolean owner_events; - unsigned int event_mask; - int pointer_mode; - int keyboard_mode; - Window confine_to; - Cursor cursor; -#endif + Cursor cursor) { WIDGET_TO_APPCON(widget); @@ -880,18 +845,10 @@ void XtGrabButton(widget, button, modifiers, owner_events, * combination. */ -#if NeedFunctionPrototypes void XtUngrabKey ( Widget widget, _XtKeyCode keycode, - Modifiers modifiers - ) -#else -void XtUngrabKey (widget, keycode, modifiers) - Widget widget; - KeyCode keycode; - Modifiers modifiers; -#endif + Modifiers modifiers) { WIDGET_TO_APPCON(widget); @@ -999,23 +956,12 @@ static void UngrabDevice(widget, time, isKeyboard) /* * Active grab of keyboard. clear any client side grabs so we dont lock */ -#if NeedFunctionPrototypes int XtGrabKeyboard ( Widget widget, _XtBoolean owner_events, int pointer_mode, int keyboard_mode, - Time time - ) -#else -int XtGrabKeyboard (widget, owner_events, - pointer_mode, keyboard_mode, time) - Widget widget; - Boolean owner_events; - int pointer_mode; - int keyboard_mode; - Time time; -#endif + Time time) { int retval; WIDGET_TO_APPCON(widget); @@ -1050,7 +996,6 @@ void XtUngrabKeyboard(widget, time) /* * grab the pointer */ -#if NeedFunctionPrototypes int XtGrabPointer ( Widget widget, _XtBoolean owner_events, @@ -1059,21 +1004,7 @@ int XtGrabPointer ( int keyboard_mode, Window confine_to, Cursor cursor, - Time time - ) -#else -int XtGrabPointer (widget, owner_events, event_mask, - pointer_mode, keyboard_mode, - confine_to, cursor, time) - Widget widget; - Boolean owner_events; - unsigned int event_mask; - int pointer_mode; - int keyboard_mode; - Window confine_to; - Cursor cursor; - Time time; -#endif + Time time) { int retval; WIDGET_TO_APPCON(widget); diff --git a/src/Popup.c b/src/Popup.c index 1549a68..b51151e 100644 --- a/src/Popup.c +++ b/src/Popup.c @@ -46,22 +46,15 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ +/* $XFree86: xc/lib/Xt/Popup.c,v 1.4 2003/10/24 15:47:35 tsi Exp $ */ #include "IntrinsicI.h" #include "ShellP.h" -#if NeedFunctionPrototypes void _XtPopup( Widget widget, XtGrabKind grab_kind, - _XtBoolean spring_loaded - ) -#else -void _XtPopup(widget, grab_kind, spring_loaded) - Widget widget; - XtGrabKind grab_kind; - Boolean spring_loaded; -#endif + _XtBoolean spring_loaded) { register ShellWidget shell_widget = (ShellWidget) widget; @@ -93,13 +86,7 @@ void _XtPopup(widget, grab_kind, spring_loaded) } /* _XtPopup */ -#if NeedFunctionPrototypes void XtPopup (Widget widget, XtGrabKind grab_kind) -#else -void XtPopup (widget, grab_kind) - Widget widget; - XtGrabKind grab_kind; -#endif { Widget hookobj; diff --git a/src/Resources.c b/src/Resources.c index d8e5d40..859a801 100644 --- a/src/Resources.c +++ b/src/Resources.c @@ -59,7 +59,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xt/Resources.c,v 1.9 2001/12/14 19:56:28 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/Resources.c,v 1.12 2003/08/27 21:39:38 tsi Exp $ */ /*LINTLIBRARY*/ #include "IntrinsicI.h" @@ -1071,33 +1071,17 @@ XtCacheRef *_XtGetResources(w, args, num_args, typed_args, num_typed_args) } /* _XtGetResources */ -#if NeedFunctionPrototypes void _XtGetSubresources ( - Widget w, - XtPointer base, - const char* name, - const char* class, - XtResourceList resources, - Cardinal num_resources, - ArgList args, + Widget w, /* Widget "parent" of subobject */ + XtPointer base, /* Base address to write to */ + const char* name, /* name of subobject */ + const char* class, /* class of subobject */ + XtResourceList resources, /* resource list for subobject */ + Cardinal num_resources, + ArgList args, /* arg list to override resources */ Cardinal num_args, XtTypedArgList typed_args, - Cardinal num_typed_args - ) -#else -void _XtGetSubresources (w, base, name, class, resources, num_resources, - args, num_args) - Widget w; /* Widget "parent" of subobject */ - XtPointer base; /* Base address to write to */ - String name; /* name of subobject */ - String class; /* class of subobject */ - XtResourceList resources; /* resource list for subobject */ - Cardinal num_resources; - ArgList args; /* arg list to override resources */ - Cardinal num_args; - XtTypedArgsList typed_args; - Cardinal num_typed_args; -#endif + Cardinal num_typed_args) { XrmName *names, names_s[50]; XrmClass *classes, classes_s[50]; @@ -1144,29 +1128,15 @@ void _XtGetSubresources (w, base, name, class, resources, num_resources, UNLOCK_APP(app); } -#if NeedFunctionPrototypes void XtGetSubresources ( - Widget w, - XtPointer base, - _Xconst char* name, - _Xconst char* class, - XtResourceList resources, - Cardinal num_resources, - ArgList args, - Cardinal num_args - ) -#else -void XtGetSubresources (w, base, name, class, resources, num_resources, - args, num_args) - Widget w; /* Widget "parent" of subobject */ - XtPointer base; /* Base address to write to */ - String name; /* name of subobject */ - String class; /* class of subobject */ - XtResourceList resources; /* resource list for subobject */ - Cardinal num_resources; - ArgList args; /* arg list to override resources */ - Cardinal num_args; -#endif + Widget w, /* Widget "parent" of subobject */ + XtPointer base, /* Base address to write to */ + _Xconst char* name, /* name of subobject */ + _Xconst char* class, /* class of subobject */ + XtResourceList resources, /* resource list for subobject */ + Cardinal num_resources, + ArgList args, /* arg list to override resources */ + Cardinal num_args) { _XtGetSubresources (w, base, name, class, resources, num_resources, args, num_args, NULL, 0); } @@ -1189,12 +1159,16 @@ void _XtGetApplicationResources XrmQuarkList quark_args; XrmResourceList* table; Cardinal count, ntyped_args = num_typed_args; +#ifdef XTHREADS XtAppContext app; +#endif if (num_resources == 0) return; +#ifdef XTHREADS if (w == NULL) app = _XtDefaultAppContext(); else app = XtWidgetToApplicationContext(w); +#endif LOCK_APP(app); /* Get full name, class of application */ diff --git a/src/Selection.c b/src/Selection.c index 0a5cd9d..55d496c 100644 --- a/src/Selection.c +++ b/src/Selection.c @@ -58,7 +58,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/Xt/Selection.c,v 3.9 2001/12/14 19:56:29 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/Selection.c,v 3.10 2003/04/21 16:34:28 herrb Exp $ */ #include "IntrinsicI.h" #include "StringDefs.h" @@ -395,11 +395,7 @@ Time time; static XContext selectWindowContext = 0; /* %%% Xlib.h should make this public! */ -typedef int (*xErrorHandler)( -#if NeedFunctionPrototypes - Display*, XErrorEvent* -#endif - ); +typedef int (*xErrorHandler)(Display*, XErrorEvent*); static xErrorHandler oldErrorHandler = NULL; static unsigned long firstProtectRequest; diff --git a/src/SetSens.c b/src/SetSens.c index 96940cd..52e7d77 100644 --- a/src/SetSens.c +++ b/src/SetSens.c @@ -58,7 +58,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/Xt/SetSens.c,v 1.3 2001/12/14 19:56:29 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/SetSens.c,v 1.4 2003/04/21 16:34:28 herrb Exp $ */ #include "IntrinsicI.h" #include "StringDefs.h" @@ -93,16 +93,9 @@ static void SetAncestorSensitive( } /* SetAncestorSensitive */ -#if NeedFunctionPrototypes void XtSetSensitive( register Widget widget, - _XtBoolean sensitive - ) -#else -void XtSetSensitive(widget, sensitive) - register Widget widget; - Boolean sensitive; -#endif + _XtBoolean sensitive) { Arg args[1]; register Cardinal i; diff --git a/src/Shell.c b/src/Shell.c index 8c600d9..6d65bbb 100644 --- a/src/Shell.c +++ b/src/Shell.c @@ -32,7 +32,7 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xt/Shell.c,v 3.15 2001/12/14 19:56:30 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/Shell.c,v 3.17 2003/05/27 22:26:43 tsi Exp $ */ /* @@ -2897,9 +2897,7 @@ static SmProp * CardPack(name, closure) return p; } -static SmProp * ArrayPack(name, closure) - char *name; - XtPointer closure; +static SmProp * ArrayPack(char *name, XtPointer closure) { String prop = *(String *) closure; SmProp *p; @@ -3241,12 +3239,7 @@ static XtCheckpointToken GetToken(widget, type) return token; } -#if NeedFunctionPrototypes XtCheckpointToken XtSessionGetToken(Widget widget) -#else -XtCheckpointToken XtSessionGetToken(widget) - Widget widget; -#endif { SessionShellWidget w = (SessionShellWidget) widget; XtCheckpointToken token = NULL; @@ -3281,12 +3274,7 @@ static Boolean ExamineToken(call_data) return True; } -#if NeedFunctionPrototypes void XtSessionReturnToken(XtCheckpointToken token) -#else -void XtSessionReturnToken(token) - XtCheckpointToken token; -#endif { SessionShellWidget w = (SessionShellWidget) token->widget; Boolean has_some; diff --git a/src/TMaction.c b/src/TMaction.c index a1b7b0a..ac8fcdd 100644 --- a/src/TMaction.c +++ b/src/TMaction.c @@ -59,7 +59,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/Xt/TMaction.c,v 3.7 2001/12/14 19:56:30 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/TMaction.c,v 3.8 2003/04/21 16:34:28 herrb Exp $ */ /* TMaction.c -- maintains the state table of actions for the translation * manager. @@ -400,18 +400,10 @@ static XtActionProc *TryBindCache(widget, stateTree) * The class record actions field will point to the bind cache header * after this call is made out of coreClassPartInit. */ -#if NeedFunctionPrototypes XtPointer _XtInitializeActionData( register struct _XtActionsRec *actions, register Cardinal count, - _XtBoolean inPlace - ) -#else -XtPointer _XtInitializeActionData(actions, count, inPlace) - register struct _XtActionsRec *actions; - register Cardinal count; - Boolean inPlace; -#endif + _XtBoolean inPlace) { TMClassCache classCache; @@ -953,22 +945,12 @@ void _XtPopupInitialize(app) } -#if NeedFunctionPrototypes void XtCallActionProc( Widget widget, _Xconst char* action, XEvent *event, String *params, - Cardinal num_params - ) -#else -void XtCallActionProc(widget, action, event, params, num_params) - Widget widget; - String action; - XEvent *event; - String *params; - Cardinal num_params; -#endif + Cardinal num_params) { CompiledAction* actionP; XrmQuark q = XrmStringToQuark(action); diff --git a/src/TMgrab.c b/src/TMgrab.c index 9257293..50be71a 100644 --- a/src/TMgrab.c +++ b/src/TMgrab.c @@ -58,7 +58,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/Xt/TMgrab.c,v 1.3 2001/12/14 19:56:30 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/TMgrab.c,v 1.4 2003/04/21 16:34:28 herrb Exp $ */ /*LINTLIBRARY*/ #include "IntrinsicI.h" @@ -277,22 +277,12 @@ void _XtRegisterGrabs(widget) } } -#if NeedFunctionPrototypes void XtRegisterGrabAction( XtActionProc action_proc, _XtBoolean owner_events, unsigned int event_mask, int pointer_mode, - int keyboard_mode - ) -#else -void XtRegisterGrabAction(action_proc, owner_events, event_mask, - pointer_mode, keyboard_mode) - XtActionProc action_proc; - Boolean owner_events; - unsigned int event_mask; - int pointer_mode, keyboard_mode; -#endif + int keyboard_mode) { GrabActionRec* actionP; diff --git a/src/TMkey.c b/src/TMkey.c index 3087407..e338954 100644 --- a/src/TMkey.c +++ b/src/TMkey.c @@ -59,7 +59,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/Xt/TMkey.c,v 3.10 2001/12/14 19:56:30 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/TMkey.c,v 3.11 2003/04/21 16:34:28 herrb Exp $ */ #define XK_MISCELLANY #define XK_LATIN1 @@ -492,24 +492,12 @@ void _XtBuildKeysymTables(dpy,pd) XFreeModifiermap(modKeymap); } -#if NeedFunctionPrototypes void XtTranslateKeycode ( Display *dpy, _XtKeyCode keycode, Modifiers modifiers, Modifiers *modifiers_return, - KeySym *keysym_return - ) -#else -void XtTranslateKeycode (dpy, keycode, modifiers, - modifiers_return, keysym_return) - - Display *dpy; - KeyCode keycode; - Modifiers modifiers; - Modifiers *modifiers_return; - KeySym *keysym_return; -#endif + KeySym *keysym_return) { XtPerDisplay pd; DPY_TO_APPCON(dpy); @@ -523,23 +511,12 @@ void XtTranslateKeycode (dpy, keycode, modifiers, } /* This code should match XTranslateKey (internal, sigh) in Xlib */ -#if NeedFunctionPrototypes void XtTranslateKey( register Display *dpy, _XtKeyCode keycode, Modifiers modifiers, Modifiers *modifiers_return, - KeySym *keysym_return - ) -#else -void XtTranslateKey(dpy, keycode, modifiers, - modifiers_return, keysym_return) - register Display *dpy; - KeyCode keycode; - Modifiers modifiers; - Modifiers *modifiers_return; - KeySym *keysym_return; -#endif + KeySym *keysym_return) #ifndef XKB { XtPerDisplay pd; diff --git a/src/TMparse.c b/src/TMparse.c index e758e36..ad57d00 100644 --- a/src/TMparse.c +++ b/src/TMparse.c @@ -32,7 +32,7 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xt/TMparse.c,v 3.9 2002/05/31 18:45:46 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/TMparse.c,v 3.11 2003/05/27 22:26:43 tsi Exp $ */ /* @@ -430,10 +430,10 @@ static void CompileNameValueTable(table) table[i].signature = XrmPermStringToQuark(table[i].name); } -static int OrderEvents(a, b) - EventKey *a, *b; +static int OrderEvents(_Xconst void *a, _Xconst void *b) { - return ((a->signature < b->signature) ? -1 : 1); + return ((((_Xconst EventKey *)a)->signature < + ((_Xconst EventKey *)b)->signature) ? -1 : 1); } static void Compile_XtEventTable(table, count) @@ -448,10 +448,10 @@ static void Compile_XtEventTable(table, count) qsort(table, count, sizeof(EventKey), OrderEvents); } -static int OrderModifiers(a, b) - ModifierRec *a, *b; +static int OrderModifiers(_Xconst void *a, _Xconst void *b) { - return ((a->signature < b->signature) ? -1 : 1); + return ((((_Xconst ModifierRec *)a)->signature < + ((_Xconst ModifierRec *)b)->signature) ? -1 : 1); } static void Compile_XtModifierTable(table, count) @@ -2053,14 +2053,8 @@ XtCvtStringToTranslationTable(dpy, args, num_args, from, to, closure_ret) /* * Parses a user's or applications translation table */ -#if NeedFunctionPrototypes XtAccelerators XtParseAcceleratorTable( - _Xconst char* source - ) -#else -XtAccelerators XtParseAcceleratorTable(source) - String source; -#endif + _Xconst char* source) { Boolean error = FALSE; XtAccelerators ret = @@ -2073,14 +2067,8 @@ XtAccelerators XtParseAcceleratorTable(source) return ret; } -#if NeedFunctionPrototypes XtTranslations XtParseTranslationTable( - _Xconst char* source - ) -#else -XtTranslations XtParseTranslationTable(source) - String source; -#endif + _Xconst char* source) { Boolean error = FALSE; XtTranslations ret = ParseTranslationTable(source, FALSE, XtTableReplace, &error); @@ -2092,7 +2080,7 @@ XtTranslations XtParseTranslationTable(source) return ret; } -void _XtTranslateInitialize() +void _XtTranslateInitialize(void) { LOCK_PROCESS; if (initialized) { diff --git a/src/TMprint.c b/src/TMprint.c index 3b44326..db73700 100644 --- a/src/TMprint.c +++ b/src/TMprint.c @@ -58,7 +58,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/Xt/TMprint.c,v 1.6 2001/12/14 19:56:31 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/TMprint.c,v 1.7 2003/04/21 16:34:29 herrb Exp $ */ /*LINTLIBRARY*/ #include "IntrinsicI.h" @@ -659,20 +659,11 @@ static void PrintState(sb, tree, branchHead, includeRHS, accelWidget, dpy) UNLOCK_PROCESS; } -#if NeedFunctionPrototypes String _XtPrintXlations( Widget w, XtTranslations xlations, Widget accelWidget, - _XtBoolean includeRHS - ) -#else -String _XtPrintXlations(w, xlations, accelWidget, includeRHS) - Widget w; - XtTranslations xlations; - Widget accelWidget; - Boolean includeRHS; -#endif + _XtBoolean includeRHS) { register Cardinal i; #define STACKPRINTSIZE 250 diff --git a/src/TMstate.c b/src/TMstate.c index 2283e13..7f6646a 100644 --- a/src/TMstate.c +++ b/src/TMstate.c @@ -32,7 +32,7 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xt/TMstate.c,v 1.8 2001/12/14 19:56:31 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/TMstate.c,v 1.9 2003/04/21 16:34:29 herrb Exp $ */ /* @@ -1400,18 +1400,11 @@ void XtUninstallTranslations(widget) UNLOCK_APP(app); } -#if NeedFunctionPrototypes XtTranslations _XtCreateXlations( TMStateTree *stateTrees, TMShortCard numStateTrees, XtTranslations first, XtTranslations second) -#else -XtTranslations _XtCreateXlations(stateTrees, numStateTrees, first, second) - TMStateTree *stateTrees; - TMShortCard numStateTrees; - XtTranslations first, second; -#endif { XtTranslations xlations; TMShortCard i; diff --git a/src/Threads.c b/src/Threads.c index ef9a3bb..4ef3eec 100644 --- a/src/Threads.c +++ b/src/Threads.c @@ -53,7 +53,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/Xt/Threads.c,v 3.6 2001/12/14 19:56:31 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/Threads.c,v 3.7 2003/04/21 16:34:29 herrb Exp $ */ #include "IntrinsicI.h" @@ -165,13 +165,7 @@ ProcessUnlock(void) static void -#if NeedFunctionPrototypes -AppLock( - XtAppContext app) -#else -AppLock(app) - XtAppContext app; -#endif +AppLock(XtAppContext app) { LockPtr app_lock = app->lock_info; #ifdef _XMUTEX_NESTS @@ -201,13 +195,7 @@ AppLock(app) } static void -#if NeedFunctionPrototypes -AppUnlock( - XtAppContext app) -#else -AppUnlock(app) - XtAppContext app; -#endif +AppUnlock(XtAppContext app) { LockPtr app_lock = app->lock_info; #ifdef _XMUTEX_NESTS @@ -231,19 +219,11 @@ AppUnlock(app) } static void -#if NeedFunctionPrototypes YieldAppLock( XtAppContext app, Boolean* push_thread, Boolean* pushed_thread, int* level) -#else -YieldAppLock(app, push_thread, pushed_thread, level) - XtAppContext app; - Boolean* push_thread; - Boolean* pushed_thread; - int* level; -#endif { LockPtr app_lock = app->lock_info; xthread_t self = xthread_self(); @@ -284,17 +264,10 @@ YieldAppLock(app, push_thread, pushed_thread, level) } static void -#if NeedFunctionPrototypes RestoreAppLock( XtAppContext app, int level, Boolean* pushed_thread) -#else -RestoreAppLock(app, level, pushed_thread) - XtAppContext app; - int level; - Boolean* pushed_thread; -#endif { LockPtr app_lock = app->lock_info; xthread_t self = xthread_self(); @@ -343,13 +316,7 @@ RestoreAppLock(app, level, pushed_thread) } static void -#if NeedFunctionPrototypes -FreeAppLock( - XtAppContext app) -#else -FreeAppLock(app) - XtAppContext app; -#endif +FreeAppLock(XtAppContext app) { int ii; LockPtr app_lock = app->lock_info; @@ -374,13 +341,7 @@ FreeAppLock(app) } static void -#if NeedFunctionPrototypes -InitAppLock( - XtAppContext app) -#else -InitAppLock(app) - XtAppContext app; -#endif +InitAppLock(XtAppContext app) { int ii; LockPtr app_lock; @@ -412,13 +373,7 @@ InitAppLock(app) #endif /* defined(XTHREADS) */ -#if NeedFunctionPrototypes -void XtAppLock( - XtAppContext app) -#else -void XtAppLock(app) - XtAppContext app; -#endif +void XtAppLock(XtAppContext app) { #ifdef XTHREADS if(app->lock) @@ -426,13 +381,7 @@ void XtAppLock(app) #endif } -#if NeedFunctionPrototypes -void XtAppUnlock( - XtAppContext app) -#else -void XtAppUnlock(app) - XtAppContext app; -#endif +void XtAppUnlock(XtAppContext app) { #ifdef XTHREADS if(app->unlock) @@ -440,7 +389,7 @@ void XtAppUnlock(app) #endif } -void XtProcessLock() +void XtProcessLock(void) { #ifdef XTHREADS if(_XtProcessLock) @@ -448,7 +397,7 @@ void XtProcessLock() #endif } -void XtProcessUnlock() +void XtProcessUnlock(void) { #ifdef XTHREADS if(_XtProcessUnlock) diff --git a/src/Varargs.c b/src/Varargs.c index 552f72d..35a38f6 100644 --- a/src/Varargs.c +++ b/src/Varargs.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/Xt/Varargs.c,v 3.10 2001/12/14 19:56:32 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/Varargs.c,v 3.11 2003/04/21 16:34:29 herrb Exp $ */ #include "IntrinsicI.h" #include "VarargsI.h" @@ -64,16 +64,8 @@ _XtCountNestedList( * and the count of the number of those attributes that are typed. * The list is counted recursively. */ -#if NeedFunctionPrototypes void _XtCountVaList(va_list var, int* total_count, int* typed_count) -#else -void -_XtCountVaList(var, total_count, typed_count) - va_list var; - int *total_count; - int *typed_count; -#endif { String attr; @@ -140,13 +132,7 @@ XtVaCreateArgsList(XtPointer unused, ...) } -#if NeedFunctionPrototypes XtTypedArgList _XtVaCreateTypedArgList(va_list var, register int count) -#else -XtTypedArgList _XtVaCreateTypedArgList(var, count) - va_list var; - register int count; -#endif { String attr; XtTypedArgList avlist; @@ -321,19 +307,11 @@ NestedArgtoArg( * to make this representation, priority was given to the wish to retrofit * the release of memory around the existing signature of _XtVaToArgList. */ -#if NeedFunctionPrototypes void _XtFreeArgList( ArgList args, /* as returned by _XtVaToArgList */ int total_count, /* argument count returned by _XtCountVaList */ int typed_count) /* typed arg count returned by _XtCountVaList */ -#else -void -_XtFreeArgList(args, total_count, typed_count) - ArgList args; - int total_count; - int typed_count; -#endif { ArgList p; @@ -357,7 +335,6 @@ static void GetResources(Widget widget, XtResourceList *res_list, * lists and typed arguments. If typed arguments are present, the * ArgList should be freed with _XtFreeArgList. */ -#if NeedFunctionPrototypes void _XtVaToArgList( Widget widget, @@ -365,15 +342,6 @@ _XtVaToArgList( int max_count, ArgList *args_return, Cardinal *num_args_return) -#else -void -_XtVaToArgList(widget, var, max_count, args_return, num_args_return) - Widget widget; - va_list var; - int max_count; - ArgList *args_return; - Cardinal *num_args_return; -#endif { String attr; int count; @@ -510,21 +478,12 @@ static int NestedArgtoTypedArg( * lists. * Note: _XtVaToTypedArgList() does not do type conversions. */ -#if NeedFunctionPrototypes void _XtVaToTypedArgList( va_list var, int max_count, XtTypedArgList *args_return, Cardinal *num_args_return) -#else -void -_XtVaToTypedArgList(var, max_count, args_return, num_args_return) - va_list var; - int max_count; - XtTypedArgList *args_return; - Cardinal *num_args_return; -#endif { XtTypedArgList args = NULL; String attr; diff --git a/src/sharedlib.c b/src/sharedlib.c index 5096c44..17c25fd 100644 --- a/src/sharedlib.c +++ b/src/sharedlib.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/Xt/sharedlib.c,v 3.7 2002/05/31 18:45:46 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/sharedlib.c,v 3.8 2003/04/21 16:34:29 herrb Exp $ */ #if (defined(SUNSHLIB) || defined(AIXSHLIB)) && !defined(SHAREDCODE) #include "IntrinsicI.h" @@ -81,57 +81,31 @@ void XtToolkitInitialize() _XtToolkitInitialize(); } -#if NeedFunctionPrototypes Widget XtInitialize( -_Xconst char* name, -_Xconst char* classname, -XrmOptionDescRec *options, -Cardinal num_options, -int *argc, -String *argv -) -#else -Widget -XtInitialize(name, classname, options, num_options, argc, argv) -String name, classname; -XrmOptionDescRec *options; -Cardinal num_options; -String *argv; -int *argc; -#endif + _Xconst char* name, + _Xconst char* classname, + XrmOptionDescRec *options, + Cardinal num_options, + int *argc, + String *argv) { extern Widget _XtInitialize(); VENDORINIT return _XtInitialize (name, classname, options, num_options, argc, argv); } -#if NeedFunctionPrototypes Widget XtAppInitialize( -XtAppContext * app_context_return, -_Xconst char* application_class, -XrmOptionDescRec *options, -Cardinal num_options, -int *argc_in_out, -String *argv_in_out, -String *fallback_resources, -ArgList args_in, -Cardinal num_args_in -) -#else -Widget -XtAppInitialize(app_context_return, application_class, options, num_options, - argc_in_out, argv_in_out, fallback_resources, - args_in, num_args_in) -XtAppContext * app_context_return; -String application_class; -XrmOptionDescRec *options; -Cardinal num_options, num_args_in; -int *argc_in_out; -String *argv_in_out, * fallback_resources; -ArgList args_in; -#endif + XtAppContext * app_context_return, + _Xconst char* application_class, + XrmOptionDescRec *options, + Cardinal num_options, + int *argc_in_out, + String *argv_in_out, + String *fallback_resources, + ArgList args_in, + Cardinal num_args_in) { extern Widget _XtAppInitialize(); VENDORINIT @@ -161,34 +135,18 @@ XtVaAppInitialize( fallback_resources, var); } -#if NeedFunctionPrototypes Widget XtOpenApplication( -XtAppContext * app_context_return, -_Xconst char* application_class, -XrmOptionDescRec *options, -Cardinal num_options, -int *argc_in_out, -String *argv_in_out, -String *fallback_resources, -WidgetClass widget_class, -ArgList args_in, -Cardinal num_args_in -) -#else -Widget -XtOpenApplication(app_context_return, application_class, options, num_options, - argc_in_out, argv_in_out, fallback_resources, - widget_class, args_in, num_args_in) -XtAppContext * app_context_return; -String application_class; -XrmOptionDescRec *options; -Cardinal num_options, num_args_in; -int *argc_in_out; -String *argv_in_out, * fallback_resources; -WidgetClass widget_class; -ArgList args_in; -#endif + XtAppContext * app_context_return, + _Xconst char* application_class, + XrmOptionDescRec *options, + Cardinal num_options, + int *argc_in_out, + String *argv_in_out, + String *fallback_resources, + WidgetClass widget_class, + ArgList args_in, + Cardinal num_args_in) { extern Widget _XtOpenApplication(); VENDORINIT |