Fix bogus crash with -DENABLE_CHECKING.
[emacs.git] / oldXMenu / SetPane.c
blobe76b75902c3a50ededb15d9b945ebd442803e33a
1 #include "copyright.h"
3 /* Copyright Massachusetts Institute of Technology 1985 */
4 /* Copyright (C) 2002, 2003, 2004, 2005,
5 2006 Free Software Foundation, Inc. */
7 /*
8 * XMenu: MIT Project Athena, X Window system menu package
10 * XMenuSetPane - Set a menu pane to be active or inactive.
12 * Author: Tony Della Fera, DEC
13 * August, 1985
17 #include "XMenuInt.h"
19 int
20 XMenuSetPane(menu, p_num, active)
21 register XMenu *menu; /* Menu object to be modified. */
22 register int p_num; /* Pane number to be modified. */
23 register int active; /* Make selection active? */
25 register XMPane *p_ptr; /* XMPane pointer. */
28 * Find the right pane.
30 p_ptr = _XMGetPanePtr(menu, p_num);
31 if (p_ptr == NULL) return(XM_FAILURE);
34 * Set its active switch.
36 p_ptr->active = active;
37 if (p_ptr->active == False) p_ptr->activated = False;
40 * Return the pane number just set.
42 _XMErrorCode = XME_NO_ERROR;
43 return(p_num);
46 /* arch-tag: 90bc8d90-031d-41a2-a2c6-04bf94efbc90
47 (do not change this comment) */