Fix typo in doc-string of charset
indian-1-column. Adjust for the name change of
standard-character-unification-table-for-decode and
standard-character-unification-table-for-encode.
line source
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /* A general interface to the widgets of different toolkits.
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 Copyright (C) 1992, 1993 Lucid, Inc.
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 This file is part of the Lucid Widget Library.
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 The Lucid Widget Library is free software; you can redistribute it and/or
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 modify it under the terms of the GNU General Public License as published by
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 the Free Software Foundation; either version 2, or (at your option)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 any later version.
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 The Lucid Widget Library is distributed in the hope that it will be useful,
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 but WITHOUT ANY WARRANTY; without even the implied warranty of
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 GNU General Public License for more details.
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 You should have received a copy of the GNU General Public License
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 along with GNU Emacs; see the file COPYING. If not, write to
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 Boston, MA 02111-1307, USA. */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #ifdef NeXT
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #undef __STRICT_BSD__ /* ick */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #endif
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #include <sys/types.h>
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #include <stdio.h>
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #include <ctype.h>
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #include "lwlib-int.h"
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #include "lwlib-utils.h"
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #include <X11/StringDefs.h>
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #ifdef __osf__
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #include <string.h>
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #include <stdlib.h>
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 extern long *xmalloc();
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #endif
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #if defined (USE_LUCID)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #include "lwlib-Xlw.h"
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #endif
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #if defined (USE_MOTIF)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #include "lwlib-Xm.h"
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #else /* not USE_MOTIF */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #if defined (USE_LUCID)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #define USE_XAW
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #endif /* not USE_MOTIF && USE_LUCID */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #endif
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #if defined (USE_OLIT)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #include "lwlib-Xol.h"
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #endif
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #if defined (USE_XAW)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #include "lwlib-Xaw.h"
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #endif
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #if !defined (USE_LUCID) && !defined (USE_MOTIF) && !defined (USE_OLIT)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 ERROR! At least one of USE_LUCID, USE_MOTIF or USE_OLIT must be defined.
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #endif
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #if defined (USE_MOTIF) && defined (USE_OLIT)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 ERROR! no more than one of USE_MOTIF and USE_OLIT may be defined.
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #endif
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #ifndef max
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #define max(x, y) ((x) > (y) ? (x) : (y))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #endif
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /* List of all widgets managed by the library. */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static widget_info*
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 all_widget_info = NULL;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #ifdef USE_MOTIF
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 char *lwlib_toolkit_type = "motif";
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #else
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 char *lwlib_toolkit_type = "lucid";
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #endif
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /* Forward declarations */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static void
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 instantiate_widget_instance (/* widget_instance* instance */);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 lwlib_memset (address, value, length)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 char *address;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 int value;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 int length;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 int i;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 for (i = 0; i < length; i++)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 address[i] = value;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 lwlib_bcopy (from, to, length)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 char *from;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 char *to;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 int length;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 int i;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 for (i = 0; i < length; i++)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 to[i] = from[i];
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /* utility functions for widget_instance and widget_info */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 char *
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 safe_strdup (s)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 char *s;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 char *result;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (! s) return 0;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 result = (char *) malloc (strlen (s) + 1);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (! result)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return 0;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 strcpy (result, s);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return result;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /* Like strcmp but ignore differences in case. */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static int
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 my_strcasecmp (s1, s2)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 char *s1, *s2;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 while (1)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 int c1 = *s1++;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 int c2 = *s2++;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (isupper (c1))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 c1 = tolower (c1);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (isupper (c2))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 c2 = tolower (c2);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (c1 != c2)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return (c1 > c2 ? 1 : -1);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (c1 == 0)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return 0;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static void
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 safe_free_str (s)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 char *s;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (s) free (s);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static widget_value *widget_value_free_list = 0;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static int malloc_cpt = 0;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_value *
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 malloc_widget_value ()
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_value *wv;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (widget_value_free_list)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 wv = widget_value_free_list;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_value_free_list = wv->free_list;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 wv->free_list = 0;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 else
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 wv = (widget_value *) malloc (sizeof (widget_value));
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 malloc_cpt++;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 lwlib_memset (wv, 0, sizeof (widget_value));
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return wv;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /* this is analogous to free(). It frees only what was allocated
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 by malloc_widget_value(), and no substructures.
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 void
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 free_widget_value (wv)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_value *wv;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (wv->free_list)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 abort ();
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (malloc_cpt > 25)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /* When the number of already allocated cells is too big,
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 We free it. */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 free (wv);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 malloc_cpt--;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 else
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 wv->free_list = widget_value_free_list;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_value_free_list = wv;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static void
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 free_widget_value_tree (wv)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_value *wv;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (!wv)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (wv->name) free (wv->name);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (wv->value) free (wv->value);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (wv->key) free (wv->key);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 wv->name = wv->value = wv->key = (char *) 0xDEADBEEF;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (wv->toolkit_data && wv->free_toolkit_data)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 XtFree (wv->toolkit_data);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 wv->toolkit_data = (void *) 0xDEADBEEF;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (wv->contents && (wv->contents != (widget_value*)1))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 free_widget_value_tree (wv->contents);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 wv->contents = (widget_value *) 0xDEADBEEF;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (wv->next)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 free_widget_value_tree (wv->next);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 wv->next = (widget_value *) 0xDEADBEEF;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 free_widget_value (wv);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static widget_value *
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 copy_widget_value_tree (val, change)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_value* val;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 change_type change;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_value* copy;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (!val)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return NULL;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (val == (widget_value *) 1)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return val;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 copy = malloc_widget_value ();
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 copy->name = safe_strdup (val->name);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 copy->value = safe_strdup (val->value);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 copy->key = safe_strdup (val->key);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 copy->enabled = val->enabled;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 copy->selected = val->selected;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 copy->edited = False;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 copy->change = change;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 copy->this_one_change = change;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 copy->contents = copy_widget_value_tree (val->contents, change);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 copy->call_data = val->call_data;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 copy->next = copy_widget_value_tree (val->next, change);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 copy->toolkit_data = NULL;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 copy->free_toolkit_data = False;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return copy;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static widget_info *
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 allocate_widget_info (type, name, id, val, pre_activate_cb, selection_cb, post_activate_cb)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 char* type;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 char* name;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 LWLIB_ID id;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_value* val;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 lw_callback pre_activate_cb;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 lw_callback selection_cb;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 lw_callback post_activate_cb;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_info* info = (widget_info*)malloc (sizeof (widget_info));
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 info->type = safe_strdup (type);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 info->name = safe_strdup (name);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 info->id = id;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 info->val = copy_widget_value_tree (val, STRUCTURAL_CHANGE);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 info->busy = False;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 info->pre_activate_cb = pre_activate_cb;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 info->selection_cb = selection_cb;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 info->post_activate_cb = post_activate_cb;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 info->instances = NULL;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 info->next = all_widget_info;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 all_widget_info = info;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return info;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static void
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 free_widget_info (info)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_info* info;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 safe_free_str (info->type);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 safe_free_str (info->name);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 free_widget_value_tree (info->val);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 lwlib_memset ((void*)info, 0xDEADBEEF, sizeof (widget_info));
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 free (info);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static void
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 mark_widget_destroyed (widget, closure, call_data)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 Widget widget;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 XtPointer closure;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 XtPointer call_data;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_instance* instance = (widget_instance*)closure;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /* be very conservative */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (instance->widget == widget)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 instance->widget = NULL;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static widget_instance *
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 allocate_widget_instance (info, parent, pop_up_p)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_info* info;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 Widget parent;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 Boolean pop_up_p;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_instance* instance =
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (widget_instance*)malloc (sizeof (widget_instance));
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 instance->parent = parent;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 instance->pop_up_p = pop_up_p;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 instance->info = info;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 instance->next = info->instances;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 info->instances = instance;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 instantiate_widget_instance (instance);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 XtAddCallback (instance->widget, XtNdestroyCallback,
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 mark_widget_destroyed, (XtPointer)instance);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return instance;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static void
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 free_widget_instance (instance)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_instance* instance;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 lwlib_memset ((void*)instance, 0xDEADBEEF, sizeof (widget_instance));
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 free (instance);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static widget_info *
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 get_widget_info (id, remove_p)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 LWLIB_ID id;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 Boolean remove_p;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_info* info;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_info* prev;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 for (prev = NULL, info = all_widget_info;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 info;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 prev = info, info = info->next)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (info->id == id)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (remove_p)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (prev)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 prev->next = info->next;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 else
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 all_widget_info = info->next;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return info;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return NULL;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /* Internal function used by the library dependent implementation to get the
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_value for a given widget in an instance */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_info *
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 lw_get_widget_info (id)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 LWLIB_ID id;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return get_widget_info (id, 0);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static widget_instance *
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 get_widget_instance (widget, remove_p)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 Widget widget;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 Boolean remove_p;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_info* info;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_instance* instance;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_instance* prev;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 for (info = all_widget_info; info; info = info->next)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 for (prev = NULL, instance = info->instances;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 instance;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 prev = instance, instance = instance->next)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (instance->widget == widget)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (remove_p)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (prev)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 prev->next = instance->next;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 else
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 info->instances = instance->next;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return instance;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return (widget_instance *) 0;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static widget_instance*
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 find_instance (id, parent, pop_up_p)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 LWLIB_ID id;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 Widget parent;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 Boolean pop_up_p;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_info* info = get_widget_info (id, False);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_instance* instance;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (info)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 for (instance = info->instances; instance; instance = instance->next)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (instance->parent == parent && instance->pop_up_p == pop_up_p)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return instance;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return NULL;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /* utility function for widget_value */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static Boolean
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 safe_strcmp (s1, s2)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 char* s1;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 char* s2;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (!!s1 ^ !!s2) return True;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return (s1 && s2) ? strcmp (s1, s2) : s1 ? False : !!s2;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #if 0
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 # define EXPLAIN(name, oc, nc, desc, a1, a2) \
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 printf ("Change: \"%s\"\tmax(%s=%d,%s=%d)\t%s %d %d\n", \
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 name, \
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (oc == NO_CHANGE ? "none" : \
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (oc == INVISIBLE_CHANGE ? "invisible" : \
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (oc == VISIBLE_CHANGE ? "visible" : \
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (oc == STRUCTURAL_CHANGE ? "structural" : "???")))), \
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 oc, \
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (nc == NO_CHANGE ? "none" : \
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (nc == INVISIBLE_CHANGE ? "invisible" : \
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (nc == VISIBLE_CHANGE ? "visible" : \
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 (nc == STRUCTURAL_CHANGE ? "structural" : "???")))), \
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 nc, desc, a1, a2)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #else
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 # define EXPLAIN(name, oc, nc, desc, a1, a2)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #endif
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static widget_value *
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 merge_widget_value (val1, val2, level)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_value* val1;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_value* val2;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 int level;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 change_type change, this_one_change;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_value* merged_next;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_value* merged_contents;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (!val1)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (val2)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return copy_widget_value_tree (val2, STRUCTURAL_CHANGE);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 else
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return NULL;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (!val2)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 free_widget_value_tree (val1);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return NULL;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 change = NO_CHANGE;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (safe_strcmp (val1->name, val2->name))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 EXPLAIN (val1->name, change, STRUCTURAL_CHANGE, "name change",
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 val1->name, val2->name);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 change = max (change, STRUCTURAL_CHANGE);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 safe_free_str (val1->name);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 val1->name = safe_strdup (val2->name);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (safe_strcmp (val1->value, val2->value))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 EXPLAIN (val1->name, change, VISIBLE_CHANGE, "value change",
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 val1->value, val2->value);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 change = max (change, VISIBLE_CHANGE);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 safe_free_str (val1->value);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 val1->value = safe_strdup (val2->value);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (safe_strcmp (val1->key, val2->key))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 EXPLAIN (val1->name, change, VISIBLE_CHANGE, "key change",
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 val1->key, val2->key);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 change = max (change, VISIBLE_CHANGE);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 safe_free_str (val1->key);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 val1->key = safe_strdup (val2->key);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (val1->enabled != val2->enabled)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 EXPLAIN (val1->name, change, VISIBLE_CHANGE, "enablement change",
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 val1->enabled, val2->enabled);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 change = max (change, VISIBLE_CHANGE);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 val1->enabled = val2->enabled;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (val1->selected != val2->selected)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 EXPLAIN (val1->name, change, VISIBLE_CHANGE, "selection change",
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 val1->selected, val2->selected);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 change = max (change, VISIBLE_CHANGE);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 val1->selected = val2->selected;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (val1->call_data != val2->call_data)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 EXPLAIN (val1->name, change, INVISIBLE_CHANGE, "call-data change",
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 val1->call_data, val2->call_data);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 change = max (change, INVISIBLE_CHANGE);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 val1->call_data = val2->call_data;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (level > 0)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 merged_contents =
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 merge_widget_value (val1->contents, val2->contents, level - 1);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (val1->contents && !merged_contents)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /* This used to say INVISIBLE_CHANGE,
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 but it is visible and vitally important when
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 the contents of the menu bar itself are entirely deleted.
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 But maybe it doesn't matter. This fails to fix the bug. */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 EXPLAIN (val1->name, change, STRUCTURAL_CHANGE, "(contents gone)",
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 0, 0);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 change = max (change, STRUCTURAL_CHANGE);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 else if (merged_contents && merged_contents->change != NO_CHANGE)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 EXPLAIN (val1->name, change, INVISIBLE_CHANGE, "(contents change)",
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 0, 0);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 change = max (change, INVISIBLE_CHANGE);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #if 0 /* This was replaced by the August 9 1996 change in lwlib-Xm.c. */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #ifdef USE_MOTIF
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 change = max (merged_contents->change, change);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #endif
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #endif
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 val1->contents = merged_contents;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 this_one_change = change;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 merged_next = merge_widget_value (val1->next, val2->next, level);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (val1->next && !merged_next)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 EXPLAIN (val1->name, change, STRUCTURAL_CHANGE, "(following gone)",
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 0, 0);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 change = max (change, STRUCTURAL_CHANGE);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 else if (merged_next)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (merged_next->change)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 EXPLAIN (val1->name, change, merged_next->change, "(following change)",
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 0, 0);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 change = max (change, merged_next->change);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 val1->next = merged_next;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 val1->this_one_change = this_one_change;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 val1->change = change;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (change > NO_CHANGE && val1->toolkit_data)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (val1->free_toolkit_data)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 XtFree (val1->toolkit_data);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 val1->toolkit_data = NULL;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return val1;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /* modifying the widgets */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static Widget
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 name_to_widget (instance, name)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_instance* instance;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 char* name;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 Widget widget = NULL;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (!instance->widget)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return NULL;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (!strcmp (XtName (instance->widget), name))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget = instance->widget;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 else
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 int length = strlen (name) + 2;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 char* real_name = (char *) xmalloc (length);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 real_name [0] = '*';
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 strcpy (real_name + 1, name);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget = XtNameToWidget (instance->widget, real_name);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 free (real_name);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return widget;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static void
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 set_one_value (instance, val, deep_p)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_instance* instance;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_value* val;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 Boolean deep_p;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 Widget widget = name_to_widget (instance, val->name);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (widget)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #if defined (USE_LUCID)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (lw_lucid_widget_p (instance->widget))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 xlw_update_one_widget (instance, widget, val, deep_p);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #endif
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #if defined (USE_MOTIF)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (lw_motif_widget_p (instance->widget))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 xm_update_one_widget (instance, widget, val, deep_p);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #endif
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #if defined (USE_OLIT)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (lw_olit_widget_p (instance->widget))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 xol_update_one_widget (instance, widget, val, deep_p);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #endif
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #if defined (USE_XAW)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (lw_xaw_widget_p (instance->widget))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 xaw_update_one_widget (instance, widget, val, deep_p);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #endif
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static void
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 update_one_widget_instance (instance, deep_p)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_instance* instance;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 Boolean deep_p;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_value *val;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (!instance->widget)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /* the widget was destroyed */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 for (val = instance->info->val; val; val = val->next)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (val->change != NO_CHANGE)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 set_one_value (instance, val, deep_p);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static void
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 update_all_widget_values (info, deep_p)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_info* info;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 Boolean deep_p;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_instance* instance;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_value* val;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 for (instance = info->instances; instance; instance = instance->next)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 update_one_widget_instance (instance, deep_p);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 for (val = info->val; val; val = val->next)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 val->change = NO_CHANGE;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 void
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 lw_modify_all_widgets (id, val, deep_p)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 LWLIB_ID id;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_value* val;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 Boolean deep_p;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_info* info = get_widget_info (id, False);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_value* new_val;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_value* next_new_val;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_value* cur;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_value* prev;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_value* next;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 int found;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (!info)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 for (new_val = val; new_val; new_val = new_val->next)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 next_new_val = new_val->next;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 new_val->next = NULL;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 found = False;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 for (prev = NULL, cur = info->val; cur; prev = cur, cur = cur->next)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (!strcmp (cur->name, new_val->name))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 found = True;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 next = cur->next;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 cur->next = NULL;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 cur = merge_widget_value (cur, new_val, deep_p ? 1000 : 1);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (prev)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 prev->next = cur ? cur : next;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 else
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 info->val = cur ? cur : next;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (cur)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 cur->next = next;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 break;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (!found)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /* Could not find it, add it */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (prev)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 prev->next = copy_widget_value_tree (new_val, STRUCTURAL_CHANGE);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 else
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 info->val = copy_widget_value_tree (new_val, STRUCTURAL_CHANGE);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 new_val->next = next_new_val;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 update_all_widget_values (info, deep_p);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /* creating the widgets */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static void
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 initialize_widget_instance (instance)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_instance* instance;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_value* val;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 for (val = instance->info->val; val; val = val->next)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 val->change = STRUCTURAL_CHANGE;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 update_one_widget_instance (instance, True);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 for (val = instance->info->val; val; val = val->next)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 val->change = NO_CHANGE;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static widget_creation_function
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 find_in_table (type, table)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 char* type;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_creation_entry* table;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_creation_entry* cur;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 for (cur = table; cur->type; cur++)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (!my_strcasecmp (type, cur->type))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return cur->function;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return NULL;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static Boolean
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 dialog_spec_p (name)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 char* name;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /* return True if name matches [EILPQeilpq][1-9][Bb] or
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 [EILPQeilpq][1-9][Bb][Rr][1-9] */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (!name)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return False;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 switch (name [0])
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 case 'E': case 'I': case 'L': case 'P': case 'Q':
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 case 'e': case 'i': case 'l': case 'p': case 'q':
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (name [1] >= '0' && name [1] <= '9')
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (name [2] != 'B' && name [2] != 'b')
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return False;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (!name [3])
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return True;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if ((name [3] == 'T' || name [3] == 't') && !name [4])
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return True;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if ((name [3] == 'R' || name [3] == 'r')
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 && name [4] >= '0' && name [4] <= '9' && !name [5])
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return True;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return False;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 else
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return False;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 default:
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return False;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static void
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 instantiate_widget_instance (instance)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_instance* instance;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_creation_function function = NULL;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #if defined (USE_LUCID)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (!function)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 function = find_in_table (instance->info->type, xlw_creation_table);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #endif
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #if defined(USE_MOTIF)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (!function)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 function = find_in_table (instance->info->type, xm_creation_table);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #endif
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #if defined (USE_OLIT)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (!function)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 function = find_in_table (instance->info->type, xol_creation_table);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #endif
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #if defined (USE_XAW)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (!function)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 function = find_in_table (instance->info->type, xaw_creation_table);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #endif
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (!function)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (dialog_spec_p (instance->info->type))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #if defined (USE_LUCID)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /* not yet */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #endif
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #if defined(USE_MOTIF)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (!function)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 function = xm_create_dialog;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #endif
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #if defined (USE_XAW)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (!function)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 function = xaw_create_dialog;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #endif
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #if defined (USE_OLIT)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /* not yet */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #endif
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (!function)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 printf ("No creation function for widget type %s\n",
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 instance->info->type);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 abort ();
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 instance->widget = (*function) (instance);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (!instance->widget)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 abort ();
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /* XtRealizeWidget (instance->widget);*/
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 void
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 lw_register_widget (type, name, id, val, pre_activate_cb, selection_cb, post_activate_cb)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 char* type;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 char* name;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 LWLIB_ID id;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_value* val;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 lw_callback pre_activate_cb;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 lw_callback selection_cb;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 lw_callback post_activate_cb;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (!get_widget_info (id, False))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 allocate_widget_info (type, name, id, val, pre_activate_cb, selection_cb,
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 post_activate_cb);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 Widget
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 lw_get_widget (id, parent, pop_up_p)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 LWLIB_ID id;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 Widget parent;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 Boolean pop_up_p;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_instance* instance;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 instance = find_instance (id, parent, pop_up_p);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return instance ? instance->widget : NULL;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 Widget
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 lw_make_widget (id, parent, pop_up_p)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 LWLIB_ID id;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 Widget parent;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 Boolean pop_up_p;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_instance* instance;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_info* info;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 instance = find_instance (id, parent, pop_up_p);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (!instance)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 info = get_widget_info (id, False);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (!info)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return NULL;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 instance = allocate_widget_instance (info, parent, pop_up_p);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 initialize_widget_instance (instance);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (!instance->widget)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 abort ();
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return instance->widget;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 Widget
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 lw_create_widget (type, name, id, val, parent, pop_up_p, pre_activate_cb, selection_cb, post_activate_cb)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 char* type;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 char* name;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 LWLIB_ID id;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_value* val;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 Widget parent;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 Boolean pop_up_p;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 lw_callback pre_activate_cb;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 lw_callback selection_cb;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 lw_callback post_activate_cb;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 lw_register_widget (type, name, id, val, pre_activate_cb, selection_cb,
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 post_activate_cb);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return lw_make_widget (id, parent, pop_up_p);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /* destroying the widgets */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static void
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 destroy_one_instance (instance)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_instance* instance;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /* Remove the destroy callback on the widget; that callback will try to
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 dereference the instance object (to set its widget slot to 0, since the
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget is dead.) Since the instance is now dead, we don't have to worry
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 about the fact that its widget is dead too.
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 This happens in the Phase2Destroy of the widget, so this callback would
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 not have been run until arbitrarily long after the instance was freed.
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (instance->widget)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 XtRemoveCallback (instance->widget, XtNdestroyCallback,
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 mark_widget_destroyed, (XtPointer)instance);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (instance->widget)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /* The else are pretty tricky here, including the empty statement
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 at the end because it would be very bad to destroy a widget
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 twice. */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #if defined (USE_LUCID)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (lw_lucid_widget_p (instance->widget))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 xlw_destroy_instance (instance);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 else
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #endif
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #if defined (USE_MOTIF)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (lw_motif_widget_p (instance->widget))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 xm_destroy_instance (instance);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 else
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #endif
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #if defined (USE_OLIT)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (lw_olit_widget_p (instance->widget))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 xol_destroy_instance (instance);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 else
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #endif
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #if defined (USE_XAW)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (lw_xaw_widget_p (instance->widget))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 xaw_destroy_instance (instance);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 else
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #endif
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /* do not remove the empty statement */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 ;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 free_widget_instance (instance);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 void
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 lw_destroy_widget (w)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 Widget w;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_instance* instance = get_widget_instance (w, True);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (instance)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_info *info = instance->info;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /* instance has already been removed from the list; free it */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 destroy_one_instance (instance);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /* if there are no instances left, free the info too */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (!info->instances)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 lw_destroy_all_widgets (info->id);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 void
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 lw_destroy_all_widgets (id)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 LWLIB_ID id;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_info* info = get_widget_info (id, True);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_instance* instance;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_instance* next;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (info)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 for (instance = info->instances; instance; )
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 next = instance->next;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 destroy_one_instance (instance);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 instance = next;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 free_widget_info (info);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 void
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 lw_destroy_everything ()
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 while (all_widget_info)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 lw_destroy_all_widgets (all_widget_info->id);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 void
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 lw_destroy_all_pop_ups ()
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_info* info;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_info* next;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_instance* instance;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 for (info = all_widget_info; info; info = next)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 next = info->next;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 instance = info->instances;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (instance && instance->pop_up_p)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 lw_destroy_all_widgets (info->id);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #ifdef USE_MOTIF
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 extern Widget first_child (/* Widget */); /* garbage */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #endif
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 Widget
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 lw_raise_all_pop_up_widgets ()
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_info* info;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_instance* instance;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 Widget result = NULL;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 for (info = all_widget_info; info; info = info->next)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 for (instance = info->instances; instance; instance = instance->next)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (instance->pop_up_p)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 Widget widget = instance->widget;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (widget)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (XtIsManaged (widget)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #ifdef USE_MOTIF
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /* What a complete load of crap!!!!
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 When a dialogShell is on the screen, it is not managed!
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 || (lw_motif_widget_p (instance->widget) &&
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 XtIsManaged (first_child (widget)))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #endif
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 )
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (!result)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 result = widget;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 XMapRaised (XtDisplay (widget), XtWindow (widget));
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return result;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static void
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 lw_pop_all_widgets (id, up)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 LWLIB_ID id;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 Boolean up;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_info* info = get_widget_info (id, False);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_instance* instance;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (info)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 for (instance = info->instances; instance; instance = instance->next)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (instance->pop_up_p && instance->widget)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #if defined (USE_LUCID)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (lw_lucid_widget_p (instance->widget))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 XtRealizeWidget (instance->widget);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 xlw_pop_instance (instance, up);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #endif
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #if defined (USE_MOTIF)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (lw_motif_widget_p (instance->widget))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 XtRealizeWidget (instance->widget);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 xm_pop_instance (instance, up);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #endif
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #if defined (USE_OLIT)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (lw_olit_widget_p (instance->widget))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 XtRealizeWidget (instance->widget);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 xol_pop_instance (instance, up);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #endif
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #if defined (USE_XAW)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (lw_xaw_widget_p (instance->widget))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 XtRealizeWidget (XtParent (instance->widget));
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 XtRealizeWidget (instance->widget);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 xaw_pop_instance (instance, up);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #endif
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 void
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 lw_pop_up_all_widgets (id)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 LWLIB_ID id;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 lw_pop_all_widgets (id, True);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 void
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 lw_pop_down_all_widgets (id)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 LWLIB_ID id;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 lw_pop_all_widgets (id, False);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 void
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 lw_popup_menu (widget, event)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 Widget widget;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 XEvent *event;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #if defined (USE_LUCID)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (lw_lucid_widget_p (widget))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 xlw_popup_menu (widget, event);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #endif
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #if defined (USE_MOTIF)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (lw_motif_widget_p (widget))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 xm_popup_menu (widget, event);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #endif
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #if defined (USE_OLIT)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (lw_olit_widget_p (widget))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 xol_popup_menu (widget, event);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #endif
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #if defined (USE_XAW)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (lw_xaw_widget_p (widget))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 xaw_popup_menu (widget, event);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #endif
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /* get the values back */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static Boolean
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 get_one_value (instance, val)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_instance* instance;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_value* val;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 Widget widget = name_to_widget (instance, val->name);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (widget)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #if defined (USE_LUCID)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (lw_lucid_widget_p (instance->widget))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 xlw_update_one_value (instance, widget, val);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #endif
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #if defined (USE_MOTIF)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (lw_motif_widget_p (instance->widget))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 xm_update_one_value (instance, widget, val);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #endif
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #if defined (USE_OLIT)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (lw_olit_widget_p (instance->widget))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 xol_update_one_value (instance, widget, val);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #endif
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #if defined (USE_XAW)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (lw_xaw_widget_p (instance->widget))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 xaw_update_one_value (instance, widget, val);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #endif
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return True;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 else
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return False;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 Boolean
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 lw_get_some_values (id, val_out)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 LWLIB_ID id;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_value* val_out;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_info* info = get_widget_info (id, False);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_instance* instance;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_value* val;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 Boolean result = False;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (!info)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return False;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 instance = info->instances;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (!instance)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return False;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 for (val = val_out; val; val = val->next)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (get_one_value (instance, val))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 result = True;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return result;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_value*
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 lw_get_all_values (id)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 LWLIB_ID id;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_info* info = get_widget_info (id, False);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_value* val = info->val;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (lw_get_some_values (id, val))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return val;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 else
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return NULL;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /* internal function used by the library dependent implementation to get the
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_value for a given widget in an instance */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_value*
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 lw_get_widget_value_for_widget (instance, w)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_instance* instance;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 Widget w;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 char* name = XtName (w);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_value* cur;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 for (cur = instance->info->val; cur; cur = cur->next)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (!strcmp (cur->name, name))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return cur;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return NULL;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /* update other instances value when one thing changed */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /* To forbid recursive calls */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static Boolean lwlib_updating;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /* This function can be used as a an XtCallback for the widgets that get
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 modified to update other instances of the widgets. Closure should be the
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_instance. */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 void
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 lw_internal_update_other_instances (widget, closure, call_data)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 Widget widget;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 XtPointer closure;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 XtPointer call_data;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_instance* instance = (widget_instance*)closure;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 char* name = XtName (widget);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_info* info;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_instance* cur;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_value* val;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /* Avoid possibly infinite recursion. */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (lwlib_updating)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /* protect against the widget being destroyed */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (XtWidgetBeingDestroyedP (widget))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /* Return immediately if there are no other instances */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 info = instance->info;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (!info->instances->next)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 lwlib_updating = True;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 for (val = info->val; val && strcmp (val->name, name); val = val->next);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (val && get_one_value (instance, val))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 for (cur = info->instances; cur; cur = cur->next)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (cur != instance)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 set_one_value (cur, val, True);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 lwlib_updating = False;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /* get the id */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 LWLIB_ID
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 lw_get_widget_id (w)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 Widget w;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_instance* instance = get_widget_instance (w, False);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return instance ? instance->info->id : 0;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /* set the keyboard focus */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 void
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 lw_set_keyboard_focus (parent, w)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 Widget parent;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 Widget w;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #if defined (USE_MOTIF)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 xm_set_keyboard_focus (parent, w);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #else
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 XtSetKeyboardFocus (parent, w);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #endif
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /* Show busy */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 static void
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 show_one_widget_busy (w, flag)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 Widget w;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 Boolean flag;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 Pixel foreground = 0;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 Pixel background = 1;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 Widget widget_to_invert = XtNameToWidget (w, "*sheet");
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (!widget_to_invert)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_to_invert = w;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 XtVaGetValues (widget_to_invert,
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 XtNforeground, &foreground,
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 XtNbackground, &background,
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 0);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 XtVaSetValues (widget_to_invert,
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 XtNforeground, background,
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 XtNbackground, foreground,
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 0);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 void
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 lw_show_busy (w, busy)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 Widget w;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 Boolean busy;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_instance* instance = get_widget_instance (w, False);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_info* info;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 widget_instance* next;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (instance)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 info = instance->info;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (info->busy != busy)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 for (next = info->instances; next; next = next->next)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (next->widget)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 show_one_widget_busy (next->widget, busy);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 info->busy = busy;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /* This hack exists because Lucid/Athena need to execute the strange
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 function below to support geometry management. */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 void
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 lw_refigure_widget (w, doit)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 Widget w;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 Boolean doit;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #if defined (USE_XAW)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 XawPanedSetRefigureMode (w, doit);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #endif
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #if defined (USE_MOTIF)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 if (doit)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 XtManageChild (w);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 else
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 XtUnmanageChild (w);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #endif
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /* Toolkit independent way of determining if an event window is in the
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 menubar. */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 Boolean
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 lw_window_is_in_menubar (win, menubar_widget)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 Window win;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 Widget menubar_widget;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 return menubar_widget
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #if defined (USE_LUCID)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 && XtWindow (menubar_widget) == win;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #endif
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #if defined (USE_MOTIF)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 && ((XtWindow (menubar_widget) == win)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 || (XtWindowToWidget (XtDisplay (menubar_widget), win)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 && (XtParent (XtWindowToWidget (XtDisplay (menubar_widget), win))
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 == menubar_widget)));
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #endif
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /* Motif hack to set the main window areas. */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 void
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 lw_set_main_areas (parent, menubar, work_area)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 Widget parent;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 Widget menubar;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 Widget work_area;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #if defined (USE_MOTIF)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 xm_set_main_areas (parent, menubar, work_area);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #endif
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 /* Manage resizing for Motif. This disables resizing when the menubar
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 is about to be modified. */
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 void
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 lw_allow_resizing (w, flag)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 Widget w;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 Boolean flag;
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 {
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #if defined (USE_MOTIF)
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 xm_manage_resizing (w, flag);
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 #endif
+ 鐃緒申��申鐃初姐�渇����鐃醇�鐃緒申��申鐃緒申 }