diff options
-rw-r--r-- | oldXMenu/Activate.c | 27 | ||||
-rw-r--r-- | oldXMenu/AddPane.c | 10 | ||||
-rw-r--r-- | oldXMenu/AddSel.c | 16 | ||||
-rw-r--r-- | oldXMenu/ChangeLog | 35 | ||||
-rw-r--r-- | oldXMenu/ChgPane.c | 8 | ||||
-rw-r--r-- | oldXMenu/ChgSel.c | 18 | ||||
-rw-r--r-- | oldXMenu/Create.c | 21 | ||||
-rw-r--r-- | oldXMenu/DelPane.c | 8 | ||||
-rw-r--r-- | oldXMenu/DelSel.c | 10 | ||||
-rw-r--r-- | oldXMenu/Destroy.c | 6 | ||||
-rw-r--r-- | oldXMenu/Error.c | 2 | ||||
-rw-r--r-- | oldXMenu/EvHand.c | 3 | ||||
-rw-r--r-- | oldXMenu/FindPane.c | 4 | ||||
-rw-r--r-- | oldXMenu/FindSel.c | 5 | ||||
-rw-r--r-- | oldXMenu/InsPane.c | 10 | ||||
-rw-r--r-- | oldXMenu/InsSel.c | 14 | ||||
-rw-r--r-- | oldXMenu/Internal.c | 94 | ||||
-rw-r--r-- | oldXMenu/Locate.c | 22 | ||||
-rw-r--r-- | oldXMenu/Post.c | 16 | ||||
-rw-r--r-- | oldXMenu/Recomp.c | 6 | ||||
-rw-r--r-- | oldXMenu/SetAEQ.c | 6 | ||||
-rw-r--r-- | oldXMenu/SetFrz.c | 6 | ||||
-rw-r--r-- | oldXMenu/SetPane.c | 8 | ||||
-rw-r--r-- | oldXMenu/SetSel.c | 10 | ||||
-rw-r--r-- | oldXMenu/X10.h | 4 | ||||
-rw-r--r-- | oldXMenu/XCrAssoc.c | 6 | ||||
-rw-r--r-- | oldXMenu/XDelAssoc.c | 7 | ||||
-rw-r--r-- | oldXMenu/XDestAssoc.c | 3 | ||||
-rw-r--r-- | oldXMenu/XLookAssoc.c | 8 | ||||
-rw-r--r-- | oldXMenu/XMakeAssoc.c | 11 | ||||
-rw-r--r-- | oldXMenu/XMenu.h | 46 | ||||
-rw-r--r-- | oldXMenu/XMenuInt.h | 26 | ||||
-rw-r--r-- | oldXMenu/insque.c | 6 |
33 files changed, 241 insertions, 241 deletions
diff --git a/oldXMenu/Activate.c b/oldXMenu/Activate.c index 2e1996e7287..55bfca510b9 100644 --- a/oldXMenu/Activate.c +++ b/oldXMenu/Activate.c @@ -103,32 +103,27 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* For debug, set this to 0 to not grab the keyboard on menu popup */ int x_menu_grab_keyboard = 1; -typedef void (*Wait_func)(); - static Wait_func wait_func; static void* wait_data; void -XMenuActivateSetWaitFunction (func, data) - Wait_func func; - void *data; +XMenuActivateSetWaitFunction (Wait_func func, void *data) { wait_func = func; wait_data = data; } int -XMenuActivate(display, menu, p_num, s_num, x_pos, y_pos, event_mask, data, - help_callback) - register Display *display; /* Display to put menu on. */ - register XMenu *menu; /* Menu to activate. */ - int *p_num; /* Pane number selected. */ - int *s_num; /* Selection number selected. */ - int x_pos; /* X coordinate of menu position. */ - int y_pos; /* Y coordinate of menu position. */ - unsigned int event_mask; /* Mouse button event mask. */ - char **data; /* Pointer to return data value. */ - void (* help_callback) (); /* Help callback. */ +XMenuActivate( + register Display *display, /* Display to put menu on. */ + register XMenu *menu, /* Menu to activate. */ + int *p_num, /* Pane number selected. */ + int *s_num, /* Selection number selected. */ + int x_pos, /* X coordinate of menu position. */ + int y_pos, /* Y coordinate of menu position. */ + unsigned int event_mask, /* Mouse button event mask. */ + char **data, /* Pointer to return data value. */ + void (* help_callback) (char *, int, int)) /* Help callback. */ { int status; /* X routine call status. */ int orig_x; /* Upper left menu origin X coord. */ diff --git a/oldXMenu/AddPane.c b/oldXMenu/AddPane.c index 54b55a150c9..6312aa2c70a 100644 --- a/oldXMenu/AddPane.c +++ b/oldXMenu/AddPane.c @@ -16,11 +16,11 @@ #include "XMenuInt.h" int -XMenuAddPane(display, menu, label, active) - Display *display; - register XMenu *menu; /* Menu object to be modified. */ - register char *label; /* Selection label. */ - int active; /* Make selection active? */ +XMenuAddPane(Display *display, register XMenu *menu, register char *label, int active) + + /* Menu object to be modified. */ + /* Selection label. */ + /* Make selection active? */ { register XMPane *pane; /* Newly created pane. */ register XMSelect *select; /* Initial selection for the new pane. */ diff --git a/oldXMenu/AddSel.c b/oldXMenu/AddSel.c index e38b3404b56..d2f2156b077 100644 --- a/oldXMenu/AddSel.c +++ b/oldXMenu/AddSel.c @@ -17,14 +17,14 @@ #include "XMenuInt.h" int -XMenuAddSelection(display, menu, p_num, data, label, active, help) - Display *display; - register XMenu *menu; /* Menu object to be modified. */ - register int p_num; /* Pane number to be modified. */ - char *data; /* Data value. */ - char *label; /* Selection label. */ - int active; /* Make selection active? */ - char *help; /* Help string */ +XMenuAddSelection(Display *display, register XMenu *menu, register int p_num, char *data, char *label, int active, char *help) + + /* Menu object to be modified. */ + /* Pane number to be modified. */ + /* Data value. */ + /* Selection label. */ + /* Make selection active? */ + /* Help string */ { register XMPane *pane; /* Pane containing the new selection. */ register XMSelect *select; /* Newly created selection. */ diff --git a/oldXMenu/ChangeLog b/oldXMenu/ChangeLog index 7c2b2826375..e2edb0afe09 100644 --- a/oldXMenu/ChangeLog +++ b/oldXMenu/ChangeLog @@ -1,3 +1,38 @@ +2010-07-04 Dan Nicolaescu <dann@ics.uci.edu> + + * Activate.c: Convert function definitions to standard C. + * AddPane.c: + * AddSel.c: + * ChgPane.c: + * ChgSel.c: + * Create.c: + * DelPane.c: + * DelSel.c: + * Destroy.c: + * Error.c: + * EvHand.c: + * FindPane.c: + * FindSel.c: + * InsPane.c: + * InsSel.c: + * Internal.c: + * Locate.c: + * Post.c: + * Recomp.c: + * SetAEQ.c: + * SetFrz.c: + * SetPane.c: + * SetSel.c: + * X10.h: + * XCrAssoc.c: + * XDelAssoc.c: + * XDestAssoc.c: + * XLookAssoc.c: + * XMakeAssoc.c: + * XMenu.h: + * XMenuInt.h: + * insque.c: Likewise. + 2010-05-07 Chong Yidong <cyd@stupidchicken.com> * Version 23.2 released. diff --git a/oldXMenu/ChgPane.c b/oldXMenu/ChgPane.c index 06b2faa4451..9217c848641 100644 --- a/oldXMenu/ChgPane.c +++ b/oldXMenu/ChgPane.c @@ -17,10 +17,10 @@ #include "XMenuInt.h" int -XMenuChangePane(menu, p_num, label) - register XMenu *menu; /* Menu object to be modified. */ - register int p_num; /* Pane number to be modified. */ - char *label; /* Selection label. */ +XMenuChangePane(register XMenu *menu, register int p_num, char *label) + /* Menu object to be modified. */ + /* Pane number to be modified. */ + /* Selection label. */ { register XMPane *p_ptr; /* XMPane pointer. */ diff --git a/oldXMenu/ChgSel.c b/oldXMenu/ChgSel.c index 9a1230bd39b..b23bb6fd348 100644 --- a/oldXMenu/ChgSel.c +++ b/oldXMenu/ChgSel.c @@ -17,15 +17,15 @@ #include "XMenuInt.h" int -XMenuChangeSelection(display, menu, p_num, s_num, data, data_sw, label, label_sw) - Display *display; /* previously opened display. */ - register XMenu *menu; /* Menu object to be modified. */ - register int p_num; /* Pane number to be modified. */ - register int s_num; /* Selection number to modified. */ - char *data; /* Data value. */ - int data_sw; /* Change to new data value? */ - char *label; /* Selection label. */ - int label_sw; /* Change to new label? */ +XMenuChangeSelection(Display *display, register XMenu *menu, register int p_num, register int s_num, char *data, int data_sw, char *label, int label_sw) + /* previously opened display. */ + /* Menu object to be modified. */ + /* Pane number to be modified. */ + /* Selection number to modified. */ + /* Data value. */ + /* Change to new data value? */ + /* Selection label. */ + /* Change to new label? */ { register XMPane *p_ptr; /* XMPane pointer. */ register XMSelect *s_ptr; /* XMSelect pointer. */ diff --git a/oldXMenu/Create.c b/oldXMenu/Create.c index 628ab89a678..f96e077a466 100644 --- a/oldXMenu/Create.c +++ b/oldXMenu/Create.c @@ -91,19 +91,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define TILE_BUF_SIZE 5 -int atoi(); -double atof(); -char *x_get_resource_string (); +int atoi(const char *); +double atof(const char *); +char *x_get_resource_string (char *attribute, char *class); static Status -XAllocDisplayColor(display, map, colorName, color, junk) - Display *display; - Colormap map; - char *colorName; - XColor *color; - XColor *junk; +XAllocDisplayColor(Display *display, Colormap map, char *colorName, XColor *color, XColor *junk) { return (colorName!=0 && XParseColor(display, map, colorName, color) && @@ -112,10 +107,10 @@ XAllocDisplayColor(display, map, colorName, color, junk) XMenu * -XMenuCreate(display, parent, def_env) - Display *display; /* ID of previously opened display */ - Window parent; /* Window ID of the menu's parent window. */ - register char *def_env; /* X Defaults program environment name. */ +XMenuCreate(Display *display, Window parent, register char *def_env) + /* ID of previously opened display */ + /* Window ID of the menu's parent window. */ + /* X Defaults program environment name. */ { register int i; /* Loop counter. */ register int j; /* Loop counter. */ diff --git a/oldXMenu/DelPane.c b/oldXMenu/DelPane.c index e7568cff56e..baa1b8def41 100644 --- a/oldXMenu/DelPane.c +++ b/oldXMenu/DelPane.c @@ -16,10 +16,10 @@ #include "XMenuInt.h" int -XMenuDeletePane(display, menu, p_num) - register Display *display; /* Previously opened display */ - register XMenu *menu; /* Menu object to be modified. */ - register int p_num; /* Pane number to be deleted. */ +XMenuDeletePane(register Display *display, register XMenu *menu, register int p_num) + /* Previously opened display */ + /* Menu object to be modified. */ + /* Pane number to be deleted. */ { register XMPane *p_ptr; /* Pointer to pane being deleted. */ register XMSelect *s_ptr; /* Pointer to selections being deleted. */ diff --git a/oldXMenu/DelSel.c b/oldXMenu/DelSel.c index e7b6ace3845..9b0e3d7cd37 100644 --- a/oldXMenu/DelSel.c +++ b/oldXMenu/DelSel.c @@ -16,11 +16,11 @@ #include "XMenuInt.h" int -XMenuDeleteSelection(display, menu, p_num, s_num) - register Display *display; /* Previously opened display. */ - register XMenu *menu; /* Menu object to be modified. */ - register int p_num; /* Pane number to be deleted. */ - register int s_num; /* Selection number to be deleted. */ +XMenuDeleteSelection(register Display *display, register XMenu *menu, register int p_num, register int s_num) + /* Previously opened display. */ + /* Menu object to be modified. */ + /* Pane number to be deleted. */ + /* Selection number to be deleted. */ { register XMPane *p_ptr; /* Pointer to pane being deleted. */ register XMSelect *s_ptr; /* Pointer to selections being deleted. */ diff --git a/oldXMenu/Destroy.c b/oldXMenu/Destroy.c index 117f04ed1c5..906d92fb8cf 100644 --- a/oldXMenu/Destroy.c +++ b/oldXMenu/Destroy.c @@ -15,9 +15,9 @@ #include "XMenuInt.h" -XMenuDestroy(display, menu) - Display *display; - register XMenu *menu; /* Menu object to destroy. */ +XMenuDestroy(Display *display, register XMenu *menu) + + /* Menu object to destroy. */ { register XMPane *p_ptr; /* Pointer to the current pane. */ register XMPane *p_next; /* Pointer to the next pane. */ diff --git a/oldXMenu/Error.c b/oldXMenu/Error.c index 6f43cbdbf9b..6454974fd5e 100644 --- a/oldXMenu/Error.c +++ b/oldXMenu/Error.c @@ -17,7 +17,7 @@ #include "XMenuInt.h" char * -XMenuError() +XMenuError(void) { static char message[128]; /* Error message buffer. */ diff --git a/oldXMenu/EvHand.c b/oldXMenu/EvHand.c index 41ba49bcbca..fa99b8363af 100644 --- a/oldXMenu/EvHand.c +++ b/oldXMenu/EvHand.c @@ -15,8 +15,7 @@ #include "XMenuInt.h" -XMenuEventHandler(handler) - int (*handler)(); +XMenuEventHandler(int (*handler) (XEvent*)) { /* * Set the global event handler variable. diff --git a/oldXMenu/FindPane.c b/oldXMenu/FindPane.c index fa71c6b39a1..0d0f8188013 100644 --- a/oldXMenu/FindPane.c +++ b/oldXMenu/FindPane.c @@ -17,9 +17,7 @@ #include "XMenuInt.h" int -XMenuFindPane(menu, label) - register XMenu *menu; - register char *label; +XMenuFindPane(register XMenu *menu, register char *label) { register XMPane *p_ptr; register int i = 0; diff --git a/oldXMenu/FindSel.c b/oldXMenu/FindSel.c index fcb66eb851c..202bbc1b28c 100644 --- a/oldXMenu/FindSel.c +++ b/oldXMenu/FindSel.c @@ -34,10 +34,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "XMenuInt.h" int -XMenuFindSelection(menu, p_num, label) - register XMenu *menu; - int p_num; - register char *label; +XMenuFindSelection(register XMenu *menu, int p_num, register char *label) { register XMPane *p_ptr; register XMSelect *s_ptr; diff --git a/oldXMenu/InsPane.c b/oldXMenu/InsPane.c index 0aa43935ea2..19ee33cb423 100644 --- a/oldXMenu/InsPane.c +++ b/oldXMenu/InsPane.c @@ -18,11 +18,11 @@ #include "XMenuInt.h" int -XMenuInsertPane(menu, p_num, label, active) - register XMenu *menu; /* Menu object to be modified. */ - register int p_num; /* Pane number of new pane. */ - char *label; /* Selection label. */ - int active; /* Make selection active? */ +XMenuInsertPane(register XMenu *menu, register int p_num, char *label, int active) + /* Menu object to be modified. */ + /* Pane number of new pane. */ + /* Selection label. */ + /* Make selection active? */ { register XMPane *p_ptr; /* XMPane pointer. */ register XMPane *pane; /* Newly created pane. */ diff --git a/oldXMenu/InsSel.c b/oldXMenu/InsSel.c index 08a0370868c..0f28cdbef0c 100644 --- a/oldXMenu/InsSel.c +++ b/oldXMenu/InsSel.c @@ -17,13 +17,13 @@ #include "XMenuInt.h" int -XMenuInsertSelection(menu, p_num, s_num, data, label, active) - register XMenu *menu; /* Menu object to be modified. */ - register int p_num; /* Pane number to be modified. */ - register int s_num; /* Selection number of new selection. */ - char *data; /* Data value. */ - char *label; /* Selection label. */ - int active; /* Make selection active? */ +XMenuInsertSelection(register XMenu *menu, register int p_num, register int s_num, char *data, char *label, int active) + /* Menu object to be modified. */ + /* Pane number to be modified. */ + /* Selection number of new selection. */ + /* Data value. */ + /* Selection label. */ + /* Make selection active? */ { register XMPane *p_ptr; /* XMPane pointer. */ register XMSelect *s_ptr; /* XMSelect pointer. */ diff --git a/oldXMenu/Internal.c b/oldXMenu/Internal.c index b00841b0cc3..cb87dd650c7 100644 --- a/oldXMenu/Internal.c +++ b/oldXMenu/Internal.c @@ -96,7 +96,7 @@ _XMErrorList[XME_CODE_COUNT] = { /* * _XMEventHandler - Internal event handler variable. */ -int (*_XMEventHandler)() = NULL; +int (*_XMEventHandler)(XEvent*) = NULL; @@ -104,7 +104,7 @@ int (*_XMEventHandler)() = NULL; * _XMWinQueInit - Internal routine to initialize the window * queue. */ -_XMWinQueInit() +_XMWinQueInit(void) { /* * If the queue is not initialized initialize it. @@ -138,10 +138,10 @@ _XMWinQueInit() * window queue. */ int -_XMWinQueAddPane(display, menu, p_ptr) - register Display *display; - register XMenu *menu; /* Menu being manipulated. */ - register XMPane *p_ptr; /* XMPane being queued. */ +_XMWinQueAddPane(register Display *display, register XMenu *menu, register XMPane *p_ptr) + + /* Menu being manipulated. */ + /* XMPane being queued. */ { /* * If the queue is currently full then flush it. @@ -172,10 +172,10 @@ _XMWinQueAddPane(display, menu, p_ptr) * the selection window queue. */ int -_XMWinQueAddSelection(display, menu, s_ptr) - register Display *display; - register XMenu *menu; /* Menu being manipulated. */ - register XMSelect *s_ptr; /* XMSelection being queued. */ +_XMWinQueAddSelection(register Display *display, register XMenu *menu, register XMSelect *s_ptr) + + /* Menu being manipulated. */ + /* XMSelection being queued. */ { /* * If this entry will overflow the queue then flush it. @@ -206,10 +206,10 @@ _XMWinQueAddSelection(display, menu, s_ptr) * selection window queues. */ int -_XMWinQueFlush(display, menu, pane, select) - register Display *display; - register XMenu *menu; /* Menu being manipulated. */ - register XMPane *pane; /* Current pane. */ +_XMWinQueFlush(register Display *display, register XMenu *menu, register XMPane *pane, XMSelect *select) + + /* Menu being manipulated. */ + /* Current pane. */ { register int pq_index; /* Pane queue index. */ register int sq_index; /* Selection queue index. */ @@ -346,9 +346,9 @@ _XMWinQueFlush(display, menu, pane, select) * a pane pointer that points to the indexed pane. */ XMPane * -_XMGetPanePtr(menu, p_num) - register XMenu *menu; /* Menu to find the pane in. */ - register int p_num; /* Index number of pane to find. */ +_XMGetPanePtr(register XMenu *menu, register int p_num) + /* Menu to find the pane in. */ + /* Index number of pane to find. */ { register XMPane *p_ptr; /* Pane pointer to be returned. */ register int i; /* Loop counter. */ @@ -382,9 +382,9 @@ _XMGetPanePtr(menu, p_num) * indexed selection. */ XMSelect * -_XMGetSelectionPtr(p_ptr, s_num) - register XMPane *p_ptr; /* Pane to find the selection in. */ - register int s_num; /* Index number of the selection to find. */ +_XMGetSelectionPtr(register XMPane *p_ptr, register int s_num) + /* Pane to find the selection in. */ + /* Index number of the selection to find. */ { register XMSelect *s_ptr; /* Selection pointer to be returned. */ register int i; /* Loop counter. */ @@ -416,9 +416,9 @@ _XMGetSelectionPtr(p_ptr, s_num) * _XMRecomputeGlobals - Internal subroutine to recompute menu wide * global values. */ -_XMRecomputeGlobals(display, menu) - register Display *display; /*X11 display variable. */ - register XMenu *menu; /* Menu object to compute from. */ +_XMRecomputeGlobals(register Display *display, register XMenu *menu) + /*X11 display variable. */ + /* Menu object to compute from. */ { register XMPane *p_ptr; /* Pane pointer. */ register XMSelect *s_ptr; /* Selection pointer. */ @@ -531,11 +531,11 @@ _XMRecomputeGlobals(display, menu) * window dependencies. */ int -_XMRecomputePane(display, menu, p_ptr, p_num) - register Display *display; /* Standard X display variable. */ - register XMenu *menu; /* Menu object being recomputed. */ - register XMPane *p_ptr; /* Pane pointer. */ - register int p_num; /* Pane sequence number. */ +_XMRecomputePane(register Display *display, register XMenu *menu, register XMPane *p_ptr, register int p_num) + /* Standard X display variable. */ + /* Menu object being recomputed. */ + /* Pane pointer. */ + /* Pane sequence number. */ { register int window_x; /* Recomputed window X coordinate. */ register int window_y; /* Recomputed window Y coordinate. */ @@ -681,11 +681,11 @@ _XMRecomputePane(display, menu, p_ptr, p_num) * selection window dependencies. */ int -_XMRecomputeSelection(display, menu, s_ptr, s_num) - register Display *display; - register XMenu *menu; /* Menu object being recomputed. */ - register XMSelect *s_ptr; /* Selection pointer. */ - register int s_num; /* Selection sequence number. */ +_XMRecomputeSelection(register Display *display, register XMenu *menu, register XMSelect *s_ptr, register int s_num) + + /* Menu object being recomputed. */ + /* Selection pointer. */ + /* Selection sequence number. */ { register Bool config_s = False; /* Reconfigure selection window? */ XWindowChanges *changes; /* Values to change in configure. */ @@ -811,15 +811,15 @@ _XMRecomputeSelection(display, menu, s_ptr, s_num) * recomputed before calling this routine or * unpredictable results will follow. */ -_XMTransToOrigin(display, menu, p_ptr, s_ptr, x_pos, y_pos, orig_x, orig_y) - Display *display; /* Not used. Included for consistency. */ - register XMenu *menu; /* Menu being computed against. */ - register XMPane *p_ptr; /* Current pane pointer. */ - register XMSelect *s_ptr; /* Current selection pointer. */ - int x_pos; /* X coordinate of point to translate. */ - int y_pos; /* Y coordinate of point to translate. */ - int *orig_x; /* Return value X coord. of the menu origin. */ - int *orig_y; /* Return value Y coord. of the menu origin. */ +_XMTransToOrigin(Display *display, register XMenu *menu, register XMPane *p_ptr, register XMSelect *s_ptr, int x_pos, int y_pos, int *orig_x, int *orig_y) + /* Not used. Included for consistency. */ + /* Menu being computed against. */ + /* Current pane pointer. */ + /* Current selection pointer. */ + /* X coordinate of point to translate. */ + /* Y coordinate of point to translate. */ + /* Return value X coord. of the menu origin. */ + /* Return value Y coord. of the menu origin. */ { register int l_orig_x; /* Local X coordinate of the menu origin. */ register int l_orig_y; /* Local Y coordinate of the menu origin. */ @@ -871,10 +871,7 @@ _XMTransToOrigin(display, menu, p_ptr, s_ptr, x_pos, y_pos, orig_x, orig_y) * _XMRefreshPane - Internal subroutine to completely refresh * the contents of a pane. */ -_XMRefreshPane(display, menu, pane) - register Display *display; - register XMenu *menu; - register XMPane *pane; +_XMRefreshPane(register Display *display, register XMenu *menu, register XMPane *pane) { register XMSelect *s_list = pane->s_list; register XMSelect *s_ptr; @@ -941,10 +938,7 @@ _XMRefreshPane(display, menu, pane) * _XMRefreshSelection - Internal subroutine that refreshes * a single selection window. */ -_XMRefreshSelection(display, menu, select) - register Display *display; - register XMenu *menu; - register XMSelect *select; +_XMRefreshSelection(register Display *display, register XMenu *menu, register XMSelect *select) { register int width = select->window_w; register int height = select->window_h; diff --git a/oldXMenu/Locate.c b/oldXMenu/Locate.c index edd94369e6e..c79f70bd836 100644 --- a/oldXMenu/Locate.c +++ b/oldXMenu/Locate.c @@ -17,17 +17,17 @@ #include "XMenuInt.h" int -XMenuLocate(display, menu, p_num, s_num, x_pos, y_pos, ul_x, ul_y, width, height) - register Display *display; /* Previously opened display. */ - register XMenu *menu; /* Menu object being located. */ - int p_num; /* Active pane number. */ - int s_num; /* Active selection number. */ - int x_pos; /* X coordinate of mouse active position. */ - int y_pos; /* Y coordinate of mouse active position. */ - int *ul_x; /* Returned upper left menu X coordinate. */ - int *ul_y; /* Returned upper left menu Y coordinate. */ - int *width; /* Returned menu width. */ - int *height; /* Returned menu height. */ +XMenuLocate(register Display *display, register XMenu *menu, int p_num, int s_num, int x_pos, int y_pos, int *ul_x, int *ul_y, int *width, int *height) + /* Previously opened display. */ + /* Menu object being located. */ + /* Active pane number. */ + /* Active selection number. */ + /* X coordinate of mouse active position. */ + /* Y coordinate of mouse active position. */ + /* Returned upper left menu X coordinate. */ + /* Returned upper left menu Y coordinate. */ + /* Returned menu width. */ + /* Returned menu height. */ { register XMPane *p_ptr; /* XMPane pointer. */ register XMSelect *s_ptr; /* XMSelect pointer. */ diff --git a/oldXMenu/Post.c b/oldXMenu/Post.c index c51f23e7146..07e24a26272 100644 --- a/oldXMenu/Post.c +++ b/oldXMenu/Post.c @@ -39,14 +39,14 @@ #include "XMenuInt.h" char * -XMenuPost(display, menu, p_num, s_num, x_pos, y_pos, event_mask) - register Display *display; /* Previously opened display. */ - register XMenu *menu; /* Menu to post. */ - register int *p_num; /* Pane number selected. */ - register int *s_num; /* Selection number selected. */ - register int x_pos; /* X coordinate of menu position. */ - register int y_pos; /* Y coordinate of menu position. */ - int event_mask; /* Mouse button event mask. */ +XMenuPost(register Display *display, register XMenu *menu, register int *p_num, register int *s_num, register int x_pos, register int y_pos, int event_mask) + /* Previously opened display. */ + /* Menu to post. */ + /* Pane number selected. */ + /* Selection number selected. */ + /* X coordinate of menu position. */ + /* Y coordinate of menu position. */ + /* Mouse button event mask. */ { register int stat; /* Routine call return status. */ char *data; /* Return data. */ diff --git a/oldXMenu/Recomp.c b/oldXMenu/Recomp.c index 230db9e3a13..038ac3b0b6b 100644 --- a/oldXMenu/Recomp.c +++ b/oldXMenu/Recomp.c @@ -16,9 +16,9 @@ #include "XMenuInt.h" int -XMenuRecompute(display, menu) - Display *display; - register XMenu *menu; /* Menu object to be recomputed. */ +XMenuRecompute(Display *display, register XMenu *menu) + + /* Menu object to be recomputed. */ { register XMPane *p_ptr; /* Pane pointer. */ register XMSelect *s_ptr; /* Selection pointer. */ diff --git a/oldXMenu/SetAEQ.c b/oldXMenu/SetAEQ.c index 0e81ed55a49..7cdb867ff09 100644 --- a/oldXMenu/SetAEQ.c +++ b/oldXMenu/SetAEQ.c @@ -18,9 +18,9 @@ #include "XMenuInt.h" -XMenuSetAEQ(menu, aeq) - register XMenu *menu; /* Menu object to be modified. */ - register int aeq; /* AEQ mode? */ +XMenuSetAEQ(register XMenu *menu, register int aeq) + /* Menu object to be modified. */ + /* AEQ mode? */ { /* * Set the AEQ mode switch. diff --git a/oldXMenu/SetFrz.c b/oldXMenu/SetFrz.c index be9f76f7d80..43684db9011 100644 --- a/oldXMenu/SetFrz.c +++ b/oldXMenu/SetFrz.c @@ -17,9 +17,9 @@ #include "XMenuInt.h" -XMenuSetFreeze(menu, freeze) - register XMenu *menu; /* Menu object to be modified. */ - register int freeze; /* Freeze mode? */ +XMenuSetFreeze(register XMenu *menu, register int freeze) + /* Menu object to be modified. */ + /* Freeze mode? */ { /* * Set the freeze mode switch. diff --git a/oldXMenu/SetPane.c b/oldXMenu/SetPane.c index b9ecb7e8706..9f5a99a564e 100644 --- a/oldXMenu/SetPane.c +++ b/oldXMenu/SetPane.c @@ -16,10 +16,10 @@ #include "XMenuInt.h" int -XMenuSetPane(menu, p_num, active) - register XMenu *menu; /* Menu object to be modified. */ - register int p_num; /* Pane number to be modified. */ - register int active; /* Make selection active? */ +XMenuSetPane(register XMenu *menu, register int p_num, register int active) + /* Menu object to be modified. */ + /* Pane number to be modified. */ + /* Make selection active? */ { register XMPane *p_ptr; /* XMPane pointer. */ diff --git a/oldXMenu/SetSel.c b/oldXMenu/SetSel.c index aae161322eb..162d3434bad 100644 --- a/oldXMenu/SetSel.c +++ b/oldXMenu/SetSel.c @@ -16,11 +16,11 @@ #include "XMenuInt.h" int -XMenuSetSelection(menu, p_num, s_num, active) - register XMenu *menu; /* Menu object to be modified. */ - register int p_num; /* Pane number to be modified. */ - register int s_num; /* Selection number to modified. */ - int active; /* Make selection active? */ +XMenuSetSelection(register XMenu *menu, register int p_num, register int s_num, int active) + /* Menu object to be modified. */ + /* Pane number to be modified. */ + /* Selection number to modified. */ + /* Make selection active? */ { register XMPane *p_ptr; /* XMPane pointer. */ register XMSelect *s_ptr; /* XMSelect pointer. */ diff --git a/oldXMenu/X10.h b/oldXMenu/X10.h index e1abcbbe6c5..9a7766bc09d 100644 --- a/oldXMenu/X10.h +++ b/oldXMenu/X10.h @@ -71,8 +71,8 @@ typedef struct { int size; /* Table size (number of buckets). */ } XAssocTable; -XAssocTable *XCreateAssocTable(); -char *XLookUpAssoc(); +XAssocTable *XCreateAssocTable(int size); +char *XLookUpAssoc(Display *dpy, XAssocTable *table, XID x_id); #endif /* _X10_H_ */ diff --git a/oldXMenu/XCrAssoc.c b/oldXMenu/XCrAssoc.c index 874ed81d31f..aa98c27ff41 100644 --- a/oldXMenu/XCrAssoc.c +++ b/oldXMenu/XCrAssoc.c @@ -11,8 +11,6 @@ #define NULL 0 #endif -extern int errno; - /* * XCreateAssocTable - Create an XAssocTable. The size argument should be * a power of two for efficiency reasons. Some size suggestions: use 32 @@ -20,8 +18,8 @@ extern int errno; * buckets is 8. If there is an error creating the XAssocTable, a NULL * pointer is returned. */ -XAssocTable *XCreateAssocTable(size) - register int size; /* Desired size of the table. */ +XAssocTable *XCreateAssocTable(register int size) + /* Desired size of the table. */ { register XAssocTable *table; /* XAssocTable to be initialized. */ register XAssoc *buckets; /* Pointer to the first bucket in */ diff --git a/oldXMenu/XDelAssoc.c b/oldXMenu/XDelAssoc.c index 11e8c35a774..7aca50aa56b 100644 --- a/oldXMenu/XDelAssoc.c +++ b/oldXMenu/XDelAssoc.c @@ -5,22 +5,19 @@ #include <X11/Xlib.h> #include "X10.h" -void emacs_remque(); struct qelem { struct qelem *q_forw; struct qelem *q_back; char q_data[1]; }; +void emacs_remque(struct qelem*); /* * XDeleteAssoc - Delete an association in an XAssocTable keyed on * an XId. An association may be removed only once. Redundant * deletes are meaningless (but cause no problems). */ -XDeleteAssoc(dpy, table, x_id) - register Display *dpy; - register XAssocTable *table; - register XID x_id; +XDeleteAssoc(register Display *dpy, register XAssocTable *table, register XID x_id) { int hash; register XAssoc *bucket; diff --git a/oldXMenu/XDestAssoc.c b/oldXMenu/XDestAssoc.c index fee53eb756f..c2dd8d4d89b 100644 --- a/oldXMenu/XDestAssoc.c +++ b/oldXMenu/XDestAssoc.c @@ -10,8 +10,7 @@ * XDestroyAssocTable - Destroy (free the memory associated with) * an XAssocTable. */ -XDestroyAssocTable(table) - register XAssocTable *table; +XDestroyAssocTable(register XAssocTable *table) { register int i; register XAssoc *bucket; diff --git a/oldXMenu/XLookAssoc.c b/oldXMenu/XLookAssoc.c index 0ab71c3e78b..a1a06e900c7 100644 --- a/oldXMenu/XLookAssoc.c +++ b/oldXMenu/XLookAssoc.c @@ -18,10 +18,10 @@ * in the table the routine will return a NULL pointer. All XId's are relative * to the currently active Display. */ -caddr_t XLookUpAssoc(dpy, table, x_id) - register Display *dpy; - register XAssocTable *table; /* XAssocTable to search in. */ - register XID x_id; /* XId to search for. */ +caddr_t XLookUpAssoc(register Display *dpy, register XAssocTable *table, register XID x_id) + + /* XAssocTable to search in. */ + /* XId to search for. */ { int hash; register XAssoc *bucket; diff --git a/oldXMenu/XMakeAssoc.c b/oldXMenu/XMakeAssoc.c index cf039c8f3c1..84157399b43 100644 --- a/oldXMenu/XMakeAssoc.c +++ b/oldXMenu/XMakeAssoc.c @@ -13,25 +13,20 @@ #define NULL 0 #endif -extern int errno; - -void emacs_insque(); struct qelem { struct qelem *q_forw; struct qelem *q_back; char q_data[1]; }; +void emacs_insque (struct qelem *elem, struct qelem *prev); + /* * XMakeAssoc - Insert data into an XAssocTable keyed on an XId. * Data is inserted into the table only once. Redundant inserts are * meaningless (but cause no problems). The queue in each association * bucket is sorted (lowest XId to highest XId). */ -XMakeAssoc(dpy, table, x_id, data) - register Display *dpy; - register XAssocTable *table; - register XID x_id; - register caddr_t data; +XMakeAssoc(register Display *dpy, register XAssocTable *table, register XID x_id, register caddr_t data) { int hash; register XAssoc *bucket; diff --git a/oldXMenu/XMenu.h b/oldXMenu/XMenu.h index 2589ae68cca..42f9c45a37c 100644 --- a/oldXMenu/XMenu.h +++ b/oldXMenu/XMenu.h @@ -234,31 +234,33 @@ typedef struct _xmenu { Pixmap inact_pixmap; /* Menu inactive pixmap. */ } XMenu; +typedef void (*Wait_func)(void*); + /* * XMenu library routine declarations. */ -XMenu *XMenuCreate(); -int XMenuAddPane(); -int XMenuAddSelection(); -int XMenuInsertPane(); -int XMenuInsertSelection(); -int XMenuFindPane(); -int XMenuFindSelection(); -int XMenuChangePane(); -int XMenuChangeSelection(); -int XMenuSetPane(); -int XMenuSetSelection(); -int XMenuRecompute(); -int XMenuEventHandler(); /* No value actually returned. */ -int XMenuLocate(); -int XMenuSetFreeze(); /* No value actually returned. */ -void XMenuActivateSetWaitFunction(); -int XMenuActivate(); -char *XMenuPost(); -int XMenuDeletePane(); -int XMenuDeleteSelection(); -int XMenuDestroy(); /* No value actually returned. */ -char *XMenuError(); +XMenu *XMenuCreate(Display *display, Window parent, register char *def_env); +int XMenuAddPane(Display *display, register XMenu *menu, register char *label, int active); +int XMenuAddSelection(Display *display, register XMenu *menu, register int p_num, char *data, char *label, int active, char *help); +int XMenuInsertPane(register XMenu *menu, register int p_num, char *label, int active); +int XMenuInsertSelection(register XMenu *menu, register int p_num, register int s_num, char *data, char *label, int active); +int XMenuFindPane(register XMenu *menu, register char *label); +int XMenuFindSelection(register XMenu *menu, int p_num, register char *label); +int XMenuChangePane(register XMenu *menu, register int p_num, char *label); +int XMenuChangeSelection(Display *display, register XMenu *menu, register int p_num, register int s_num, char *data, int data_sw, char *label, int label_sw); +int XMenuSetPane(register XMenu *menu, register int p_num, register int active); +int XMenuSetSelection(register XMenu *menu, register int p_num, register int s_num, int active); +int XMenuRecompute(Display *display, register XMenu *menu); +int XMenuEventHandler(int (*handler) (XEvent *)); /* No value actually returned. */ +int XMenuLocate(register Display *display, register XMenu *menu, int p_num, int s_num, int x_pos, int y_pos, int *ul_x, int *ul_y, int *width, int *height); +int XMenuSetFreeze(register XMenu *menu, register int freeze); /* No value actually returned. */ +void XMenuActivateSetWaitFunction(Wait_func func, void *data); +int XMenuActivate(Display *display, XMenu *menu, int *p_num, int *s_num, int x_pos, int y_pos, unsigned int event_mask, char **data, void (*help_callback) (char *, int, int)); +char *XMenuPost(register Display *display, register XMenu *menu, register int *p_num, register int *s_num, register int x_pos, register int y_pos, int event_mask); +int XMenuDeletePane(register Display *display, register XMenu *menu, register int p_num); +int XMenuDeleteSelection(register Display *display, register XMenu *menu, register int p_num, register int s_num); +int XMenuDestroy(Display *display, register XMenu *menu); /* No value actually returned. */ +char *XMenuError(void); #endif /* Don't add after this point. */ diff --git a/oldXMenu/XMenuInt.h b/oldXMenu/XMenuInt.h index d2844d8ea2b..dc6a0e5192a 100644 --- a/oldXMenu/XMenuInt.h +++ b/oldXMenu/XMenuInt.h @@ -37,7 +37,7 @@ /* * XMenu internal event handler variable. */ -extern int (*_XMEventHandler)(); +extern int (*_XMEventHandler)(XEvent*); #ifndef Pixel #define Pixel unsigned long @@ -46,19 +46,17 @@ extern int (*_XMEventHandler)(); /* * Internal routine declarations. */ -int _XMWinQueInit(); /* No value actually returned. */ -int _XMWinQueAddPane(); -int _XMWinQueAddSelection(); -int _XMWinQueFlush(); -XMPane *_XMGetPanePtr(); -XMSelect *_XMGetSelectionPtr(); -int _XMRecomputeGlobals(); /* No value actually returned. */ -int _XMRecomputePane(); -int _XMRecomputeSelection(); -int _XMTransToOrigin(); /* No value actually returned. */ -int _XMRefreshPane(); /* No value actually returned. */ -int _XMRefreshSelections(); /* No value actually returned. */ -int _XMHighlightSelection(); /* No value actually returned. */ +int _XMWinQueInit(void); /* No value actually returned. */ +int _XMWinQueAddPane(register Display *display, register XMenu *menu, register XMPane *p_ptr); +int _XMWinQueAddSelection(register Display *display, register XMenu *menu, register XMSelect *s_ptr); +int _XMWinQueFlush(register Display *display, register XMenu *menu, register XMPane *pane, XMSelect *select); +XMPane *_XMGetPanePtr(register XMenu *menu, register int p_num); +XMSelect *_XMGetSelectionPtr(register XMPane *p_ptr, register int s_num); +int _XMRecomputeGlobals(register Display *display, register XMenu *menu); /* No value actually returned. */ +int _XMRecomputePane(register Display *display, register XMenu *menu, register XMPane *p_ptr, register int p_num); +int _XMRecomputeSelection(register Display *display, register XMenu *menu, register XMSelect *s_ptr, register int s_num); +int _XMTransToOrigin(Display *display, register XMenu *menu, register XMPane *p_ptr, register XMSelect *s_ptr, int x_pos, int y_pos, int *orig_x, int *orig_y); /* No value actually returned. */ +int _XMRefreshPane(register Display *display, register XMenu *menu, register XMPane *pane); /* No value actually returned. */ #endif /* Don't add stuff after this #endif */ diff --git a/oldXMenu/insque.c b/oldXMenu/insque.c index 16b194d88d3..c6f8f6ef1fb 100644 --- a/oldXMenu/insque.c +++ b/oldXMenu/insque.c @@ -30,8 +30,7 @@ struct qelem { /* Insert ELEM into a doubly-linked list, after PREV. */ void -emacs_insque (elem, prev) - struct qelem *elem, *prev; +emacs_insque (struct qelem *elem, struct qelem *prev) { struct qelem *next = prev->q_forw; prev->q_forw = elem; @@ -43,8 +42,7 @@ emacs_insque (elem, prev) /* Unlink ELEM from the doubly-linked list that it is in. */ -emacs_remque (elem) - struct qelem *elem; +emacs_remque (struct qelem *elem) { struct qelem *next = elem->q_forw; struct qelem *prev = elem->q_back; |