Mercurial > emacs
changeset 109124:5cc91198ffb2
Convert function definitions in oldXMenu to standard C.
* oldXMenu/Activate.c: Convert function definitions to standard C.
* oldXMenu/AddPane.c:
* oldXMenu/AddSel.c:
* oldXMenu/ChgPane.c:
* oldXMenu/ChgSel.c:
* oldXMenu/Create.c:
* oldXMenu/DelPane.c:
* oldXMenu/DelSel.c:
* oldXMenu/Destroy.c:
* oldXMenu/Error.c:
* oldXMenu/EvHand.c:
* oldXMenu/FindPane.c:
* oldXMenu/FindSel.c:
* oldXMenu/InsPane.c:
* oldXMenu/InsSel.c:
* oldXMenu/Internal.c:
* oldXMenu/Locate.c:
* oldXMenu/Post.c:
* oldXMenu/Recomp.c:
* oldXMenu/SetAEQ.c:
* oldXMenu/SetFrz.c:
* oldXMenu/SetPane.c:
* oldXMenu/SetSel.c:
* oldXMenu/X10.h:
* oldXMenu/XCrAssoc.c:
* oldXMenu/XDelAssoc.c:
* oldXMenu/XDestAssoc.c:
* oldXMenu/XLookAssoc.c:
* oldXMenu/XMakeAssoc.c:
* oldXMenu/XMenu.h:
* oldXMenu/XMenuInt.h:
* oldXMenu/insque.c: Likewise.
author | Dan Nicolaescu <dann@ics.uci.edu> |
---|---|
date | Sat, 03 Jul 2010 22:57:11 -0700 |
parents | 384b3408c143 |
children | 12b02558bf51 |
files | oldXMenu/Activate.c oldXMenu/AddPane.c oldXMenu/AddSel.c oldXMenu/ChangeLog oldXMenu/ChgPane.c oldXMenu/ChgSel.c oldXMenu/Create.c oldXMenu/DelPane.c oldXMenu/DelSel.c oldXMenu/Destroy.c oldXMenu/Error.c oldXMenu/EvHand.c oldXMenu/FindPane.c oldXMenu/FindSel.c oldXMenu/InsPane.c oldXMenu/InsSel.c oldXMenu/Internal.c oldXMenu/Locate.c oldXMenu/Post.c oldXMenu/Recomp.c oldXMenu/SetAEQ.c oldXMenu/SetFrz.c oldXMenu/SetPane.c oldXMenu/SetSel.c oldXMenu/X10.h oldXMenu/XCrAssoc.c oldXMenu/XDelAssoc.c oldXMenu/XDestAssoc.c oldXMenu/XLookAssoc.c oldXMenu/XMakeAssoc.c oldXMenu/XMenu.h oldXMenu/XMenuInt.h oldXMenu/insque.c |
diffstat | 33 files changed, 241 insertions(+), 241 deletions(-) [+] |
line wrap: on
line diff
--- a/oldXMenu/Activate.c Sat Jul 03 22:47:55 2010 -0700 +++ b/oldXMenu/Activate.c Sat Jul 03 22:57:11 2010 -0700 @@ -103,32 +103,27 @@ /* 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. */
--- a/oldXMenu/AddPane.c Sat Jul 03 22:47:55 2010 -0700 +++ b/oldXMenu/AddPane.c Sat Jul 03 22:57:11 2010 -0700 @@ -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. */
--- a/oldXMenu/AddSel.c Sat Jul 03 22:47:55 2010 -0700 +++ b/oldXMenu/AddSel.c Sat Jul 03 22:57:11 2010 -0700 @@ -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. */
--- a/oldXMenu/ChangeLog Sat Jul 03 22:47:55 2010 -0700 +++ b/oldXMenu/ChangeLog Sat Jul 03 22:57:11 2010 -0700 @@ -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.
--- a/oldXMenu/ChgPane.c Sat Jul 03 22:47:55 2010 -0700 +++ b/oldXMenu/ChgPane.c Sat Jul 03 22:57:11 2010 -0700 @@ -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. */
--- a/oldXMenu/ChgSel.c Sat Jul 03 22:47:55 2010 -0700 +++ b/oldXMenu/ChgSel.c Sat Jul 03 22:57:11 2010 -0700 @@ -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. */
--- a/oldXMenu/Create.c Sat Jul 03 22:47:55 2010 -0700 +++ b/oldXMenu/Create.c Sat Jul 03 22:57:11 2010 -0700 @@ -91,19 +91,14 @@ #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 @@ 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. */
--- a/oldXMenu/DelPane.c Sat Jul 03 22:47:55 2010 -0700 +++ b/oldXMenu/DelPane.c Sat Jul 03 22:57:11 2010 -0700 @@ -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. */
--- a/oldXMenu/DelSel.c Sat Jul 03 22:47:55 2010 -0700 +++ b/oldXMenu/DelSel.c Sat Jul 03 22:57:11 2010 -0700 @@ -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. */
--- a/oldXMenu/Destroy.c Sat Jul 03 22:47:55 2010 -0700 +++ b/oldXMenu/Destroy.c Sat Jul 03 22:57:11 2010 -0700 @@ -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. */
--- a/oldXMenu/Error.c Sat Jul 03 22:47:55 2010 -0700 +++ b/oldXMenu/Error.c Sat Jul 03 22:57:11 2010 -0700 @@ -17,7 +17,7 @@ #include "XMenuInt.h" char * -XMenuError() +XMenuError(void) { static char message[128]; /* Error message buffer. */
--- a/oldXMenu/EvHand.c Sat Jul 03 22:47:55 2010 -0700 +++ b/oldXMenu/EvHand.c Sat Jul 03 22:57:11 2010 -0700 @@ -15,8 +15,7 @@ #include "XMenuInt.h" -XMenuEventHandler(handler) - int (*handler)(); +XMenuEventHandler(int (*handler) (XEvent*)) { /* * Set the global event handler variable.
--- a/oldXMenu/FindPane.c Sat Jul 03 22:47:55 2010 -0700 +++ b/oldXMenu/FindPane.c Sat Jul 03 22:57:11 2010 -0700 @@ -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;
--- a/oldXMenu/FindSel.c Sat Jul 03 22:47:55 2010 -0700 +++ b/oldXMenu/FindSel.c Sat Jul 03 22:57:11 2010 -0700 @@ -34,10 +34,7 @@ #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;
--- a/oldXMenu/InsPane.c Sat Jul 03 22:47:55 2010 -0700 +++ b/oldXMenu/InsPane.c Sat Jul 03 22:57:11 2010 -0700 @@ -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. */
--- a/oldXMenu/InsSel.c Sat Jul 03 22:47:55 2010 -0700 +++ b/oldXMenu/InsSel.c Sat Jul 03 22:57:11 2010 -0700 @@ -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. */
--- a/oldXMenu/Internal.c Sat Jul 03 22:47:55 2010 -0700 +++ b/oldXMenu/Internal.c Sat Jul 03 22:57:11 2010 -0700 @@ -96,7 +96,7 @@ /* * _XMEventHandler - Internal event handler variable. */ -int (*_XMEventHandler)() = NULL; +int (*_XMEventHandler)(XEvent*) = NULL; @@ -104,7 +104,7 @@ * _XMWinQueInit - Internal routine to initialize the window * queue. */ -_XMWinQueInit() +_XMWinQueInit(void) { /* * If the queue is not initialized initialize it. @@ -138,10 +138,10 @@ * 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 @@ * 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 @@ * 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 @@ * 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 @@ * 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 @@ * _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 @@ * 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 @@ * 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 @@ * 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 @@ * _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 @@ * _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;
--- a/oldXMenu/Locate.c Sat Jul 03 22:47:55 2010 -0700 +++ b/oldXMenu/Locate.c Sat Jul 03 22:57:11 2010 -0700 @@ -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. */
--- a/oldXMenu/Post.c Sat Jul 03 22:47:55 2010 -0700 +++ b/oldXMenu/Post.c Sat Jul 03 22:57:11 2010 -0700 @@ -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. */
--- a/oldXMenu/Recomp.c Sat Jul 03 22:47:55 2010 -0700 +++ b/oldXMenu/Recomp.c Sat Jul 03 22:57:11 2010 -0700 @@ -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. */
--- a/oldXMenu/SetAEQ.c Sat Jul 03 22:47:55 2010 -0700 +++ b/oldXMenu/SetAEQ.c Sat Jul 03 22:57:11 2010 -0700 @@ -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.
--- a/oldXMenu/SetFrz.c Sat Jul 03 22:47:55 2010 -0700 +++ b/oldXMenu/SetFrz.c Sat Jul 03 22:57:11 2010 -0700 @@ -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.
--- a/oldXMenu/SetPane.c Sat Jul 03 22:47:55 2010 -0700 +++ b/oldXMenu/SetPane.c Sat Jul 03 22:57:11 2010 -0700 @@ -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. */
--- a/oldXMenu/SetSel.c Sat Jul 03 22:47:55 2010 -0700 +++ b/oldXMenu/SetSel.c Sat Jul 03 22:57:11 2010 -0700 @@ -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. */
--- a/oldXMenu/X10.h Sat Jul 03 22:47:55 2010 -0700 +++ b/oldXMenu/X10.h Sat Jul 03 22:57:11 2010 -0700 @@ -71,8 +71,8 @@ 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_ */
--- a/oldXMenu/XCrAssoc.c Sat Jul 03 22:47:55 2010 -0700 +++ b/oldXMenu/XCrAssoc.c Sat Jul 03 22:57:11 2010 -0700 @@ -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 @@ * 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 */
--- a/oldXMenu/XDelAssoc.c Sat Jul 03 22:47:55 2010 -0700 +++ b/oldXMenu/XDelAssoc.c Sat Jul 03 22:57:11 2010 -0700 @@ -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;
--- a/oldXMenu/XDestAssoc.c Sat Jul 03 22:47:55 2010 -0700 +++ b/oldXMenu/XDestAssoc.c Sat Jul 03 22:57:11 2010 -0700 @@ -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;
--- a/oldXMenu/XLookAssoc.c Sat Jul 03 22:47:55 2010 -0700 +++ b/oldXMenu/XLookAssoc.c Sat Jul 03 22:57:11 2010 -0700 @@ -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;
--- a/oldXMenu/XMakeAssoc.c Sat Jul 03 22:47:55 2010 -0700 +++ b/oldXMenu/XMakeAssoc.c Sat Jul 03 22:57:11 2010 -0700 @@ -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;
--- a/oldXMenu/XMenu.h Sat Jul 03 22:47:55 2010 -0700 +++ b/oldXMenu/XMenu.h Sat Jul 03 22:57:11 2010 -0700 @@ -234,31 +234,33 @@ 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. */
--- a/oldXMenu/XMenuInt.h Sat Jul 03 22:47:55 2010 -0700 +++ b/oldXMenu/XMenuInt.h Sat Jul 03 22:57:11 2010 -0700 @@ -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 @@ /* * 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 */
--- a/oldXMenu/insque.c Sat Jul 03 22:47:55 2010 -0700 +++ b/oldXMenu/insque.c Sat Jul 03 22:57:11 2010 -0700 @@ -30,8 +30,7 @@ /* 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 @@ /* 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;