Mercurial > hg > xemacs-beta
diff src/ChangeLog @ 5495:1f0b15040456
Merge.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sun, 01 May 2011 18:44:03 +0100 |
parents | 861f2601a38b 159face738c3 |
children | eb4eeec50f25 |
line wrap: on
line diff
--- a/src/ChangeLog Sat Feb 20 06:03:00 2010 -0600 +++ b/src/ChangeLog Sun May 01 18:44:03 2011 +0100 @@ -1,3 +1,4090 @@ +2011-05-01 Aidan Kehoe <kehoea@parhasard.net> + + * lread.c (parse_integer): + GMP's mpz_set_string deals with a leading plus badly, make sure it + never sees one coming from this function. + +2010-12-31 Mike Kupfer <mike.kupfer@xemacs.org> + + * redisplay.c (pixel_to_glyph_translation): + Handle redisplay edge case. + With motion events when entering a frame and the minibuffer is + active, row and column can be zero, and there aren't any runes. + +2011-04-30 Stephen J. Turnbull <stephen@xemacs.org> + + * specifier.c (Fspecifier_matching_instance): + Add comment about backward-incompatibility of MATCHSPEC. + +2011-04-29 Stephen J. Turnbull <stephen@xemacs.org> + + * XEmacs 21.5.31 "ginger" is released. + +2011-04-26 Stephen J. Turnbull <stephen@xemacs.org> + + * XEmacs 21.5.30 "garlic" is released. + +2011-04-23 Aidan Kehoe <kehoea@parhasard.net> + + * editfns.c: + * editfns.c (syms_of_editfns): + Implement #'char= in cl-extra.el, not here, accepting more than + two arguments as Common Lisp specifies. + +2011-04-17 Jeff Sparkes <jsparkes@gmail.com> + + * device-tty.c (tty_device_system_metrics): Fix compile issues for + C89 compilers. Use log() instead of log2(). + +2011-04-04 Aidan Kehoe <kehoea@parhasard.net> + + * fns.c (count_with_tail): + This can be legitimately called from #'delete* with a specified + COUNT keyword value, accept this in the assertion. + * fns.c (FdeleteX): + * fns.c (FremoveX): + If COUNT is specified and FROM-END is non-nil, set COUNT to nil in + the argument vector, so count_with_tail doesn't see it when + calculating the total number of times an item occurs. Fixes + problems with the interaction of :count and :from-end. + +2011-04-04 Aidan Kehoe <kehoea@parhasard.net> + + * fns.c (FremoveX): + * fns.c (sublis): + Correct some nesting of GCPRO and UNGCPRO here, revealed by the + the C++ build compiling core Lisp. Thank you Mats' buildbot! + +2011-04-04 Aidan Kehoe <kehoea@parhasard.net> + + * lisp.h (GC_EXTERNAL_LIST_LOOP_3, GC_EXTERNAL_LIST_LOOP_4): New. + * fns.c (count_with_tail, list_position_cons_before, FassocX): + * fns.c (FrassocX, position, FdeleteX, FremoveX): + * fns.c (list_delete_duplicates_from_end): + * fns.c (Fdelete_duplicates, Fremove_duplicates, Freduce): + * fns.c (Fnsubstitute, Fsubstitute, sublis, nsublis, Fnsublis): + * fns.c (venn, nvenn, Funion, Fset_exclusive_or, Fnset_exclusive_or): + Use GC_EXTERNAL_LIST_LOOP_* in the sequence functions in fns.c + where appropriate, there were some corner cases where my old + approach was unsafe (mainly if the circularity checking's tortoise + lost GCPRO protection. + Add GC_EXTERNAL_LIST_LOOP_{3,4}, analogous to + GC_EXTERNAL_LIST_LOOP_2. + +2011-03-28 Jeff Sparkes <jsparkes@gmail.com> + + * console-tty-impl.h (struct tty_console): Add field for number of + displayable colors. + * device-tty.c (tty_device_system_metrics): Return metrics for + num-color-cells and num-bit-planes. Tracker issue 757. + * device.c: There are two required args for device-system-metric. + * redisplay-tty.c (init_tty_for_redisplay): Retrieve number of + colors from terminal description. Default to 2 if none found. + +2011-03-24 Jerry James <james@xemacs.org> + + * alloc.c (listu): Assemble the list in the right order so we don't + have to reverse it. + (listn): Ditto. + * dired.c (Ffile_attributes): Use listn instead of building an array + to pass to Flist. GC protect the mode string. + * editfns.c (Fdecode_time): Use listn instead of Flist. + * faces.c (vars_of_faces): Use listu instead of Flist. + +2011-03-24 Jerry James <james@xemacs.org> + + * README.kkcc: "occured" -> "occurred". + * alloc.c (malloced_storage_size): "supress" -> "suppress". + * buffer.c: "intial" -> "initial". + * elhash.c (Fdefine_hash_table_test): "analagous" -> "analogous". + * emacs.c: "targetting" -> "targeting". + (shut_down_emacs): "recurrance" -> "reoccurrence". + * event-stream.c: "accidentaly" -> "accidentally", and fix grammar. + * extents.c: "occuring" -> "occurring". + * faces.c (update_face_cachel_data): "appart" -> "apart", "begining" + -> "beginning". + * file-coding.c (Vkeyboard_coding_system): "interpet" -> "interpret". + * fileio.c (Fmake_temp_name): "analagous" -> "analogous". + * fontcolor-gtk.c: "sucess" -> "success". + * frame-gtk.c (gtk_init_frame_2): "carefull" -> "careful", fix + whitespace. + * frame.c: "negotation" -> "negotiation". + * glyphs-msw.c (mswindows_map_subwindow): "everytime" -> "every time". + * glyphs-widget.c: "accomodate" -> "accommodate". + (logical_unit_height): Ditto. + (Fwidget_logical_to_character_height): Ditto. + * gtk-xemacs.c (__nuke_background_items): "noticable" -> "noticeable". + * menubar-gtk.c: "inital" -> "initial". + * mule-ccl.c: "refered" -> "referred to". + * nt.c (mswindows_stat): "noticable" -> "noticeable". + * ntheap.c (recreate_heap): "commited" -> "committed". + * s/cygwin32.h: "konw" -> "know". + * sysdll.c: "dependant" -> "dependent". + * syswindows.h: "targetting" -> "targeting". + * text.c: "reversable" -> "reversible". + * unexcw.c (copy_executable_and_dump_data_section): "addres" -> + "address". + * unicode.c (Funicode_precedence_list): "occurrance" -> "occurrence". + * window.c (struct window_mirror_stats): "Ancilliary" -> "Ancillary". + +2011-03-20 Mats Lidell <matsl@xemacs.org> + + * alloca.c (find_stack_direction): + * alloca.c (xemacs_c_alloca): + Remove use of auto keyword. It is default and will be illegal in + C++0X. + +2011-03-17 Didier Verna <didier@xemacs.org> + + * data.c (init_errors_once_early): Define Qextent_read_only error. + * lisp.h: Declare it. + * extents.c (verify_extent_mapper): Signal an extent-read-only + error instead of a buffer-read-only one. + +2011-03-15 Aidan Kehoe <kehoea@parhasard.net> + + * config.h.in (SUPPORT_CONFOUNDING_FUNCTIONS): New #define, + equivalent NEED_TO_HANDLE_21_4_CODE by default, describing whether + this XEmacs should support the old-eq, old-equal and related + functions and byte codes. + * bytecode.c (UNUSED): + Only interpret old-eq, old-equal, old-memq if + SUPPORT_CONFOUNDING_FUNCTIONS is defined. + * data.c: + Move Fold_eq to fns.c with the rest of the Fold_* functions. + * fns.c: + * fns.c (Fmemq): + * fns.c (memq_no_quit): + * fns.c (assoc_no_quit): + * fns.c (Frassq): + * fns.c (Fequal): + * fns.c (Fold_equal): + * fns.c (syms_of_fns): + Group old-eq, old-equal, old-memq etc together, surround them with + #ifdef SUPPORT_CONFOUNDING_FUNCTIONS. + +2011-03-14 Aidan Kehoe <kehoea@parhasard.net> + + * glyphs-eimage.c (png_instantiate): + Update the PNG handling code to work with versions of the library + where the png_info structure is no longer visible. Thank you for + the report, Robert Delius Royar. + +2011-03-12 Aidan Kehoe <kehoea@parhasard.net> + + * event-stream.c (Fdispatch_event): + As documented, allow pre-command-hook to usefully modify + this-command even when this-command is nil (that is, we would + normally throw an undefined-keystroke-sequence error). Don't throw + that error if this-command was modified, instead try to execute + the new value. + Allow pre-command-hook to modify last-command-event in this + specific context. Don't document this, for the moment. + +2011-03-11 Aidan Kehoe <kehoea@parhasard.net> + + * bytecode.c (optimize_byte_code): + Only transform assignments to keywords to Bdiscard if + NEED_TO_HANDLE_21_4_CODE is turned on. Cf. similar code in + reject_constant_symbols(). + +2011-02-24 Aidan Kehoe <kehoea@parhasard.net> + + * fns.c (Fsubstring_no_properties): + Sigh, get_string_range_char checks the type of its START and END + arguments, but doesn't check the type of its STRING + argument. Thank you Raymond Toy! + +2011-02-19 Aidan Kehoe <kehoea@parhasard.net> + + * fns.c (Fset_exclusive_or): + This function accepts the :stable keyword too, document this in + its arglist. + +2011-02-16 Aidan Kehoe <kehoea@parhasard.net> + + * xemacs.def.in.in: + No longer export acons(), export Facons() instead, thank you Mats, + Jerry and Jeff Sparkes. + +2011-02-10 Aidan Kehoe <kehoea@parhasard.net> + + * fns.c (shortest_length_among_sequences): + This was buggy, it always errored if the last argument was + circular, even if other arguments were non-circular. Correct that. + +2011-02-09 Aidan Kehoe <kehoea@parhasard.net> + + * alloc.c (Facons): + * alloc.c (Fobject_memory_usage): + * alloc.c (syms_of_alloc): + * faces.c (complex_vars_of_faces): + * lisp.h: + * mc-alloc.c (Fmc_alloc_memory_usage): + Rename acons() to Facons(), make it visible to Lisp. Change uses + of the function in C accordingly. + +2011-02-07 Aidan Kehoe <kehoea@parhasard.net> + + * keymap.c (describe_map_sort_predicate): Correct the order of + arguments to map_keymap_sort_predicate() here. Thanks again, Mats. + +2011-02-06 Aidan Kehoe <kehoea@parhasard.net> + + * symbols.c (Fapropos_internal): + Supply check_string_lessp_nokey explicitly as the CHECK_MERGE + argument to list_sort(), NULL no longer works. Thank you Mats + Lidell in IRC! + +2011-02-05 Aidan Kehoe <kehoea@parhasard.net> + + * fns.c: + * fns.c (check_lss_key, check_lss_key_car): New. + * fns.c (check_string_lessp_key check_string_lessp_key_car): New. + * fns.c (get_merge_predicate): New. + * fns.c (list_merge): + * fns.c (array_merge): + * fns.c (list_array_merge_into_list): + * fns.c (list_list_merge_into_array): + * fns.c (list_array_merge_into_array): + * fns.c (Fmerge): + * fns.c (list_sort): + * fns.c (array_sort): + * fns.c (FsortX): + * fns.c (syms_of_fns): + * lisp.h: + Move #'sort, #'merge to using the same test approach as is used in + the functions that take TEST, TEST-NOT and KEY arguments. This + allows us to avoid the Ffuncall() overhead when the most common + PREDICATE arguments are supplied, in particular #'< and + #'string-lessp. + + * fontcolor-msw.c (sort_font_list_function): + * fontcolor-msw.c (mswindows_enumerate_fonts): + * dired.c: + * dired.c (Fdirectory_files): + * fileio.c: + * fileio.c (build_annotations): + * fileio.c (syms_of_fileio): + * keymap.c: + * keymap.c (keymap_submaps): + * keymap.c (map_keymap_sort_predicate): + * keymap.c (describe_map_sort_predicate): + * keymap.c (describe_map): + Change the various C predicates passed to list_sort () and + list_merge () to fit the new calling convention, returning + non-zero if the first argument is less than the second, zero + otherwise. + +2011-01-30 Michael Sperber <mike@xemacs.org> + + * redisplay.h: + * redisplay.c: + (redisplay_cancel_ritual_suicide): + * eval.c (throw_or_bomb_out_unsafe): + * device-x.c (x_IO_error_handler): Don't commit suicide when an X + device dies. + +2011-01-23 Aidan Kehoe <kehoea@parhasard.net> + + * file-coding.c (complex_vars_of_file_coding): + * intl-win32.c (complex_vars_of_intl_win32): + * profile.c (Fget_profiling_info): + * unicode.c (complex_vars_of_unicode): + Replace various awkward calls to nconc2 () with list6 () with + analogous calls to Ben's relatively-recently introduced listu (), + constructing a list from an arbitrary number of C arguments. + +2011-01-18 Mike Sperber <mike@xemacs.org> + + * s/freebsd.h: Zap. Not really needed anymore, and it has unclear + license status. + +2011-01-15 Aidan Kehoe <kehoea@parhasard.net> + + * s/usg5-4.h (PTY_NAME_SPRINTF, PTY_TTY_NAME_SPRINTF): + That didn't work; attempt with qxestrcpy_ascii(), + qxestrncpy_ascii(). + +2011-01-14 Aidan Kehoe <kehoea@parhasard.net> + + * s/hpux11.h (PTY_TTY_NAME_SPRINTF, PTY_NAME_SPRINTF): + * s/usg5-4.h (PTY_TTY_NAME_SPRINTF, PTY_NAME_SPRINTF): + Replace sprintf() with qxesprintf(), strcpy with qxestrpy(), + hopefully fixing some platform-specific C++ builds. + +2011-01-14 Aidan Kehoe <kehoea@parhasard.net> + + * fns.c (Ffind): Use the correct subr information here, pass in + the DEFAULT keyword argument value correctly. + +2011-01-11 Aidan Kehoe <kehoea@parhasard.net> + + * device-msw.c (Fmswindows_printer_list): Remove a Fdelete () + call here, remove the necessity for it. + * fns.c (Fdelete, Fdelq): + * lisp.h: + Move #'delete, #'delq to Lisp, implemented in terms of #'delete* + * select.c (Fown_selection_internal): + * select.c (handle_selection_clear): + Use delq_no_quit() in these functions, don't reimplement it or use + Fdelq(), which is now gone. + +2011-01-10 Aidan Kehoe <kehoea@parhasard.net> + + * mc-alloc.c (get_used_list_index): + Replace some C++ comments with C-style /* comments. + +2011-01-02 Aidan Kehoe <kehoea@parhasard.net> + + * fns.c (FdeleteX, FremoveX, Fnsubstitute, Fsubstitute, syms_of_fns): + Don't repeat the declaration and DEFSYMBOL() for Qnintersection in + this file; don't assume that bignums are always available. Fixes + some of the build problems the buildbot is showing me at the + moment. + (syms_of_fns): Remove a couple more duplicate symbol declarations. + +2011-01-01 Aidan Kehoe <kehoea@parhasard.net> + + * data.c (print_ephemeron, print_weak_list, print_weak_box): + Be more helpful in printing these structures; show their contents, + print their UIDs so it's possible to distinguish between them. + +2010-12-30 Aidan Kehoe <kehoea@parhasard.net> + + Move the heavy lifting from cl-seq.el to C, finally making those + functions first-class XEmacs citizens, with circularity checking, + built-in support for tests other than #'eql, and as much + compatibility with current Common Lisp as Paul Dietz' tests require. + + * fns.c (check_eq_nokey, check_eq_key, check_eql_nokey) + (check_eql_key, check_equal_nokey, check_equal_key) + (check_equalp_nokey, check_equalp_key, check_string_match_nokey) + (check_string_match_key, check_other_nokey, check_other_key) + (check_if_nokey, check_if_key, check_match_eq_key) + (check_match_eql_key, check_match_equal_key) + (check_match_equalp_key, check_match_other_key): New. These are + basically to provide function pointers to be used by Lisp + functions that take TEST, TEST-NOT and KEY arguments. + + (get_check_match_function_1, get_check_test_function) + (get_check_match_function): These functions work out which of the + previous list of functions to use, given the keywords supplied by + the user. + + (count_with_tail): New. This is the bones of #'count. + (list_count_from_end, string_count_from_end): Utility functions + for #'count. + (Fcount): New, moved from cl-seq.el. + (list_position_cons_before): New. The implementation of #'member*, + and important in implementing various other functions. + + (FmemberX, Fadjoin, FassocX, FrassocX, Fposition, Ffind) + (FdeleteX, FremoveX, Fdelete_duplicates, Fremove_duplicates) + (Fnsubstitute, Fsubstitute, Fsublis, Fnsublis, Fsubst, Fnsubst) + (Ftree_equal, Fmismatch, Fsearch, Fintersection, Fnintersection) + (Fsubsetp, Fset_difference, Fnset_difference, Fnunion, Funion) + (Fset_exclusive_or, Fnset_exclusive_or): New, moved here from + cl-seq.el. + + (position): New. The implementation of #'find and #'position. + (list_delete_duplicates_from_end, subst, sublis, nsublis) + (tree_equal, mismatch_from_end, mismatch_list_list) + (mismatch_list_string, mismatch_list_array) + (mismatch_string_array, mismatch_string_string) + (mismatch_array_array, get_mismatch_func): Helper C functions for + the Lisp-visible functions. + (venn, nvenn): New. The implementation of the main Lisp functions that + treat lists as sets. + +2010-12-30 Aidan Kehoe <kehoea@parhasard.net> + + * lisp.h (DECLARE_N_KEYWORDS_8, DECLARE_N_KEYWORDS_9) + (CHECK_N_KEYWORDS_8, CHECK_N_KEYWORDS_9): + Support up to nine keywords in the PARSE_KEYWORDS() macro. + +2010-12-30 Aidan Kehoe <kehoea@parhasard.net> + + * elhash.c (syms_of_elhash): + * chartab.c (syms_of_chartab): + * abbrev.c (syms_of_abbrev): + * general-slots.h: + Move Qcount, Q_default, Q_test to general-slots.h, they're about + to be used by other files. Rename Q_default to Q_default_, for the + sake of the PARSE_KEYWORDS macro (given that default is a reserved + identifier in C). Add SYMBOL_KEYWORD_GENERAL(), analogous to + SYMBOL_GENERAL() to make this easier. + +2010-12-29 Aidan Kehoe <kehoea@parhasard.net> + + * floatfns.c (Ffloat): If we've been handed a bigfloat here, it's + appropriate to give the same bigfloat back. + +2010-11-30 Aidan Kehoe <kehoea@parhasard.net> + + * fns.c (Ffill): + Move all declarations before statements, for the sake of the + Visual Studio build. Thank you Vin! + +2010-11-24 Aidan Kehoe <kehoea@parhasard.net> + + * font-mgr.c (Ffc_pattern_get): Fix my last change when both + --with-union-type and --with-xft are specified, thank you Robert + Delius Royar! + +2010-11-20 Aidan Kehoe <kehoea@parhasard.net> + + * abbrev.c (Fexpand_abbrev): + * alloc.c: + * alloc.c (Fmake_list): + * alloc.c (Fmake_vector): + * alloc.c (Fmake_bit_vector): + * alloc.c (Fmake_byte_code): + * alloc.c (Fmake_string): + * alloc.c (vars_of_alloc): + * bytecode.c (UNUSED): + * bytecode.c (Fbyte_code): + * chartab.c (decode_char_table_range): + * cmds.c (Fself_insert_command): + * data.c (check_integer_range): + * data.c (Fnatnump): + * data.c (Fnonnegativep): + * data.c (Fstring_to_number): + * elhash.c (hash_table_size_validate): + * elhash.c (decode_hash_table_size): + * eval.c (Fbacktrace_frame): + * event-stream.c (lisp_number_to_milliseconds): + * event-stream.c (Faccept_process_output): + * event-stream.c (Frecent_keys): + * event-stream.c (Fdispatch_event): + * events.c (Fmake_event): + * events.c (Fevent_timestamp): + * events.c (Fevent_timestamp_lessp): + * events.h: + * events.h (struct command_builder): + * file-coding.c (gzip_putprop): + * fns.c: + * fns.c (check_sequence_range): + * fns.c (Frandom): + * fns.c (Fnthcdr): + * fns.c (Flast): + * fns.c (Fnbutlast): + * fns.c (Fbutlast): + * fns.c (Fmember): + * fns.c (Ffill): + * fns.c (Freduce): + * fns.c (replace_string_range_1): + * fns.c (Freplace): + * font-mgr.c (Ffc_pattern_get): + * frame-msw.c (msprinter_set_frame_properties): + * glyphs.c (check_valid_xbm_inline): + * indent.c (Fmove_to_column): + * intl-win32.c (mswindows_multibyte_to_unicode_putprop): + * lisp.h: + * lisp.h (ARRAY_DIMENSION_LIMIT): + * lread.c (decode_mode_1): + * mule-ccl.c (ccl_get_compiled_code): + * number.h: + * process-unix.c (unix_open_multicast_group): + * process.c (Fset_process_window_size): + * profile.c (Fstart_profiling): + * unicode.c (Funicode_to_char): + Change NATNUMP to return 1 for positive bignums; changes uses of + it and of CHECK_NATNUM appropriately, usually by checking for an + integer in an appropriate range. + Add array-dimension-limit and use it in #'make-vector, + #'make-string. Add array-total-size-limit, array-rank-limit while + we're at it, for the sake of any Common Lisp-oriented code that + uses these limits. + Rename check_int_range to check_integer_range, have it take + Lisp_Objects (and thus bignums) instead. + Remove bignum_butlast(), just set int_n to an appropriately large + integer if N is a bignum. + Accept bignums in check_sequence_range(), change the functions + that use check_sequence_range() appropriately. + Move the definition of NATNUMP() to number.h; document why it's a + reasonable name, contradicting an old comment. + +2010-11-17 Aidan Kehoe <kehoea@parhasard.net> + + * fns.c (bignum_butlast): New. + (Fnbutlast, Fbutlast): Use it. + In #'butlast and #'nbutlast, if N is a bignum, we should always + return nil. Bug revealed by Paul Dietz' test suite, thank you + Paul. + +2010-11-15 Aidan Kehoe <kehoea@parhasard.net> + + * .gdbinit.in: Remove lrecord_type_popup_data, + lrecord_type_window_configuration from this file, they're not + used, and their presence breaks pobj in GDB at runtime for me. + +2010-11-14 Aidan Kehoe <kehoea@parhasard.net> + + * fns.c (Fnreverse): + Check that non-list sequences are writable from Lisp before + modifying them. (There's an argument that we should do this for + list sequences too, but for the moment other code (e.g. #'setcar) + doesn't.) + (mapcarX): Initialise lisp_vals_staging, lisp_vals_type + explicitly, for the sake of compile warnings. Check if + lisp_vals_staging is non-NULL when deciding whether to replace a + string's range. + (Fsome): Cross-reference to #'find-if in the doc string for this + function. + (Freduce): GCPRO accum in this function, when a key argument is + specicified it can be silently garbage-collected. When deciding + whether to iterate across a string, check whether the cursor + exceeds the byte len; while iterating, increment an integer + counter. Don't ABORT() if check_sequence_range() returns when + handed a suspicious sequence; it is legal to supply the length of + SEQUENCE as the :end keyword value, and this will provoke our + suspicions, legitimately enough. (Problems with this function + revealed by Paul Dietz' ANSI test suite, thank you Paul Dietz.) + (Freplace): Check list sequence lengths using the arguments, not + the conses we're currently looking at, thank you Paul Dietz. + +2010-11-14 Aidan Kehoe <kehoea@parhasard.net> + + * fns.c (Frandom): Correct the docstring here, the name of the + argument is LIMIT, not N. + +2010-11-06 Aidan Kehoe <kehoea@parhasard.net> + + * bytecode.c (bytecode_nreverse): Call Fnreverse() if SEQUENCE is + not a cons in this function. + (Fnreverse, Freverse): + Accept sequences, not just lists, in these functions. + +2010-11-06 Aidan Kehoe <kehoea@parhasard.net> + + * fns.c (Flist_length): Error if LIST is dotted in this function; + document this behaviour. + +2010-10-25 Aidan Kehoe <kehoea@parhasard.net> + + * specifier.c (specifier_instance_from_inst_list): + Call call_with_suspended_errors() with ERROR_ME_WARN, explicitly; + avoids the problem Giacomo Boffi describes in + http://mid.gmane.org/19617.52517.341117.388679@aiuole.stru.polimi.it + , but the specifier instantiation bug that makes XEmacs fail for + him is still visible. + +2010-10-25 Aidan Kehoe <kehoea@parhasard.net> + + * print.c (ulong_to_bit_string): If printing zero, actually print + a zero, don't return the empty string. + +2010-07-06 Stephen J. Turnbull <stephen@xemacs.org> + + * emodules.c (emodules_load): + Add one more dereference on f = dll_variable() in three places. + We then use EXTERNAL_TO_ITEXT on it, which returns an alloca'd + string, so I delete the unneeded alloca copy statements. + Fixes error reported by Anders Odberg, confirmed in + <rfawrpfhm3l.fsf@fangorn.uio.no>. + +2010-06-14 Stephen J. Turnbull <stephen@xemacs.org> + + * ui-byhand.c: + * gtk-glue.c: + Add copyright notice based on internal evidence. + +2010-06-14 Stephen J. Turnbull <stephen@xemacs.org> + + * number.h: Another permission consistency fix. + +2010-10-14 Aidan Kehoe <kehoea@parhasard.net> + + * fns.c (Fnbutlast, Fbutlast): + Tighten up Common Lisp compatibility for these two functions; they + need to operate on dotted lists without erroring. + +2010-10-12 Aidan Kehoe <kehoea@parhasard.net> + + * fns.c (list_merge): + Circularity checking here needs to be done independently for each + list, they can't share a loop counter. Thank you for the bug + report, Robert Pluim! + +2010-09-20 Aidan Kehoe <kehoea@parhasard.net> + + * lisp.h (GET_DEFUN_LISP_OBJECT): Make the NEW_GC version of this + work, remove a needless and unhelpful semicolon. + (GET_DEFUN_LISP_OBJECT): Remove a needless semicolon from the + non-NEW_GC version of this. + (PARSE_KEYWORDS): Fix the indentation for the DEBUG_XEMACS + version of this macro. + (PARSE_KEYWORDS): Use GET_DEFUN_LISP_OBJECT() for both the NEW_GC + and non-NEW_GC versions of this macro, when working out the + function's min args. + +2010-09-18 Aidan Kehoe <kehoea@parhasard.net> + + * lisp.h (PARSE_KEYWORDS): + Turns out #elsif is not valid preprocessor syntax, who knew! + +2010-09-18 Aidan Kehoe <kehoea@parhasard.net> + + * lisp.h (PARSE_KEYWORDS): + Correct the NEW_GC non-DEBUG_XEMACS version of this macro; under + such builds S##function is a pointer, not a Lisp_Subr structure. + +2010-09-18 Aidan Kehoe <kehoea@parhasard.net> + + Simplify the API of PARSE_KEYWORDS for callers. + + * lisp.h (PARSE_KEYWORDS): Simply the API, while making the + implementation a little more complex; work out KEYWORDS_OFFSET + from the appropriate Lisp_Subr struct, take the function name as + the C name of the DEFUN rather than a symbol visible as a + Lisp_Object, on debug builds assert that we're actually in the + function so we choke on badly-done copy-and-pasting, + + * lisp.h (PARSE_KEYWORDS_8): New. This is the old PARSE_KEYWORDS. + + * fns.c (Fmerge, FsortX, Ffill, Freduce, Freplace): + Change to use the new PARSE_KEYWORDS syntax. + * elhash.c (Fmake_hash_table): Chance to the new PARSE_KEYWORDS + syntax, rename a define to correspond to what other files use. + + * symbols.c (intern_massaging_name): + * buffer.c (ADD_INT): + Rename intern_converting_underscores_to_dashes() to + intern_massaging_name(), now it does a little more. + +2010-09-18 Aidan Kehoe <kehoea@parhasard.net> + + * termcap.c: + Add a couple of missing includes here, which should fix builds + that use this file. (I have no access to such builds, but Mats' + buildbot shows output that indicates they fail at link time since + DEVICE_BAUD_RATE and IS_DIRECTORY_SEP are available.) + +2010-09-18 Aidan Kehoe <kehoea@parhasard.net> + + * fns.c (Freduce): + Move statements outside of the braces surrounding the + EXTERNAL_LIST_LOOP_3 macro, fixing strict C89 builds. Thank you + for the report, Vin! + +2010-09-16 Aidan Kehoe <kehoea@parhasard.net> + + * fns.c (Flist_length): New, moved here from cl-extra.el, needed + by the next function. + (shortest_length_among_sequences): New. + (Fmapconcat, FmapcarX, Fmapvector, Fmapcan, Fmapc, Fmap) + (Fmap_into, Fsome, Fevery): + Use shortest_length_among_sequences() when working out how many + iterations to do, only giving circular list errors if all + arguments are circular. + +2010-09-16 Aidan Kehoe <kehoea@parhasard.net> + + * fns.c (Fsubseq): + Change the string code to better fit in with the rest of this + function (it still uses get_string_range_char(), though, which *may* + diverge algorithmically from what we're doing). + + If dealing with a cons, only call #'length if we have reason to + believe that the START and END arguments are badly specified, and + check for circular lists ourselves when that's appropriate. + + If dealing with a vector, call Fvector() on the appropriate subset + of the old vector's data directly, don't initialise the result + with nil and then copy. + + (Ffill): + Only check the range arguments for a cons SEQUENCE if we have good + reason to think they were badly specified. + + (Freduce): + Handle multiple values properly. Add bounds checking to this + function, as specificied by ANSI Common Lisp. + +2010-09-16 Aidan Kehoe <kehoea@parhasard.net> + + * eval.c (Ffunction, Fquote): + Add argument information in the arguments: () format for these two + special operators. + +2010-09-07 Aidan Kehoe <kehoea@parhasard.net> + + * fns.c (Freplace): + Replace an accidental double semi-colon with a single semi-colon, + hopefully fixing Vin's Visual Studio 6 build. (Visual Studio 2005 + had no problem with it, oddly.) + +2010-09-06 Aidan Kehoe <kehoea@parhasard.net> + + Move #'replace to C; add bounds checking to it and to #'fill. + + * fns.c (Fsubseq, Ffill, mapcarX): + Don't #'nreverse in #'subseq, use fill_string_range and check + bounds in #'fill, use replace_string_range() in #'map-into + avoiding quadratic time when modfiying the string. + + * fns.c (check_sequence_range, fill_string_range) + (replace_string_range, replace_string_range_1, Freplace): + New functions; check that arguments fit sequence dimensions, fill + a string range with a given character, replace a string range from + an Ibyte pointer. + +2010-09-05 Aidan Kehoe <kehoea@parhasard.net> + + * chartab.c (char_table_default_for_type, + chartab_default_validate): New. + (print_char_table, Freset_char_table, chartab_default_validate) + (chartab_instantiate, structure_type_create_chartab): + Accept keyword :default in the read syntax for char tables, and + print the default when it is not what was expected for the + time. Makes it a little easier to debug things. + +2010-09-05 Aidan Kehoe <kehoea@parhasard.net> + + * editfns.c (Fformat_time_string): + Use two backslashes so that there is at least one present in the + output of describe function, when describing the Roman month + number syntax in this function's docstring. Thanks for provoking + me to look at this, Stephen Turnbull. + +2010-09-03 Aidan Kehoe <kehoea@parhasard.net> + + * symsinit.h: Declare reinit_process_early() here, fixing the C++ + build; thank you for pointing this out, Adam Sjøgren! + * fontcolor-msw.c (mswindows_string_to_color): + Cast the result of bsearch() to a colormap_t pointer, fixing the + Visual Studio 2005 build. + +2010-09-02 Aidan Kehoe <kehoea@parhasard.net> + + * strftime.c (roman_upper, roman_lower, strftime): + Implement Roman month numbers, as used in central and eastern + Europe. + * editfns.c (Fformat_time_string): + Document two new escapes, to allow uppercase and lowercase Roman + month numbers. Remove documentation of a bug that we didn't + actually have. + * text.h (Qtime_function_encoding): We know the text encoding + coming from strftime(), because we always use the one in + strftime.c. Don't use Qnative. + +2010-09-01 Aidan Kehoe <kehoea@parhasard.net> + + * fns.c (list_merge, list_array_merge_into_list) + (list_array_merge_into_array): + Avoid algorithmic complexity surprises when checking for + circularity in these functions. + (Freduce): Fix some formatting, in passing. + + (mapcarX): Drop the SOME_OR_EVERY argument to this function; + instead, take CALLER, a symbol reflecting the Lisp-visible + function that called mapcarX(). Use CALLER with + mapping_interaction_error() when sequences are modified + illegally. Don't cons with #'some, #'every, not even a little. + (Fmapconcat, FmapcarX, Fmapvector, Fmapcan, Fmapc, Fmap) + (Fmap_into, Fsome, Fevery): Call mapcarX() with its new + arguments. + (Fmapcan): Don't unnecessarily complicate the nconc call. + + (maplist): Take CALLER, a symbol reflecting the Lisp-visible + function that called maplist(), rather than having separate + arguments to indicate mapl vs. mapcon. + Avoid algorithmic complexity surprises when checking for + circularity. In #'mapcon, check a given stretch of + result for well-formedness once, which was not previously the + case, despite what the comments said. + (Fmaplist, Fmapl, Fmapcon): + Call maplist() with its new arguments. + +2010-09-02 Aidan Kehoe <kehoea@parhasard.net> + + * process.c (process_getprop, process_putprop, process_remprop) + (process_plist, process_setplist, reinit_process_early): + Add functions to modify a process's property list. + * process-slots.h (MARKED_SLOT): Add a plist slot. + + * fns.c (Fobject_setplist): New function, analogous to #'setplist, + but more general. + Update the documentation in the other plist functions to reflect + that processes now have property lists. + * emacs.c (main_1): Call reinit_process_early(), now processes have + plist methods that need to be initialised. + * symbols.c (reinit_symbol_objects_early): Fsetplist is the named + setplist method for symbols. + +2010-08-30 Aidan Kehoe <kehoea@parhasard.net> + + * floatfns.c (ceiling_one_mundane_arg, floor_one_mundane_arg) + (round_one_mundane_arg, truncate_one_mundane_arg): + INTEGERP is always available, no need to wrap calls to it with + #ifdef HAVE_BIGNUM. + (Fceiling, Ffloor, Fround, Ftruncate, Ffceiling, Fffloor) + (Ffround, Fftruncate): + Correct some code formatting here. + * doprnt.c (emacs_doprnt_1): + Remove some needless #ifdef WITH_NUMBER_TYPES, now number.h is + always #included. + +2010-08-26 Adam Sjøgren <asjo@koldfront.dk> + + * glyphs-eimage.c (gif_instantiate): Try harder to find an + appropriate GIF colormap and then flag an error if one can't be + found. + +2010-08-21 Aidan Kehoe <kehoea@parhasard.net> + + * lread.c (read_escape): + Make error messages better reflect the text that was encountered, + when overlong hex character escapes or non-Latin-1 octal character + escapes are encountered. + +2010-08-15 Aidan Kehoe <kehoea@parhasard.net> + + * print.c (print_symbol): + Escape any symbols that look like ratios, in the same way we do + symbols that look like floats or integers. Prevents confusion in + the Lisp reader. + * lread.c (isratio_string): Make this available even on builds + without HAVE_RATIO, so we can print symbols that look like ratios + with the appropriate escapes. + * lisp.h: + Make isratio_string available even if HAVE_RATIO is not defined. + +2010-07-24 Aidan Kehoe <kehoea@parhasard.net> + + * lisp.h (PARSE_KEYWORDS): + Always accept a nil :allow-other-keys keyword argument, as + described in the ALLOW-OTHER-KEYS-NIL Common Lisp issue writeup, + and as necessary for Paul Dietz' tests for #'reduce. + + * fns.c (mapping_interaction_error): New. + (Freduce): Call mapping_interaction_error when KEY or FUNCTION + have modified a string SEQUENCE such that the byte length of the + string has changed, or such that the current cursor pointer + doesn't point to the beginning of a character. + Cf. the MAPPING-DESTRUCTIVE-INTERACTION Common Lisp issue + writeup. + When traversing a list, GCPRO the part of it we still have to + traverse, to avoid any crashes if FUNCTION or KEY amputate it + behind us and force a garbage collection. + +2010-06-05 Marcus Crestani <crestani@informatik.uni-tuebingen.de> + + * gc.c: + * mc-alloc.c: + Document the new allocator and the new garbage collector. + +2010-06-13 Stephen J. Turnbull <stephen@xemacs.org> + + * elhash.c: + * emacs.c: + * glade.c: + * gtk-glue.c: + * gtk-xemacs.c: + * gtk-xemacs.h: + * m/alpha.h: + * number-gmp.c: + * number-gmp.h: + * number-mp.c: + * number-mp.h: + * number.c: + * number.h: + * s/hpux11-shr.h: + * s/mach-bsd4-3.h: + * s/sco7.h: + * symsinit.h: + * ui-byhand.c: + * ui-gtk.c: + * ui-gtk.h: + Correct FSF address in permission notice. + +2010-06-08 Aidan Kehoe <kehoea@parhasard.net> + + * alloc.c (Fpurecopy): + Moved to obsolete.el as an alias for #'identity, marked obsolete. + +2010-06-06 Aidan Kehoe <kehoea@parhasard.net> + + * fns.c (Freduce): + Move this here from cl-seq.el, avoiding the need to cons. This + has been tested using Paul Dietz' test suite, and everything + applicable passes, with the exception that the + ALLOW-OTHER-KEYS-NIL Common Lisp issue (functions with &key must + *always* accept :allow-other-keys nil) hasn't been implemented. + +2010-06-02 Aidan Kehoe <kehoea@parhasard.net> + + * lread.c (vars_of_lread): + * emacs.c: + (shut_down_emacs, vars_of_emacs, complex_vars_of_emacs): + * device-x.c (get_device_from_display) + (have_xemacs_resources_in_xrdb): + * device-gtk.c (Fgtk_init): + * config.h.in: + Remove all checks for InfoDock. + +2010-06-01 Aidan Kehoe <kehoea@parhasard.net> + + * fns.c (Fsubstring_no_properties): + Add this function, API taken from GNU, though ours drops all + extent data, not just properties. + +2010-06-01 Aidan Kehoe <kehoea@parhasard.net> + + * glyphs.c (syms_of_glyphs): + Remove the definition of Q_data from this file, now it's in + general-slots.h. Problem picked up by a C++ build. + +2010-05-31 Aidan Kehoe <kehoea@parhasard.net> + + * rangetab.c (print_range_table, rangetab_instantiate) + (structure_type_create_rangetab): + * chartab.c (print_char_table, chartab_instantiate) + (structure_type_create_chartab): + * faces.c (syms_of_faces, print_face, face_validate): + + Move structure syntax in these files to using keywords by default, + as is done in Common Lisp and GNU Emacs, accepting for the moment + the older non-keywords syntax too. + + * glyphs.h: No need to have Q_data here. + * general-slots.h: Add Q_data, Q_type here. + + * config.h.in (NEED_TO_HANDLE_21_4_CODE): + New #define, always 1 for the moment, replacing the previous + never-really-used NO_NEED_TO_HANDLE_21_4_CODE, and avoiding + confusing syntax. + + * eval.c (Ffuncall): Wrap the hack that allows #'throw to be + funcalled in #ifdef NEED_TO_HANDLE_21_4_CODE. + * elhash.c (syms_of_elhash): Move Q_type, Q_data to + general-slots.h. Change to NEED_TO_HANDLE_21_4_CODE throughout + this file. + +2010-05-29 Aidan Kehoe <kehoea@parhasard.net> + + * fontcolor-msw.c (mswindows_X_color_map): Sort this, case + insensitively, by the color name. + (colormap_t_compare): New function. + (mswindows_string_to_color): When using symbolic color names, use + binary search, not linear search. + (mswindows_color_list): No need to start from the beginning of the + array and call #'nreverse to get the colors in an intuitive order, + just build the list starting from the end of the array. + +2010-05-28 Marcus Crestani <crestani@informatik.uni-tuebingen.de> + + * window.c (compute_window_usage): Unbreak `show-memory-usage' for + NEW_GC. + +2010-05-28 Marcus Crestani <crestani@informatik.uni-tuebingen.de> + + * mc-alloc.c: + * mc-alloc.c (visit_all_used_page_headers): + * mc-alloc.c (install_page_in_used_list): + * mc-alloc.c (mc_alloc_1): + * mc-alloc.c (init_mc_allocator): + * mc-alloc.c (Fmc_alloc_memory_usage): Allocate lrecord arrays in + own size class. + +2010-05-24 Mike Sperber <mike@xemacs.org> + + * lread.c (read1): Accept #B<binary>, #O<octal>, and #X<hex>, just + like GNU Emacs. + +2010-05-17 Jeff Sparkes <jsparkes@gmail.com> + + * buffer.c (complex_vars_of_buffer): + Add buffer local variables buffer-display-count and + buffer-display-time. + (common_init_complex_vars_of_buffer): + Initialize them here. + + * bufslots.h: Add slots for buffer-display-count and buffer-display-time. + + * window.c (Fset_window_buffer): Update buffer-display-count and + buffer-display-time whenever a buffer is displayed. + +2010-05-16 Aidan Kehoe <kehoea@parhasard.net> + + Move `default-file-system-ignore-case' to C; pay attention to it + in creating the directory hash tables for #'locate-file. Fix a bug + where #'eq was specified when creating directory hash tables in + dired.c. + + * config.h.in (DEFAULT_FILE_SYSTEM_IGNORE_CASE): This is 1 on + Darwin. + * dired.c (make_directory_hash_table): If + #'file-system-ignore-case-p gives non-nil for a directory, created + the associated hash table with #'equalp as its test. Never use + #'eq as a directory hash table test. + * fileio.c (vars_of_fileio): + Move `default-file-system-ignore-case' here, so it can be a + constant boolean reflecting a compile-time #define. + * lisp.h: Update the declaration of make_directory_hash_table; + remove the declaration of wasteful_word_to_lisp, which was + #ifdef'd out. + * lread.c (Flocate_file): Take out a debugging statement from + this function. + (locate_file_refresh_hashing): Call make_directory_hash_table with + a Lisp string, not an Ibyte pointer. + (vars_of_lread): If DEFAULT_FILE_SYSTEM_IGNORE_CASE is defined, + use #'equalp as the hash table test for locate-file-hash-table, + not #'equal. + * s/win32-common.h (DEFAULT_FILE_SYSTEM_IGNORE_CASE): + Case should normally be ignored in file names on Win32. + +2010-04-29 Aidan Kehoe <kehoea@parhasard.net> + + * eval.c (Fquote, Ffunction): Error on more than one argument to + these special operators. + * data.c (syms_of_data): Move Qquote to general-slots.h from this + file, now it's used in eval.c + +2010-04-17 Aidan Kehoe <kehoea@parhasard.net> + + * doc.c (Fdocumentation): + If we have a zero length doc string in DOC, as may happen for + undocumented compiled function objects which nonetheless have file + information stored, return nil. + (Fsnarf_documentation): + DOC info existing for compiled functions without docstrings is + perfectly legitimate, now the file is also used to store file names. + * bytecode.c (set_compiled_function_documentation): + Allow this function to set the documentation successfully for + compiled function objects that don't currently have documentation; + most relevant for functions without docstrings which have file + information stored in DOC. + +2010-04-15 Ben Wing <ben@xemacs.org> + + * device-x.c (x_init_device): + Don't declare something const if we're going to modify it. + Clean up code to follow GNU coding standards. + +2010-04-12 Ben Wing <ben@xemacs.org> + + * specifier.c (specifier_memory_usage): + Disable specifier memory-usage stats for now. Sometimes they can + end up with circularities in them and I'm not sure exactly whats + going on to produce them. + +2010-04-12 Ben Wing <ben@xemacs.org> + + * charset.h: + * lisp.h: + * lisp.h (XREALLOC_ARRAY): + * text.h: + Port charset_codepoint_to_itext(), buffer_itext_to_charset_codepoint(), + EXTBYTE_STRING_TO_ALLOCA(), `enum converr' from ben-unicode-internal, + for use with the mule-wnnfns.c changes. + + * mule-wnnfns.c: + * mule-wnnfns.c (Fwnn_open): + * mule-wnnfns.c (Fwnn_dict_add): + * mule-wnnfns.c (Fwnn_dict_list): + * mule-wnnfns.c (Fwnn_get_zenkouho): + * mule-wnnfns.c (Fwnn_inspect): + * mule-wnnfns.c (Fwnn_bunsetu_kanji): + * mule-wnnfns.c (Fwnn_bunsetu_yomi): + * mule-wnnfns.c (Fwnn_word_info): + * mule-wnnfns.c (Fwnn_dict_search): + * mule-wnnfns.c (Fwnn_get_msg): + * mule-wnnfns.c (Fwnn_fuzokugo_set): + * mule-wnnfns.c (Fwnn_fuzokugo_get): + * mule-wnnfns.c (Fwnn_hinsi_list): + * mule-wnnfns.c (Fwnn_fisys_dict_add): + * mule-wnnfns.c (Fwnn_fiusr_dict_add): + * mule-wnnfns.c (Fwnn_notrans_dict_add): + * mule-wnnfns.c (Fwnn_bmodify_dict_add): + * mule-wnnfns.c (reinit_vars_of_mule_wnn): + * mule-wnnfns.c (vars_of_mule_wnn): + * mule-wnnfns.c (w2m): + * mule-wnnfns.c (m2w): + * mule-wnnfns.c (yes_or_no): + * mule-wnnfns.c (puts2): + * mule-wnnfns.c (check_wnn_server_type): + Mule-ize, borrowed from ben-unicode-internal. + +2010-04-09 Ben Wing <ben@xemacs.org> + + * fileio.c (check_writable): + * fileio.c (Fdo_auto_save): + * redisplay-xlike-inc.c (separate_textual_runs_nomule): + * redisplay-xlike-inc.c (separate_textual_runs_xft_nomule): + * redisplay-xlike-inc.c (separate_textual_runs_xft_mule): + * redisplay-xlike-inc.c (separate_textual_runs_mule): + * redisplay-xlike-inc.c (XLIKE_output_string): + * redisplay-xlike-inc.c (XLIKE_output_vertical_divider): + * redisplay.c (create_text_block): + * redisplay.c (regenerate_window): + * redisplay.c (redisplay_window): + * redisplay.c (redisplay_device): + * redisplay.c (window_line_number): + * redisplay.c (point_would_be_visible): + * redisplay.c (compute_display_line_dynarr_usage): + * specifier.c (prune_specifiers): + * specifier.c (finalize_specifier): + * specifier.c (make_magic_specifier): + * specifier.c (charset_matches_specifier_tag_set_p): + * specifier.c (Fdefine_specifier_tag): + * specifier.c (setup_device_initial_specifier_tags): + * specifier.c (bodily_specifier): + * specifier.c (add_spec_to_ghost_specifier): + * specifier.c (remove_ghost_specifier): + * specifier.c (set_specifier_fallback): + * specifier.c (specifier_instance_from_inst_list): + * specifier.c (set_specifier_caching): + Fix coding style to correspond to GNU standard. + +2010-04-09 Didier Verna <didier@xemacs.org> + + * fontcolor-xlike-inc.c (DEBUG_FONTS2): + * fontcolor-xlike-inc.c (DEBUG_FONTS3): + * fontcolor-xlike-inc.c (DEBUG_FONTS4): + * fontcolor-xlike-inc.c (DEBUG_FONTS_LISP1): + * fontcolor-xlike-inc.c (DEBUG_FONTS_LISP2): + * fontcolor-xlike-inc.c (DEBUG_FONTS_LISP3): + * fontcolor-xlike-inc.c (DEBUG_FONTS_LISP4): Conditionalize + definitions on DEBUG_XEMACS, provide empty definitions otherwise. + +2010-04-06 Ben Wing <ben@xemacs.org> + + * elhash.c (Feq_hash): + Cast to EMACS_INT to fix warning. + + * elhash.c (internal_hash): + * elhash.c (Feql_hash): + Fix spacing before parens. + + * general-slots.h: + * xemacs.def.in.in: + Export Qfixnump to fix eldap.c link error. + +2010-04-06 Aidan Kehoe <kehoea@parhasard.net> + + * toolbar-msw.c (allocate_toolbar_item_id) + (mswindows_output_toolbar): + * menubar-msw.c (allocate_menu_item_id, checksum_menu_item): + * glyphs-msw.c (mswindows_image_instance_hash): + * fontcolor-msw.c (mswindows_color_instance_equal): + * device-msw.c (hash_devmode): + Call internal_hash() with the correct number of arguments, declare + various hash methods with the correct number of arguments, fixing + the Win32 build. Thank you Vin. + +2010-04-06 Aidan Kehoe <kehoea@parhasard.net> + + * frame.c (print_frame): + When printing a frame, print its device, making the output of + #'frame-list a lot more helpful if using gnuclient. + +2010-04-04 Ben Wing <ben@xemacs.org> + + * font-mgr.c: + * font-mgr.c (fc_standard_properties): + * font-mgr.c (Ffc_pattern_p): + * font-mgr.c (Ffc_pattern_create): + * font-mgr.c (Ffc_name_parse): + * font-mgr.c (Ffc_name_unparse): + * font-mgr.c (Ffc_pattern_duplicate): + * font-mgr.c (Ffc_pattern_add): + * font-mgr.c (Ffc_pattern_del): + * font-mgr.c (Ffc_pattern_get): + * font-mgr.c (fc_config_create_using): + * font-mgr.c (fc_strlist_to_lisp_using): + * font-mgr.c (fontset_to_list): + * font-mgr.c (Ffc_config_p): + * font-mgr.c (Ffc_config_create): + * font-mgr.c (Ffc_config_destroy): + * font-mgr.c (Ffc_config_up_to_date): + * font-mgr.c (Ffc_config_build_fonts): + * font-mgr.c (Ffc_config_get_config_dirs): + * font-mgr.c (Ffc_config_get_font_dirs): + * font-mgr.c (Ffc_config_get_config_files): + * font-mgr.c (Ffc_config_get_cache): + * font-mgr.c (Ffc_config_get_fonts): + * font-mgr.c (Ffc_config_set_current): + * font-mgr.c (Ffc_config_get_blanks): + * font-mgr.c (Ffc_config_get_rescan_interval): + * font-mgr.c (Ffc_config_set_rescan_interval): + * font-mgr.c (Ffc_config_app_font_add_file): + * font-mgr.c (Ffc_config_app_font_add_dir): + * font-mgr.c (Ffc_config_app_font_clear): + * font-mgr.c (Ffc_init_load_config): + * font-mgr.c (Ffc_init_load_config_and_fonts): + * font-mgr.c (Ffc_config_get_current): + * font-mgr.c (size): + * font-mgr.c (Ffc_font_render_prepare): + * font-mgr.c (Ffc_font_match): + * font-mgr.c (Ffc_font_sort): + * font-mgr.c (Ffc_init): + * font-mgr.c (Ffc_get_version): + * font-mgr.c (Ffc_init_reinitialize): + * font-mgr.c (Ffc_init_bring_up_to_date): + * font-mgr.c (Fxlfd_font_name_p): + * font-mgr.c (make_xlfd_font_regexp): + * font-mgr.c (syms_of_font_mgr): + * font-mgr.c (vars_of_font_mgr): + * font-mgr.c (complex_vars_of_font_mgr): + Fix the code to conform to GNU style standards. + Rename xft-debug-level to debug-xft. + + * fontcolor-x.c: + * fontcolor-x.c (vars_of_fontcolor_x): + Rename debug-x-objects to debug-x-fonts. + + * fontcolor-xlike-inc.c: + * fontcolor-xlike-inc.c (DEBUG_FONTS1): + * fontcolor-xlike-inc.c (DEBUG_FONTS2): + * fontcolor-xlike-inc.c (DEBUG_FONTS3): + * fontcolor-xlike-inc.c (DEBUG_FONTS4): + * fontcolor-xlike-inc.c (DEBUG_FONTS_LISP1): + * fontcolor-xlike-inc.c (count_hyphens): + * fontcolor-xlike-inc.c (XFUN): + * fontcolor-xlike-inc.c (xlistfonts_checking_charset): + * fontcolor-xlike-inc.c (xft_find_charset_font): + Misc. code fixes, mostly cosmetic. Get rid of some warnings. + Fix the code to conform to GNU style standards. + + * lisp.h: + * print.c: + * print.c (debug_out_lisp): + New function for doing printf-like formatting involving Lisp objects + and outputting to the debug output. + +2010-04-03 Aidan Kehoe <kehoea@parhasard.net> + + * fns.c (Ffill): + Be much more careful about resizing a string argument, update + pointers to within the string data that may have been relocated + with the string resize. Fixes a test hang reported by Vin Shelton; + thanks, Vin. + +2010-04-05 Aidan Kehoe <kehoea@parhasard.net> + + * elhash.h: + * elhash.c (struct Hash_Table_Test, lisp_object_eql_equal) + (lisp_object_eql_hash, lisp_object_equal_equal) + (lisp_object_equal_hash, lisp_object_equalp_hash) + (lisp_object_equalp_equal, lisp_object_general_hash) + (lisp_object_general_equal, Feq_hash, Feql_hash, Fequal_hash) + (Fequalp_hash, define_hash_table_test, Fdefine_hash_table_test) + (init_elhash_once_early, mark_hash_table_tests, string_equalp_hash): + * glyphs.c (vars_of_glyphs): + Add a new hash table test in C, #'equalp. + Make it possible to specify new hash table tests with functions + define_hash_table_test, #'define-hash-table-test. + Use define_hash_table_test() in glyphs.c. + Expose the hash functions (besides that used for #'equal) to Lisp, + for people writing functions to be used with #'define-hash-table-test. + Call define_hash_table_test() very early in temacs, to create the + built-in hash table tests. + + * ui-gtk.c (emacs_gtk_boxed_hash): + * specifier.h (struct specifier_methods): + * specifier.c (specifier_hash): + * rangetab.c (range_table_entry_hash, range_table_hash): + * number.c (bignum_hash, ratio_hash, bigfloat_hash): + * marker.c (marker_hash): + * lrecord.h (struct lrecord_implementation): + * keymap.c (keymap_hash): + * gui.c (gui_item_id_hash, gui_item_hash): + * glyphs.c (image_instance_hash, glyph_hash): + * glyphs-x.c (x_image_instance_hash): + * glyphs-msw.c (mswindows_image_instance_hash): + * glyphs-gtk.c (gtk_image_instance_hash): + * frame-msw.c (mswindows_set_title_from_ibyte): + * fontcolor.c (color_instance_hash, font_instance_hash): + * fontcolor-x.c (x_color_instance_hash): + * fontcolor-tty.c (tty_color_instance_hash): + * fontcolor-msw.c (mswindows_color_instance_hash): + * fontcolor-gtk.c (gtk_color_instance_hash): + * fns.c (bit_vector_hash): + * floatfns.c (float_hash): + * faces.c (face_hash): + * extents.c (extent_hash): + * events.c (event_hash): + * data.c (weak_list_hash, weak_box_hash): + * chartab.c (char_table_entry_hash, char_table_hash): + * bytecode.c (compiled_function_hash): + * alloc.c (vector_hash): + Change the various object hash methods to take a new EQUALP + parameter, hashing appropriately for #'equalp if it is true. + +2010-04-02 Aidan Kehoe <kehoea@parhasard.net> + + * fns.c (FsortX, Ffill): + Don't try to be clever with the ascii_begin string header slot in + these functions, just call init_string_ascii_begin(). + +2010-04-02 Aidan Kehoe <kehoea@parhasard.net> + + Avoid build failure, Apple's g++-4.0.1, Mac OS 10.4. + * sysdll.c (search_linked_libs, dll_variable): Correct some casts + for the C++ build. + * regex.h (END_C_DECLS, BEGIN_C_DECLS): Wrap function declarations + in extern "C" { ... } on the C++ build. + * mule-ccl.c (ccl_driver): Initialise i, silencing a warning on + a C++ build. + * keymap.c (key_desc_list_to_event): + Work around a bug in Apple's g++-4.0.1. + +2010-03-31 Aidan Kehoe <kehoea@parhasard.net> + + * fns.c (STRING_DATA_TO_OBJECT_ARRAY) + (BIT_VECTOR_TO_OBJECT_ARRAY, c_merge_predicate_key) + (c_merge_predicate_nokey, list_merge, array_merge) + (list_array_merge_into_list, list_list_merge_into_array) + (list_array_merge_into_array, CHECK_KEY_ARGUMENT, Fmerge) + (list_sort, array_sort, FsortX): + Move #'sort*, #'fill, #'merge from cl-seq.el to C, extending the + implementations of Fsort, Ffillarray, and merge() to do so. + + * keymap.c (keymap_submaps, map_keymap_sort_predicate) + (describe_map_sort_predicate): + Change the calling semantics of the C sort predicates to return a + non-nil Lisp object if the first argument is less than the second, + rather than C integers. + + * fontcolor-msw.c (sort_font_list_function): + * fileio.c (build_annotations): + * dired.c (Fdirectory_files): + * abbrev.c (Finsert_abbrev_table_description): + Call list_sort instead of Fsort, list_merge instead of merge() in + these functions. + +2010-03-29 Ben Wing <ben@xemacs.org> + + * lisp.h (PRIVATE_UNVERIFIED_LIST_LOOP_7): + Need to cast 0 to void (so both parts of conditional expression + have void type) to fix C++ compilation. + +2010-03-29 Ben Wing <ben@xemacs.org> + + * alloc.c: + * alloc.c (lisp_object_storage_size): + * alloc.c (Fobject_memory_usage): + * alloc.c (lisp_object_memory_usage_full): + Don't crash if passed a non-record object (int or char). + + * alloc.c (tree_memory_usage_1): + * lrecord.h: + New function tree_memory_usage() to return the memory usage of + a tree of conses and/or vectors. + + * lisp.h: + * lisp.h (PRIVATE_UNVERIFIED_LIST_LOOP_7): + Add SAFE_LIST_LOOP_* functions for looping over a list not known + to be correct or non-circular, but without signalling an error -- + instead, just stop enumerating when an error detected. + + * emacs.c (main_1): + * specifier.c: + * specifier.c (specifier_memory_usage): + * specifier.c (vars_of_specifier): + * symsinit.h: + Add memory usage info for specifiers. + +2010-03-28 Ben Wing <ben@xemacs.org> + + * window.c (find_window_mirror_internal): + Stop looking if no window mirror, and return 0. + + * window.c (window_display_lines): + * window.c (window_display_buffer): + * window.c (set_window_display_buffer): + Don't need to update window mirror before calling find_window_mirror + because does the updating automatically. + +2010-03-25 Ben Wing <ben@xemacs.org> + + * alloc.c: + * alloc.c (struct): + * alloc.c (finish_object_memory_usage_stats): + * alloc.c (object_memory_usage_stats): + * alloc.c (Fobject_memory_usage): + * alloc.c (lisp_object_memory_usage_full): + * alloc.c (compute_memusage_stats_length): + * lrecord.h: + * lrecord.h (struct lrecord_implementation): + Add fields to the `lrecord_implementation' structure to list an + offset into the array of extra statistics in a + `struct generic_usage_stats' and a length, listing the first slice + of ancillary Lisp-object memory. Compute automatically in + compute_memusage_stats_length(). Use to add an entry + `FOO-lisp-ancillary-storage' for object type FOO. + + Don't crash when an int or char is given to object-memory-usage, + signal an error instead. + + Add functions lisp_object_memory_usage_full() and + lisp_object_memory_usage() to compute the total memory usage of an + object (sum of object, non-Lisp attached, and Lisp ancillary + memory). + + * array.c: + * array.c (gap_array_memory_usage): + * array.h: + Add function to return memory usage of a gap array. + + * buffer.c (struct buffer_stats): + * buffer.c (compute_buffer_usage): + * buffer.c (vars_of_buffer): + * extents.c (compute_buffer_extent_usage): + * marker.c: + * marker.c (compute_buffer_marker_usage): + * extents.h: + * lisp.h: + Remove `struct usage_stats' arg from compute_buffer_marker_usage() + and compute_buffer_extent_usage() -- these are ancillary Lisp + objects and don't get accumulated into `struct usage_stats'; + change the value of `memusage_stats_list' so that `markers' and + `extents' memory is in Lisp-ancillary, where it belongs. + + In compute_buffer_marker_usage(), use lisp_object_memory_usage() + rather than lisp_object_storage_size(). + + * casetab.c: + * casetab.c (case_table_memory_usage): + * casetab.c (vars_of_casetab): + * emacs.c (main_1): + Add memory usage stats for case tables. + + * lisp.h: + Add comment explaining the `struct generic_usage_stats' more, + as well as the new fields in lrecord_implementation. + + * console-impl.h: + * console-impl.h (struct console_methods): + * scrollbar-gtk.c: + * scrollbar-gtk.c (gtk_compute_scrollbar_instance_usage): + * scrollbar-msw.c: + * scrollbar-msw.c (mswindows_compute_scrollbar_instance_usage): + * scrollbar-x.c: + * scrollbar-x.c (x_compute_scrollbar_instance_usage): + * scrollbar.c: + * scrollbar.c (struct scrollbar_instance_stats): + * scrollbar.c (compute_all_scrollbar_instance_usage): + * scrollbar.c (scrollbar_instance_memory_usage): + * scrollbar.c (scrollbar_objects_create): + * scrollbar.c (vars_of_scrollbar): + * scrollbar.h: + * symsinit.h: + * window.c: + * window.c (find_window_mirror_maybe): + * window.c (struct window_mirror_stats): + * window.c (compute_window_mirror_usage): + * window.c (window_mirror_memory_usage): + * window.c (compute_window_usage): + * window.c (window_objects_create): + * window.c (syms_of_window): + * window.c (vars_of_window): + Redo memory-usage associated with windows, window mirrors, and + scrollbar instances. Should fix crash in find_window_mirror, + among other things. Properly assign memo ry to object memory, + non-Lisp extra memory, and Lisp ancillary memory. For example, + redisplay structures are non-Lisp memory hanging off a window + mirror, not a window; make it an ancillary Lisp-object field. + Window mirrors and scrollbar instances have their own statistics, + among other things. + +2010-03-24 Ben Wing <ben@xemacs.org> + + * array.h: + * array.h (XD_LISP_DYNARR_DESC): + * dumper.c (pdump_register_sub): + * dumper.c (pdump_store_new_pointer_offsets): + * dumper.c (pdump_reloc_one_mc): + * elhash.c: + * gc.c (lispdesc_one_description_line_size): + * gc.c (kkcc_marking): + * lrecord.h: + * lrecord.h (IF_NEW_GC): + * lrecord.h (enum memory_description_type): + * lrecord.h (enum data_description_entry_flags): + * lrecord.h (struct opaque_convert_functions): + Rename XD_LISP_OBJECT_BLOCK_PTR to XD_INLINE_LISP_OBJECT_BLOCK_PTR + and document it in lrecord.h. + + * data.c: + * data.c (finish_marking_weak_lists): + * data.c (continue_marking_ephemerons): + * data.c (finish_marking_ephemerons): + * elhash.c (MARK_OBJ): + * gc.c: + * gc.c (lispdesc_indirect_count_1): + * gc.c (struct): + * gc.c (kkcc_bt_push): + * gc.c (kkcc_gc_stack_push): + * gc.c (kkcc_gc_stack_push_lisp_object): + * gc.c (kkcc_gc_stack_repush_dirty_object): + * gc.c (KKCC_DO_CHECK_FREE): + * gc.c (mark_object_maybe_checking_free): + * gc.c (mark_struct_contents): + * gc.c (mark_lisp_object_block_contents): + * gc.c (register_for_finalization): + * gc.c (mark_object): + * gc.h: + * lisp.h: + * profile.c: + * profile.c (mark_profiling_info_maphash): + Clean up KKCC code related to DEBUG_XEMACS. Rename + kkcc_backtrace() to kkcc_backtrace_1() and add two params: a + `size' arg to control how many stack elements to print and a + `detailed' arg to control whether Lisp objects are printed using + `debug_print()'. Create front-ends to kkcc_backtrace_1() -- + kkcc_detailed_backtrace(), kkcc_short_backtrace(), + kkcc_detailed_backtrace_full(), kkcc_short_backtrace_full(), as + well as shortened versions kbt(), kbts(), kbtf(), kbtsf() -- to + call it with various parameter values. Add an `is_lisp' field to + the stack and backtrace structures and use it to keep track of + whether an object pushed onto the stack is a Lisp object or a + non-Lisp structure; in kkcc_backtrace_1(), don't try to print a + non-Lisp structure as a Lisp object. + + * elhash.c: + * extents.c: + * file-coding.c: + * lrecord.h: + * lrecord.h (IF_NEW_GC): + * marker.c: + * marker.c (Fmarker_buffer): + * mule-coding.c: + * number.c: + * rangetab.c: + * specifier.c: + New macros IF_OLD_GC(), IF_NEW_GC() to simplify declaration of + Lisp objects when a finalizer may exist in one but not the other. + Use them appropriately. + + * extents.c (finalize_extent_info): + Don't zero out data->soe and data->extents before trying to free, + else we get memory leaks. + + * lrecord.h (enum lrecord_type): + Make the first lrecord type have value 1 not 0 so that 0 remains + without implementation and attempts to interpret zeroed memory + as a Lisp object will be more obvious. + + * array.c (Dynarr_free): + * device-msw.c (msprinter_delete_device): + * device-tty.c (free_tty_device_struct): + * device-tty.c (tty_delete_device): + * dialog-msw.c (handle_directory_dialog_box): + * dialog-x.c: + * emacs.c (free_argc_argv): + * emodules.c (attempt_module_delete): + * file-coding.c (chain_finalize_coding_stream_1): + * file-coding.c (chain_finalize_coding_stream): + * glyphs-eimage.c: + * glyphs-eimage.c (jpeg_instantiate_unwind): + * glyphs-eimage.c (gif_instantiate_unwind): + * glyphs-eimage.c (png_instantiate_unwind): + * glyphs-eimage.c (tiff_instantiate_unwind): + * imgproc.c: + * imgproc.c (build_EImage_quantable): + * insdel.c (uninit_buffer_text): + * mule-coding.c (iso2022_finalize_detection_state): + * objects-tty.c (tty_finalize_color_instance): + * objects-tty.c (tty_finalize_font_instance): + * objects-tty.c (tty_font_list): + * process.c: + * process.c (finalize_process): + * redisplay.c (add_propagation_runes): + * scrollbar-gtk.c: + * scrollbar-gtk.c (gtk_free_scrollbar_instance): + * scrollbar-gtk.c (gtk_release_scrollbar_instance): + * scrollbar-msw.c: + * scrollbar-msw.c (mswindows_free_scrollbar_instance): + * scrollbar-msw.c (unshow_that_mofo): + * scrollbar-x.c (x_free_scrollbar_instance): + * scrollbar-x.c (x_release_scrollbar_instance): + * select-x.c: + * select-x.c (x_handle_selection_request): + * syntax.c: + * syntax.c (uninit_buffer_syntax_cache): + * text.h (eifree): + If possible, whenever we call xfree() on a field in a structure, + set the field to 0 afterwards. A lot of code is written so that + it checks the value being freed to see if it is non-zero before + freeing it -- doing this and setting the value to 0 afterwards + ensures (a) we won't try to free twice if the cleanup code is + called twice; (b) if the object itself stays around, KKCC won't + crash when attempting to mark the freed field. + + * rangetab.c: + Add a finalization method when not NEW_GC to avoid memory leaks. + (#### We still get memory leaks when NEW_GC; need to convert gap + array to Lisp object). + +2010-03-22 Ben Wing <ben@xemacs.org> + + * Makefile.in.in (objs): + * array.c: + * array.c (gap_array_adjust_markers): + * array.c (gap_array_move_gap): + * array.c (gap_array_make_gap): + * array.c (gap_array_insert_els): + * array.c (gap_array_delete_els): + * array.c (gap_array_make_marker): + * array.c (gap_array_delete_marker): + * array.c (gap_array_delete_all_markers): + * array.c (gap_array_clone): + * array.h: + * depend: + * emacs.c (main_1): + * extents.c: + * extents.c (EXTENT_GAP_ARRAY_AT): + * extents.c (extent_list_num_els): + * extents.c (extent_list_locate): + * extents.c (extent_list_at): + * extents.c (extent_list_delete_all): + * extents.c (allocate_extent_list): + * extents.c (syms_of_extents): + * extents.h: + * extents.h (XEXTENT_LIST_MARKER): + * lisp.h: + * rangetab.c: + * rangetab.c (mark_range_table): + * rangetab.c (print_range_table): + * rangetab.c (range_table_equal): + * rangetab.c (range_table_hash): + * rangetab.c (verify_range_table): + * rangetab.c (get_range_table_pos): + * rangetab.c (Fmake_range_table): + * rangetab.c (Fcopy_range_table): + * rangetab.c (Fget_range_table): + * rangetab.c (put_range_table): + * rangetab.c (Fclear_range_table): + * rangetab.c (Fmap_range_table): + * rangetab.c (unified_range_table_bytes_needed): + * rangetab.c (unified_range_table_copy_data): + * rangetab.c (unified_range_table_lookup): + * rangetab.h: + * rangetab.h (struct range_table_entry): + * rangetab.h (struct Lisp_Range_Table): + * rangetab.h (rangetab_gap_array_at): + * symsinit.h: + Rename dynarr.c to array.c. Move gap array from extents.c to array.c. + Extract dynarr, gap array and stack-like malloc into new file array.h. + Rename GAP_ARRAY_NUM_ELS -> gap_array_length(). Add gap_array_at(), + gap_array_atp(). + + Rewrite range table code to use gap arrays. Make put_range_table() + smarter so that its operation is O(log n) for adding a localized + range. + + * gc.c (lispdesc_block_size_1): + Don't ABORT() when two elements are located at the same place. + This will happen with a size-0 gap array -- both parts of the array + (before and after gap) are in the same place. + +2010-03-21 Ben Wing <ben@xemacs.org> + + * alloc.c: + * alloc.c (assert_proper_sizing): + * alloc.c (c_readonly): + * alloc.c (malloced_storage_size): + * alloc.c (fixed_type_block_overhead): + * alloc.c (lisp_object_storage_size): + * alloc.c (inc_lrecord_stats): + * alloc.c (dec_lrecord_stats): + * alloc.c (pluralize_word): + * alloc.c (object_memory_usage_stats): + * alloc.c (Fobject_memory_usage): + * alloc.c (compute_memusage_stats_length): + * alloc.c (disksave_object_finalization_1): + * alloc.c (Fgarbage_collect): + * mc-alloc.c: + * mc-alloc.c (mc_alloced_storage_size): + * mc-alloc.h: + No functionality change here. Collect the allocations-statistics + code that was scattered throughout alloc.c into one place. Add + remaining section headings so that all sections have headings + clearly identifying the start of the section and its purpose. + Expose mc_alloced_storage_size() even when not MEMORY_USAGE_STATS; + this fixes build problems and is related to the export of + lisp_object_storage_size() and malloced_storage_size() when + non-MEMORY_USAGE_STATS in the previous change set. + +2010-03-22 Vin Shelton <acs@xemacs.org> + + * window.c (vars_of_window): Move HAVE_SCROLLBARS test so the code + can compile under Visual Studio 6. + +2010-03-21 Aidan Kehoe <kehoea@parhasard.net> + + * alloc.c (tick_lrecord_stats): + Fix the union build after Ben's last change, don't assume that a + Lisp_Object will fit into a Bytecount. + +2010-03-20 Ben Wing <ben@xemacs.org> + + * alloc.c: + * alloc.c (init_lrecord_stats): + * alloc.c (free_normal_lisp_object): + * alloc.c (struct): + * alloc.c (clear_lrecord_stats): + * alloc.c (tick_lrecord_stats): + * alloc.c (COUNT_FROB_BLOCK_USAGE): + * alloc.c (COPY_INTO_LRECORD_STATS): + * alloc.c (sweep_strings): + * alloc.c (UNMARK_string): + * alloc.c (gc_sweep_1): + * alloc.c (finish_object_memory_usage_stats): + * alloc.c (object_memory_usage_stats): + * alloc.c (object_dead_p): + * alloc.c (fixed_type_block_overhead): + * alloc.c (lisp_object_storage_size): + * emacs.c (main_1): + * lisp.h: + * lrecord.h: + Export lisp_object_storage_size() and malloced_storage_size() even + when not MEMORY_USAGE_STATS, to get the non-MEMORY_USAGE_STATS + build to compile. + + Don't export fixed_type_block_overhead() any more. + + Some code cleanup, rearrangement, add some section headers. + + Clean up various bugs especially involving computation of overhead + and double-counting certain usage in total_gc_usage. Add + statistics computing the overhead used by all types. Don't add a + special entry for string headers in the object-memory-usage-stats + because it's already present as just "string". But do count the + overhead used by long strings. Don't try to call the + memory_usage() methods when NEW_GC because there's nowhere obvious + in the sweep stage to make the calls. + + * marker.c (compute_buffer_marker_usage): + Just use lisp_object_storage_size() rather than trying to + reimplement it. + +2010-03-19 Ben Wing <ben@xemacs.org> + + * alloc.c: + * alloc.c (struct): + * alloc.c (tick_lrecord_stats): + * alloc.c (gc_sweep_1): + * alloc.c (finish_object_memory_usage_stats): + * alloc.c (object_memory_usage_stats): + * alloc.c (compute_memusage_stats_length): + Call new memory-usage mechanism at sweep time to compute extra + memory utilization for all objects. Add up the values element-by- + element to get an aggregrate set of statistics, where each is the + sum of the values of a single statistic across different objects + of the same type. At end of sweep time, call + finish_object_memory_usage_stats() to add up all the aggreggrate + stats that are related to non-Lisp memory storage to compute + a single value, and add it to the list of values returned by + `garbage-collect' and `object-memory-usage-stats'. + + * buffer.c (compute_buffer_text_usage): + Don't crash on buffers without text (killed buffers?) and don't + double-count indirect buffers. + + * elhash.c: + * elhash.c (hash_table_objects_create): + * elhash.c (vars_of_elhash): + * symsinit.h: + Add memory-usage method to count the size of `hentries'. + + * emacs.c (main_1): + Call new functions in elhash.c, frame.c at init. + + * frame.c: + * frame.c (compute_frame_usage): + * frame.c (frame_memory_usage): + * frame.c (frame_objects_create): + * symsinit.h: + Add memory-usage method to count gutter display structures, + subwindow exposures. + + * gc.c (gc_finish): + * lisp.h: + Declare finish_object_memory_usage_stats(), call it in gc_finish(). + + * lrecord.h (struct lrecord_implementation): + * lrecord.h (INIT_MEMORY_USAGE_STATS): + New value in implementation struct to track number of non-Lisp-memory + statistics. Computed in alloc.c. + + +2010-03-18 Ben Wing <ben@xemacs.org> + + * alloc.c: + * alloc.c (disksave_object_finalization_1): + * alloc.c (lisp_object_storage_size): + * alloc.c (listu): + * alloc.c (listn): + * alloc.c (Fobject_memory_usage_stats): + * alloc.c (compute_memusage_stats_length): + * alloc.c (Fobject_memory_usage): + * alloc.c (Ftotal_object_memory_usage): + * alloc.c (malloced_storage_size): + * alloc.c (common_init_alloc_early): + * alloc.c (reinit_alloc_objects_early): + * alloc.c (reinit_alloc_early): + * alloc.c (init_alloc_once_early): + * alloc.c (syms_of_alloc): + * alloc.c (reinit_vars_of_alloc): + * buffer.c: + * buffer.c (struct buffer_stats): + * buffer.c (compute_buffer_text_usage): + * buffer.c (compute_buffer_usage): + * buffer.c (buffer_memory_usage): + * buffer.c (buffer_objects_create): + * buffer.c (syms_of_buffer): + * buffer.c (vars_of_buffer): + * console-impl.h (struct console_methods): + * dynarr.c (Dynarr_memory_usage): + * emacs.c (main_1): + * events.c (clear_event_resource): + * extents.c: + * extents.c (compute_buffer_extent_usage): + * extents.c (extent_objects_create): + * extents.h: + * faces.c: + * faces.c (compute_face_cachel_usage): + * faces.c (face_objects_create): + * faces.h: + * general-slots.h: + * glyphs.c: + * glyphs.c (compute_glyph_cachel_usage): + * glyphs.c (glyph_objects_create): + * glyphs.h: + * lisp.h: + * lisp.h (struct usage_stats): + * lrecord.h: + * lrecord.h (enum lrecord_type): + * lrecord.h (struct lrecord_implementation): + * lrecord.h (MC_ALLOC_CALL_FINALIZER_FOR_DISKSAVE): + * lrecord.h (DEFINE_DUMPABLE_LISP_OBJECT): + * lrecord.h (DEFINE_DUMPABLE_SIZABLE_LISP_OBJECT): + * lrecord.h (DEFINE_DUMPABLE_FROB_BLOCK_LISP_OBJECT): + * lrecord.h (DEFINE_DUMPABLE_FROB_BLOCK_SIZABLE_LISP_OBJECT): + * lrecord.h (DEFINE_DUMPABLE_INTERNAL_LISP_OBJECT): + * lrecord.h (DEFINE_DUMPABLE_SIZABLE_INTERNAL_LISP_OBJECT): + * lrecord.h (DEFINE_NODUMP_LISP_OBJECT): + * lrecord.h (DEFINE_NODUMP_SIZABLE_LISP_OBJECT): + * lrecord.h (DEFINE_NODUMP_FROB_BLOCK_LISP_OBJECT): + * lrecord.h (DEFINE_NODUMP_FROB_BLOCK_SIZABLE_LISP_OBJECT): + * lrecord.h (DEFINE_NODUMP_INTERNAL_LISP_OBJECT): + * lrecord.h (DEFINE_NODUMP_SIZABLE_INTERNAL_LISP_OBJECT): + * lrecord.h (MAKE_LISP_OBJECT): + * lrecord.h (DEFINE_DUMPABLE_MODULE_LISP_OBJECT): + * lrecord.h (DEFINE_DUMPABLE_MODULE_SIZABLE_LISP_OBJECT): + * lrecord.h (DEFINE_NODUMP_MODULE_LISP_OBJECT): + * lrecord.h (DEFINE_NODUMP_MODULE_SIZABLE_LISP_OBJECT): + * lrecord.h (MAKE_MODULE_LISP_OBJECT): + * lrecord.h (INIT_LISP_OBJECT): + * lrecord.h (INIT_MODULE_LISP_OBJECT): + * lrecord.h (UNDEF_LISP_OBJECT): + * lrecord.h (UNDEF_MODULE_LISP_OBJECT): + * lrecord.h (DECLARE_LISP_OBJECT): + * lrecord.h (DECLARE_MODULE_API_LISP_OBJECT): + * lrecord.h (DECLARE_MODULE_LISP_OBJECT): + * lstream.c: + * lstream.c (syms_of_lstream): + * lstream.c (vars_of_lstream): + * marker.c: + * marker.c (compute_buffer_marker_usage): + * mc-alloc.c (mc_alloced_storage_size): + * mc-alloc.h: + * mule-charset.c: + * mule-charset.c (struct charset_stats): + * mule-charset.c (compute_charset_usage): + * mule-charset.c (charset_memory_usage): + * mule-charset.c (mule_charset_objects_create): + * mule-charset.c (syms_of_mule_charset): + * mule-charset.c (vars_of_mule_charset): + * redisplay.c: + * redisplay.c (compute_rune_dynarr_usage): + * redisplay.c (compute_display_block_dynarr_usage): + * redisplay.c (compute_glyph_block_dynarr_usage): + * redisplay.c (compute_display_line_dynarr_usage): + * redisplay.c (compute_line_start_cache_dynarr_usage): + * redisplay.h: + * scrollbar-gtk.c (gtk_compute_scrollbar_instance_usage): + * scrollbar-msw.c (mswindows_compute_scrollbar_instance_usage): + * scrollbar-x.c (x_compute_scrollbar_instance_usage): + * scrollbar.c (compute_scrollbar_instance_usage): + * scrollbar.h: + * symbols.c: + * symbols.c (reinit_symbol_objects_early): + * symbols.c (init_symbols_once_early): + * symbols.c (reinit_symbols_early): + * symbols.c (defsymbol_massage_name_1): + * symsinit.h: + * ui-gtk.c: + * ui-gtk.c (emacs_gtk_object_getprop): + * ui-gtk.c (emacs_gtk_object_putprop): + * ui-gtk.c (ui_gtk_objects_create): + * unicode.c (compute_from_unicode_table_size_1): + * unicode.c (compute_to_unicode_table_size_1): + * unicode.c (compute_from_unicode_table_size): + * unicode.c (compute_to_unicode_table_size): + * window.c: + * window.c (struct window_stats): + * window.c (compute_window_mirror_usage): + * window.c (compute_window_usage): + * window.c (window_memory_usage): + * window.c (window_objects_create): + * window.c (syms_of_window): + * window.c (vars_of_window): + * window.h: + Redo memory-usage mechanism, make it general; add way of dynamically + initializing Lisp object types -- OBJECT_HAS_METHOD(), similar to + CONSOLE_HAS_METHOD(). + + (1) Create OBJECT_HAS_METHOD(), OBJECT_HAS_PROPERTY() etc. for + specifying that a Lisp object type has a particular method or + property. Call such methods with OBJECT_METH, MAYBE_OBJECT_METH, + OBJECT_METH_OR_GIVEN; retrieve properties with OBJECT_PROPERTY. + Methods that formerly required a DEFINE_*GENERAL_LISP_OBJECT() to + specify them (getprop, putprop, remprop, plist, disksave) now + instead use the dynamic-method mechanism. The main benefit of + this is that new methods or properties can be added without + requiring that the declaration statements of all existing methods + be modified. We have to make the `struct lrecord_implementation' + non-const, but I don't think this should have any effect on speed -- + the only possible method that's really speed-critical is the + mark method, and we already extract those out into a separate + (non-const) array for increased cache locality. + + Object methods need to be reinitialized after pdump, so we put + them in separate functions such as face_objects_create(), + extent_objects_create() and call them appropriately from emacs.c + The only current object property (`memusage_stats_list') that + objects can specify is a Lisp object and gets staticpro()ed so it + only needs to be set during dump time, but because it references + symbols that might not exist in a syms_of_() function, we + initialize it in vars_of_(). There is also an object property + (`num_extra_memusage_stats') that is automatically initialized based + on `memusage_stats_list'; we do that in reinit_vars_of_alloc(), + which is called after all vars_of_() functions are called. + + `disksaver' method was renamed `disksave' to correspond with the + name normally given to the function (e.g. disksave_lstream()). + + (2) Generalize the memory-usage mechanism in `buffer-memory-usage', + `window-memory-usage', `charset-memory-usage' into an object-type- + specific mechanism called by a single function + `object-memory-usage'. (Former function `object-memory-usage' + renamed to `total-object-memory-usage'). Generalize the mechanism + of different "slices" so that we can have different "classes" of + memory described and different "slices" onto each class; `t' + separates classes, `nil' separates slices. Currently we have + three classes defined: the memory of an object itself, + non-Lisp-object memory associated with the object (e.g. arrays or + dynarrs stored as fields in the object), and Lisp-object memory + associated with the object (other internal Lisp objects stored in + the object). This isn't completely finished yet and we might need + to further separate the "other internal Lisp objects" class into + two classes. + + The memory-usage mechanism uses a `struct usage_stats' (renamed + from `struct overhead_stats') to describe a malloc-view onto a set + of allocated memory (listing how much was requested and various + types of overhead) and a more general `struct generic_usage_stats' + (with a `struct usage_stats' in it) to hold all statistics about + object memory. `struct generic_usage_stats' contains an array of + 32 Bytecounts, which are statistics of unspecified semantics. The + intention is that individual types declare a corresponding struct + (e.g. `struct window_stats') with the same structure but with + specific fields in place of the array, corresponding to specific + statistics. The number of such statistics is an object property + computed from the list of tags (Lisp symbols describing the + statistics) stored in `memusage_stats_list'. The idea here is to + allow particular object types to customize the number and + semantics of the statistics where completely avoiding consing. + This doesn't matter so much yet, but the intention is to have the + memory usage of all objects computed at the end of GC, at the same + time as other statistics are currently computed. The values for + all statistics for a single type would be added up to compute + aggregate values for all objects of a specific type. To make this + efficient, we can't allow any memory allocation at all. + + (3) Create some additional functions for creating lists that + specify the elements directly as args rather than indirectly through + an array: listn() (number of args given), listu() (list terminated + by Qunbound). + + (4) Delete a bit of remaining unused C window_config stuff, also + unused lrecord_type_popup_data. + + +2010-03-18 Ben Wing <ben@xemacs.org> + + * tests.c: + * tests.c (Ftest_data_format_conversion): + Need to GCPRO newly created objects or we'll eventually get + a crash due to occurrence of call2(). + +2010-03-16 Ben Wing <ben@xemacs.org> + + * alloc.c (make_lcrecord_list): + * alloc.c (alloc_managed_lcrecord): + Fix compilation problems identified by Robert Delius Royar. + +2010-03-15 Ben Wing <ben@xemacs.org> + + * extents.c (Fprevious_single_property_change): + * extents.c (Fnext_single_char_property_change): + * extents.c (Fprevious_single_char_property_change): + Fix see-also portion of documentation string. + +2010-03-15 Ben Wing <ben@xemacs.org> + + * alloc.c: + * alloc.c (c_readonly): + * alloc.c (deadbeef_memory): + * alloc.c (make_compiled_function): + * alloc.c (make_button_data): + * alloc.c (make_motion_data): + * alloc.c (make_process_data): + * alloc.c (make_timeout_data): + * alloc.c (make_magic_data): + * alloc.c (make_magic_eval_data): + * alloc.c (make_eval_data): + * alloc.c (make_misc_user_data): + * alloc.c (noseeum_make_marker): + * alloc.c (ADDITIONAL_FREE_string): + * alloc.c (common_init_alloc_early): + * alloc.c (init_alloc_once_early): + * bytecode.c (print_compiled_function): + * bytecode.c (mark_compiled_function): + * casetab.c: + * casetab.c (print_case_table): + * console.c: + * console.c (print_console): + * database.c (print_database): + * database.c (finalize_database): + * device-msw.c (sync_printer_with_devmode): + * device-msw.c (print_devmode): + * device-msw.c (finalize_devmode): + * device.c: + * device.c (print_device): + * elhash.c: + * elhash.c (print_hash_table): + * eval.c (print_multiple_value): + * eval.c (mark_multiple_value): + * events.c (deinitialize_event): + * events.c (print_event): + * events.c (event_equal): + * extents.c: + * extents.c (soe_dump): + * extents.c (soe_insert): + * extents.c (soe_delete): + * extents.c (soe_move): + * extents.c (extent_fragment_update): + * extents.c (print_extent_1): + * extents.c (print_extent): + * extents.c (vars_of_extents): + * frame.c: + * frame.c (print_frame): + * free-hook.c: + * free-hook.c (check_free): + * glyphs.c: + * glyphs.c (print_image_instance): + * glyphs.c (print_glyph): + * gui.c: + * gui.c (copy_gui_item): + * hash.c: + * hash.c (NULL_ENTRY): + * hash.c (KEYS_DIFFER_P): + * keymap.c (print_keymap): + * keymap.c (MARKED_SLOT): + * lisp.h: + * lrecord.h: + * lrecord.h (LISP_OBJECT_UID): + * lrecord.h (set_lheader_implementation): + * lrecord.h (struct old_lcrecord_header): + * lstream.c (print_lstream): + * lstream.c (finalize_lstream): + * marker.c (print_marker): + * marker.c (marker_equal): + * mc-alloc.c (visit_all_used_page_headers): + * mule-charset.c: + * mule-charset.c (print_charset): + * objects.c (print_color_instance): + * objects.c (print_font_instance): + * objects.c (finalize_font_instance): + * opaque.c (print_opaque): + * opaque.c (print_opaque_ptr): + * opaque.c (equal_opaque_ptr): + * print.c (internal_object_printer): + * print.c (enum printing_badness): + * rangetab.c (print_range_table): + * rangetab.c (range_table_equal): + * specifier.c (print_specifier): + * specifier.c (finalize_specifier): + * symbols.c: + * symbols.c (print_symbol_value_magic): + * tooltalk.c: + * tooltalk.c (print_tooltalk_message): + * tooltalk.c (print_tooltalk_pattern): + * window.c (print_window): + * window.c (debug_print_window): + (1) Make lrecord UID's have a separate UID space for each object. + Otherwise, with 20-bit UID's, we rapidly wrap around, especially + when common objects like conses and strings increment the UID value + for every object created. (Originally I tried making two UID spaces, + one for objects that always print readably and hence don't display + the UID, and one for other objects. But certain objects like markers + for which a UID is displayed are still generated rapidly enough that + UID overflow is a serious issue.) This also has the advantage of + making UID values smaller, hence easier to remember -- their main + purpose is to make it easier to keep track of different objects of + the same type when debugging code. Make sure we dump lrecord UID's + so that we don't have problems with pdumped and non-dumped objects + having the same UID. + + (2) Display UID's consistently whenever an object (a) doesn't + consistently print readably (objects like cons and string, which + always print readably, can't display a UID), and (b) doesn't + otherwise have a unique property that makes objects of a + particular type distinguishable. (E.g. buffers didn't and still + don't print an ID, but the buffer name uniquely identifies the + buffer.) Some types, such as event, extent, compiled-function, + didn't always (or didn't ever) display an ID; others (such as + marker, extent, lstream, opaque, opaque-ptr, any object using + internal_object_printer()) used to display the actual machine + pointer instead. + + (3) Rename NORMAL_LISP_OBJECT_UID to LISP_OBJECT_UID; make it work + over all Lisp objects and take a Lisp object, not a struct pointer. + + (4) Some misc cleanups in alloc.c, elhash.c. + + (5) Change code in events.c that "deinitializes" an event so that + it doesn't increment the event UID counter in the process. Also + use deadbeef_memory() to overwrite memory instead of doing the same + with custom code. In the process, make deadbeef_memory() in + alloc.c always available, and delete extraneous copy in mc-alloc.c. + Also capitalize all uses of 0xDEADBEEF. Similarly in elhash.c + call deadbeef_memory(). + + (6) Resurrect "debug SOE" code in extents.c. Make it conditional + on DEBUG_XEMACS and on a `debug-soe' variable, rather than on + SOE_DEBUG. Make it output to stderr, not stdout. + + (7) Delete some custom print methods that were identical to + external_object_printer(). + +2010-03-12 Ben Wing <ben@xemacs.org> + + * lisp.h: + * lisp.h (redo-symbols): Removed. + Put the Lisp variables and symbols where they belong, with other + stuff related to the file they're in. + + * event-Xt.c (THIS_IS_X): + * event-Xt.c (syms_of_event_Xt): + * event-Xt.c (reinit_vars_of_event_Xt): + * event-gtk.c: + * event-gtk.c (syms_of_event_gtk): + * event-gtk.c (reinit_vars_of_event_gtk): + * event-stream.c: + * event-stream.c (syms_of_event_stream): + * event-stream.c (reinit_vars_of_event_stream): + * events.c (reinit_vars_of_events): + * events.c (vars_of_events): + `sans-modifiers' was defsymbol'ed more than once. Move it to + events-stream.c. `self-insert-command' was defsymbol'ed more than once. + Vevent_resource should be staticpro_nodump()ed as it's declared in + a reinit_*() method. + + * lread.c (vars_of_lread): + Vfile_domain wasn't staticpro'ed. + + * minibuf.c: + * minibuf.c (reinit_complex_vars_of_minibuf): + Vminibuffer_zero and Vecho_area_buffer weren't staticpro'ed. + +2010-03-12 Ben Wing <ben@xemacs.org> + + * redisplay-msw.c: + * redisplay-msw.c (mswindows_output_dibitmap_region): + * redisplay-msw.c (mswindows_output_pixmap): + * redisplay-msw.c (mswindows_clear_region): + Have a crack at implementing the `absolute' property for + background pixmaps. It seems to work; however, things don't + work quite right in relation to window sizing/moving. In particular, + ideally when you move the window the background should stay in place + but it doesn't; instead it moves, and when you hit C-l it gets + redrawn in the "proper" place. When resizing you get some serious + jitter, apparently as first the image gets moved then redrawn in + the correct offset position. #### Not sure how to fix this. + +2010-03-13 Ben Wing <ben@xemacs.org> + + * alloc.c (alloc_sized_lrecord_1): + * alloc.c (alloc_sized_lrecord_array): + * alloc.c (old_alloc_sized_lcrecord): + * alloc.c (disksave_object_finalization_1): + * alloc.c (mark_lcrecord_list): + * alloc.c (alloc_managed_lcrecord): + * alloc.c (free_managed_lcrecord): + * alloc.c (tick_lcrecord_stats): + * alloc.c (sweep_lcrecords_1): + * buffer.c (print_buffer): + * buffer.c (DEFVAR_BUFFER_LOCAL_1): + * casetab.c: + * casetab.c (print_case_table): + * console.c (print_console): + * console.c (DEFVAR_CONSOLE_LOCAL_1): + * data.c (print_weak_list): + * data.c (print_weak_box): + * data.c (print_ephemeron): + * data.c (ephemeron_equal): + * database.c (print_database): + * database.c (finalize_database): + * device-msw.c (sync_printer_with_devmode): + * device-msw.c (print_devmode): + * device-msw.c (finalize_devmode): + * device.c: + * device.c (print_device): + * elhash.c: + * elhash.c (print_hash_table): + * eval.c (print_subr): + * eval.c (print_multiple_value): + * event-stream.c (event_stream_resignal_wakeup): + * events.c (clear_event_resource): + * events.c (zero_event): + * events.c (print_event): + * extents.c: + * extents.c (print_extent): + * file-coding.c (print_coding_system): + * font-mgr.c: + * font-mgr.c (Ffc_init): + * frame.c: + * frame.c (print_frame): + * gc.c: + * gc.c (GC_CHECK_NOT_FREE): + * glyphs.c: + * glyphs.c (print_image_instance): + * glyphs.c (print_glyph): + * gui.c (print_gui_item): + * gui.c (copy_gui_item): + * keymap.c (print_keymap): + * keymap.c (MARKED_SLOT): + * lisp.h: + * lisp.h (struct Lisp_String): + * lisp.h (DEFUN): + * lisp.h (DEFUN_NORETURN): + * lrecord.h: + * lrecord.h (NORMAL_LISP_OBJECT_UID): + * lrecord.h (struct lrecord_header): + * lrecord.h (set_lheader_implementation): + * lrecord.h (struct old_lcrecord_header): + * lrecord.h (struct free_lcrecord_header): + * marker.c (print_marker): + * mule-charset.c: + * mule-charset.c (print_charset): + * objects.c (print_color_instance): + * objects.c (print_font_instance): + * objects.c (finalize_font_instance): + * print.c (print_cons): + * print.c (printing_unreadable_object_fmt): + * print.c (printing_unreadable_lisp_object): + * print.c (external_object_printer): + * print.c (internal_object_printer): + * print.c (debug_p4): + * print.c (ext_print_begin): + * process.c (print_process): + * rangetab.c (print_range_table): + * rangetab.c (range_table_equal): + * scrollbar.c (free_scrollbar_instance): + * specifier.c (print_specifier): + * specifier.c (finalize_specifier): + * symbols.c (guts_of_unbound_marker): + * symeval.h: + * symeval.h (DEFVAR_SYMVAL_FWD): + * tooltalk.c: + * tooltalk.c (print_tooltalk_message): + * tooltalk.c (print_tooltalk_pattern): + * ui-gtk.c (ffi_object_printer): + * ui-gtk.c (emacs_gtk_object_printer): + * ui-gtk.c (emacs_gtk_boxed_printer): + * window.c (print_window): + * window.c (free_window_mirror): + * window.c (debug_print_window): + * xemacs.def.in.in: + (1) printing_unreadable_object -> printing_unreadable_object_fmt. + (2) printing_unreadable_lcrecord -> printing_unreadable_lisp_object + and fix up so it no longer requires an lcrecord. + + These previous changes eliminate most of the remaining places where + the terms `lcrecord' and `lrecord' occurred outside of specialized + code. + + (3) Fairly major change: Reduce the number of words in an lcrecord + from 3 to 2. The third word consisted of a uid that duplicated the + lrecord uid, and a single free bit, which was moved into the lrecord + structure. This reduces the size of the `uid' slot from 21 bits to + 20 bits. Arguably this isn't enough -- we could easily have more than + 1,000,000 or so objects created in a session. The answer is + (a) It doesn't really matter if we overflow the uid field because + it's only used for debugging, to identify an object uniquely + (or pretty much so). + (b) If we cared about it overflowing and wanted to reduce this, + we could make it so that cons, string, float and certain other + frob-block types that never print out the uid simply don't + store a uid in them and don't increment the lrecord_uid_counter. + + (4) In conjunction with (3), create new macro NORMAL_LISP_OBJECT_UID() + and use it to abstract out the differences between NEWGC and old-GC + in accessing the `uid' value from a "normal Lisp Object pointer". + + (5) In events.c, use zero_nonsized_lisp_object() in place of custom- + written equivalent. In font-mgr.c use external_object_printer() + in place of custom-written equivalents. +2010-03-07 Ben Wing <ben@xemacs.org> + + * number.c (bignum_finalize): + * number.c (ratio_finalize): + * number.c (bigfloat_finalize): + Fix the finalizers to go with the new calling sequence. Done + previously but somehow got lost. + +2010-03-06 Ben Wing <ben@xemacs.org> + + * frame.c (change_frame_size_1): + Add a comment about where FRAME_PIXWIDTH/FRAME_PIXHEIGHT is set. + +2010-03-05 Ben Wing <ben@xemacs.org> + + * frame.c: + * frame.c (Fframe_pixel_height): + * frame.c (Fframe_displayable_pixel_height): + * frame.c (Fframe_pixel_width): + * frame.c (Fframe_displayable_pixel_width): + * frame.c (Fset_frame_pixel_height): + * frame.c (Fset_frame_displayable_pixel_height): + * frame.c (Fset_frame_pixel_width): + * frame.c (Fset_frame_displayable_pixel_width): + * frame.c (get_frame_char_size): + * frame.c (change_frame_size_1): + Make it so that `frame-pixel-height', `set-frame-pixel-height', etc. + use updated values for the displayable or total pixel size that + will reflect what will happen as of the next redisplay. This + basically means using the character-cell height and converting + on-the-fly to pixel units. In the process, make sure FRAME_CHARWIDTH/ + FRAME_CHARHEIGHT are always correct and change + get_frame_char_size() to simply use them; the old logic in that + function was inlined into change_frame_size_1(), which is the only + place that needs the logic. + +2010-03-05 Ben Wing <ben@xemacs.org> + + * frame.c: + * frame.c (frame_live_p): + * frame.c (Fframep): + * frame.c (Fdisable_frame): + * frame.c (Fenable_frame): + * frame.c (Fraise_frame): + * frame.c (Fframe_name): + * frame.c (Fset_frame_height): + * frame.c (internal_set_frame_size): + * frame.c (adjust_frame_size): + Add documentation on the different types of units used to measure + frame size. + + Add section headers to the various sections. + + Rearrange the location of some functions in the file to keep + related functions together. This especially goes for frame-sizing + functions (internal_set_frame_size() and adjust_frame_size()), + which have been moved so that they form a group with + change_frame_size() and change_frame_size_1(). + + No functionality should change. + +2010-03-05 Ben Wing <ben@xemacs.org> + + * alloc.c: + * alloc.c (old_alloc_sized_lcrecord): + * alloc.c (very_old_free_lcrecord): + * alloc.c (copy_lisp_object): + * alloc.c (zero_sized_lisp_object): + * alloc.c (zero_nonsized_lisp_object): + * alloc.c (lisp_object_storage_size): + * alloc.c (free_normal_lisp_object): + * alloc.c (FREE_FIXED_TYPE_WHEN_NOT_IN_GC): + * alloc.c (ALLOC_FROB_BLOCK_LISP_OBJECT): + * alloc.c (Fcons): + * alloc.c (noseeum_cons): + * alloc.c (make_float): + * alloc.c (make_bignum): + * alloc.c (make_bignum_bg): + * alloc.c (make_ratio): + * alloc.c (make_ratio_bg): + * alloc.c (make_ratio_rt): + * alloc.c (make_bigfloat): + * alloc.c (make_bigfloat_bf): + * alloc.c (size_vector): + * alloc.c (make_compiled_function): + * alloc.c (Fmake_symbol): + * alloc.c (allocate_extent): + * alloc.c (allocate_event): + * alloc.c (make_key_data): + * alloc.c (make_button_data): + * alloc.c (make_motion_data): + * alloc.c (make_process_data): + * alloc.c (make_timeout_data): + * alloc.c (make_magic_data): + * alloc.c (make_magic_eval_data): + * alloc.c (make_eval_data): + * alloc.c (make_misc_user_data): + * alloc.c (Fmake_marker): + * alloc.c (noseeum_make_marker): + * alloc.c (size_string_direct_data): + * alloc.c (make_uninit_string): + * alloc.c (make_string_nocopy): + * alloc.c (mark_lcrecord_list): + * alloc.c (alloc_managed_lcrecord): + * alloc.c (free_managed_lcrecord): + * alloc.c (sweep_lcrecords_1): + * alloc.c (malloced_storage_size): + * buffer.c (allocate_buffer): + * buffer.c (compute_buffer_usage): + * buffer.c (DEFVAR_BUFFER_LOCAL_1): + * buffer.c (nuke_all_buffer_slots): + * buffer.c (common_init_complex_vars_of_buffer): + * buffer.h (struct buffer_text): + * buffer.h (struct buffer): + * bytecode.c: + * bytecode.c (make_compiled_function_args): + * bytecode.c (size_compiled_function_args): + * bytecode.h (struct compiled_function_args): + * casetab.c (allocate_case_table): + * casetab.h (struct Lisp_Case_Table): + * charset.h (struct Lisp_Charset): + * chartab.c (fill_char_table): + * chartab.c (Fmake_char_table): + * chartab.c (make_char_table_entry): + * chartab.c (copy_char_table_entry): + * chartab.c (Fcopy_char_table): + * chartab.c (put_char_table): + * chartab.h (struct Lisp_Char_Table_Entry): + * chartab.h (struct Lisp_Char_Table): + * console-gtk-impl.h (struct gtk_device): + * console-gtk-impl.h (struct gtk_frame): + * console-impl.h (struct console): + * console-msw-impl.h (struct Lisp_Devmode): + * console-msw-impl.h (struct mswindows_device): + * console-msw-impl.h (struct msprinter_device): + * console-msw-impl.h (struct mswindows_frame): + * console-msw-impl.h (struct mswindows_dialog_id): + * console-stream-impl.h (struct stream_console): + * console-stream.c (stream_init_console): + * console-tty-impl.h (struct tty_console): + * console-tty-impl.h (struct tty_device): + * console-tty.c (allocate_tty_console_struct): + * console-x-impl.h (struct x_device): + * console-x-impl.h (struct x_frame): + * console.c (allocate_console): + * console.c (nuke_all_console_slots): + * console.c (DEFVAR_CONSOLE_LOCAL_1): + * console.c (common_init_complex_vars_of_console): + * data.c (make_weak_list): + * data.c (make_weak_box): + * data.c (make_ephemeron): + * database.c: + * database.c (struct Lisp_Database): + * database.c (allocate_database): + * database.c (finalize_database): + * device-gtk.c (allocate_gtk_device_struct): + * device-impl.h (struct device): + * device-msw.c: + * device-msw.c (mswindows_init_device): + * device-msw.c (msprinter_init_device): + * device-msw.c (finalize_devmode): + * device-msw.c (allocate_devmode): + * device-tty.c (allocate_tty_device_struct): + * device-x.c (allocate_x_device_struct): + * device.c: + * device.c (nuke_all_device_slots): + * device.c (allocate_device): + * dialog-msw.c (handle_question_dialog_box): + * elhash.c: + * elhash.c (struct Lisp_Hash_Table): + * elhash.c (finalize_hash_table): + * elhash.c (make_general_lisp_hash_table): + * elhash.c (Fcopy_hash_table): + * elhash.h (htentry): + * emacs.c (main_1): + * eval.c: + * eval.c (size_multiple_value): + * event-stream.c (finalize_command_builder): + * event-stream.c (allocate_command_builder): + * event-stream.c (free_command_builder): + * event-stream.c (event_stream_generate_wakeup): + * event-stream.c (event_stream_resignal_wakeup): + * event-stream.c (event_stream_disable_wakeup): + * event-stream.c (event_stream_wakeup_pending_p): + * events.h (struct Lisp_Timeout): + * events.h (struct command_builder): + * extents-impl.h: + * extents-impl.h (struct extent_auxiliary): + * extents-impl.h (struct extent_info): + * extents-impl.h (set_extent_no_chase_aux_field): + * extents-impl.h (set_extent_no_chase_normal_field): + * extents.c: + * extents.c (gap_array_marker): + * extents.c (gap_array): + * extents.c (extent_list_marker): + * extents.c (extent_list): + * extents.c (stack_of_extents): + * extents.c (gap_array_make_marker): + * extents.c (extent_list_make_marker): + * extents.c (allocate_extent_list): + * extents.c (SLOT): + * extents.c (mark_extent_auxiliary): + * extents.c (allocate_extent_auxiliary): + * extents.c (attach_extent_auxiliary): + * extents.c (size_gap_array): + * extents.c (finalize_extent_info): + * extents.c (allocate_extent_info): + * extents.c (uninit_buffer_extents): + * extents.c (allocate_soe): + * extents.c (copy_extent): + * extents.c (vars_of_extents): + * extents.h: + * faces.c (allocate_face): + * faces.h (struct Lisp_Face): + * faces.h (struct face_cachel): + * file-coding.c: + * file-coding.c (finalize_coding_system): + * file-coding.c (sizeof_coding_system): + * file-coding.c (Fcopy_coding_system): + * file-coding.h (struct Lisp_Coding_System): + * file-coding.h (MARKED_SLOT): + * fns.c (size_bit_vector): + * font-mgr.c: + * font-mgr.c (finalize_fc_pattern): + * font-mgr.c (print_fc_pattern): + * font-mgr.c (Ffc_pattern_p): + * font-mgr.c (Ffc_pattern_create): + * font-mgr.c (Ffc_name_parse): + * font-mgr.c (Ffc_name_unparse): + * font-mgr.c (Ffc_pattern_duplicate): + * font-mgr.c (Ffc_pattern_add): + * font-mgr.c (Ffc_pattern_del): + * font-mgr.c (Ffc_pattern_get): + * font-mgr.c (fc_config_create_using): + * font-mgr.c (fc_strlist_to_lisp_using): + * font-mgr.c (fontset_to_list): + * font-mgr.c (Ffc_config_p): + * font-mgr.c (Ffc_config_up_to_date): + * font-mgr.c (Ffc_config_build_fonts): + * font-mgr.c (Ffc_config_get_cache): + * font-mgr.c (Ffc_config_get_fonts): + * font-mgr.c (Ffc_config_set_current): + * font-mgr.c (Ffc_config_get_blanks): + * font-mgr.c (Ffc_config_get_rescan_interval): + * font-mgr.c (Ffc_config_set_rescan_interval): + * font-mgr.c (Ffc_config_app_font_add_file): + * font-mgr.c (Ffc_config_app_font_add_dir): + * font-mgr.c (Ffc_config_app_font_clear): + * font-mgr.c (size): + * font-mgr.c (Ffc_config_substitute): + * font-mgr.c (Ffc_font_render_prepare): + * font-mgr.c (Ffc_font_match): + * font-mgr.c (Ffc_font_sort): + * font-mgr.c (finalize_fc_config): + * font-mgr.c (print_fc_config): + * font-mgr.h: + * font-mgr.h (struct fc_pattern): + * font-mgr.h (XFC_PATTERN): + * font-mgr.h (struct fc_config): + * font-mgr.h (XFC_CONFIG): + * frame-gtk.c (allocate_gtk_frame_struct): + * frame-impl.h (struct frame): + * frame-msw.c (mswindows_init_frame_1): + * frame-x.c (allocate_x_frame_struct): + * frame.c (nuke_all_frame_slots): + * frame.c (allocate_frame_core): + * gc.c: + * gc.c (GC_CHECK_NOT_FREE): + * glyphs.c (finalize_image_instance): + * glyphs.c (allocate_image_instance): + * glyphs.c (Fcolorize_image_instance): + * glyphs.c (allocate_glyph): + * glyphs.c (unmap_subwindow_instance_cache_mapper): + * glyphs.c (register_ignored_expose): + * glyphs.h (struct Lisp_Image_Instance): + * glyphs.h (struct Lisp_Glyph): + * glyphs.h (struct glyph_cachel): + * glyphs.h (struct expose_ignore): + * gui.c (allocate_gui_item): + * gui.h (struct Lisp_Gui_Item): + * keymap.c (struct Lisp_Keymap): + * keymap.c (make_keymap): + * lisp.h: + * lisp.h (struct Lisp_String_Direct_Data): + * lisp.h (struct Lisp_String_Indirect_Data): + * lisp.h (struct Lisp_Vector): + * lisp.h (struct Lisp_Bit_Vector): + * lisp.h (DECLARE_INLINE_LISP_BIT_VECTOR): + * lisp.h (struct weak_box): + * lisp.h (struct ephemeron): + * lisp.h (struct weak_list): + * lrecord.h: + * lrecord.h (struct lrecord_implementation): + * lrecord.h (MC_ALLOC_CALL_FINALIZER): + * lrecord.h (struct lcrecord_list): + * lstream.c (finalize_lstream): + * lstream.c (sizeof_lstream): + * lstream.c (Lstream_new): + * lstream.c (Lstream_delete): + * lstream.h (struct lstream): + * marker.c: + * marker.c (finalize_marker): + * marker.c (compute_buffer_marker_usage): + * mule-charset.c: + * mule-charset.c (make_charset): + * mule-charset.c (compute_charset_usage): + * objects-impl.h (struct Lisp_Color_Instance): + * objects-impl.h (struct Lisp_Font_Instance): + * objects-tty-impl.h (struct tty_color_instance_data): + * objects-tty-impl.h (struct tty_font_instance_data): + * objects-tty.c (tty_initialize_color_instance): + * objects-tty.c (tty_initialize_font_instance): + * objects.c (finalize_color_instance): + * objects.c (Fmake_color_instance): + * objects.c (finalize_font_instance): + * objects.c (Fmake_font_instance): + * objects.c (reinit_vars_of_objects): + * opaque.c: + * opaque.c (sizeof_opaque): + * opaque.c (make_opaque_ptr): + * opaque.c (free_opaque_ptr): + * opaque.h: + * opaque.h (Lisp_Opaque): + * opaque.h (Lisp_Opaque_Ptr): + * print.c (printing_unreadable_lcrecord): + * print.c (external_object_printer): + * print.c (debug_p4): + * process.c (finalize_process): + * process.c (make_process_internal): + * procimpl.h (struct Lisp_Process): + * rangetab.c (Fmake_range_table): + * rangetab.c (Fcopy_range_table): + * rangetab.h (struct Lisp_Range_Table): + * scrollbar.c: + * scrollbar.c (create_scrollbar_instance): + * scrollbar.c (compute_scrollbar_instance_usage): + * scrollbar.h (struct scrollbar_instance): + * specifier.c (finalize_specifier): + * specifier.c (sizeof_specifier): + * specifier.c (set_specifier_caching): + * specifier.h (struct Lisp_Specifier): + * specifier.h (struct specifier_caching): + * symeval.h: + * symeval.h (SYMBOL_VALUE_MAGIC_P): + * symeval.h (DEFVAR_SYMVAL_FWD): + * symsinit.h: + * syntax.c (init_buffer_syntax_cache): + * syntax.h (struct syntax_cache): + * toolbar.c: + * toolbar.c (allocate_toolbar_button): + * toolbar.c (update_toolbar_button): + * toolbar.h (struct toolbar_button): + * tooltalk.c (struct Lisp_Tooltalk_Message): + * tooltalk.c (make_tooltalk_message): + * tooltalk.c (struct Lisp_Tooltalk_Pattern): + * tooltalk.c (make_tooltalk_pattern): + * ui-gtk.c: + * ui-gtk.c (allocate_ffi_data): + * ui-gtk.c (emacs_gtk_object_finalizer): + * ui-gtk.c (allocate_emacs_gtk_object_data): + * ui-gtk.c (allocate_emacs_gtk_boxed_data): + * ui-gtk.h: + * window-impl.h (struct window): + * window-impl.h (struct window_mirror): + * window.c (finalize_window): + * window.c (allocate_window): + * window.c (new_window_mirror): + * window.c (mark_window_as_deleted): + * window.c (make_dummy_parent): + * window.c (compute_window_mirror_usage): + * window.c (compute_window_usage): + + Overall point of this change and previous ones in this repository: + + (1) Introduce new, clearer terminology: everything other than int + or char is a "record" object, which comes in two types: "normal + objects" and "frob-block objects". Fix up all places that + referred to frob-block objects as "simple", "basic", etc. + + (2) Provide an advertised interface for doing operations on Lisp + objects, including creating new types, that is clean and + consistent in its naming, uses the above-referenced terms and + avoids referencing "lrecords", "old lcrecords", etc., which should + hide under the surface. + + (3) Make the size_in_bytes and finalizer methods take a + Lisp_Object rather than a void * for consistency with other methods. + + (4) Separate finalizer method into finalizer and disksaver, so + that normal finalize methods don't have to worry about disksaving. + + Other specifics: + + (1) Renaming: + + LISP_OBJECT_HEADER -> NORMAL_LISP_OBJECT_HEADER + ALLOC_LISP_OBJECT -> ALLOC_NORMAL_LISP_OBJECT + implementation->basic_p -> implementation->frob_block_p + ALLOCATE_FIXED_TYPE_AND_SET_IMPL -> ALLOC_FROB_BLOCK_LISP_OBJECT + *FCCONFIG*, wrap_fcconfig -> *FC_CONFIG*, wrap_fc_config + *FCPATTERN*, wrap_fcpattern -> *FC_PATTERN*, wrap_fc_pattern + + (the last two changes make the naming of these macros consistent + with the naming of all other macros, since the objects are named + fc-config and fc-pattern with a hyphen) + + (2) Lots of documentation fixes in lrecord.h. + + (3) Eliminate macros for copying, freeing, zeroing objects, getting + their storage size. Instead, new functions: + + zero_sized_lisp_object() + zero_nonsized_lisp_object() + lisp_object_storage_size() + free_normal_lisp_object() + (copy_lisp_object() already exists) + LISP_OBJECT_FROB_BLOCK_P() (actually a macro) + + Eliminated: + + free_lrecord() + zero_lrecord() + copy_lrecord() + copy_sized_lrecord() + old_copy_lcrecord() + old_copy_sized_lcrecord() + old_zero_lcrecord() + old_zero_sized_lcrecord() + LISP_OBJECT_STORAGE_SIZE() + COPY_SIZED_LISP_OBJECT() + COPY_SIZED_LCRECORD() + COPY_LISP_OBJECT() + ZERO_LISP_OBJECT() + FREE_LISP_OBJECT() + + (4) Catch the remaining places where lrecord stuff was used directly + and use the advertised interface, e.g. alloc_sized_lrecord() -> + ALLOC_SIZED_LISP_OBJECT(). + + (5) Make certain statically-declared pseudo-objects + (buffer_local_flags, console_local_flags) have their lheader + initialized correctly, so things like copy_lisp_object() can work + on them. Make extent_auxiliary_defaults a proper heap object + Vextent_auxiliary_defaults, and make extent auxiliaries dumpable + so that this object can be dumped. allocate_extent_auxiliary() + now just creates the object, and attach_extent_auxiliary() + creates an extent auxiliary and attaches to an extent, like the + old allocate_extent_auxiliary(). + + (6) Create EXTENT_AUXILIARY_SLOTS macro, similar to the foo-slots.h + files but in a macro instead of a file. The purpose is to avoid + duplication when iterating over all the slots in an extent auxiliary. + Use it. + + (7) In lstream.c, don't zero out object after allocation because + allocation routines take care of this. + + (8) In marker.c, fix a mistake in computing marker overhead. + + (9) In print.c, clean up printing_unreadable_lcrecord(), + external_object_printer() to avoid lots of ifdef NEW_GC's. + + (10) Separate toolbar-button allocation into a separate + allocate_toolbar_button() function for use in the example code + in lrecord.h. + +2010-01-20 Ben Wing <ben@xemacs.org> + + * alloc.c: + * alloc.c (very_old_free_lcrecord): + * alloc.c (disksave_object_finalization_1): + * alloc.c (make_lcrecord_list): + * alloc.c (alloc_managed_lcrecord): + * alloc.c (free_managed_lcrecord): + * alloc.c (sweep_lcrecords_1): + * buffer.c: + * bytecode.c: + * bytecode.c (Fcompiled_function_p): + * chartab.c: + * console-impl.h: + * console-impl.h (CONSOLE_TYPE_P): + * console.c: + * console.c (set_quit_events): + * data.c: + * data.c (Fmake_ephemeron): + * database.c: + * database.c (finalize_database): + * database.c (Fclose_database): + * device-msw.c: + * device-msw.c (finalize_devmode): + * device-msw.c (allocate_devmode): + * device.c: + * elhash.c: + * elhash.c (finalize_hash_table): + * eval.c: + * eval.c (bind_multiple_value_limits): + * event-stream.c: + * event-stream.c (finalize_command_builder): + * events.c: + * events.c (mark_event): + * extents.c: + * extents.c (finalize_extent_info): + * extents.c (uninit_buffer_extents): + * faces.c: + * file-coding.c: + * file-coding.c (finalize_coding_system): + * file-coding.h: + * file-coding.h (struct coding_system_methods): + * file-coding.h (struct detector): + * floatfns.c: + * floatfns.c (extract_float): + * fns.c: + * fns.c (Fidentity): + * font-mgr.c (finalize_fc_pattern): + * font-mgr.c (finalize_fc_config): + * frame.c: + * glyphs.c: + * glyphs.c (finalize_image_instance): + * glyphs.c (unmap_subwindow_instance_cache_mapper): + * gui.c: + * gui.c (gui_error): + * keymap.c: + * lisp.h (struct Lisp_Symbol): + * lrecord.h: + * lrecord.h (struct lrecord_implementation): + * lrecord.h (MC_ALLOC_CALL_FINALIZER): + * lrecord.h (MC_ALLOC_CALL_FINALIZER_FOR_DISKSAVE): + * lrecord.h (DEFINE_DUMPABLE_LISP_OBJECT): + * lrecord.h (DEFINE_DUMPABLE_GENERAL_LISP_OBJECT): + * lrecord.h (DEFINE_DUMPABLE_SIZABLE_LISP_OBJECT): + * lrecord.h (DEFINE_DUMPABLE_SIZABLE_GENERAL_LISP_OBJECT): + * lrecord.h (DEFINE_DUMPABLE_FROB_BLOCK_LISP_OBJECT): + * lrecord.h (DEFINE_DUMPABLE_FROB_BLOCK_GENERAL_LISP_OBJECT): + * lrecord.h (DEFINE_DUMPABLE_FROB_BLOCK_SIZABLE_LISP_OBJECT): + * lrecord.h (DEFINE_DUMPABLE_INTERNAL_LISP_OBJECT): + * lrecord.h (DEFINE_DUMPABLE_SIZABLE_INTERNAL_LISP_OBJECT): + * lrecord.h (DEFINE_NODUMP_LISP_OBJECT): + * lrecord.h (DEFINE_NODUMP_GENERAL_LISP_OBJECT): + * lrecord.h (DEFINE_NODUMP_SIZABLE_LISP_OBJECT): + * lrecord.h (DEFINE_NODUMP_SIZABLE_GENERAL_LISP_OBJECT): + * lrecord.h (DEFINE_NODUMP_FROB_BLOCK_LISP_OBJECT): + * lrecord.h (DEFINE_NODUMP_FROB_BLOCK_GENERAL_LISP_OBJECT): + * lrecord.h (DEFINE_NODUMP_FROB_BLOCK_SIZABLE_LISP_OBJECT): + * lrecord.h (DEFINE_NODUMP_INTERNAL_LISP_OBJECT): + * lrecord.h (DEFINE_NODUMP_SIZABLE_INTERNAL_LISP_OBJECT): + * lrecord.h (MAKE_LISP_OBJECT): + * lrecord.h (DEFINE_DUMPABLE_MODULE_LISP_OBJECT): + * lrecord.h (DEFINE_DUMPABLE_MODULE_GENERAL_LISP_OBJECT): + * lrecord.h (DEFINE_DUMPABLE_MODULE_SIZABLE_LISP_OBJECT): + * lrecord.h (DEFINE_DUMPABLE_MODULE_SIZABLE_GENERAL_LISP_OBJECT): + * lrecord.h (DEFINE_NODUMP_MODULE_LISP_OBJECT): + * lrecord.h (DEFINE_NODUMP_MODULE_GENERAL_LISP_OBJECT): + * lrecord.h (DEFINE_NODUMP_MODULE_SIZABLE_LISP_OBJECT): + * lrecord.h (DEFINE_NODUMP_MODULE_SIZABLE_GENERAL_LISP_OBJECT): + * lrecord.h (MAKE_MODULE_LISP_OBJECT): + * lstream.c: + * lstream.c (finalize_lstream): + * lstream.c (disksave_lstream): + * marker.c: + * marker.c (finalize_marker): + * mule-charset.c (make_charset): + * number.c: + * objects.c: + * objects.c (finalize_color_instance): + * objects.c (finalize_font_instance): + * opaque.c: + * opaque.c (make_opaque_ptr): + * process-nt.c: + * process-nt.c (nt_finalize_process_data): + * process-nt.c (nt_deactivate_process): + * process.c: + * process.c (finalize_process): + * procimpl.h (struct process_methods): + * scrollbar.c: + * scrollbar.c (free_scrollbar_instance): + * specifier.c (finalize_specifier): + * symbols.c: + * toolbar.c: + * toolbar.c (Ftoolbar_button_p): + * tooltalk.c: + * ui-gtk.c: + * ui-gtk.c (emacs_gtk_object_finalizer): + * ui-gtk.c (allocate_emacs_gtk_boxed_data): + * window.c: + * window.c (finalize_window): + * window.c (mark_window_as_deleted): + + Separate out regular and disksave finalization. Instead of a + FOR_DISKSAVE argument to the finalizer, create a separate object + method `disksaver'. Make `finalizer' have only one argument. + + Go through and separate out all finalize methods into finalize + and disksave. Delete lots of thereby redundant disksave checking. + Delete places that signal an error if we attempt to disksave -- + all of these objects are non-dumpable and we will get an error + from pdump anyway if we attempt to dump them. After this is done, + only one object remains that has a disksave method -- lstream. + + Change DEFINE_*_LISP_OBJECT_WITH_PROPS to DEFINE_*_GENERAL_LISP_OBJECT, + which is used for specifying either property methods or disksave + methods (or in the future, any other less-used methods). + + Remove the for_disksave argument to finalize_process_data. Don't + provide a disksaver for processes because no one currently needs + it. + + Clean up various places where objects didn't provide a print method. + It was made mandatory in previous changes, and all methods now + either provide their own print method or use internal_object_printer + or external_object_printer. + + Change the definition of CONSOLE_LIVE_P to use the contype enum + rather than looking into the conmeths structure -- in some weird + situations with dead objects, the conmeths structure is NULL, + and printing such objects from debug_print() will crash if we try + to look into the conmeths structure. + + +2005-11-22 Ben Wing <ben@xemacs.org> + + * alloc.c: + * alloc.c (assert_proper_sizing): + * alloc.c (alloc_sized_lrecord_1): + * alloc.c (alloc_sized_lrecord): + * alloc.c (noseeum_alloc_sized_lrecord): + * alloc.c (alloc_lrecord): + * alloc.c (old_alloc_sized_lcrecord): + * alloc.c (make_vector_internal): + * alloc.c (make_bit_vector_internal): + * alloc.c (alloc_automanaged_sized_lcrecord): + * buffer.c (allocate_buffer): + * buffer.c (DEFVAR_BUFFER_LOCAL_1): + * buffer.c (common_init_complex_vars_of_buffer): + * casetab.c (allocate_case_table): + * chartab.c (Fmake_char_table): + * chartab.c (make_char_table_entry): + * chartab.c (copy_char_table_entry): + * chartab.c (Fcopy_char_table): + * console.c (allocate_console): + * console.c (DEFVAR_CONSOLE_LOCAL_1): + * console.c (common_init_complex_vars_of_console): + * data.c (make_weak_list): + * data.c (make_weak_box): + * data.c (make_ephemeron): + * database.c (allocate_database): + * device-msw.c (allocate_devmode): + * device.c (allocate_device): + * dialog-msw.c (handle_question_dialog_box): + * elhash.c (make_general_lisp_hash_table): + * elhash.c (Fcopy_hash_table): + * emacs.c (main_1): + * event-stream.c: + * event-stream.c (allocate_command_builder): + * event-stream.c (free_command_builder): + * event-stream.c (mark_timeout): + * event-stream.c (event_stream_generate_wakeup): + * event-stream.c (event_stream_resignal_wakeup): + * event-stream.c (event_stream_disable_wakeup): + * event-stream.c (reinit_vars_of_event_stream): + * extents.c (allocate_extent_auxiliary): + * extents.c (allocate_extent_info): + * extents.c (copy_extent): + * faces.c (allocate_face): + * file-coding.c (allocate_coding_system): + * frame.c (allocate_frame_core): + * glyphs.c (allocate_image_instance): + * glyphs.c (allocate_glyph): + * gui.c (allocate_gui_item): + * keymap.c (make_keymap): + * lrecord.h: + * lrecord.h (ALLOC_LCRECORD): + * lrecord.h (ALLOC_SIZED_LCRECORD): + * lrecord.h (struct old_lcrecord_header): + * lrecord.h (old_alloc_lcrecord_type): + * lrecord.h (alloc_lrecord_type): + * lrecord.h (noseeum_alloc_lrecord_type): + * lstream.c (Lstream_new): + * mule-charset.c (make_charset): + * objects.c (Fmake_color_instance): + * objects.c (Fmake_font_instance): + * objects.c (reinit_vars_of_objects): + * opaque.c (make_opaque): + * opaque.c (make_opaque_ptr): + * process.c (make_process_internal): + * rangetab.c (Fmake_range_table): + * rangetab.c (Fcopy_range_table): + * scrollbar.c (create_scrollbar_instance): + * specifier.c (make_specifier_internal): + * symbols.c (Fdefvaralias): + * toolbar.c (update_toolbar_button): + * tooltalk.c (make_tooltalk_message): + * tooltalk.c (make_tooltalk_pattern): + * ui-gtk.c (allocate_ffi_data): + * ui-gtk.c (allocate_emacs_gtk_object_data): + * ui-gtk.c (allocate_emacs_gtk_boxed_data): + * window.c (allocate_window): + * window.c (new_window_mirror): + * window.c (make_dummy_parent): + Create a simpler interface for allocating/declaring Lisp objects; + documented in lrecord.h. + + ALLOC_LCRECORD_TYPE -> ALLOC_LISP_OBJECT (returns a Lisp object + rather than a pointer), + BASIC_ALLOC_LCRECORD -> ALLOC_SIZED_LISP_OBJECT + DEFINE_LRECORD_IMPLEMENTATION -> DEFINE_*_LISP_OBJECT + DEFINE_LRECORD_SEQUENCE_IMPLEMENTATION -> DEFINE_*SIZABLE_*LISP_OBJECT + DEFINE_LRECORD_*IMPLEMENTATION_WITH_PROPS -> DEFINE_*GENERAL_LISP_OBJECT + DEFINE_BASIC_LRECORD_IMPLEMENTATION -> DEFINE_*FROB_BLOCK_LISP_OBJECT + DEFINE_DUMPABLE_*/DEFINE_NODUMP_* instead of a 0 or 1 dumpable flag + DEFINE_*INTERNAL_* for "internal" Lisp objects (shouldn't escape + to Lisp) + DEFINE_EXTERNAL_* -> DEFINE_MODULE_* + MAKE_LRECORD_IMPLEMENTATION -> MAKE_LISP_OBJECT + MAKE_EXTERNAL_LRECORD_IMPLEMENTATION -> MAKE_MODULE_LISP_OBJECT + DECLARE_LRECORD -> DECLARE_LISP_OBJECT + INIT_LRECORD_IMPLEMENTATION -> INIT_LISP_OBJECT + alloc_lrecord -> alloc_sized_lrecord (since it takes a size) + + Dynarr_newf, Dynarr_lisp_newf: takes a Bytecount instead of an int + +2010-03-05 Ben Wing <ben@xemacs.org> + + * mule-coding.c: + * mule-coding.c (iso2022_encode): + Horrible bug: `escape-quoted' was failing to escape-quote special + characters in the 0x80 - 0x9F range. Who knows what breakage ensued? + SAME BUG IN XEMACS 21.4; MUST BE FIXED THERE TOO. + +2010-03-03 Ben Wing <ben@xemacs.org> + + * lrecord.h: Fix outdated comment. + +2010-03-03 Ben Wing <ben@xemacs.org> + + * emacs.c: + * emacs.c (assert_equal_failed): + * lisp.h: + * lisp.h (assert_equal): + New fun assert_equal, asserting that two values == each other, and + printing out both values upon failure. + + * frame-gtk.c (gtk_initialize_frame_size): + * frame-impl.h: + * frame-impl.h (FRAME_TOP_INTERNAL_BORDER_START): + * frame-impl.h (FRAME_BOTTOM_INTERNAL_BORDER_START): + * frame-impl.h (FRAME_LEFT_INTERNAL_BORDER_START): + * frame-impl.h (FRAME_PANED_TOP_EDGE): + * frame-impl.h (FRAME_NONPANED_SIZE): + * frame-x.c (x_initialize_frame_size): + * frame.c: + * gutter.c (get_gutter_coords): + * gutter.c (calculate_gutter_size): + * gutter.h: + * gutter.h (WINDOW_REAL_TOP_GUTTER_BOUNDS): + * gutter.h (FRAME_TOP_GUTTER_BOUNDS): + * input-method-xlib.c: + * input-method-xlib.c (XIM_SetGeometry): + * redisplay-output.c (clear_left_border): + * redisplay-output.c (clear_right_border): + * redisplay-output.c (redisplay_output_pixmap): + * redisplay-output.c (redisplay_clear_region): + * redisplay-output.c (redisplay_clear_top_of_window): + * redisplay-output.c (redisplay_clear_to_window_end): + * redisplay-xlike-inc.c (XLIKE_clear_frame): + * redisplay.c: + * redisplay.c (UPDATE_CACHE_RETURN): + * redisplay.c (pixel_to_glyph_translation): + * toolbar.c (update_frame_toolbars_geometry): + * window.c (Fwindow_pixel_edges): + Get rid of some redundant macros. Consistently use the + FRAME_TOP_*_START, FRAME_RIGHT_*_END, etc. format. Rename + FRAME_*_BORDER_* to FRAME_*_INTERNAL_BORDER_*. Comment out + FRAME_BOTTOM_* for gutters and the paned area due to the + uncertainty over where the paned area actually begins. (Eventually + we should probably move the gutters outside the minibuffer so that + the paned area is contiguous.) Use FRAME_PANED_* more often in the + code to make things clearer. + + Update the diagram to show that the bottom gutter is inside the + minibuffer (!) and that there are "junk boxes" when you have left + and/or right gutters (dead boxes that are mistakenly left uncleared, + unlike the corresponding scrollbar dead boxes). Update the text + appropriately to cover the bottom gutter position, etc. + + Rewrite gutter-geometry code to use the FRAME_*_GUTTER_* in place of + equivalent expressions referencing other frame elements, to make the + code more portable in case we move around the gutter location. + + Cleanup FRAME_*_GUTTER_BOUNDS() in gutter.h. + + Add some #### GEOM! comments where I think code is incorrect -- + typically, it wasn't fixed up properly when the gutter was added. + + Some cosmetic changes. + +2010-03-02 Ben Wing <ben@xemacs.org> + + * lisp.h: + * text.h: + Move inclusion point of text.h earlier in lisp.h -- just before + the definition of characters, which needs some of the stuff in + text.h. With text.h later, some basic character properties had to + be defined in lisp.h -- put them back into text.h where they belong. + Move some text in lisp.h at the point of text.h inclusion into + text.h -- it serves as a mini-introduction. + +2010-03-02 Ben Wing <ben@xemacs.org> + + * Makefile.in.in: + * Makefile.in.in (objs): + glyphs-shared.o, glyphs-eimage.o only needed when HAVE_WINDOW_SYSTEM. + glyphs-widget.o should be too, but we need a bit of work ifdeffing + out the subwindow stuff from redisplay.c et al. + + * bytecode.c (init_opcode_table_multi_op): + Change var name to avoid shadowing with `basename'. + + * emacs.c (main_1): + Don't call init/etc. routines for glyphs-shared, glyphs-eimage unless + HAVE_WINDOW_SYSTEM is defined. + + * linuxplay.c: + * linuxplay.c (sighandler): + * vdb-posix.c (vdb_fault_handler): + Use const for variables holding string constants to avoid C++ + warnings. + +2010-03-02 Jerry James <james@xemacs.org> + + * lread.c (read_atom): Signal a read error upon encountering a + ratio constant with a zero denominator. + +2010-03-03 Aidan Kehoe <kehoea@parhasard.net> + + * fns.c (Fsubstring): Removed. + * search.c (Freplace_match): + * minibuf.c (Ftry_completion): + * lisp.h: + * keymap.c (ensure_meta_prefix_char_keymapp): + * dired.c (user_name_completion, file_name_completion): + * console-x.c (x_canonicalize_console_connection): + * bytecode.c (Bsubseq): + * bytecode-ops.h (subseq): + Move #'substring to Lisp, as an alias for #'subseq; change all + C Fsubstring() calls to Fsubseq(), change the Bsubstring bytecode + to Bsubseq. + + Motivation; not accepting vectors in #'substring is incompatible + with GNU, and Common Lisp prefers #'subseq, it has no #'substring. + +2010-03-02 Aidan Kehoe <kehoea@parhasard.net> + + * eval.c (print_multiple_value): + Say #<INTERNAL OBJECT (XEmacs bug?) ...> when printing these, for + consistency with the rest of the print code. + +2010-03-01 Aidan Kehoe <kehoea@parhasard.net> + + * lisp.h (PARSE_KEYWORDS): New macro, for parsing keyword + arguments from C subrs. + * elhash.c (Fmake_hash_table): Use it. + * general-slots.h (Q_allow_other_keys): Add this symbol. + * eval.c (non_nil_allow_other_keys_p): + (invalid_keyword_argument): + New functions, called from the keyword argument parsing code. + * data.c (init_errors_once_early): + Add the new invalid-keyword-argument error here. + +2010-02-26 Aidan Kehoe <kehoea@parhasard.net> + + * file-coding.c (Fmake_coding_system_internal): + Be somewhat clearer in this docstring, especially for the sake of + people running non-Mule builds who will see this docstring when + they do F1 f make-coding-system RET. + +2010-02-25 Didier Verna <didier@xemacs.org> + + The background-placement face property. + * console-x-impl.h (struct x_frame): Add new slots x and y. + * console-x-impl.h (FRAME_X_X, FRAME_X_Y): New slot accessors. + * console-gtk-impl.h: Fake something similar for potential port. + * frame-x.c (x_get_frame_text_position): New function. + * frame-x.c (x_init_frame_3): Use it. + * event-Xt.c (emacs_Xt_handle_magic_event): Eat spurious + ConfigureNotify events, get the frame position and mark frame + faces changed. + * objects-impl.h: The face_background_placement_specifier + structure and its accessors. + * objects.c: New symbols Qabsolute and Qrelative. + * objects.c (face_background_placement_create): + * objects.c (face_background_placement_mark): + * objects.c (face_background_placement_instantiate): + * objects.c (face_background_placement_validate): + * objects.c (face_background_placement_after_change): + * objects.c (set_face_background_placement_attached_to): New. + * objects.h (set_face_background_palcement_attached_to): Declare + the one above. + * objects.c (syms_of_objects): + * objects.c (specifier_type_create_objects): + * objects.c (reinit_specifier_type_create_objects): + * objects.c (reinit_vars_of_objects): Update for the modifications + above. + * console-xlike-inc.h (XLIKE_GC_TS_X_ORIGIN, XLIKE_GC_TS_X_ORIGIN): + New X11/Gtk compatibility macros. + * redisplay-xlike-inc.c (XLIKE_get_gc): Add a background placement + argument and handle it. + * gtk-glue.c (face_to_gc): + * redisplay-xlike-inc.c (XLIKE_output_string): + * redisplay-xlike-inc.c (XLIKE_output_pixmap): + * redisplay-xlike-inc.c (XLIKE_output_blank): + * redisplay-xlike-inc.c (XLIKE_output_horizontal_line): + * redisplay-xlike-inc.c (XLIKE_output_eol_cursor): Update + accordingly. + * console-impl.h (struct console_methods): Add a background + placement (Lisp_Object) argument to the clear_region method. + * console-stream.c (stream_clear_region): + * redisplay-tty.c (tty_clear_region): + * redisplay-msw.c (mswindows_clear_region): + * redisplay-xlike-inc.c (XLIKE_clear_region): Update accordingly. + * redisplay-output.c (redisplay_clear_region): Handle the + background placement property and update the call to the + clear_region method. + * faces.h (struct Lisp_Face): + * faces.h (struct face_cachel): Add a background placement slot. + * faces.h (WINDOW_FACE_CACHEL_BACKGROUND_PLACEMENT): New accessor. + * faces.c (mark_face): + * faces.c (face_equal): + * faces.c (face_getprop): + * faces.c (face_putprop): + * faces.c (face_remprop): + * faces.c (face_plist): + * faces.c (reset_face): + * faces.c (mark_face_cachels): + * faces.c (update_face_cachel_data): + * faces.c (merge_face_cachel_data): + * faces.c (reset_face_cachel): + * faces.c (Fmake_face): + * faces.c (Fcopy_face): Handle the background placement property. + * faces.c (syms_of_faces): + * faces.c (vars_of_faces): + * faces.c (complex_vars_of_faces): Update accordingly. + +2010-02-25 Ben Wing <ben@xemacs.org> + + * frame-impl.h: + Create some new macros for more clearly getting the size/edges + of various rectangles surrounding the paned area. + * frame.c (change_frame_size_1): + Use the new macros. Clean up change_frame_size_1 and make sure + the internal border width gets taken into account -- that was what + was causing the clipped bottom and right. + +2010-02-25 Ben Wing <ben@xemacs.org> + + * EmacsFrame.c (EmacsFrameSetValues): + * frame-impl.h: + * frame-impl.h (struct frame): + * frame-impl.h (FRAME_THEORETICAL_TOP_TOOLBAR_HEIGHT): + * frame-impl.h (FRAME_THEORETICAL_TOP_TOOLBAR_BORDER_WIDTH): + * frame-impl.h (FRAME_REAL_TOP_TOOLBAR_HEIGHT): + * frame-impl.h (FRAME_REAL_TOP_TOOLBAR_BORDER_WIDTH): + * frame-impl.h (FRAME_REAL_TOP_TOOLBAR_VISIBLE): + * frame-impl.h (FRAME_REAL_TOP_TOOLBAR_BOUNDS): + * frame.h: + * frame.h (enum edge_pos): + * gutter.c: + * gutter.c (get_gutter_coords): + * gutter.c (display_boxes_in_gutter_p): + * gutter.c (construct_window_gutter_spec): + * gutter.c (calculate_gutter_size_from_display_lines): + * gutter.c (calculate_gutter_size): + * gutter.c (output_gutter): + * gutter.c (clear_gutter): + * gutter.c (mark_gutters): + * gutter.c (gutter_extent_signal_changed_region_maybe): + * gutter.c (update_gutter_geometry): + * gutter.c (update_frame_gutter_geometry): + * gutter.c (update_frame_gutters): + * gutter.c (reset_gutter_display_lines): + * gutter.c (redraw_exposed_gutter): + * gutter.c (redraw_exposed_gutters): + * gutter.c (free_frame_gutters): + * gutter.c (decode_gutter_position): + * gutter.c (Fset_default_gutter_position): + * gutter.c (Fgutter_pixel_width): + * gutter.c (Fgutter_pixel_height): + * gutter.c (recompute_overlaying_specifier): + * gutter.c (gutter_specs_changed_1): + * gutter.c (gutter_specs_changed): + * gutter.c (top_gutter_specs_changed): + * gutter.c (bottom_gutter_specs_changed): + * gutter.c (left_gutter_specs_changed): + * gutter.c (right_gutter_specs_changed): + * gutter.c (gutter_geometry_changed_in_window): + * gutter.c (init_frame_gutters): + * gutter.c (specifier_vars_of_gutter): + * gutter.h: + * gutter.h (WINDOW_REAL_TOP_GUTTER_BOUNDS): + * gutter.h (FRAME_TOP_GUTTER_BOUNDS): + * lisp.h (enum edge_style): + * native-gtk-toolbar.c: + * native-gtk-toolbar.c (gtk_output_toolbar): + * native-gtk-toolbar.c (gtk_clear_toolbar): + * native-gtk-toolbar.c (gtk_output_frame_toolbars): + * native-gtk-toolbar.c (gtk_initialize_frame_toolbars): + * toolbar-msw.c: + * toolbar-msw.c (TOOLBAR_HANDLE): + * toolbar-msw.c (allocate_toolbar_item_id): + * toolbar-msw.c (mswindows_clear_toolbar): + * toolbar-msw.c (mswindows_output_toolbar): + * toolbar-msw.c (mswindows_move_toolbar): + * toolbar-msw.c (mswindows_redraw_exposed_toolbars): + * toolbar-msw.c (mswindows_initialize_frame_toolbars): + * toolbar-msw.c (mswindows_output_frame_toolbars): + * toolbar-msw.c (mswindows_clear_frame_toolbars): + * toolbar-msw.c (DELETE_TOOLBAR): + * toolbar-msw.c (mswindows_free_frame_toolbars): + * toolbar-msw.c (mswindows_get_toolbar_button_text): + * toolbar-xlike.c: + * toolbar-xlike.c (__prepare_button_area): + * toolbar-xlike.c (XLIKE_OUTPUT_BUTTONS_LOOP): + * toolbar-xlike.c (xlike_output_toolbar): + * toolbar-xlike.c (xlike_clear_toolbar): + * toolbar-xlike.c (xlike_output_frame_toolbars): + * toolbar-xlike.c (xlike_clear_frame_toolbars): + * toolbar-xlike.c (xlike_redraw_exposed_toolbar): + * toolbar-xlike.c (xlike_redraw_exposed_toolbars): + * toolbar-xlike.c (xlike_redraw_frame_toolbars): + * toolbar.c: + * toolbar.c (decode_toolbar_position): + * toolbar.c (Fset_default_toolbar_position): + * toolbar.c (mark_frame_toolbar_buttons_dirty): + * toolbar.c (compute_frame_toolbar_buttons): + * toolbar.c (set_frame_toolbar): + * toolbar.c (compute_frame_toolbars_data): + * toolbar.c (update_frame_toolbars_geometry): + * toolbar.c (init_frame_toolbars): + * toolbar.c (get_toolbar_coords): + * toolbar.c (CHECK_TOOLBAR): + * toolbar.c (toolbar_buttons_at_pixpos): + * toolbar.c (CTB_ERROR): + * toolbar.c (recompute_overlaying_specifier): + * toolbar.c (specifier_vars_of_toolbar): + * toolbar.h: + * toolbar.h (SET_TOOLBAR_WAS_VISIBLE_FLAG): + Create new enum edge_pos with TOP_EDGE, BOTTOM_EDGE, LEFT_EDGE, + RIGHT_EDGE; subsume TOP_BORDER, TOP_GUTTER, enum toolbar_pos, + enum gutter_pos, etc. + + Create EDGE_POS_LOOP, subsuming GUTTER_POS_LOOP. + + Create NUM_EDGES, use in many places instead of hardcoded '4'. + + Instead of top_toolbar_was_visible, bottom_toolbar_was_visible, + etc. make an array toolbar_was_visible[NUM_EDGES]. This increases + the frame size by 15 bytes or so (could be 3 if we use Boolbytes) + but hardly seems w to matter -- frames are heavy weight objects + anyway. Same with top_gutter_was_visible, etc. + + Remove duplicated SET_TOOLBAR_WAS_VISIBLE_FLAG and put defn in + one place (toolbar.h). + +2010-02-24 Didier Verna <didier@xemacs.org> + + Modify XLIKE_get_gc's prototype. + * redisplay-xlike-inc.c (XLIKE_get_gc): Take a frame instead of a + device as first argument. + * redisplay-xlike-inc.c (XLIKE_output_string): Update caller. + * redisplay-xlike-inc.c (XLIKE_output_pixmap): Ditto. + * redisplay-xlike-inc.c (XLIKE_output_blank): Ditto. + * redisplay-xlike-inc.c (XLIKE_output_horizontal_line): Ditto. + * redisplay-xlike-inc.c (XLIKE_clear_region): Ditto. + * redisplay-xlike-inc.c (XLIKE_output_eol_cursor): Ditto. + * console-gtk.h (gtk_get_gc): Take a frame instead of a device as + first argument. + * gtk-glue.c (face_to_gc): Update caller. + +2010-02-24 Didier Verna <didier@xemacs.org> + + * glyphs.c: Clarify comment about potential_pixmap_file_instantiator. + * glyphs.c (xbm_mask_file_munging): Clarify comment, remove + unreachable condition and provide a cuple of assertions. + * glyphs.c (xbm_normalize): Clarify comments, error on mask file + not found. + * glyphs.c (xface_normalize): Ditto, and handle inline data properly. + +2010-02-22 Ben Wing <ben@xemacs.org> + + * EmacsFrame.c: + * Makefile.in.in (x_objs): + * Makefile.in.in (mswindows_objs): + * Makefile.in.in (tty_objs): + * Makefile.in.in (gtk_objs): + * Makefile.in.in (objs): + * console-tty.h: + * console-x-impl.h: + * console-x-impl.h (struct x_device): + * console-x.h: + * console-xlike-inc.h: + * depend: + * device-gtk.c: + * device-msw.c: + * device-x.c: + * device-x.c (x_init_device): + * device-x.c (x_finish_init_device): + * device.c: + * devslots.h (MARKED_SLOT): + * emacs.c (main_1): + * event-Xt.c: + * event-gtk.c: + * event-msw.c: + * faces.c: + * font-mgr.c: + * fontcolor-gtk-impl.h: + * fontcolor-gtk.c: + * fontcolor-gtk.c (syms_of_fontcolor_gtk): + * fontcolor-gtk.c (console_type_create_fontcolor_gtk): + * fontcolor-gtk.c (vars_of_fontcolor_gtk): + * fontcolor-gtk.h: + * fontcolor-impl.h: + * fontcolor-msw-impl.h: + * fontcolor-msw.c: + * fontcolor-msw.c (syms_of_fontcolor_mswindows): + * fontcolor-msw.c (console_type_create_fontcolor_mswindows): + * fontcolor-msw.c (reinit_vars_of_fontcolor_mswindows): + * fontcolor-msw.c (vars_of_fontcolor_mswindows): + * fontcolor-msw.h: + * fontcolor-msw.h (mswindows_color_to_string): + * fontcolor-tty-impl.h: + * fontcolor-tty.c: + * fontcolor-tty.c (syms_of_fontcolor_tty): + * fontcolor-tty.c (console_type_create_fontcolor_tty): + * fontcolor-tty.c (vars_of_fontcolor_tty): + * fontcolor-tty.h: + * fontcolor-x-impl.h: + * fontcolor-x.c: + * fontcolor-x.c (syms_of_fontcolor_x): + * fontcolor-x.c (console_type_create_fontcolor_x): + * fontcolor-x.c (vars_of_fontcolor_x): + * fontcolor-x.c (Xatoms_of_fontcolor_x): + * fontcolor-x.h: + * fontcolor.c: + * fontcolor.c (syms_of_fontcolor): + * fontcolor.c (specifier_type_create_fontcolor): + * fontcolor.c (reinit_specifier_type_create_fontcolor): + * fontcolor.c (reinit_vars_of_fontcolor): + * fontcolor.c (vars_of_fontcolor): + * fontcolor.h: + * fontcolor.h (set_face_boolean_attached_to): + * frame-gtk.c: + * frame-x.c: + * glyphs-eimage.c: + * glyphs-gtk.c: + * glyphs-msw.c: + * glyphs-widget.c: + * glyphs-x.c: + * glyphs.c: + * gtk-glue.c: + * gtk-glue.c (xemacs_type_register): + * gtk-xemacs.c: + * inline.c: + * intl-win32.c: + * lisp.h: + * lrecord.h: + * mule-charset.c: + * native-gtk-toolbar.c: + * redisplay-msw.c: + * redisplay-tty.c: + * redisplay.c: + * select-x.c: + * select.c: + * symsinit.h: + * toolbar-msw.c: + * toolbar-msw.c (TOOLBAR_ITEM_ID_BITS): + * toolbar-x.c: + * ui-gtk.c: + * window.c: + Rename objects*.[ch] -> fontcolor*.[ch]. Fix up all references to + the old files (e.g. in #include statements, Makefiles, + functions like syms_of_objects_x(), etc.). + +2010-02-22 Ben Wing <ben@xemacs.org> + + * .gdbinit.in.in: + * Makefile.in.in (batch_test_emacs): + test-harness.el is in lisp directory now so change how we call it. + +2010-02-22 Ben Wing <ben@xemacs.org> + + * alloc.c (object_memory_usage_stats): + Remove unused var. + +2010-02-21 Ben Wing <ben@xemacs.org> + + * alloc.c: + * alloc.c (FREE_FIXED_TYPE_WHEN_NOT_IN_GC): + * alloc.c (struct): + * alloc.c (tick_lrecord_stats): + * alloc.c (tick_lcrecord_stats): + * alloc.c (sweep_lcrecords_1): + * alloc.c (COUNT_FROB_BLOCK_USAGE): + * alloc.c (SWEEP_FIXED_TYPE_BLOCK_1): + * alloc.c (free_cons): + * alloc.c (free_key_data): + * alloc.c (free_button_data): + * alloc.c (free_motion_data): + * alloc.c (free_process_data): + * alloc.c (free_timeout_data): + * alloc.c (free_magic_data): + * alloc.c (free_magic_eval_data): + * alloc.c (free_eval_data): + * alloc.c (free_misc_user_data): + * alloc.c (free_marker): + * alloc.c (gc_sweep_1): + * alloc.c (HACK_O_MATIC): + * alloc.c (FROB): + * alloc.c (object_memory_usage_stats): + * alloc.c (Fgarbage_collect): + * dumper.c: + * dumper.c (pdump_objects_unmark): + * lrecord.h: + * lrecord.h (enum lrecord_alloc_status): + Fixes to memory-usage-tracking code, etc. + + (1) Incorporate NEW_GC stuff into FREE_FIXED_TYPE_WHEN_NOT_IN_GC + to avoid duplication. + + (2) Rewrite tick_lcrecord_stats() to include separate + tick_lrecord_stats(); use in dumper.c to note pdumped objects. + + (3) Instead of handling frob-block objects specially in + object_memory_usage_stats(), have SWEEP_FIXED_TYPE_BLOCK_1 + increment the stats in lrecord_stats[] so that they get handled + like other objects. + + (4) Pluralize entry as entries, etc. + +2010-02-21 Ben Wing <ben@xemacs.org> + + * alloc.c: + * alloc.c (pluralize_word): + New function to pluralize a word. + * alloc.c (pluralize_and_append): New function. + * alloc.c (object_memory_usage_stats): + Clean up duplication. + +2010-02-21 Vin Shelton <acs@xemacs.org> + + * events.c (event_pixel_translation): Simplify assertion for + Visual C 6. + +2010-02-21 Ben Wing <ben@xemacs.org> + + * gc.c (kkcc_marking): Fix compile error. + * mc-alloc.c: + #if 0 out some unused functions. + +2010-02-21 Ben Wing <ben@xemacs.org> + + * extents.c (process_extents_for_insertion_mapper): + Assertion wasn't quite set up correctly in previous patch. + +2010-02-20 Ben Wing <ben@xemacs.org> + + * EmacsFrame.c: + * EmacsFrame.c (EmacsFrameRecomputeCellSize): + * alloca.c (i00afunc): + * buffer.c: + * buffer.c (MARKED_SLOT): + * buffer.c (complex_vars_of_buffer): + * cm.c: + * cm.c (cmcheckmagic): + * console.c: + * console.c (MARKED_SLOT): + * device-x.c: + * device-x.c (x_get_visual_depth): + * emacs.c (sort_args): + * eval.c (throw_or_bomb_out): + * event-stream.c: + * event-stream.c (Fadd_timeout): + * event-stream.c (Fadd_async_timeout): + * event-stream.c (Frecent_keys): + * events.c: + * events.c (Fdeallocate_event): + * events.c (event_pixel_translation): + * extents.c: + * extents.c (process_extents_for_insertion_mapper): + * fns.c (Fbase64_encode_region): + * fns.c (Fbase64_encode_string): + * fns.c (Fbase64_decode_region): + * fns.c (Fbase64_decode_string): + * font-lock.c: + * font-lock.c (find_context): + * frame-x.c: + * frame-x.c (x_wm_mark_shell_size_user_specified): + * frame-x.c (x_wm_mark_shell_position_user_specified): + * frame-x.c (x_wm_set_shell_iconic_p): + * frame-x.c (x_wm_set_cell_size): + * frame-x.c (x_wm_set_variable_size): + * frame-x.c (x_wm_store_class_hints): + * frame-x.c (x_wm_maybe_store_wm_command): + * frame-x.c (x_initialize_frame_size): + * frame.c (delete_frame_internal): + * frame.c (change_frame_size_1): + * free-hook.c (check_free): + * free-hook.c (note_block_input): + * free-hook.c (log_gcpro): + * gccache-gtk.c (gc_cache_lookup): + * gccache-x.c: + * gccache-x.c (gc_cache_lookup): + * glyphs-gtk.c: + * glyphs-gtk.c (init_image_instance_from_gdk_pixmap): + * glyphs-x.c: + * glyphs-x.c (extract_xpm_color_names): + * insdel.c: + * insdel.c (move_gap): + * keymap.c: + * keymap.c (keymap_lookup_directly): + * keymap.c (keymap_delete_inverse_internal): + * keymap.c (accessible_keymaps_mapper_1): + * keymap.c (where_is_recursive_mapper): + * lisp.h: + * lstream.c (make_lisp_buffer_stream_1): + * macros.c: + * macros.c (pop_kbd_macro_event): + * mc-alloc.c (remove_page_from_used_list): + * menubar-x.c: + * menubar-x.c (set_frame_menubar): + * ralloc.c: + * ralloc.c (obtain): + * ralloc.c (relinquish): + * ralloc.c (relocate_blocs): + * ralloc.c (resize_bloc): + * ralloc.c (r_alloc_free): + * ralloc.c (r_re_alloc): + * ralloc.c (r_alloc_thaw): + * ralloc.c (init_ralloc): + * ralloc.c (Free_Addr_Block): + * scrollbar-x.c: + * scrollbar-x.c (x_update_scrollbar_instance_status): + * sunplay.c (init_device): + * unexnt.c: + * unexnt.c (read_in_bss): + * unexnt.c (map_in_heap): + * window.c: + * window.c (real_window): + * window.c (window_display_lines): + * window.c (window_display_buffer): + * window.c (set_window_display_buffer): + * window.c (unshow_buffer): + * window.c (Fget_lru_window): + if (...) ABORT(); ---> assert(); + + More specifically: + + if (x == y) ABORT (); --> assert (x != y); + if (x != y) ABORT (); --> assert (x == y); + if (x > y) ABORT (); --> assert (x <= y); + etc. + if (!x) ABORT (); --> assert (x); + if (x) ABORT (); --> assert (!x); + + DeMorgan's Law's applied and manually simplified: + if (x && !y) ABORT (); --> assert (!x || y); + if (!x || y >= z) ABORT (); --> assert (x && y < z); + + Checked to make sure that assert() of an expression with side + effects ensures that the side effects get executed even when + asserts are disabled, and add a comment about this being a + requirement of any "disabled assert" expression. + + * depend: + * make-src-depend: + * make-src-depend (PrintDeps): + Fix broken code in make-src-depend so it does what it was always + supposed to do, which was separate out config.h and lisp.h and + all the files they include into separate variables in the + depend part of Makefile so that quick-build can turn off the + lisp.h/config.h/text.h/etc. dependencies of the source files, to + speed up recompilation. + + +2010-02-20 Ben Wing <ben@xemacs.org> + + * EmacsFrame.c (EmacsFrameRecomputeCellSize): + * faces.c (default_face_font_info): + * faces.c (default_face_width_and_height): + * faces.c (Fface_list): + * faces.h: + * frame-gtk.c (gtk_set_initial_frame_size): + * frame-gtk.c (gtk_set_frame_size): + * frame-gtk.c (gtk_recompute_cell_sizes): + * frame.c: + * frame.c (frame_conversion_internal_1): + * frame.c (change_frame_size_1): + * frame.c (change_frame_size): + * glyphs-msw.c (mswindows_combo_box_instantiate): + * glyphs-widget.c (widget_instantiate): + * glyphs-widget.c (tree_view_query_geometry): + * glyphs-widget.c (Fwidget_logical_to_character_width): + * glyphs-widget.c (Fwidget_logical_to_character_height): + * indent.c (vmotion_pixels): + * redisplay-output.c (get_cursor_size_and_location): + * redisplay-xlike-inc.c (XLIKE_output_eol_cursor): + * redisplay-xlike-inc.c (XLIKE_flash): + * redisplay.c (calculate_baseline): + * redisplay.c (start_with_point_on_display_line): + * redisplay.c (glyph_to_pixel_translation): + * redisplay.c (pixel_to_glyph_translation): + * window.c (margin_width_internal): + * window.c (frame_size_valid_p): + * window.c (frame_pixsize_valid_p): + * window.c (check_frame_size): + * window.c (set_window_pixsize): + * window.c (window_pixel_height_to_char_height): + * window.c (window_char_height_to_pixel_height): + * window.c (window_displayed_height): + * window.c (window_pixel_width_to_char_width): + * window.c (window_char_width_to_pixel_width): + * window.c (change_window_height): + * window.c (window_scroll): + * window.h: + IMPORTANT: Aidan and Carbon Repo, please pay attention and fix + appropriately! + + Rename: default_face_height_and_width -> default_face_width_and_height + and reverse width/height arguments. + + Reverse width/height arguments to the following functions: + -- default_face_font_info + -- default_face_height_and_width (see above) + -- check_frame_size + -- frame_size_valid_p (made into a static function) + + Fix a redisplay bug where args to default_face_height_and_width + were in the wrong order. + + +2010-02-20 Ben Wing <ben@xemacs.org> + + * syswindows.h: + Add table about GNU Emacs -> XEmacs Windows constants from + the internals manual. + + * frame.c: + Shrink size of diagram consistent with internals manual. + + * alloc.c: + * compiler.h: + * console.c: + * events.c: + * gc.c (gc_stat_start_new_gc): + * gc.c (gc_stat_resume_gc): + * gc.c (kkcc_marking): + * gc.c (gc_1): + * gc.c (gc): + * objects-tty.c: + * redisplay-msw.c: + * redisplay-msw.c (mswindows_clear_region): + * syntax.c: + * syntax.c (ST_COMMENT_STYLE): + * sysdep.c: + Fix various compiler warnings. + +2010-02-16 Ben Wing <ben@xemacs.org> + + * frame-impl.h: + * frame-impl.h (FRAME_INTERNAL_BORDER_WIDTH): + * frame-impl.h (FRAME_REAL_TOOLBAR_BOUNDS): + * frame-impl.h (FRAME_REAL_TOP_TOOLBAR_BOUNDS): + * frame-impl.h (FRAME_BOTTOM_BORDER_START): + * frame-impl.h (FRAME_LEFT_BORDER_START): + * frame-impl.h (FRAME_RIGHT_BORDER_START): + * frame.c (frame_conversion_internal_1): + * frame.c (change_frame_size_1): + * redisplay-output.c (clear_left_border): + * redisplay-output.c (clear_right_border): + * redisplay-output.c (redisplay_clear_top_of_window): + * redisplay-output.c (redisplay_clear_to_window_end): + * redisplay-output.c (redisplay_clear_bottom_of_window): + Rename FRAME_BORDER_* to FRAME_INTERNAL_BORDER_*. Add + general FRAME_INTERNAL_BORDER_SIZE(). Add FRAME_REAL_TOOLBAR_BOUNDS() + to encompass the entire size of the toolbar including its border. + Add specific top/left/bottom/right versions of this macro. + Rewrite FRAME_*_BORDER_START and FRAME_*_BORDER_END to take into use + FRAME_REAL_*_TOOLBAR_BOUNDS(). Add some comments about existing + problems in frame sizing and how they might be fixed. Simplify + change_frame_size_1() using the macros just created. + +2010-02-15 Ben Wing <ben@xemacs.org> + + * frame.c (change_frame_size_1): + Simplify the logic in this function. + + (1) Don't allow 0 as the value of height or width. The old code + that tried to allow this was totally broken, anyway, so obviously + this never happens any more. + + (2) Don't duplicate the code in frame_conversion_internal() that + converts displayable pixel size to total pixel size -- just call + that function. + +2010-02-15 Ben Wing <ben@xemacs.org> + + * EmacsFrame.c: + * EmacsFrame.c (EmacsFrameResize): + * console-msw-impl.h: + * console-msw-impl.h (struct mswindows_frame): + * console-msw-impl.h (FRAME_MSWINDOWS_TARGET_RECT): + * device-tty.c: + * device-tty.c (tty_asynch_device_change): + * event-msw.c: + * event-msw.c (mswindows_wnd_proc): + * faces.c (Fface_list): + * faces.h: + * frame-gtk.c: + * frame-gtk.c (gtk_set_initial_frame_size): + * frame-gtk.c (gtk_set_frame_size): + * frame-msw.c: + * frame-msw.c (mswindows_init_frame_1): + * frame-msw.c (mswindows_set_frame_size): + * frame-msw.c (mswindows_size_frame_internal): + * frame-msw.c (msprinter_init_frame_3): + * frame.c: + * frame.c (enum): + * frame.c (Fmake_frame): + * frame.c (adjust_frame_size): + * frame.c (store_minibuf_frame_prop): + * frame.c (Fframe_property): + * frame.c (Fframe_properties): + * frame.c (Fframe_displayable_pixel_height): + * frame.c (Fframe_displayable_pixel_width): + * frame.c (internal_set_frame_size): + * frame.c (Fset_frame_height): + * frame.c (Fset_frame_pixel_height): + * frame.c (Fset_frame_displayable_pixel_height): + * frame.c (Fset_frame_width): + * frame.c (Fset_frame_pixel_width): + * frame.c (Fset_frame_displayable_pixel_width): + * frame.c (Fset_frame_size): + * frame.c (Fset_frame_pixel_size): + * frame.c (Fset_frame_displayable_pixel_size): + * frame.c (frame_conversion_internal_1): + * frame.c (get_frame_displayable_pixel_size): + * frame.c (change_frame_size_1): + * frame.c (change_frame_size): + * frame.c (generate_title_string): + * frame.h: + * gtk-xemacs.c: + * gtk-xemacs.c (gtk_xemacs_size_request): + * gtk-xemacs.c (gtk_xemacs_size_allocate): + * gtk-xemacs.c (gtk_xemacs_paint): + * gutter.c: + * gutter.c (update_gutter_geometry): + * redisplay.c (end_hold_frame_size_changes): + * redisplay.c (redisplay_frame): + * toolbar.c: + * toolbar.c (update_frame_toolbars_geometry): + * window.c: + * window.c (frame_pixsize_valid_p): + * window.c (check_frame_size): + Various fixes to frame geometry to make it a bit easier to understand + and fix some bugs. + + 1. IMPORTANT: Some renamings. Will need to be applied carefully to + the carbon repository, in the following order: + + -- pixel_to_char_size -> pixel_to_frame_unit_size + -- char_to_pixel_size -> frame_unit_to_pixel_size + -- pixel_to_real_char_size -> pixel_to_char_size + -- char_to_real_pixel_size -> char_to_pixel_size + -- Reverse second and third arguments of change_frame_size() and + change_frame_size_1() to try to make functions consistent in + putting width before height. + -- Eliminate old round_size_to_char, because it didn't really + do anything differently from round_size_to_real_char() + -- round_size_to_real_char -> round_size_to_char; any places that + called the old round_size_to_char should just call the new one. + + 2. IMPORTANT FOR CARBON: The set_frame_size() method is now passed + sizes in "frame units", like all other frame-sizing functions, + rather than some hacked-up combination of char-cell units and + total pixel size. This only affects window systems that use + "pixelated geometry", and I'm not sure if Carbon is one of them. + MS Windows is pixelated, X and GTK are not. For pixelated-geometry + systems, the size in set_frame_size() is in displayable pixels + rather than total pixels and needs to be converted appropriately; + take a look at the changes made to mswindows_set_frame_size() + method if necessary. + + 3. Add a big long comment in frame.c describing how frame geometry + works. + + 4. Remove MS Windows-specific character height and width fields, + duplicative and unused. + + 5. frame-displayable-pixel-* and set-frame-displayable-pixel-* + didn't use to work on MS Windows, but they do now. + + 6. In general, clean up the handling of "pixelated geometry" so + that fewer functions have to worry about this. This is really + an abomination that should be removed entirely but that will + have to happen later. Fix some buggy code in + frame_conversion_internal() that happened to "work" because it + was countered by oppositely buggy code in change_frame_size(). + + 7. Clean up some frame-size code in toolbar.c and use functions + already provided in frame.c instead of rolling its own. + + 8. Fix check_frame_size() in window.c, which formerly didn't take + pixelated geometry into account. + + +2010-02-15 Ben Wing <ben@xemacs.org> + + * mc-alloc.c: + * mc-alloc.c (mc_realloc_1): + * mc-alloc.c (set_dirty_bit): + * mc-alloc.c (set_dirty_bit_for_address): + * mc-alloc.c (get_dirty_bit): + * mc-alloc.c (get_dirty_bit_for_address): + * mc-alloc.c (set_protection_bit): + * mc-alloc.c (set_protection_bit_for_address): + * mc-alloc.c (get_protection_bit): + * mc-alloc.c (get_protection_bit_for_address): + * mc-alloc.c (get_page_start): + * vdb-win32.c (win32_fault_handler): + * vdb.c: + Fix some compile warnings, make vdb test code conditional on + DEBUG_XEMACS. + +2010-02-15 Ben Wing <ben@xemacs.org> + + * regex.c: + * regex.c (DEBUG_FAIL_PRINT1): + * regex.c (PUSH_FAILURE_POINT): + * regex.c (POP_FAILURE_POINT): + * regex.c (regex_compile): + * regex.c (re_match_2_internal): + * regex.h: + * search.c: + * search.c (search_buffer): + * search.c (debug_regexps_changed): + * search.c (vars_of_search): + Add an internal variable debug_regexps and a corresponding Lisp + variable `debug-regexps' that takes a list of areas in which to + display debugging info about regex compilation and matching + (currently three areas exist). Use existing debugging code + already in regex.c and modify it so that it recognizes the + debug_regexps variable and the flags in it. + + Rename variable `debug-xemacs-searches' to just `debug-searches', + consistent with other debug vars. + +2010-02-20 Ben Wing <ben@xemacs.org> + + * device-x.c (Fx_get_resource): + * dynarr.c: + * dynarr.c (Dynarr_realloc): + * dynarr.c (Dynarr_newf): + * dynarr.c (Dynarr_lisp_realloc): + * dynarr.c (Dynarr_lisp_newf): + * dynarr.c (Dynarr_resize): + * dynarr.c (Dynarr_insert_many): + * dynarr.c (Dynarr_delete_many): + * dynarr.c (Dynarr_memory_usage): + * dynarr.c (stack_like_free): + * file-coding.c (coding_reader): + * file-coding.c (gzip_convert): + * gutter.c (output_gutter): + * lisp.h: + * lisp.h (Dynarr_declare): + * lisp.h (DYNARR_SET_LISP_IMP): + * lisp.h (CHECK_NATNUM): + * profile.c (create_timing_profile_table): + * redisplay-output.c (sync_rune_structs): + * redisplay-output.c (sync_display_line_structs): + * redisplay-output.c (redisplay_output_window): + * redisplay.c: + * redisplay.c (get_display_block_from_line): + * redisplay.c (add_ichar_rune_1): + * redisplay.c (ensure_modeline_generated): + * redisplay.c (generate_displayable_area): + * redisplay.c (regenerate_window): + * redisplay.c (update_line_start_cache): + * signal.c: + * signal.c (check_quit): + + Lots of rewriting of dynarr code. + + (1) Lots of documentation added. Also fix places that + referenced a now-bogus internals node concerning redisplay + critical sections. + + (2) Rename: + + Dynarr_add_lisp_string -> Dynarr_add_ext_lisp_string + Dynarr_set_length -> Dynarr_set_lengthr ("restricted") + Dynarr_increment -> Dynarr_incrementr + Dynarr_resize_if -> Dynarr_resize_to_add + + (3) New functions: + + Dynarr_elsize = dy->elsize_ + Dynarr_set_length(): Set length, resizing as necessary + Dynarr_set_length_and_zero(): Set length, resizing as necessary, + zeroing out new elements + Dynarr_increase_length(), Dynarr_increase_length_and_zero(): + Optimization of Dynarr_set_length(), Dynarr_set_length_and_zero() + when size is known to increase + Dynarr_resize_to_fit(): Resize as necessary to fit a given length. + Dynarr_set(): Set element at a given position, increasing length + as necessary and setting any newly created positions to 0 + + (4) Use Elemcount, Bytecount. + + (5) Rewrite many macros as inline functions. + +2010-02-20 Ben Wing <ben@xemacs.org> + + * tests.c: + Fix operation of c-tests. + +2010-02-19 Aidan Kehoe <kehoea@parhasard.net> + + * fns.c (split_string_by_ichar_1): + Use better types (e.g., not an Ichar for a buffer size) in this + function when dealing with ESCAPECHAR. + +2010-02-19 Aidan Kehoe <kehoea@parhasard.net> + + * fns.c (mapcarX): + Correct this function, discarding multiple values when one + SEQUENCE is supplied, choosing a better label name. Correct the + comment describing the SOME_OR_EVERY argument. + +2010-02-12 Aidan Kehoe <kehoea@parhasard.net> + + * syswindows.h: + Remove the PDWORD_PTR typedef; it's not used in + intl-auto-encap-win32.h , and it breaks the build with Visual C++ + 2005 Express Edition and a 2005 copy of the SDK. + 2010-02-20 Ben Wing <ben@xemacs.org> * sysdep.c: @@ -3541,6 +7628,16 @@ reasons. +2010-02-07 Aidan Kehoe <kehoea@parhasard.net> + + * fns.c (split_string_by_ichar_1): Extend this to take UNESCAPE + and ESCAPECHAR arguments. + (split_external_path, split_env_path, Fsplit_string_by_char) + (Fsplit_path): + Pass the new arguments to split_string_by_ichar_1(); take a new + optional argument, ESCAPE-CHAR, in #'split-string-by-char, + allowing SEPCHAR to be escaped. + 2010-01-09 Didier Verna <didier@xemacs.org> * glyphs.c (query_string_font): Use proper domain for cachel @@ -54811,3 +58908,23 @@ Wed Dec 4 23:38:03 1996 Steven L Baur <steve@altair.xemacs.org> * redisplay.c: Allow column numbers in modeline to start from 1. + + +ChangeLog entries synched from GNU Emacs are the property of the FSF. +Other ChangeLog entries are usually the property of the author of the +change. + +This file is part of XEmacs. + +XEmacs 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 3 of the License, or (at your +option) any later version. + +XEmacs 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 XEmacs. If not, see <http://www.gnu.org/licenses/>.