diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-07-30 21:57:04 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-07-31 21:59:16 -0700 |
commit | ea349d3c406695665322c71caf5ea3c970cb3155 (patch) | |
tree | 73e1ea9553cae88cfe2748cd6d2681d147254851 /src | |
parent | abb8b6198b639359f34ab6f0ab97039016d8b6db (diff) |
Use (void) to declare functions that take no arguments, instead of ()
It's time for C89.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: <wharms@bfs.de>
Diffstat (limited to 'src')
-rw-r--r-- | src/add_window.c | 4 | ||||
-rw-r--r-- | src/events.c | 52 | ||||
-rw-r--r-- | src/gc.c | 2 | ||||
-rw-r--r-- | src/gram.y | 2 | ||||
-rw-r--r-- | src/iconmgr.c | 3 | ||||
-rw-r--r-- | src/icons.c | 2 | ||||
-rw-r--r-- | src/menus.c | 16 | ||||
-rw-r--r-- | src/parse.c | 6 | ||||
-rw-r--r-- | src/resize.c | 2 | ||||
-rw-r--r-- | src/twm.c | 4 | ||||
-rw-r--r-- | src/util.c | 2 |
11 files changed, 48 insertions, 47 deletions
diff --git a/src/add_window.c b/src/add_window.c index 72aa0aa..984e17b 100644 --- a/src/add_window.c +++ b/src/add_window.c @@ -981,7 +981,7 @@ static void do_add_binding (int button, int context, int modifier, int func) } void -AddDefaultBindings () +AddDefaultBindings (void) { /* * The bindings are stored in Scr->Mouse, indexed by @@ -1161,7 +1161,7 @@ static Window CreateHighlightWindow (TwmWindow *tmp_win) } -void ComputeCommonTitleOffsets () +void ComputeCommonTitleOffsets (void) { int buttonwidth = (Scr->TBInfo.width + Scr->TBInfo.pad); diff --git a/src/events.c b/src/events.c index dbc94dc..2d76b19 100644 --- a/src/events.c +++ b/src/events.c @@ -137,7 +137,7 @@ void SetRaiseWindow (TwmWindow *tmp) * initialize the event jump table. */ void -InitEvents() +InitEvents(void) { int i; @@ -268,7 +268,7 @@ Window WindowOfEvent (XEvent *e) * handle a single X event stored in global var Event * this routine for is for a call during an f.move */ -Bool DispatchEvent2 () +Bool DispatchEvent2 (void) { Window w = Event.xany.window; XPointer context_data; @@ -299,7 +299,7 @@ Bool DispatchEvent2 () /** * handle a single X event stored in global var Event */ -Bool DispatchEvent () +Bool DispatchEvent (void) { Window w = Event.xany.window; XPointer context_data; @@ -330,7 +330,7 @@ Bool DispatchEvent () * handle X events */ void -HandleEvents() +HandleEvents(void) { while (TRUE) { @@ -364,7 +364,7 @@ HandleEvents() * */ void -HandleColormapNotify() +HandleColormapNotify(void) { XColormapEvent *cevent = (XColormapEvent *) &Event; ColormapWindow *cwin, **cwins; @@ -524,7 +524,7 @@ HandleColormapNotify() * */ void -HandleVisibilityNotify() +HandleVisibilityNotify(void) { XVisibilityEvent *vevent = (XVisibilityEvent *) &Event; ColormapWindow *cwin; @@ -561,7 +561,7 @@ int MovedFromKeyPress = False; * key press event handler */ void -HandleKeyPress() +HandleKeyPress(void) { KeySym ks; FuncKey *key; @@ -734,7 +734,7 @@ free_cwins (TwmWindow *tmp) * property notify event handler */ void -HandlePropertyNotify() +HandlePropertyNotify(void) { char *name = NULL; unsigned long valuemask; /* mask for create windows */ @@ -943,7 +943,7 @@ HandlePropertyNotify() * procedure to re-position the icon window and name */ void -RedoIconName() +RedoIconName(void) { int x, y; @@ -1006,7 +1006,7 @@ RedoIconName() *client message event handler */ void -HandleClientMessage() +HandleClientMessage(void) { if (Event.xclient.message_type == _XA_WM_CHANGE_STATE) { @@ -1035,7 +1035,7 @@ HandleClientMessage() * expose event handler */ void -HandleExpose() +HandleExpose(void) { XPointer context_data; @@ -1164,7 +1164,7 @@ static void remove_window_from_ring (TwmWindow *tmp) * DestroyNotify event handler */ void -HandleDestroyNotify() +HandleDestroyNotify(void) { int i; @@ -1262,7 +1262,7 @@ HandleDestroyNotify() void -HandleCreateNotify() +HandleCreateNotify(void) { #ifdef DEBUG_EVENTS fprintf(stderr, "CreateNotify w = 0x%x\n", Event.xcreatewindow.window); @@ -1278,7 +1278,7 @@ HandleCreateNotify() * HandleMapRequest - MapRequest event handler */ void -HandleMapRequest() +HandleMapRequest(void) { XPointer context_data; int zoom_save; @@ -1362,7 +1362,7 @@ void SimulateMapRequest (w) * MapNotify event handler */ void -HandleMapNotify() +HandleMapNotify(void) { if (Tmp_win == NULL) return; @@ -1396,7 +1396,7 @@ HandleMapNotify() * UnmapNotify event handler */ void -HandleUnmapNotify() +HandleUnmapNotify(void) { int dstx, dsty; Window dumwin; @@ -1464,7 +1464,7 @@ HandleUnmapNotify() * MotionNotify event handler */ void -HandleMotionNotify() +HandleMotionNotify(void) { XPointer context_data; @@ -1494,7 +1494,7 @@ HandleMotionNotify() * ButtonRelease event handler */ void -HandleButtonRelease() +HandleButtonRelease(void) { int xl, xr, yt, yb, w, h; unsigned mask; @@ -1705,7 +1705,7 @@ do_menu (MenuRoot *menu, Window w) * ButtonPress event handler */ void -HandleButtonPress() +HandleButtonPress(void) { unsigned int modifier; Cursor cur; @@ -1983,7 +1983,7 @@ HENQueueScanner(Display *dpy, XEvent *ev, char *args) * EnterNotify event handler */ void -HandleEnterNotify() +HandleEnterNotify(void) { MenuRoot *mr; XEnterWindowEvent *ewp = &Event.xcrossing; @@ -2171,7 +2171,7 @@ HLNQueueScanner(Display *dpy, XEvent *ev, char *args) * LeaveNotify event handler */ void -HandleLeaveNotify() +HandleLeaveNotify(void) { HLNScanArgs scanArgs; XEvent dummy; @@ -2246,7 +2246,7 @@ HandleLeaveNotify() * HandleConfigureRequest - ConfigureRequest event handler */ void -HandleConfigureRequest() +HandleConfigureRequest(void) { XWindowChanges xwc; unsigned long xwcm; @@ -2380,7 +2380,7 @@ HandleConfigureRequest() * shape notification event handler */ void -HandleShapeNotify () +HandleShapeNotify (void) { XShapeEvent *sev = (XShapeEvent *) &Event; @@ -2402,7 +2402,7 @@ HandleShapeNotify () * unknown event handler */ void -HandleUnknown() +HandleUnknown(void) { #ifdef DEBUG_EVENTS fprintf(stderr, "type = %d\n", Event.type); @@ -2581,7 +2581,7 @@ InstallWindowColormaps (int type, TwmWindow *tmp) * other colormap list would potentially be loaded anyway. */ void -InstallRootColormap() +InstallRootColormap(void) { TwmWindow *tmp; if (Scr->cmapInfo.root_pushes == 0) { @@ -2617,7 +2617,7 @@ UninstallRootColormapQScanner(Display *dpy, XEvent *ev, char *args) void -UninstallRootColormap() +UninstallRootColormap(void) { char args; XEvent dummy; @@ -69,7 +69,7 @@ in this Software without prior written authorization from The Open Group. * want to do this once, hence the first_time flag. */ void -CreateGCs() +CreateGCs(void) { static ScreenInfo *prevScr = NULL; XGCValues gcv; @@ -874,7 +874,7 @@ static Bool CheckColormapArg (char *s) void -twmrc_error_prefix () +twmrc_error_prefix (void) { fprintf (stderr, "%s: line %d: ", ProgramName, yylineno); } diff --git a/src/iconmgr.c b/src/iconmgr.c index b4827ad..8b1a584 100644 --- a/src/iconmgr.c +++ b/src/iconmgr.c @@ -54,7 +54,8 @@ int iconifybox_height = siconify_height; /** * create all the icon manager windows for this screen. */ -void CreateIconManagers() +void +CreateIconManagers(void) { IconMgr *p; int mask; diff --git a/src/icons.c b/src/icons.c index 6ba8066..d03f918 100644 --- a/src/icons.c +++ b/src/icons.c @@ -316,7 +316,7 @@ FreeIconEntries (IconRegion *ir) } void -FreeIconRegions() +FreeIconRegions(void) { IconRegion *ir, *tmp; diff --git a/src/menus.c b/src/menus.c index cb6cb5b..06b345b 100644 --- a/src/menus.c +++ b/src/menus.c @@ -124,7 +124,7 @@ static void send_clientmessage ( Window w, Atom a, Time timestamp ); * initialize menu roots */ void -InitMenus() +InitMenus(void) { int i, j, k; FuncKey *key, *tmp; @@ -283,7 +283,7 @@ int CreateTitleButton (const char *name, int func, const char *action, * the button, then put in a question; if we can't find the question mark, * something is wrong and we are probably going to be in trouble later on. */ -void InitTitlebarButtons () +void InitTitlebarButtons (void) { TitleButton *tb; int h; @@ -472,7 +472,7 @@ PaintMenu(MenuRoot *mr, XEvent *e) static Bool fromMenu; void -UpdateMenu() +UpdateMenu(void) { MenuItem *mi; int i, x, y, x_root, y_root, entry; @@ -741,7 +741,7 @@ AddToMenu(MenuRoot *menu, const char *item, const char *action, void -MakeMenus() +MakeMenus(void) { MenuRoot *mr; @@ -1082,7 +1082,7 @@ PopUpMenu (MenuRoot *menu, int x, int y, Bool center) * unhighlight the current menu selection and take down the menus */ void -PopDownMenu() +PopDownMenu(void) { MenuRoot *tmp; @@ -2275,7 +2275,7 @@ DeferExecution(int context, int func, Cursor cursor) *regrab the pointer with the LastCursor; */ void -ReGrab() +ReGrab(void) { XGrabPointer(dpy, Scr->Root, True, ButtonPressMask | ButtonReleaseMask, @@ -2398,7 +2398,7 @@ Execute(const char *s) * put input focus on the root window. */ void -FocusOnRoot() +FocusOnRoot(void) { SetFocus ((TwmWindow *) NULL, LastTimestamp()); if (Scr->Focus != NULL) @@ -2784,7 +2784,7 @@ BumpWindowColormap (TwmWindow *tmp, int inc) void -HideIconManager () +HideIconManager (void) { SetMapStateProp (Scr->iconmgr.twm_win, WithdrawnState); XUnmapWindow(dpy, Scr->iconmgr.twm_win->frame); diff --git a/src/parse.c b/src/parse.c index ebdb9c1..e565ad5 100644 --- a/src/parse.c +++ b/src/parse.c @@ -235,7 +235,7 @@ int ParseStringList (unsigned char **sl) * * \return the next input character */ -static int twmFileInput() +static int twmFileInput(void) { if (overflowlen) return (int) overflowbuff[--overflowlen]; @@ -250,7 +250,7 @@ static int twmFileInput() return ((int)buff[ptr++]); } -static int twmStringListInput() +static int twmStringListInput(void) { if (overflowlen) return (int) overflowbuff[--overflowlen]; @@ -1007,7 +1007,7 @@ do_var_savecolor(int key) * in the root window property. */ void -assign_var_savecolor() +assign_var_savecolor(void) { Cptr cp = chead; while (cp != NULL) { diff --git a/src/resize.c b/src/resize.c index 4ca5eea..871be89 100644 --- a/src/resize.c +++ b/src/resize.c @@ -523,7 +523,7 @@ DisplaySize(TwmWindow *tmp_win, int width, int height) * finish the resize operation */ void -EndResize() +EndResize(void) { TwmWindow *tmp_win; @@ -683,7 +683,7 @@ main(int argc, char *argv[]) * initialize twm variables */ void -InitVariables() +InitVariables(void) { FreeList(&Scr->BorderColorL); FreeList(&Scr->IconBorderColorL); @@ -832,7 +832,7 @@ InitVariables() } void -CreateFonts () +CreateFonts (void) { GetFont(&Scr->TitleBarFont); GetFont(&Scr->MenuFont); @@ -443,7 +443,7 @@ RemoveRGBColormap (Atom a) } void -LocateStandardColormaps() +LocateStandardColormaps(void) { Atom *atoms; int natoms; |