From f20747f1398ce0cc8f65ca896a63568847677c73 Mon Sep 17 00:00:00 2001 From: Peter Howkins Date: Thu, 28 Jun 2018 04:17:53 +0100 Subject: [PATCH] dtwm: Change to ANSI function definitions --- cde/programs/dtwm/Session.c | 12 +++--------- cde/programs/dtwm/UI.c | 4 +--- cde/programs/dtwm/WmCEvent.c | 3 +-- cde/programs/dtwm/WmFP.c | 6 ++---- cde/programs/dtwm/WmFeedback.c | 14 +++----------- cde/programs/dtwm/WmFunction.c | 9 ++------- cde/programs/dtwm/WmGraphics.c | 4 +--- cde/programs/dtwm/WmIconBox.c | 12 ++---------- cde/programs/dtwm/WmImage.c | 4 +--- cde/programs/dtwm/WmKeyFocus.c | 18 ++++-------------- cde/programs/dtwm/WmMenu.c | 5 +---- cde/programs/dtwm/WmResParse.c | 3 +-- cde/programs/dtwm/WmResource.c | 22 +++++----------------- 13 files changed, 27 insertions(+), 89 deletions(-) diff --git a/cde/programs/dtwm/Session.c b/cde/programs/dtwm/Session.c index b4817d67..6c428372 100644 --- a/cde/programs/dtwm/Session.c +++ b/cde/programs/dtwm/Session.c @@ -78,9 +78,7 @@ extern String unpost_monitor_arrow_image; ************************************************************************/ static char * -SessionFileGetName () - - +SessionFileGetName (void) { char * home_dir; char * file_name; @@ -113,9 +111,7 @@ SessionFileGetName () ************************************************************************/ void -SessionRestoreData () - - +SessionRestoreData (void) { FILE * fd; @@ -477,9 +473,7 @@ SessionRestoreData () ************************************************************************/ void -WmFrontPanelSessionSaveData () - - +WmFrontPanelSessionSaveData (void) { FILE * fd; diff --git a/cde/programs/dtwm/UI.c b/cde/programs/dtwm/UI.c index 6cba034a..a3a30632 100644 --- a/cde/programs/dtwm/UI.c +++ b/cde/programs/dtwm/UI.c @@ -696,9 +696,7 @@ PanelControlCreate (Widget parent, ************************************************************************/ static void -BoxCreate () - - +BoxCreate (void) { int i, j; BoxData * box_data; diff --git a/cde/programs/dtwm/WmCEvent.c b/cde/programs/dtwm/WmCEvent.c index af976c57..3ce479d1 100644 --- a/cde/programs/dtwm/WmCEvent.c +++ b/cde/programs/dtwm/WmCEvent.c @@ -2725,8 +2725,7 @@ void DetermineActiveScreen (XEvent *pEvent) * *************************************<->***********************************/ -WmScreenData * GetScreenForWindow (win) - Window win; +WmScreenData * GetScreenForWindow (Window win) { XWindowAttributes attribs; diff --git a/cde/programs/dtwm/WmFP.c b/cde/programs/dtwm/WmFP.c index 0865c1ed..1ec95196 100644 --- a/cde/programs/dtwm/WmFP.c +++ b/cde/programs/dtwm/WmFP.c @@ -364,8 +364,7 @@ EmbeddedClientRegister (ControlData * control_data, ************************************************************************/ static void -EmbeddedClientSetData () - +EmbeddedClientSetData (void) { WmScreenData *pSD; int i; @@ -555,8 +554,7 @@ PushRecallRegister (ControlData * control_data, ************************************************************************/ static void -PushRecallSetData () - +PushRecallSetData (void) { WmScreenData *pSD; int i; diff --git a/cde/programs/dtwm/WmFeedback.c b/cde/programs/dtwm/WmFeedback.c index e3b46935..c6e9a22e 100644 --- a/cde/programs/dtwm/WmFeedback.c +++ b/cde/programs/dtwm/WmFeedback.c @@ -80,7 +80,7 @@ static char *confirm_mesg[4] = {"Switch to Default Behavior?", void -initMesg() +initMesg(void) { char * tmpString; @@ -643,11 +643,7 @@ void UpdateFeedbackText (WmScreenData *pSD, int x, int y, unsigned int width, un * *************************************<->***********************************/ -static void OkCB (w, client_data, call_data) - - Widget w; - caddr_t client_data; - caddr_t call_data; +static void OkCB (Widget w, caddr_t client_data, caddr_t call_data) { WithdrawDialog (w); @@ -685,11 +681,7 @@ static void OkCB (w, client_data, call_data) * *************************************<->***********************************/ -static void CancelCB (w, client_data, call_data) - - Widget w; - caddr_t client_data; - caddr_t call_data; +static void CancelCB (Widget w, caddr_t client_data, caddr_t call_data) { WithdrawDialog (w); diff --git a/cde/programs/dtwm/WmFunction.c b/cde/programs/dtwm/WmFunction.c index fb52b489..36305ec7 100644 --- a/cde/programs/dtwm/WmFunction.c +++ b/cde/programs/dtwm/WmFunction.c @@ -218,8 +218,7 @@ Boolean F_Beep (String args, ClientData *pCD, XEvent *event) * is to restack the dirty transient relative to the second to the * top transient. This function is used to support freeFamily stacking. */ -ClientData * FindSecondToTopTransient (pcd) -ClientData *pcd; +ClientData * FindSecondToTopTransient (ClientData *pcd) { ClientData *pcdNext; static ClientData *second; @@ -2199,11 +2198,7 @@ F_Push_Recall (String args, ClientData *pCD, XEvent *event) * *************************************<->***********************************/ -Boolean F_Pass_Key (args, pCD, event) - String args; - ClientData *pCD; - XEvent *event; - +Boolean F_Pass_Key (String args, ClientData *pCD, XEvent *event) { if (wmGD.passKeysActive) { diff --git a/cde/programs/dtwm/WmGraphics.c b/cde/programs/dtwm/WmGraphics.c index edc7ed1d..f3c71cae 100644 --- a/cde/programs/dtwm/WmGraphics.c +++ b/cde/programs/dtwm/WmGraphics.c @@ -984,9 +984,7 @@ Boolean ExtendRList (RList *prl, unsigned int amt) * -------- * *************************************<->***********************************/ -RList *AllocateRList (amt) - - unsigned int amt; +RList *AllocateRList (unsigned int amt) { RList *prl; diff --git a/cde/programs/dtwm/WmIconBox.c b/cde/programs/dtwm/WmIconBox.c index 1335e37a..062b346c 100644 --- a/cde/programs/dtwm/WmIconBox.c +++ b/cde/programs/dtwm/WmIconBox.c @@ -1581,10 +1581,7 @@ void SetGranularity (WmWorkspaceData *pWS, ClientData *pCD, IconBoxData *pIBD) * *************************************<->***********************************/ -MenuItem *GetIconBoxMenuItems (pSD) - - WmScreenData *pSD; - +MenuItem *GetIconBoxMenuItems (WmScreenData *pSD) { return(ParseMwmMenuStr (pSD, @@ -1969,12 +1966,7 @@ Boolean InsertIconIntoBox (IconBoxData *pIBD, ClientData *pCD) * *************************************<->***********************************/ -IconInfo *InsertIconInfo (pIBD, pCD, theWidget) - - IconBoxData *pIBD; - ClientData *pCD; - Widget theWidget; - +IconInfo *InsertIconInfo (IconBoxData *pIBD, ClientData *pCD, Widget theWidget) { IconInfo *pII; int place; diff --git a/cde/programs/dtwm/WmImage.c b/cde/programs/dtwm/WmImage.c index 15f5ee11..0c043572 100644 --- a/cde/programs/dtwm/WmImage.c +++ b/cde/programs/dtwm/WmImage.c @@ -964,9 +964,7 @@ int GetBitmapIndex (WmScreenData *pSD, char *name, Boolean bReportError) * *************************************<->***********************************/ -char *BitmapPathName (string) - char *string; - +char *BitmapPathName (char *string) { static char fileName[MAXWMPATH+1]; char *retname; diff --git a/cde/programs/dtwm/WmKeyFocus.c b/cde/programs/dtwm/WmKeyFocus.c index 7043dba5..d34587c6 100644 --- a/cde/programs/dtwm/WmKeyFocus.c +++ b/cde/programs/dtwm/WmKeyFocus.c @@ -558,9 +558,7 @@ void ClearFocusIndication (ClientData *pCD, Boolean refresh) * *************************************<->***********************************/ -ClientData *GetClientUnderPointer (pSameScreen) - Boolean *pSameScreen; - +ClientData *GetClientUnderPointer (Boolean *pSameScreen) { Window root; Window child; @@ -871,9 +869,7 @@ Boolean FocusNextTransient (ClientData *pCD, unsigned long type, Boolean initiat * *************************************<->***********************************/ -ClientData *FindLastTransientTreeFocus (pCD, pcdNoFocus) - ClientData *pCD; - ClientData *pcdNoFocus; +ClientData *FindLastTransientTreeFocus (ClientData *pCD, ClientData *pcdNoFocus) { ClientData *pcdNext; @@ -934,10 +930,7 @@ ClientData *FindLastTransientTreeFocus (pCD, pcdNoFocus) * *************************************<->***********************************/ -ClientData *FindNextTFocusInSeq (pCD, startAt) - ClientData *pCD; - unsigned long startAt; - +ClientData *FindNextTFocusInSeq (ClientData *pCD, unsigned long startAt) { ClientData *pcdNextFocus = NULL; ClientData *pcdNext; @@ -1216,10 +1209,7 @@ Boolean FocusPrevTransient (ClientData *pCD, unsigned long type, Boolean initiat * *************************************<->***********************************/ -ClientData *FindPrevTFocusInSeq (pCD, startAt) - ClientData *pCD; - unsigned long startAt; - +ClientData *FindPrevTFocusInSeq (ClientData *pCD, unsigned long startAt) { ClientData *pcdNextFocus = NULL; ClientData *pcdNext; diff --git a/cde/programs/dtwm/WmMenu.c b/cde/programs/dtwm/WmMenu.c index cffed7e9..8a7bc012 100644 --- a/cde/programs/dtwm/WmMenu.c +++ b/cde/programs/dtwm/WmMenu.c @@ -302,10 +302,7 @@ MenuSpec *MakeMenu (WmScreenData *pSD, /*************************************<->***********************************/ -void CheckTerminalSeparator(menuSpec, buttonWidget, manage) - MenuSpec *menuSpec; - Widget buttonWidget; - Boolean manage; +void CheckTerminalSeparator(MenuSpec *menuSpec, Widget buttonWidget, Boolean manage) { CompositeWidget cw; WidgetList children; diff --git a/cde/programs/dtwm/WmResParse.c b/cde/programs/dtwm/WmResParse.c index 12274bea..7587373f 100644 --- a/cde/programs/dtwm/WmResParse.c +++ b/cde/programs/dtwm/WmResParse.c @@ -1755,8 +1755,7 @@ void ProcessWmFile (WmScreenData *pSD, Boolean bNested) /**** This function stolen from Xt/Intrinsic.c ****/ /* The implementation of this routine is operating system dependent */ -static char *ExtractLocaleName(lang) - String lang; +static char *ExtractLocaleName(String lang) { #ifdef hpux /* hpux-specific parsing of the locale string */ diff --git a/cde/programs/dtwm/WmResource.c b/cde/programs/dtwm/WmResource.c index e414e58a..059521df 100644 --- a/cde/programs/dtwm/WmResource.c +++ b/cde/programs/dtwm/WmResource.c @@ -5850,11 +5850,8 @@ _WmGetDynamicDefault (Widget widget, unsigned char type, String defaultColor, Pi * *************************************<->***********************************/ -XmColorData * _WmGetDefaultColors (screen, colormap, defaultColor) - Screen *screen; - Colormap colormap; - String defaultColor; - +XmColorData * _WmGetDefaultColors (Screen *screen, Colormap colormap, + String defaultColor) { static XmColorData *defaultSet[2] = {NULL, NULL}; static int defaultCount[2] = {0, 0}; @@ -5986,10 +5983,7 @@ XmColorData * _WmGetDefaultColors (screen, colormap, defaultColor) * *************************************<->***********************************/ -char * WmRealloc (ptr, size) - char *ptr; - unsigned size; - +char * WmRealloc (char *ptr, unsigned size) { if (ptr) { @@ -6034,10 +6028,7 @@ char * WmRealloc (ptr, size) * *************************************<->***********************************/ -char * WmMalloc (ptr, size) - char *ptr; - unsigned size; - +char * WmMalloc (char *ptr, unsigned size) { if (ptr) { @@ -6083,10 +6074,7 @@ char * WmMalloc (ptr, size) *************************************<->***********************************/ void -SetupDefaultResources (pSD) - -WmScreenData *pSD; - +SetupDefaultResources (WmScreenData *pSD) { KeySpec *nextKeySpec; String keyBindings; -- 2.25.1