aboutsummaryrefslogtreecommitdiffstats
path: root/oldXMenu/AddPane.c
diff options
context:
space:
mode:
Diffstat (limited to 'oldXMenu/AddPane.c')
-rw-r--r--oldXMenu/AddPane.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/oldXMenu/AddPane.c b/oldXMenu/AddPane.c
index 67900a6bc76..36b57fe8da6 100644
--- a/oldXMenu/AddPane.c
+++ b/oldXMenu/AddPane.c
@@ -16,14 +16,14 @@
16#include "XMenuInt.h" 16#include "XMenuInt.h"
17 17
18int 18int
19XMenuAddPane(Display *display, register XMenu *menu, register char *label, int active) 19XMenuAddPane(Display *display, register XMenu *menu, register char const *label, int active)
20 20
21 /* Menu object to be modified. */ 21 /* Menu object to be modified. */
22 /* Selection label. */ 22 /* Selection label. */
23 /* Make selection active? */ 23 /* Make selection active? */
24{ 24{
25 register XMPane *pane; /* Newly created pane. */ 25 register XMPane *pane; /* Newly created pane. */
26 register XMSelect *select; /* Initial selection for the new pane. */ 26 register XMSelect *sel; /* Initial selection for the new pane. */
27 27
28 int label_length; /* Label length in characters. */ 28 int label_length; /* Label length in characters. */
29 int label_width; /* Label width in pixels. */ 29 int label_width; /* Label width in pixels. */
@@ -44,8 +44,8 @@ XMenuAddPane(Display *display, register XMenu *menu, register char *label, int a
44 _XMErrorCode = XME_CALLOC; 44 _XMErrorCode = XME_CALLOC;
45 return(XM_FAILURE); 45 return(XM_FAILURE);
46 } 46 }
47 select = (XMSelect *)calloc(1, sizeof(XMSelect)); 47 sel = (XMSelect *)calloc(1, sizeof(XMSelect));
48 if (select == NULL) { 48 if (sel == NULL) {
49 _XMErrorCode = XME_CALLOC; 49 _XMErrorCode = XME_CALLOC;
50 return(XM_FAILURE); 50 return(XM_FAILURE);
51 } 51 }
@@ -62,11 +62,11 @@ XMenuAddPane(Display *display, register XMenu *menu, register char *label, int a
62 * Set up the initial selection. 62 * Set up the initial selection.
63 * Values not explicitly set are zeroed by calloc. 63 * Values not explicitly set are zeroed by calloc.
64 */ 64 */
65 select->next = select; 65 sel->next = sel;
66 select->prev = select; 66 sel->prev = sel;
67 select->type = SL_HEADER; 67 sel->type = SL_HEADER;
68 select->serial = -1; 68 sel->serial = -1;
69 select->parent_p = pane; 69 sel->parent_p = pane;
70 70
71 /* 71 /*
72 * Fill the XMPane structure. 72 * Fill the XMPane structure.
@@ -78,7 +78,7 @@ XMenuAddPane(Display *display, register XMenu *menu, register char *label, int a
78 pane->label = label; 78 pane->label = label;
79 pane->label_width = label_width; 79 pane->label_width = label_width;
80 pane->label_length = label_length; 80 pane->label_length = label_length;
81 pane->s_list = select; 81 pane->s_list = sel;
82 82
83 /* 83 /*
84 * Insert the pane at the end of the pane list. 84 * Insert the pane at the end of the pane list.
@@ -101,4 +101,3 @@ XMenuAddPane(Display *display, register XMenu *menu, register char *label, int a
101 _XMErrorCode = XME_NO_ERROR; 101 _XMErrorCode = XME_NO_ERROR;
102 return((menu->p_count - 1)); 102 return((menu->p_count - 1));
103} 103}
104