X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/a5805c9d0240fab504f2a3e32db6449392005fb6..6ef2e5ef5278a807132b78c42de402925b20bfb3:/oldXMenu/InsSel.c diff --git a/oldXMenu/InsSel.c b/oldXMenu/InsSel.c index 30e0756d8e..5db285f640 100644 --- a/oldXMenu/InsSel.c +++ b/oldXMenu/InsSel.c @@ -1,8 +1,7 @@ +/* Copyright Massachusetts Institute of Technology 1985 */ + #include "copyright.h" -/* Copyright Massachusetts Institute of Technology 1985 */ -/* Copyright (C) 2002, 2003, 2004, 2005, - 2006 Free Software Foundation, Inc. */ /* * XMenu: MIT Project Athena, X Window system menu package @@ -18,18 +17,18 @@ #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. */ - XMSelect *select; /* Newly created selection. */ + XMSelect *sel; /* Newly created selection. */ int label_length; /* Label length in characters. */ int label_width; /* Label width in pixels. */ @@ -58,8 +57,8 @@ XMenuInsertSelection(menu, p_num, s_num, data, label, active) /* * 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); } @@ -76,28 +75,28 @@ XMenuInsertSelection(menu, p_num, s_num, data, label, active) */ 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->active = active; - select->serial = -1; - select->label = label; - select->label_width = label_width; - select->label_length = label_length; - select->data = data; - select->parent_p = p_ptr; + sel->active = active; + sel->serial = -1; + sel->label = label; + sel->label_width = label_width; + sel->label_length = label_length; + sel->data = data; + sel->parent_p = p_ptr; /* * Insert the selection after the selection with the selection * number one less than the desired number for the new selection. */ - emacs_insque(select, s_ptr); + emacs_insque(sel, s_ptr); /* * Update the selection count. @@ -115,6 +114,3 @@ XMenuInsertSelection(menu, p_num, s_num, data, label, active) _XMErrorCode = XME_NO_ERROR; return(s_num); } - -/* arch-tag: 8398626f-81cb-4e13-8ebc-aac1b9237663 - (do not change this comment) */