changeset 436:080151679be2 r21-2-26

Import from CVS: tag r21-2-26
author cvs
date Mon, 13 Aug 2007 11:31:24 +0200
parents 53cf74a9db44
children e2a4e8b94b82
files CHANGES-beta ChangeLog lib-src/ChangeLog lisp/ChangeLog lisp/wid-edit.el lwlib/ChangeLog lwlib/xlwtabs.c man/ChangeLog man/internals/internals.texi nt/ChangeLog src/ChangeLog src/data.c src/debug.c src/dialog-x.c src/eval.c src/glyphs-x.c src/gui-x.c src/lisp.h src/menubar-x.c src/nt.c src/process-nt.c src/scrollbar-x.c tests/ChangeLog version.sh
diffstat 24 files changed, 236 insertions(+), 112 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGES-beta	Mon Aug 13 11:30:55 2007 +0200
+++ b/CHANGES-beta	Mon Aug 13 11:31:24 2007 +0200
@@ -1,3 +1,8 @@
+to 21.2.26 "Millenium"
+-- Fix unpredictable results, perhaps even crashes, if using the
+   `return from debugger feature' and errors in `eval' or `funcall'.
+-- fix for Tab widgets causing X errors in XMapWindow().
+
 to 21.2.25 "Hephaestus"
 -- the LATEST.IS.* file has been renamed to LATEST-IS-*.
 -- the CVS tag to checkout the latest tarball is `r21-2-latest-beta'.
--- a/ChangeLog	Mon Aug 13 11:30:55 2007 +0200
+++ b/ChangeLog	Mon Aug 13 11:31:24 2007 +0200
@@ -1,3 +1,7 @@
+1999-12-31  Martin Buchholz <martin@xemacs.org>
+
+	* XEmacs 21.2.26 is released.
+
 1999-12-24  Martin Buchholz <martin@xemacs.org>
 
 	* XEmacs 21.2.25 is released.
--- a/lib-src/ChangeLog	Mon Aug 13 11:30:55 2007 +0200
+++ b/lib-src/ChangeLog	Mon Aug 13 11:31:24 2007 +0200
@@ -1,3 +1,7 @@
+1999-12-31  Martin Buchholz <martin@xemacs.org>
+
+	* XEmacs 21.2.26 is released.
+
 1999-12-24  Martin Buchholz <martin@xemacs.org>
 
 	* XEmacs 21.2.25 is released.
--- a/lisp/ChangeLog	Mon Aug 13 11:30:55 2007 +0200
+++ b/lisp/ChangeLog	Mon Aug 13 11:31:24 2007 +0200
@@ -1,3 +1,15 @@
+1999-12-31  Martin Buchholz <martin@xemacs.org>
+
+	* XEmacs 21.2.26 is released.
+
+1999-12-28  Andy Piper  <andy@xemacs.org>
+
+	* wid-edit.el (widget-push-button-value-create): The gui cache
+	does not agree with native widgets which can only be displayed
+	once per window. The reasons for caching are diminished now that
+	we don't hog resources when creating buttons.
+	(widget-push-button-cache) deleted.
+
 1999-12-24  Martin Buchholz <martin@xemacs.org>
 
 	* XEmacs 21.2.25 is released.
--- a/lisp/wid-edit.el	Mon Aug 13 11:30:55 2007 +0200
+++ b/lisp/wid-edit.el	Mon Aug 13 11:31:24 2007 +0200
@@ -1898,9 +1898,6 @@
   :group 'widgets
   :type 'boolean)
 
-;; Cache already created GUI objects.
-(defvar widget-push-button-cache nil)
-
 (defcustom widget-push-button-prefix "["
   "String used as prefix for buttons."
   :type 'string
@@ -1925,7 +1922,7 @@
 	 (tag-glyph (widget-get widget :tag-glyph))
 	 (text (concat widget-push-button-prefix
 		       tag widget-push-button-suffix))
-	 (gui-glyphs (lax-plist-get widget-push-button-cache tag)))
+	 gui)
     (cond (tag-glyph
 	   (widget-glyph-insert widget text tag-glyph))
 	  ;; We must check for console-on-window-system-p here,
@@ -1933,13 +1930,10 @@
 	  ;; components for colors, and they are not known on TTYs).
 	  ((and widget-push-button-gui
 		(console-on-window-system-p))
-	   (unless gui-glyphs
-	     (let* ((gui-button-shadow-thickness 1)
-		    (gui (make-glyph 
-			  (make-gui-button tag 'widget-gui-action widget))))
-	       (setq gui-glyphs gui)
-	       (laxputf widget-push-button-cache tag gui-glyphs)))
-	   (widget-glyph-insert-glyph widget gui-glyphs))
+	   (let* ((gui-button-shadow-thickness 1))
+	     (setq gui (make-glyph 
+			(make-gui-button tag 'widget-gui-action widget))))
+	   (widget-glyph-insert-glyph widget gui))
 	  (t
 	   (insert text)))))
 
--- a/lwlib/ChangeLog	Mon Aug 13 11:30:55 2007 +0200
+++ b/lwlib/ChangeLog	Mon Aug 13 11:31:24 2007 +0200
@@ -1,3 +1,13 @@
+1999-12-31  Martin Buchholz <martin@xemacs.org>
+
+	* XEmacs 21.2.26 is released.
+
+1999-12-29  Andy Piper  <andy@xemacs.org>
+
+	* xlwtabs.c (TabsHighlight): use displayChildren for highlighting
+	not num_children.
+	(TabsPage): ditto.
+
 1999-12-24  Martin Buchholz <martin@xemacs.org>
 
 	* XEmacs 21.2.25 is released.
--- a/lwlib/xlwtabs.c	Mon Aug 13 11:30:55 2007 +0200
+++ b/lwlib/xlwtabs.c	Mon Aug 13 11:31:24 2007 +0200
@@ -1086,7 +1086,7 @@
 	Widget		newtop = NULL;
 	Widget		*childP ;
 	int		idx ;
-	int		nc = tw->composite.num_children ;
+	int		nc = tw->tabs.displayChildren ;
 
 	if( nc <= 0 )
 	  return ;
@@ -1150,7 +1150,7 @@
 	Widget		newhl = NULL;
 	Widget		*childP ;
 	int		idx ;
-	int		nc = tw->composite.num_children ;
+	int		nc = tw->tabs.displayChildren ;
 
 	if( nc <= 0 )
 	  return ;
--- a/man/ChangeLog	Mon Aug 13 11:30:55 2007 +0200
+++ b/man/ChangeLog	Mon Aug 13 11:31:24 2007 +0200
@@ -1,3 +1,11 @@
+1999-12-31  Martin Buchholz <martin@xemacs.org>
+
+	* XEmacs 21.2.26 is released.
+
+1999-12-26  Karl M. Hegbloom  <karlheg@inetarena.com>
+
+	* internals/internals.texi (garbage_collect_1): Xemacs -> XEmacs
+
 1999-12-24  Martin Buchholz <martin@xemacs.org>
 
 	* XEmacs 21.2.25 is released.
--- a/man/internals/internals.texi	Mon Aug 13 11:30:55 2007 +0200
+++ b/man/internals/internals.texi	Mon Aug 13 11:31:24 2007 +0200
@@ -4882,7 +4882,7 @@
 manually. That is done by the function @code{mark_profiling_info}
 @end itemize
 @item
-Hash tables in Xemacs belong to a kind of special objects that
+Hash tables in XEmacs belong to a kind of special objects that
 make use of a concept often called 'weak pointers'.
 To make a long story short, these kind of pointers are not followed
 during the estimation of the live objects during garbage collection.
--- a/nt/ChangeLog	Mon Aug 13 11:30:55 2007 +0200
+++ b/nt/ChangeLog	Mon Aug 13 11:31:24 2007 +0200
@@ -1,3 +1,7 @@
+1999-12-31  Martin Buchholz <martin@xemacs.org>
+
+	* XEmacs 21.2.26 is released.
+
 1999-12-24  Martin Buchholz <martin@xemacs.org>
 
 	* XEmacs 21.2.25 is released.
--- a/src/ChangeLog	Mon Aug 13 11:30:55 2007 +0200
+++ b/src/ChangeLog	Mon Aug 13 11:31:24 2007 +0200
@@ -1,3 +1,63 @@
+1999-12-31  Martin Buchholz <martin@xemacs.org>
+
+	* XEmacs 21.2.26 is released.
+
+1999-12-31  Andy Piper  <andy@xemacs.org>
+
+	* glyphs-x.c (x_widget_instantiate): Avoid X errors calling
+	XMapWindow() on a NULL pointer X window.
+
+1999-12-31  Martin Buchholz  <martin@xemacs.org>
+
+	* data.c (indirect_function): Use signal_void_function_error().
+
+	* lisp.h: Modify prototypes for signal_*().  Add SUBR_FUNCTION macro.
+
+	* eval.c (PRIMITIVE_FUNCALL): Optimize.
+	(signal_void_function_error): return result of Fsignal().
+	(signal_invalid_function_error): return result of Fsignal().
+	(signal_wrong_number_of_arguments_error): return result of Fsignal().
+	(signal_malformed_list_error): Add DOESNT_RETURN.
+	(signal_malformed_property_list_error): Add DOESNT_RETURN.
+	(signal_circular_list_error): Add DOESNT_RETURN.
+	(signal_circular_property_list_error): Add DOESNT_RETURN.
+	(Feval): Use returned results of signal_*().  Avoids a crash!
+	(Ffuncall): Use returned results of signal_*(). Avoids the crash:
+	  (setq debug-on-error t) (funcall 'foo) kbd{r42} kbd{RET}
+	- Only check for fun_nargs < subr_min_args if fun_nargs != max_args.
+	(function_argcount): Use signal_invalid_function_error().
+	(funcall_lambda): Use signal_wrong_number_of_arguments_error().
+	Use signal_invalid_function_error().
+
+1999-12-28  Andy Piper  <andy@xemacs.org>
+
+	* debug.c: rename debug_loop elements to X_ to avoid name clashes.
+
+	* menubar-x.c (menu_item_descriptor_to_widget_value_1): strdup
+	string_chars.
+	(menu_item_descriptor_to_widget_value_1): strdup name.
+	(pre_activate_callback): strdup name.
+
+	* scrollbar-x.c (scrollbar_instance_to_widget_value): strdup name.
+	(x_update_scrollbar_instance_status): use free_widget_value_tree.
+
+	* dialog-x.c (maybe_run_dbox_text_callback): strdup name.  use
+	free_widget_value_tree.
+	(dbox_descriptor_to_widget_value): ditto.
+
+	* gui-x.c (widget_value_unwind): use free_widget_value_tree.
+	(gui_items_to_widget_values_1): ditto.
+	(gui_items_to_widget_values): ditto.
+	(free_popup_widget_value_tree): free name.
+
+1999-12-27  Andy Piper  <andy@xemacs.org>
+
+	* nt.c (fstat): use get_osfhandle rather than the handle
+	directly. From Fabrice Popineau.
+
+	* process-nt.c (nt_open_network_stream): take types into account
+	when warning. From Fabrice Popineau.
+
 1999-12-24  Martin Buchholz <martin@xemacs.org>
 
 	* XEmacs 21.2.25 is released.
--- a/src/data.c	Mon Aug 13 11:30:55 2007 +0200
+++ b/src/data.c	Mon Aug 13 11:31:24 2007 +0200
@@ -660,7 +660,7 @@
     }
 
   if (errorp && UNBOUNDP (hare))
-    signal_void_function_error (object);
+    return signal_void_function_error (object);
 
   return hare;
 }
--- a/src/debug.c	Mon Aug 13 11:30:55 2007 +0200
+++ b/src/debug.c	Mon Aug 13 11:31:24 2007 +0200
@@ -45,37 +45,37 @@
 
 enum debug_loop
 {
-  ADD,
-  DELETE,
-  LIST,
-  ACTIVE,
-  INIT,
-  VALIDATE,
-  TYPE,
-  SETTYPE
+  X_ADD,
+  X_DELETE,
+  X_LIST,
+  X_ACTIVE,
+  X_INIT,
+  X_VALIDATE,
+  X_TYPE,
+  X_SETTYPE
 };
 
 static Lisp_Object
 xemacs_debug_loop (enum debug_loop op, Lisp_Object class, Lisp_Object type)
 {
-  int flag = (op == ADD) ? 1 : 0;
+  int flag = (op == X_ADD) ? 1 : 0;
   Lisp_Object retval = Qnil;
 
 #define FROB(item)							\
-  if (op == LIST || op == ACTIVE || op == INIT || EQ (class, Q##item))	\
+  if (op == X_LIST || op == X_ACTIVE || op == X_INIT || EQ (class, Q##item))	\
     {									\
-      if (op == ADD || op == DELETE || op == INIT)			\
+      if (op == X_ADD || op == X_DELETE || op == X_INIT)			\
 	active_debug_classes.item = flag;				\
-      else if (op == LIST						\
-	       || (op == ACTIVE && active_debug_classes.item))		\
+      else if (op == X_LIST						\
+	       || (op == X_ACTIVE && active_debug_classes.item))		\
 	retval = Fcons (Q##item, retval);				\
-      else if (op == VALIDATE)						\
+      else if (op == X_VALIDATE)						\
 	return Qt;							\
-      else if (op == SETTYPE)						\
+      else if (op == X_SETTYPE)						\
         active_debug_classes.types_of_##item = XINT (type);		\
-      else if (op == TYPE)						\
+      else if (op == X_TYPE)						\
         retval = make_int (active_debug_classes.types_of_##item);	\
-      if (op == INIT) active_debug_classes.types_of_##item = VALBITS;	\
+      if (op == X_INIT) active_debug_classes.types_of_##item = VALBITS;	\
     }
 
   FROB (redisplay);
@@ -96,12 +96,12 @@
 */
        (class))
 {
-  if (NILP (xemacs_debug_loop (VALIDATE, class, Qnil)))
+  if (NILP (xemacs_debug_loop (X_VALIDATE, class, Qnil)))
     error ("No such debug class exists");
   else
-    xemacs_debug_loop (ADD, class, Qnil);
+    xemacs_debug_loop (X_ADD, class, Qnil);
 
-  return (xemacs_debug_loop (ACTIVE, Qnil, Qnil));
+  return (xemacs_debug_loop (X_ACTIVE, Qnil, Qnil));
 }
 
 DEFUN ("delete-debug-class-to-check", Fdelete_debug_class_to_check, 1, 1, 0, /*
@@ -109,12 +109,12 @@
 */
        (class))
 {
-  if (NILP (xemacs_debug_loop (VALIDATE, class, Qnil)))
+  if (NILP (xemacs_debug_loop (X_VALIDATE, class, Qnil)))
     error ("No such debug class exists");
   else
-    xemacs_debug_loop (DELETE, class, Qnil);
+    xemacs_debug_loop (X_DELETE, class, Qnil);
 
-  return (xemacs_debug_loop (ACTIVE, Qnil, Qnil));
+  return (xemacs_debug_loop (X_ACTIVE, Qnil, Qnil));
 }
 
 DEFUN ("debug-classes-being-checked", Fdebug_classes_being_checked, 0, 0, 0, /*
@@ -122,7 +122,7 @@
 */
        ())
 {
-  return (xemacs_debug_loop (ACTIVE, Qnil, Qnil));
+  return (xemacs_debug_loop (X_ACTIVE, Qnil, Qnil));
 }
 
 DEFUN ("debug-classes-list", Fdebug_classes_list, 0, 0, 0, /*
@@ -130,7 +130,7 @@
 */
        ())
 {
-  return (xemacs_debug_loop (LIST, Qnil, Qnil));
+  return (xemacs_debug_loop (X_LIST, Qnil, Qnil));
 }
 
 DEFUN ("set-debug-classes-to-check", Fset_debug_classes_to_check, 1, 1, 0, /*
@@ -147,14 +147,14 @@
      valid, reject the entire list without doing anything. */
   LIST_LOOP (rest, classes )
     {
-      if (NILP (xemacs_debug_loop (VALIDATE, XCAR (rest), Qnil)))
+      if (NILP (xemacs_debug_loop (X_VALIDATE, XCAR (rest), Qnil)))
 	error ("Invalid object in class list");
     }
 
   LIST_LOOP (rest, classes)
     Fadd_debug_class_to_check (XCAR (rest));
 
-  return (xemacs_debug_loop (ACTIVE, Qnil, Qnil));
+  return (xemacs_debug_loop (X_ACTIVE, Qnil, Qnil));
 }
 
 DEFUN ("set-debug-class-types-to-check", Fset_debug_class_types_to_check, 2, 2, 0, /*
@@ -165,12 +165,12 @@
        (class, type))
 {
   CHECK_INT (type);
-  if (NILP (xemacs_debug_loop (VALIDATE, class, Qnil)))
+  if (NILP (xemacs_debug_loop (X_VALIDATE, class, Qnil)))
     error ("Invalid debug class");
 
-  xemacs_debug_loop (SETTYPE, class, type);
+  xemacs_debug_loop (X_SETTYPE, class, type);
 
-  return (xemacs_debug_loop (TYPE, class, Qnil));
+  return (xemacs_debug_loop (X_TYPE, class, Qnil));
 }
 
 DEFUN ("debug-types-being-checked", Fdebug_types_being_checked, 1, 1, 0, /*
@@ -178,10 +178,10 @@
 */
        (class))
 {
-  if (NILP (xemacs_debug_loop (VALIDATE, class, Qnil)))
+  if (NILP (xemacs_debug_loop (X_VALIDATE, class, Qnil)))
     error ("Invalid debug class");
 
-  return (xemacs_debug_loop (TYPE, class, Qnil));
+  return (xemacs_debug_loop (X_TYPE, class, Qnil));
 }
 
 void
@@ -210,7 +210,7 @@
      the flags should be set here.
      All functions called by this function are "allowed" according
      to emacs.c. */
-  xemacs_debug_loop (INIT, Qnil, Qnil);
+  xemacs_debug_loop (X_INIT, Qnil, Qnil);
 }
 
 void
--- a/src/dialog-x.c	Mon Aug 13 11:30:55 2007 +0200
+++ b/src/dialog-x.c	Mon Aug 13 11:31:24 2007 +0200
@@ -44,7 +44,7 @@
   widget_value *wv;
   int got_some;
   wv = xmalloc_widget_value ();
-  wv->name = (char *) "value";
+  wv->name = xstrdup ("value");
   got_some = lw_get_some_values (id, wv);
   if (got_some)
     {
@@ -56,10 +56,12 @@
 	  void *tmp = LISP_TO_VOID (list2 (text_field_callback,
                                            build_string (text_field_value)));
 	  popup_selection_callback (0, id, (XtPointer) tmp);
-	  xfree (text_field_value);
 	}
     }
-  free_widget_value (wv);
+  /* This code tried to optimize, newing/freeing. This is generally
+     unsafe so we will alwats strdup and always use
+     free_widget_value_tree. */
+  free_widget_value_tree (wv);
 }
 
 static void
@@ -144,7 +146,7 @@
 
   wv_closure = make_opaque_ptr (kids);
   record_unwind_protect (widget_value_unwind, wv_closure);
-  prev->name = (char *) "message";
+  prev->name = xstrdup ("message");
   prev->value = xstrdup (name);
   prev->enabled = 1;
 
@@ -166,7 +168,7 @@
       gui_item = gui_parse_item_keywords (button);
       if (!button_item_to_widget_value (gui_item, wv, allow_text_p, 1))
 	{
-	  free_widget_value (wv);
+	  free_widget_value_tree (wv);
 	  continue;
 	}
 
@@ -178,8 +180,9 @@
       else			/* it's a button */
 	{
 	  allow_text_p = 0;	 /* only allow text field at the front */
-	  wv->value = xstrdup (wv->name);	/* what a mess... */
-	  wv->name = (char *) button_names [n];
+	  if (wv->value)	xfree (wv->value);
+	  wv->value = wv->name;	/* what a mess... */
+	  wv->name = xstrdup (button_names [n]);
 
 	  if (partition_seen)
 	    rbuttons++;
@@ -202,7 +205,7 @@
     widget_value *dbox;
     sprintf (tmp_dbox_name, "%c%dBR%d", type, lbuttons + rbuttons, rbuttons);
     dbox = xmalloc_widget_value ();
-    dbox->name = tmp_dbox_name;
+    dbox->name = xstrdup (tmp_dbox_name);
     dbox->contents = kids;
 
     /* No more need to free the half-filled-in structures. */
--- a/src/eval.c	Mon Aug 13 11:30:55 2007 +0200
+++ b/src/eval.c	Mon Aug 13 11:31:24 2007 +0200
@@ -77,8 +77,7 @@
   Lisp_Object *PF_av = (av);					\
   switch (ac)							\
     {								\
-    default: abort();						\
-    case 0: rv = PRIMITIVE_FUNCALL_1(PF_fn, PF_av, 0); break;	\
+    default:rv = PRIMITIVE_FUNCALL_1(PF_fn, PF_av, 0); break;	\
     case 1: rv = PRIMITIVE_FUNCALL_1(PF_fn, PF_av, 1); break;	\
     case 2: rv = PRIMITIVE_FUNCALL_1(PF_fn, PF_av, 2); break;	\
     case 3: rv = PRIMITIVE_FUNCALL_1(PF_fn, PF_av, 3); break;	\
@@ -2471,47 +2470,48 @@
 
 
 /* Used in core lisp functions for efficiency */
-void
+Lisp_Object
 signal_void_function_error (Lisp_Object function)
 {
-  Fsignal (Qvoid_function, list1 (function));
+  return Fsignal (Qvoid_function, list1 (function));
 }
 
-static void
+Lisp_Object
 signal_invalid_function_error (Lisp_Object function)
 {
-  Fsignal (Qinvalid_function, list1 (function));
+  return Fsignal (Qinvalid_function, list1 (function));
 }
 
-static void
+Lisp_Object
 signal_wrong_number_of_arguments_error (Lisp_Object function, int nargs)
 {
-  Fsignal (Qwrong_number_of_arguments, list2 (function, make_int (nargs)));
+  return Fsignal (Qwrong_number_of_arguments,
+		  list2 (function, make_int (nargs)));
 }
 
 /* Used in list traversal macros for efficiency. */
-void
+DOESNT_RETURN
 signal_malformed_list_error (Lisp_Object list)
 {
-  Fsignal (Qmalformed_list, list1 (list));
+  signal_error (Qmalformed_list, list1 (list));
 }
 
-void
+DOESNT_RETURN
 signal_malformed_property_list_error (Lisp_Object list)
 {
-  Fsignal (Qmalformed_property_list, list1 (list));
+  signal_error (Qmalformed_property_list, list1 (list));
 }
 
-void
+DOESNT_RETURN
 signal_circular_list_error (Lisp_Object list)
 {
-  Fsignal (Qcircular_list, list1 (list));
+  signal_error (Qcircular_list, list1 (list));
 }
 
-void
+DOESNT_RETURN
 signal_circular_property_list_error (Lisp_Object list)
 {
-  Fsignal (Qcircular_property_list, list1 (list));
+  signal_error (Qcircular_property_list, list1 (list));
 }
 
 /************************************************************************/
@@ -3006,7 +3006,7 @@
       else
 	{
 	wrong_number_of_arguments:
-	  signal_wrong_number_of_arguments_error (fun, nargs);
+	  val = signal_wrong_number_of_arguments_error (fun, nargs);
 	}
     }
   else if (COMPILED_FUNCTIONP (fun))
@@ -3094,7 +3094,7 @@
   else /* ! (SUBRP (fun) || COMPILED_FUNCTIONP (fun) || CONSP (fun)) */
     {
     invalid_function:
-      signal_invalid_function_error (fun);
+      val = signal_invalid_function_error (fun);
     }
 
   lisp_eval_depth--;
@@ -3169,14 +3169,15 @@
       int max_args = subr->max_args;
       Lisp_Object spacious_args[SUBR_MAX_ARGS];
 
-      if (fun_nargs < subr->min_args)
-	goto wrong_number_of_arguments;
-
       if (fun_nargs == max_args) /* Optimize for the common case */
 	{
 	funcall_subr:
 	  FUNCALL_SUBR (val, subr, fun_args, max_args);
 	}
+      else if (fun_nargs < subr->min_args)
+	{
+	  goto wrong_number_of_arguments;
+	}
       else if (fun_nargs < max_args)
 	{
 	  Lisp_Object *p = spacious_args;
@@ -3192,8 +3193,7 @@
 	}
       else if (max_args == MANY)
 	{
-	  val = ((Lisp_Object (*) (int, Lisp_Object *)) subr_function (subr))
-	    (fun_nargs, fun_args);
+	  val = SUBR_FUNCTION (subr, MANY) (fun_nargs, fun_args);
 	}
       else if (max_args == UNEVALLED) /* Can't funcall a special form */
 	{
@@ -3202,7 +3202,7 @@
       else
 	{
 	wrong_number_of_arguments:
-	  signal_wrong_number_of_arguments_error (fun, fun_nargs);
+	  val = signal_wrong_number_of_arguments_error (fun, fun_nargs);
 	}
     }
   else if (COMPILED_FUNCTIONP (fun))
@@ -3229,12 +3229,12 @@
     }
   else if (UNBOUNDP (fun))
     {
-      signal_void_function_error (args[0]);
+      val = signal_void_function_error (args[0]);
     }
   else
     {
     invalid_function:
-      signal_invalid_function_error (fun);
+      val = signal_invalid_function_error (fun);
     }
 
   lisp_eval_depth--;
@@ -3310,7 +3310,7 @@
   else
     {
     invalid_function:
-      return Fsignal (Qinvalid_function, list1 (function));
+      return signal_invalid_function_error (function);
     }
 
   {
@@ -3497,10 +3497,10 @@
   return unbind_to (speccount, Fprogn (body));
 
  wrong_number_of_arguments:
-  return Fsignal (Qwrong_number_of_arguments, list2 (fun, make_int (nargs)));
+  return signal_wrong_number_of_arguments_error (fun, nargs);
 
  invalid_function:
-  return Fsignal (Qinvalid_function, list1 (fun));
+  return signal_invalid_function_error (fun);
 }
 
 
--- a/src/glyphs-x.c	Mon Aug 13 11:30:55 2007 +0200
+++ b/src/glyphs-x.c	Mon Aug 13 11:31:24 2007 +0200
@@ -2465,7 +2465,7 @@
   XtSetArg (al [ac], XtNy, &IMAGE_INSTANCE_X_WIDGET_YOFFSET (ii)); ac++;
   XtGetValues (FRAME_X_TEXT_WIDGET (f), al, ac);
 
-  XtMapWidget (wid);
+  XtSetMappedWhenManaged (wid, TRUE);
 
   free_widget_value_tree (wv);
 }
--- a/src/gui-x.c	Mon Aug 13 11:30:55 2007 +0200
+++ b/src/gui-x.c	Mon Aug 13 11:31:24 2007 +0200
@@ -143,7 +143,7 @@
   widget_value *wv = (widget_value *) get_opaque_ptr (closure);
   free_opaque_ptr (closure);
   if (wv)
-    free_widget_value (wv);
+    free_widget_value_tree (wv);
   return Qnil;
 }
 
@@ -186,6 +186,7 @@
   if (! wv) return;
   if (wv->key) xfree (wv->key);
   if (wv->value) xfree (wv->value);
+  if (wv->name) xfree (wv->name);
 
   wv->name = wv->value = wv->key = (char *) 0xDEADBEEF;
 
@@ -469,7 +470,7 @@
 	prev->next = wv;
       if (!button_item_to_widget_value (items, wv, 0, 1))
 	{
-	  free_widget_value (wv);
+	  free_widget_value_tree (wv);
 	  if (parent)
 	    parent->contents = 0;
 	  else 
@@ -546,7 +547,7 @@
   control = control->contents;
   tmp->next = 0;
   tmp->contents = 0;
-  free_widget_value (tmp);
+  free_widget_value_tree (tmp);
 
   /* No more need to free the half-filled-in structures. */
   set_opaque_ptr (wv_closure, 0);
--- a/src/lisp.h	Mon Aug 13 11:30:55 2007 +0200
+++ b/src/lisp.h	Mon Aug 13 11:31:24 2007 +0200
@@ -936,7 +936,7 @@
 #define CHECK_TRUE_LIST(list) do {			\
   Lisp_Object CTL_list = (list);			\
   Lisp_Object CTL_hare, CTL_tortoise;			\
-  EMACS_INT CTL_len;						\
+  EMACS_INT CTL_len;					\
 							\
   for (CTL_hare = CTL_tortoise = CTL_list, CTL_len = 0;	\
        CONSP (CTL_hare);				\
@@ -1173,8 +1173,10 @@
 #define CHECK_SUBR(x) CHECK_RECORD (x, subr)
 #define CONCHECK_SUBR(x) CONCHECK_RECORD (x, subr)
 
-#define subr_function(subr) (subr)->subr_fn
-#define subr_name(subr) (subr)->name
+#define subr_function(subr) ((subr)->subr_fn)
+#define SUBR_FUNCTION(subr,max_args) \
+  ((Lisp_Object (*) (EXFUN_##max_args)) (subr)->subr_fn)
+#define subr_name(subr) ((subr)->name)
 
 /*********** marker ***********/
 
@@ -2195,11 +2197,15 @@
 Lisp_Object maybe_signal_simple_continuable_error_2 (CONST char *, Lisp_Object,
 						     Lisp_Object, Lisp_Object,
 						     Error_behavior);
-void signal_malformed_list_error (Lisp_Object);
-void signal_malformed_property_list_error (Lisp_Object);
-void signal_circular_list_error (Lisp_Object);
-void signal_circular_property_list_error (Lisp_Object);
-void signal_void_function_error (Lisp_Object);
+DECLARE_DOESNT_RETURN (signal_malformed_list_error (Lisp_Object));
+DECLARE_DOESNT_RETURN (signal_malformed_property_list_error (Lisp_Object));
+DECLARE_DOESNT_RETURN (signal_circular_list_error (Lisp_Object));
+DECLARE_DOESNT_RETURN (signal_circular_property_list_error (Lisp_Object));
+
+Lisp_Object signal_void_function_error (Lisp_Object);
+Lisp_Object signal_invalid_function_error (Lisp_Object);
+Lisp_Object signal_wrong_number_of_arguments_error (Lisp_Object, int);
+
 Lisp_Object run_hook_with_args_in_buffer (struct buffer *, int, Lisp_Object *,
 					  enum run_hooks_condition);
 Lisp_Object run_hook_with_args (int, Lisp_Object *, enum run_hooks_condition);
--- a/src/menubar-x.c	Mon Aug 13 11:30:55 2007 +0200
+++ b/src/menubar-x.c	Mon Aug 13 11:31:24 2007 +0200
@@ -120,7 +120,7 @@
 	}
       else
 	{
-	  wv->name = string_chars;
+	  wv->name = xstrdup (string_chars);
 	  wv->enabled = 1;
 	  /* dverna Dec. 98: command_builder_operate_menu_accelerator will
 	     manipulate the accel as a Lisp_Object if the widget has a name.
@@ -157,6 +157,7 @@
 	  wv->type = CASCADE_TYPE;
 	  wv->enabled = 1;
 	  wv->name = (char *) XSTRING_DATA (LISP_GETTEXT (XCAR (desc)));
+	  wv->name = xstrdup (wv->name);
 
 	  accel = gui_name_accelerator (LISP_GETTEXT (XCAR (desc)));
 	  wv->accel = LISP_TO_VOID (accel);
@@ -226,6 +227,7 @@
 		  incr_wv->type = INCREMENTAL_TYPE;
 		  incr_wv->enabled = 1;
 		  incr_wv->name = wv->name;
+		  incr_wv->name = xstrdup (wv->name);
 		  /* This is automatically GC protected through
 		     the call to lw_map_widget_values(); no need
 		     to worry. */
@@ -242,7 +244,7 @@
 	      widget_value *title_wv = xmalloc_widget_value ();
 	      widget_value *sep_wv = xmalloc_widget_value ();
 	      title_wv->type = TEXT_TYPE;
-	      title_wv->name = wv->name;
+	      title_wv->name = xstrdup (wv->name);
 	      title_wv->enabled = 1;
 	      title_wv->next = sep_wv;
 	      sep_wv->type = SEPARATOR_TYPE;
@@ -258,7 +260,7 @@
 	      widget_value *dummy;
 	      /* Add a fake entry so the menus show up */
 	      wv->contents = dummy = xmalloc_widget_value ();
-	      dummy->name = "(inactive)";
+	      dummy->name = xstrdup ("(inactive)");
 	      dummy->accel = LISP_TO_VOID (Qnil);
 	      dummy->enabled = 0;
 	      dummy->selected = 0;
@@ -273,7 +275,7 @@
 	}
       else if (menubar_root_p)
 	{
-	  wv->name = (char *) "menubar";
+	  wv->name = xstrdup ("menubar");
 	  wv->type = CASCADE_TYPE; /* Well, nothing else seems to fit and
 				      this is ignored anyway...  */
 	}
@@ -469,7 +471,7 @@
 	  wv->accel = LISP_TO_VOID (Qnil);
 	  wv->contents = xmalloc_widget_value ();
 	  wv->contents->type = TEXT_TYPE;
-	  wv->contents->name = (char *) "No menu";
+	  wv->contents->name = xstrdup ("No menu");
 	  wv->contents->next = NULL;
 	  wv->contents->accel = LISP_TO_VOID (Qnil);
 	}
--- a/src/nt.c	Mon Aug 13 11:30:55 2007 +0200
+++ b/src/nt.c	Mon Aug 13 11:31:24 2007 +0200
@@ -1331,7 +1331,7 @@
   buffer->st_ctime = 0;
   buffer->st_mtime = 0;
   buffer->st_nlink = 0;
-  ret = GetFileInformationByHandle((HANDLE) handle, &lpFileInfo);
+  ret = GetFileInformationByHandle((HANDLE) _get_osfhandle(handle), &lpFileInfo);
   if (!ret)
     {
       return -1;
--- a/src/process-nt.c	Mon Aug 13 11:30:55 2007 +0200
+++ b/src/process-nt.c	Mon Aug 13 11:31:24 2007 +0200
@@ -1027,10 +1027,18 @@
 
  connect_failed:  
   closesocket (s);
-  warn_when_safe(Qstream, Qwarning,
-		 "failure to open network stream to host \"%s\" for service \"%s\"",
-		 XSTRING_DATA (host),
-		 XSTRING_DATA (service));
+  if (INTP (service)) {
+    warn_when_safe(Qstream, Qwarning,
+		   "failure to open network stream to host \"%s\" for service \"%d\"",
+		   XSTRING_DATA (host),
+		   (unsigned short) XINT (service));
+  }
+  else {
+    warn_when_safe(Qstream, Qwarning,
+		   "failure to open network stream to host \"%s\" for service \"%s\"",
+		   XSTRING_DATA (host),
+		   XSTRING_DATA (service));
+  }
   report_file_error ("connection failed", list2 (host, name));
 }
 
--- a/src/scrollbar-x.c	Mon Aug 13 11:30:55 2007 +0200
+++ b/src/scrollbar-x.c	Mon Aug 13 11:31:24 2007 +0200
@@ -215,6 +215,7 @@
   wv->scrollbar_data = xnew (scrollbar_values);
 
   wv->name = SCROLLBAR_X_NAME (instance);
+  wv->name = xstrdup (wv->name);
   wv->value = 0;
   wv->key = 0;
   wv->enabled = instance->scrollbar_is_active;
@@ -278,9 +279,7 @@
 	}
 
       if (!wv->scrollbar_data) abort ();
-      xfree (wv->scrollbar_data);
-      wv->scrollbar_data = 0;
-      free_widget_value (wv);
+      free_widget_value_tree (wv);
     }
   else if (managed)
     {
--- a/tests/ChangeLog	Mon Aug 13 11:30:55 2007 +0200
+++ b/tests/ChangeLog	Mon Aug 13 11:31:24 2007 +0200
@@ -1,3 +1,7 @@
+1999-12-31  Martin Buchholz <martin@xemacs.org>
+
+	* XEmacs 21.2.26 is released.
+
 1999-12-24  Martin Buchholz <martin@xemacs.org>
 
 	* XEmacs 21.2.25 is released.
--- a/version.sh	Mon Aug 13 11:30:55 2007 +0200
+++ b/version.sh	Mon Aug 13 11:31:24 2007 +0200
@@ -2,8 +2,8 @@
 emacs_is_beta=t
 emacs_major_version=21
 emacs_minor_version=2
-emacs_beta_version=25
-xemacs_codename="Hephaestus"
+emacs_beta_version=26
+xemacs_codename="Millenium"
 infodock_major_version=4
 infodock_minor_version=0
 infodock_build_version=8