From: tomo Date: Wed, 19 Jan 2000 05:20:10 +0000 (+0000) Subject: XEmacs 21.2.26 "Millenium". X-Git-Tag: r21-2-27~3 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=41e784bb39d67f3906871511cb30805a71a6d6b3;p=chise%2Fxemacs-chise.git.1 XEmacs 21.2.26 "Millenium". --- diff --git a/CHANGES-beta b/CHANGES-beta index 3c9a7d4..7a22198 100644 --- a/CHANGES-beta +++ b/CHANGES-beta @@ -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'. diff --git a/ChangeLog b/ChangeLog index 19b744d..ecb6c94 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +1999-12-31 Martin Buchholz + + * XEmacs 21.2.26 is released. + 1999-12-24 Martin Buchholz * XEmacs 21.2.25 is released. diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 603aea1..db885d4 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,7 @@ +1999-12-31 Martin Buchholz + + * XEmacs 21.2.26 is released. + 1999-12-24 Martin Buchholz * XEmacs 21.2.25 is released. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 681cb60..15aecdc 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,15 @@ +1999-12-31 Martin Buchholz + + * XEmacs 21.2.26 is released. + +1999-12-28 Andy Piper + + * 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 * XEmacs 21.2.25 is released. diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index b8eb856..64a3979 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el @@ -1898,9 +1898,6 @@ If END is omitted, it defaults to the length of LIST." :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 @@ If END is omitted, it defaults to the length of LIST." (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 @@ If END is omitted, it defaults to the length of LIST." ;; 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))))) diff --git a/lwlib/ChangeLog b/lwlib/ChangeLog index 77bcc4c..655f241 100644 --- a/lwlib/ChangeLog +++ b/lwlib/ChangeLog @@ -1,3 +1,13 @@ +1999-12-31 Martin Buchholz + + * XEmacs 21.2.26 is released. + +1999-12-29 Andy Piper + + * xlwtabs.c (TabsHighlight): use displayChildren for highlighting + not num_children. + (TabsPage): ditto. + 1999-12-24 Martin Buchholz * XEmacs 21.2.25 is released. diff --git a/lwlib/xlwtabs.c b/lwlib/xlwtabs.c index efc2954..5ef2acb 100644 --- a/lwlib/xlwtabs.c +++ b/lwlib/xlwtabs.c @@ -1086,7 +1086,7 @@ TabsPage(Widget w, XEvent *event, String *params, Cardinal *num_params) 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 @@ TabsHighlight(Widget w, XEvent *event, String *params, Cardinal *num_params) Widget newhl = NULL; Widget *childP ; int idx ; - int nc = tw->composite.num_children ; + int nc = tw->tabs.displayChildren ; if( nc <= 0 ) return ; diff --git a/man/ChangeLog b/man/ChangeLog index 4c404a1..a163690 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,11 @@ +1999-12-31 Martin Buchholz + + * XEmacs 21.2.26 is released. + +1999-12-26 Karl M. Hegbloom + + * internals/internals.texi (garbage_collect_1): Xemacs -> XEmacs + 1999-12-24 Martin Buchholz * XEmacs 21.2.25 is released. diff --git a/man/internals/internals.texi b/man/internals/internals.texi index 1a85269..f738f74 100644 --- a/man/internals/internals.texi +++ b/man/internals/internals.texi @@ -4882,7 +4882,7 @@ right ones during the sweep phase, they also have to be marked 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. diff --git a/nt/ChangeLog b/nt/ChangeLog index 994629c..993621f 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog @@ -1,3 +1,7 @@ +1999-12-31 Martin Buchholz + + * XEmacs 21.2.26 is released. + 1999-12-24 Martin Buchholz * XEmacs 21.2.25 is released. diff --git a/src/ChangeLog b/src/ChangeLog index df89f68..c5cda0c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,63 @@ +1999-12-31 Martin Buchholz + + * XEmacs 21.2.26 is released. + +1999-12-31 Andy Piper + + * glyphs-x.c (x_widget_instantiate): Avoid X errors calling + XMapWindow() on a NULL pointer X window. + +1999-12-31 Martin Buchholz + + * 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 + + * 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 + + * 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 * XEmacs 21.2.25 is released. diff --git a/src/data.c b/src/data.c index 9cf8ff4..5ae8feb 100644 --- a/src/data.c +++ b/src/data.c @@ -660,7 +660,7 @@ indirect_function (Lisp_Object object, int errorp) } if (errorp && UNBOUNDP (hare)) - signal_void_function_error (object); + return signal_void_function_error (object); return hare; } diff --git a/src/debug.c b/src/debug.c index 3e50d0a..fd0a695 100644 --- a/src/debug.c +++ b/src/debug.c @@ -45,37 +45,37 @@ struct debug_classes active_debug_classes; 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 @@ Add a debug class to the list of active classes. */ (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 @@ Delete a debug class from the list of active classes. */ (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 a list of active debug classes. */ ()) { - 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 a list of all defined debug classes. */ ()) { - 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 @@ CLASSES should be a list of debug classes. 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 @@ Lists of defined types and their values are located in the source code. (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 @@ For the given CLASS, return the associated type value. */ (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 @@ reinit_vars_of_debug (void) 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 diff --git a/src/dialog-x.c b/src/dialog-x.c index a61eee8..dc3ee71 100644 --- a/src/dialog-x.c +++ b/src/dialog-x.c @@ -44,7 +44,7 @@ maybe_run_dbox_text_callback (LWLIB_ID id) 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 @@ maybe_run_dbox_text_callback (LWLIB_ID id) 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 @@ dbox_descriptor_to_widget_value (Lisp_Object desc) 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 @@ dbox_descriptor_to_widget_value (Lisp_Object desc) 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 @@ dbox_descriptor_to_widget_value (Lisp_Object desc) 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 @@ dbox_descriptor_to_widget_value (Lisp_Object desc) 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. */ diff --git a/src/eval.c b/src/eval.c index 6ace437..1992302 100644 --- a/src/eval.c +++ b/src/eval.c @@ -77,8 +77,7 @@ struct backtrace *backtrace_list; 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 @@ signal_quit (void) /* 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 @@ Evaluate FORM and return its value. 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 @@ Evaluate FORM and return its value. 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 @@ Thus, (funcall 'cons 'x 'y) returns (x . y). 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 @@ Thus, (funcall 'cons 'x 'y) returns (x . y). } 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 @@ Thus, (funcall 'cons 'x 'y) returns (x . y). 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 @@ Thus, (funcall 'cons 'x 'y) returns (x . y). } 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 @@ function_argcount (Lisp_Object function, int function_min_args_p) else { invalid_function: - return Fsignal (Qinvalid_function, list1 (function)); + return signal_invalid_function_error (function); } { @@ -3497,10 +3497,10 @@ funcall_lambda (Lisp_Object fun, int nargs, Lisp_Object args[]) 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); } diff --git a/src/glyphs-x.c b/src/glyphs-x.c index e837548..b162822 100644 --- a/src/glyphs-x.c +++ b/src/glyphs-x.c @@ -2465,7 +2465,7 @@ x_widget_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, 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); } diff --git a/src/gui-x.c b/src/gui-x.c index 9714d02..7cb4f92 100644 --- a/src/gui-x.c +++ b/src/gui-x.c @@ -143,7 +143,7 @@ widget_value_unwind (Lisp_Object closure) 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 @@ free_popup_widget_value_tree (widget_value *wv) 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 @@ gui_items_to_widget_values_1 (Lisp_Object items, widget_value* parent, 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 @@ gui_items_to_widget_values (Lisp_Object items) 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); diff --git a/src/lisp.h b/src/lisp.h index e61b07e..8c05fdd 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -936,7 +936,7 @@ TRUE_LIST_P (Lisp_Object object) #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 @@ DECLARE_LRECORD (subr, Lisp_Subr); #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 signal_simple_continuable_error_2 (CONST char *, 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); diff --git a/src/menubar-x.c b/src/menubar-x.c index fecb4a7..c15e271 100644 --- a/src/menubar-x.c +++ b/src/menubar-x.c @@ -120,7 +120,7 @@ menu_item_descriptor_to_widget_value_1 (Lisp_Object desc, } 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 @@ menu_item_descriptor_to_widget_value_1 (Lisp_Object desc, 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 @@ menu_item_descriptor_to_widget_value_1 (Lisp_Object desc, 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 @@ menu_item_descriptor_to_widget_value_1 (Lisp_Object desc, 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 @@ menu_item_descriptor_to_widget_value_1 (Lisp_Object desc, 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 @@ menu_item_descriptor_to_widget_value_1 (Lisp_Object desc, } 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 @@ pre_activate_callback (Widget widget, LWLIB_ID id, XtPointer client_data) 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); } diff --git a/src/nt.c b/src/nt.c index 0c99c25..45e9ae5 100644 --- a/src/nt.c +++ b/src/nt.c @@ -1331,7 +1331,7 @@ fstat (int handle, struct stat *buffer) 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; diff --git a/src/process-nt.c b/src/process-nt.c index 1bdc703..2afa597 100644 --- a/src/process-nt.c +++ b/src/process-nt.c @@ -1027,10 +1027,18 @@ nt_open_network_stream (Lisp_Object name, Lisp_Object host, Lisp_Object service, 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)); } diff --git a/src/scrollbar-x.c b/src/scrollbar-x.c index 7034321..e06f598 100644 --- a/src/scrollbar-x.c +++ b/src/scrollbar-x.c @@ -215,6 +215,7 @@ scrollbar_instance_to_widget_value (struct scrollbar_instance *instance) 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 @@ x_update_scrollbar_instance_status (struct window *w, int active, int size, } 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) { diff --git a/tests/ChangeLog b/tests/ChangeLog index f14354d..b4234ab 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,7 @@ +1999-12-31 Martin Buchholz + + * XEmacs 21.2.26 is released. + 1999-12-24 Martin Buchholz * XEmacs 21.2.25 is released. diff --git a/version.sh b/version.sh index 81f4da1..97bafe3 100644 --- a/version.sh +++ b/version.sh @@ -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