X-Git-Url: http://git.hcoop.net/bpt/emacs.git/blobdiff_plain/93afd0f1d463bec0fc8d3127c1d34ccaa4dbe99b..c8a9ca5a6456e7d0ec9577493d5110b692b818bf:/oldXMenu/AddSel.c diff --git a/oldXMenu/AddSel.c b/oldXMenu/AddSel.c index 0d1085bb3d..9bbcf71cd3 100644 --- a/oldXMenu/AddSel.c +++ b/oldXMenu/AddSel.c @@ -1,8 +1,7 @@ +/* Copyright Massachusetts Institute of Technology 1985 */ + #include "copyright.h" -/* Copyright Massachusetts Institute of Technology 1985 */ -/* Copyright (C) 2001, 2002, 2003, 2004, 2005, - 2006, 2007 Free Software Foundation, Inc. */ /* * XMenu: MIT Project Athena, X Window system menu package @@ -18,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. */ @@ -50,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); } @@ -66,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. @@ -104,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) */