aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2001-12-02 04:52:12 +0000
committerRichard M. Stallman2001-12-02 04:52:12 +0000
commita3bf8a8cfac0e8486fe8441b4532e21075a1a4f5 (patch)
tree72176514d7d6b239a445230d911598630c296121
parent036e218d5b789c86aee413df27d8686f8cc057ac (diff)
downloademacs-a3bf8a8cfac0e8486fe8441b4532e21075a1a4f5.tar.gz
emacs-a3bf8a8cfac0e8486fe8441b4532e21075a1a4f5.zip
Include ../src/lisp.h. Don't declare xmalloc.
(free_widget_value_tree): Don't free `help' field. (copy_widget_value_tree): Copy `help' simply, without safe_strdup. (merge_widget_value): Compare and copy `help' simply.
-rw-r--r--lwlib/lwlib.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/lwlib/lwlib.c b/lwlib/lwlib.c
index 81ab8d5d2c7..c08fd52d70a 100644
--- a/lwlib/lwlib.c
+++ b/lwlib/lwlib.c
@@ -26,6 +26,8 @@ Boston, MA 02111-1307, USA. */
26#include <config.h> 26#include <config.h>
27#endif 27#endif
28 28
29#include "../src/lisp.h"
30
29#include <sys/types.h> 31#include <sys/types.h>
30#include <stdio.h> 32#include <stdio.h>
31#include <ctype.h> 33#include <ctype.h>
@@ -33,8 +35,6 @@ Boston, MA 02111-1307, USA. */
33#include "lwlib-utils.h" 35#include "lwlib-utils.h"
34#include <X11/StringDefs.h> 36#include <X11/StringDefs.h>
35 37
36extern long *xmalloc();
37
38#if defined (USE_LUCID) 38#if defined (USE_LUCID)
39#include "lwlib-Xlw.h" 39#include "lwlib-Xlw.h"
40#endif 40#endif
@@ -237,9 +237,8 @@ free_widget_value_tree (wv)
237 if (wv->name) free (wv->name); 237 if (wv->name) free (wv->name);
238 if (wv->value) free (wv->value); 238 if (wv->value) free (wv->value);
239 if (wv->key) free (wv->key); 239 if (wv->key) free (wv->key);
240 if (wv->help) free (wv->help);
241 240
242 wv->name = wv->value = wv->key = wv->help = (char *) 0xDEADBEEF; 241 wv->name = wv->value = wv->key = (char *) 0xDEADBEEF;
243 242
244 if (wv->toolkit_data && wv->free_toolkit_data) 243 if (wv->toolkit_data && wv->free_toolkit_data)
245 { 244 {
@@ -276,7 +275,7 @@ copy_widget_value_tree (val, change)
276 copy->name = safe_strdup (val->name); 275 copy->name = safe_strdup (val->name);
277 copy->value = safe_strdup (val->value); 276 copy->value = safe_strdup (val->value);
278 copy->key = safe_strdup (val->key); 277 copy->key = safe_strdup (val->key);
279 copy->help = safe_strdup (val->help); 278 copy->help = val->help;
280 copy->enabled = val->enabled; 279 copy->enabled = val->enabled;
281 copy->button_type = val->button_type; 280 copy->button_type = val->button_type;
282 copy->selected = val->selected; 281 copy->selected = val->selected;
@@ -546,13 +545,12 @@ merge_widget_value (val1, val2, level, change_p)
546 safe_free_str (val1->key); 545 safe_free_str (val1->key);
547 val1->key = safe_strdup (val2->key); 546 val1->key = safe_strdup (val2->key);
548 } 547 }
549 if (safe_strcmp (val1->help, val2->help)) 548 if (! EQ (val1->help, val2->help))
550 { 549 {
551 EXPLAIN (val1->name, change, VISIBLE_CHANGE, "help change", 550 EXPLAIN (val1->name, change, VISIBLE_CHANGE, "help change",
552 val1->help, val2->help); 551 val1->help, val2->help);
553 change = max (change, VISIBLE_CHANGE); 552 change = max (change, VISIBLE_CHANGE);
554 safe_free_str (val1->help); 553 val1->help = val2->help;
555 val1->help = safe_strdup (val2->help);
556 } 554 }
557 if (val1->enabled != val2->enabled) 555 if (val1->enabled != val2->enabled)
558 { 556 {