Mercurial > emacs
annotate oldXMenu/ChgPane.c @ 83093:fd7beda03521
Prevent Lisp nesting errors while bootstrapping.
lisp/Makefile.in: Compile vc-arch.el before others; having it loaded
from source while bootstrapping sometimes causes too deep nesting.
(Perhaps it's time to increase max-lisp-eval-depth?)
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-133
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Thu, 08 Apr 2004 15:09:37 +0000 |
parents | f0eb34e60705 |
children | 8e5779acd195 |
rev | line source |
---|---|
25858 | 1 #include "copyright.h" |
2 | |
53224
f0eb34e60705
tag of miles@gnu.org--gnu-2003/emacs--cvs-trunk--0--patch-137
Karoly Lorentey <lorentey@elte.hu>
parents:
52401
diff
changeset
|
3 /* $Header: /cvsroot/emacs/emacs/oldXMenu/ChgPane.c,v 1.2 2003/09/01 15:45:47 miles Exp $ */ |
25858 | 4 /* Copyright Massachusetts Institute of Technology 1985 */ |
5 | |
6 /* | |
7 * XMenu: MIT Project Athena, X Window system menu package | |
8 * | |
9 * XMenuChangePane - Change the label of a menu pane. | |
10 * | |
11 * Author: Tony Della Fera, DEC | |
12 * December 19, 1985 | |
13 * | |
14 */ | |
15 | |
16 #include "XMenuInt.h" | |
17 | |
18 int | |
19 XMenuChangePane(menu, p_num, label) | |
20 register XMenu *menu; /* Menu object to be modified. */ | |
21 register int p_num; /* Pane number to be modified. */ | |
22 char *label; /* Selection label. */ | |
23 { | |
24 register XMPane *p_ptr; /* XMPane pointer. */ | |
25 | |
26 int label_length; /* Label length in characters. */ | |
27 int label_width; /* Label width in pixels. */ | |
28 | |
29 /* | |
30 * Check for NULL pointers! | |
31 */ | |
32 if (label == NULL) { | |
33 _XMErrorCode = XME_ARG_BOUNDS; | |
34 return(XM_FAILURE); | |
35 } | |
36 | |
37 /* | |
38 * Find the right pane. | |
39 */ | |
40 p_ptr = _XMGetPanePtr(menu, p_num); | |
41 if (p_ptr == NULL) return(XM_FAILURE); | |
42 | |
43 /* | |
44 * Determine label size. | |
45 */ | |
46 label_length = strlen(label); | |
47 label_width = XTextWidth(menu->p_fnt_info, label, label_length); | |
48 | |
49 /* | |
50 * Change the pane data. | |
51 */ | |
52 p_ptr->label = label; | |
53 p_ptr->label_width = label_width; | |
54 p_ptr->label_length = label_length; | |
55 | |
56 /* | |
57 * Schedule a recompute. | |
58 */ | |
59 menu->recompute = 1; | |
60 | |
61 /* | |
62 * Return the pane number just changed. | |
63 */ | |
64 _XMErrorCode = XME_NO_ERROR; | |
65 return(p_num); | |
66 } | |
52401 | 67 |
68 /* arch-tag: e267e9de-a3f0-4a0d-8c45-413afa176fd8 | |
69 (do not change this comment) */ |