X-Git-Url: http://git.hcoop.net/bpt/emacs.git/blobdiff_plain/a0dec7068abe55dbc56ecd029189d6eb1ad12d62..a560d9743a45663fd4a054b9c62b6b09784d0bbe:/oldXMenu/AddSel.c diff --git a/oldXMenu/AddSel.c b/oldXMenu/AddSel.c index d6111fd1e2..9bbcf71cd3 100644 --- a/oldXMenu/AddSel.c +++ b/oldXMenu/AddSel.c @@ -1,7 +1,7 @@ +/* Copyright Massachusetts Institute of Technology 1985 */ + #include "copyright.h" -/* $Header: /cvsroot/emacs/emacs/oldXMenu/AddSel.c,v 1.4 2003/09/01 15:45:47 miles Exp $ */ -/* Copyright Massachusetts Institute of Technology 1985 */ /* * XMenu: MIT Project Athena, X Window system menu package @@ -17,17 +17,17 @@ #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 const *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. */ + register XMSelect *sel; /* Newly created selection. */ int label_length; /* Label lenght in characters. */ @@ -49,8 +49,8 @@ XMenuAddSelection(display, menu, p_num, data, label, active, help) /* * Calloc the XMSelect structure. */ - select = (XMSelect *)calloc(1, sizeof(XMSelect)); - if (select == NULL) { + sel = (XMSelect *)calloc(1, sizeof(XMSelect)); + if (sel == NULL) { _XMErrorCode = XME_CALLOC; return(XM_FAILURE); } @@ -65,27 +65,27 @@ XMenuAddSelection(display, menu, p_num, data, label, active, help) */ if (!strcmp (label, "--") || !strcmp (label, "---")) { - select->type = SEPARATOR; - select->active = 0; + sel->type = SEPARATOR; + sel->active = 0; } else { - select->type = SELECTION; - select->active = active; + sel->type = SELECTION; + sel->active = active; } - select->serial = -1; - select->label = label; - select->label_width = label_width; - select->label_length = label_length; - select->data = data; - select->parent_p = pane; - select->help_string = help; + sel->serial = -1; + sel->label = label; + sel->label_width = label_width; + sel->label_length = label_length; + sel->data = data; + sel->parent_p = pane; + sel->help_string = help; /* * Insert the selection at the end of the selection list. */ - emacs_insque(select, pane->s_list->prev); + emacs_insque(sel, pane->s_list->prev); /* * Update the selection count. @@ -103,6 +103,3 @@ XMenuAddSelection(display, menu, p_num, data, label, active, help) _XMErrorCode = XME_NO_ERROR; return((pane->s_count - 1)); } - -/* arch-tag: 0161f024-c739-440d-9498-050280c6c355 - (do not change this comment) */