Mercurial > hg > xemacs-beta
annotate src/debug.c @ 4953:304aebb79cd3
function renamings to track names of char typedefs
-------------------- ChangeLog entries follow: --------------------
man/ChangeLog addition:
2010-01-27 Ben Wing <ben@xemacs.org>
* internals/internals.texi (lrecords):
* internals/internals.texi (The DFC API):
* internals/internals.texi (Conversion to and from External Data):
* internals/internals.texi (Mule-izing Code):
* internals/internals.texi (Pervasive changes throughout XEmacs sources):
* internals/internals.texi (Ben's README):
* internals/internals.texi (Future Work -- Localized Text/Messages):
* emodules.texi (Defining Variables):
Rename:
write_c_string -> write_cistring
build_intstring -> build_istring
build_string -> build_cistring
build_ext_string -> build_extstring
make_ext_string -> make_extstring
buffer_insert_c_string -> buffer_insert_ascstring
intern_int -> intern_istring
See comment in src/ChangeLog about this.
modules/ChangeLog addition:
2010-01-27 Ben Wing <ben@xemacs.org>
* postgresql/postgresql.c (print_pgconn):
* postgresql/postgresql.c (print_pgresult):
* postgresql/postgresql.c (Fpq_conn_defaults):
* postgresql/postgresql.c (Fpq_pgconn):
* postgresql/postgresql.c (Fpq_res_status):
* postgresql/postgresql.c (Fpq_result_error_message):
* postgresql/postgresql.c (Fpq_fname):
* postgresql/postgresql.c (Fpq_get_value):
* postgresql/postgresql.c (Fpq_cmd_status):
* postgresql/postgresql.c (Fpq_cmd_tuples):
* postgresql/postgresql.c (Fpq_notifies):
* postgresql/postgresql.c (Fpq_get_line):
* postgresql/postgresql.c (Fpq_get_line_async):
* postgresql/postgresql.c (FROB):
* postgresql/postgresql.c (init_postgresql_from_environment):
* ldap/eldap.c:
* ldap/eldap.c (Fldap_open):
* ldap/eldap.c (Fldap_search_basic):
* canna/canna_api.c:
* canna/canna_api.c (make_euc_string):
Rename:
write_c_string -> write_cistring
build_intstring -> build_istring
build_string -> build_cistring
build_ext_string -> build_extstring
make_ext_string -> make_extstring
buffer_insert_c_string -> buffer_insert_ascstring
intern_int -> intern_istring
See comment in src/ChangeLog about this.
src/ChangeLog addition:
2010-01-27 Ben Wing <ben@xemacs.org>
* .gdbinit.in.in:
* README:
* abbrev.c (write_abbrev):
* abbrev.c (describe_abbrev):
* alloc.c (make_extstring):
* alloc.c (build_istring):
* alloc.c (build_cistring):
* alloc.c (build_ascstring):
* alloc.c (build_extstring):
* alloc.c (build_msg_istring):
* alloc.c (build_defer_istring):
* buffer.c (Fgenerate_new_buffer_name):
* buffer.c (init_buffer_2):
* console-tty.c (tty_init_console):
* console-x.c (get_display_arg_connection):
* console-x.c (x_perhaps_init_unseen_key_defaults):
* database.c (dbm_map):
* database.c (dbm_get):
* database.c (berkdb_get):
* database.c (berkdb_map):
* device-gtk.c (FROB_PIXMAP):
* device-gtk.c (Fgtk_style_info):
* device-msw.c (msprinter_default_printer):
* device-msw.c (sync_printer_with_devmode):
* device-x.c (coding_system_of_xrm_database):
* device-x.c (x_init_device):
* device-x.c (signal_if_x_error):
* device-x.c (Fx_get_resource):
* device-x.c (Fx_server_vendor):
* device-x.c (Fx_get_font_path):
* dialog-x.c (maybe_run_dbox_text_callback):
* doc.c (extract_object_file_name):
* doc.c (unparesseuxify_doc_string):
* doc.c (get_doc_string):
* doc.c (get_object_file_name):
* doc.c (Fdocumentation):
* doc.c (Fsnarf_documentation):
* doc.c (Fsubstitute_command_keys):
* editfns.c (init_editfns):
* editfns.c (Ftemp_directory):
* editfns.c (Fuser_login_name):
* editfns.c (Fuser_real_login_name):
* editfns.c (Fuser_home_directory):
* editfns.c (Fformat_time_string):
* editfns.c (Fcurrent_time_string):
* editfns.c (Fcurrent_time_zone):
* emacs.c:
* emacs.c (main_1):
* emodules.c (Flist_modules):
* emodules.c (emodules_load):
* emodules.c (emodules_doc_sym):
* emodules.c (vars_of_module):
* event-Xt.c (x_has_keysym):
* event-gtk.c (emacs_gtk_format_magic_event):
* event-gtk.c (dragndrop_data_received):
* event-gtk.c (gtk_reset_key_mapping):
* event-msw.c (mswindows_dde_callback):
* event-msw.c (mswindows_wnd_proc):
* faces.c (complex_vars_of_faces):
* file-coding.c (find_coding_system):
* file-coding.c (setup_eol_coding_systems):
* file-coding.c (make_coding_system_1):
* file-coding.c (snarf_coding_system):
* fileio.c:
* fileio.c (lisp_strerror):
* fileio.c (Ffile_name_directory):
* fileio.c (Ffile_name_as_directory):
* fileio.c (Fdirectory_file_name):
* fileio.c (if):
* fileio.c (Ffile_symlink_p):
* fileio.c (Fencrypt_string):
* fileio.c (Fdecrypt_string):
* filelock.c (lock_file):
* filelock.c (Ffile_locked_p):
* floatfns.c (matherr):
* font-mgr.c (build_fcapi_string):
* font-mgr.c (make_xlfd_font_regexp):
* frame-msw.c (mswindows_window_id):
* frame-msw.c (mswindows_frame_property):
* frame-x.c:
* frame-x.c (color_to_string):
* frame-x.c (maybe_set_frame_title_format):
* frame-x.c (x_cde_transfer_callback):
* frame-x.c (Fx_window_id):
* glade.c (connector):
* glade.c (Fglade_xml_textdomain):
* glade.c (syms_of_glade):
* glyphs-eimage.c (jpeg_instantiate):
* glyphs-eimage.c (png_instantiate):
* glyphs-eimage.c (tiff_instantiate):
* glyphs-gtk.c (font_instantiate):
* glyphs-gtk.c (BUILD_GLYPH_INST):
* glyphs-x.c (x_locate_pixmap_file):
* glyphs-x.c (font_instantiate):
* glyphs-x.c (x_widget_property):
* glyphs-x.c (BUILD_GLYPH_INST):
* glyphs.c (print_image_instance):
* glyphs.c (bitmap_to_lisp_data):
* glyphs.c (pixmap_to_lisp_data):
* gpmevent.c (turn_off_gpm):
* gpmevent.c (Fgpm_enabled_p):
* gpmevent.c (Fgpm_enable):
* gtk-glue.c (__make_string_mapper):
* gtk-glue.c (xemacs_gtklist_to_list):
* gtk-xemacs.c (FROB_FACE):
* gtk-xemacs.c (xemacs_gtk_convert_color):
* hpplay.c (player_error_internal):
* hpplay.c (myHandler):
* insdel.c (buffer_insert_ascstring_1):
* insdel.h:
* insdel.h (buffer_insert_ascstring):
* intl.c (Fcurrent_locale):
* intl.c (Fset_current_locale):
* keymap.c (make_key_description):
* keymap.c (Ftext_char_description):
* keymap.c (describe_command):
* keymap.c (describe_map):
* lisp.h:
* lread.c:
* lread.c (locate_file_in_directory_mapper):
* lread.c (locate_file_construct_suffixed_files_mapper):
* mule-charset.c (Fmake_charset):
* nt.c (Fmswindows_short_file_name):
* nt.c (Fmswindows_long_file_name):
* objects-gtk.c (__get_gtk_font_truename):
* objects-gtk.c (__gtk_font_list_internal):
* objects-msw.c (font_enum_callback_2):
* objects-msw.c (create_hfont_from_font_spec):
* objects-msw.c (mswindows_font_list):
* objects-msw.c (mswindows_font_spec_matches_charset_stage_2):
* objects-tty.c (tty_initialize_font_instance):
* objects-x.c (x_font_truename):
* objects-x.c (x_font_instance_truename):
* objects-x.c (x_font_instance_properties):
* objects-x.c (x_font_list):
* print.c (write_cistring):
* print.c (print_vector_internal):
* print.c (print_cons):
* process-nt.c (nt_canonicalize_host_name):
* process-unix.c (unix_create_process):
* process-unix.c (unix_canonicalize_host_name):
* process.c (status_message):
* process.c (status_notify):
* process.c (init_xemacs_process):
* process.c (syms_of_process):
* redisplay-tty.c (term_get_fkeys_1):
* redisplay-tty.c (CONDITIONAL_REASSIGN):
* search.c (compile_pattern_1):
* select-common.h (selection_data_to_lisp_data):
* select-gtk.c (atom_to_symbol):
* select-gtk.c (PROCESSING_GTK_CODE):
* select-msw.c (mswindows_get_foreign_selection):
* select-x.c (x_atom_to_symbol):
* select-x.c (Fx_get_cutbuffer_internal):
* symbols.c (intern_istring):
* symbols.c (intern):
* symbols.c (intern_converting_underscores_to_dashes):
* symbols.c (Fintern):
* sysdep.c (init_system_name):
* sysdll.c (dll_error):
* sysdll.c (dll_open):
* syswindows.h:
* syswindows.h (build_tstr_string):
* tests.c (DFC_CHECK_LENGTH):
* tests.c (DFC_CHECK_CONTENT):
* tests.c (DFC_RESULT_PASS):
* tests.c (Ftest_data_format_conversion):
* text.c:
* text.c (new_dfc_convert_now_damn_it):
* text.h:
* text.h (build_wext_string):
* tooltalk.c (tt_build_c_string):
* tooltalk.c (Ftooltalk_default_procid):
* tooltalk.c (Ftooltalk_default_session):
* tooltalk.c (init_tooltalk):
* ui-byhand.c (Fgtk_clist_get_text):
* ui-byhand.c (Fgtk_clist_get_pixtext):
* ui-byhand.c (Fgtk_label_get):
* ui-byhand.c (Fgtk_notebook_query_tab_label_packing):
* ui-gtk.c (emacs_gtk_object_printer):
* ui-gtk.c (emacs_gtk_boxed_printer):
* ui-gtk.c (gtk_type_to_lisp):
* ui-gtk.c (symbol_to_enum):
* ui-gtk.c (enum_to_symbol):
* unexaix.c (report_error):
* unexaix.c (ERROR0):
* unexec.c (report_error):
* unexec.c (ERROR0):
* unicode.c (unicode_to_ichar):
* win32.c (tstr_to_local_file_format):
* win32.c (Fmswindows_cygwin_to_win32_path):
* win32.c (struct read_link_hash):
* xemacs.def.in.in:
Rename:
write_c_string -> write_cistring
build_intstring -> build_istring
build_string -> build_cistring
build_ext_string -> build_extstring
make_ext_string -> make_extstring
buffer_insert_c_string -> buffer_insert_ascstring
intern_int -> intern_istring
These functions have been renamed so that the naming harmonizes
with the typedefs for strings: `cistring' along with CIbyte *,
`istring' along with Ibyte *, `extstring' along with Extbyte *,
`ascstring' along with Ascbyte *.
Also make buffer_insert_ascstring take Ascbyte * and assert
that its argument is ASCII.
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Wed, 27 Jan 2010 00:35:36 -0600 |
parents | e0138eaaca0c |
children | 308d34e9f07d |
rev | line source |
---|---|
428 | 1 /* Debugging aids -- togglable assertions. |
2 Copyright (C) 1994 Free Software Foundation, Inc. | |
3 | |
4 This file is part of XEmacs. | |
5 | |
6 XEmacs is free software; you can redistribute it and/or modify it | |
7 under the terms of the GNU General Public License as published by the | |
8 Free Software Foundation; either version 2, or (at your option) any | |
9 later version. | |
10 | |
11 XEmacs is distributed in the hope that it will be useful, but WITHOUT | |
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
14 for more details. | |
15 | |
16 You should have received a copy of the GNU General Public License | |
17 along with XEmacs; see the file COPYING. If not, write to | |
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
19 Boston, MA 02111-1307, USA. */ | |
20 | |
21 /* Synched up with: Not in FSF. */ | |
22 | |
23 /* This file has been Mule-ized. */ | |
24 | |
25 /* Written by Chuck Thompson */ | |
26 | |
27 #include <config.h> | |
28 #include "lisp.h" | |
29 #include "debug.h" | |
30 #include "bytecode.h" | |
31 | |
32 /* | |
33 * To add a new debug class: | |
1318 | 34 * 1. Add a symbol definition for it here or in general-slots.h, if one |
35 * doesn't exist elsewhere. If you add it here, make sure to add a | |
36 * defsymbol line for it in syms_of_debug. | |
428 | 37 * 2. Add an extern definition for the symbol to debug.h. |
38 * 3. Add entries for the class to struct debug_classes in debug.h. | |
39 * 4. Add a FROB line for it in xemacs_debug_loop. | |
40 */ | |
41 | |
42 struct debug_classes active_debug_classes; | |
43 | |
44 enum debug_loop | |
45 { | |
436 | 46 X_ADD, |
47 X_DELETE, | |
48 X_LIST, | |
49 X_ACTIVE, | |
50 X_INIT, | |
51 X_VALIDATE, | |
52 X_TYPE, | |
53 X_SETTYPE | |
428 | 54 }; |
55 | |
56 static Lisp_Object | |
1204 | 57 xemacs_debug_loop (enum debug_loop op, Lisp_Object class_, Lisp_Object type) |
428 | 58 { |
436 | 59 int flag = (op == X_ADD) ? 1 : 0; |
428 | 60 Lisp_Object retval = Qnil; |
61 | |
1318 | 62 #define FROB(item) \ |
63 if (op == X_LIST || op == X_ACTIVE || op == X_INIT || EQ (class_, Q##item)) \ | |
64 { \ | |
65 if (op == X_ADD || op == X_DELETE || op == X_INIT) \ | |
66 active_debug_classes.item = flag; \ | |
67 else if (op == X_LIST \ | |
68 || (op == X_ACTIVE && active_debug_classes.item)) \ | |
69 retval = Fcons (Q##item, retval); \ | |
70 else if (op == X_VALIDATE) \ | |
71 return Qt; \ | |
72 else if (op == X_SETTYPE) \ | |
73 active_debug_classes.types_of_##item = XINT (type); \ | |
74 else if (op == X_TYPE) \ | |
75 retval = make_int (active_debug_classes.types_of_##item); \ | |
76 if (op == X_INIT) active_debug_classes.types_of_##item = VALBITS; \ | |
428 | 77 } |
78 | |
79 FROB (redisplay); | |
80 FROB (buffers); | |
81 FROB (extents); | |
82 FROB (faces); | |
83 FROB (windows); | |
84 FROB (frames); | |
85 FROB (devices); | |
86 FROB (byte_code); | |
87 | |
88 return retval; | |
89 #undef FROB | |
90 } | |
91 | |
92 DEFUN ("add-debug-class-to-check", Fadd_debug_class_to_check, 1, 1, 0, /* | |
93 Add a debug class to the list of active classes. | |
94 */ | |
1204 | 95 (class_)) |
428 | 96 { |
1204 | 97 if (NILP (xemacs_debug_loop (X_VALIDATE, class_, Qnil))) |
563 | 98 invalid_argument ("No such debug class exists", Qunbound); |
428 | 99 else |
1204 | 100 xemacs_debug_loop (X_ADD, class_, Qnil); |
428 | 101 |
436 | 102 return (xemacs_debug_loop (X_ACTIVE, Qnil, Qnil)); |
428 | 103 } |
104 | |
105 DEFUN ("delete-debug-class-to-check", Fdelete_debug_class_to_check, 1, 1, 0, /* | |
106 Delete a debug class from the list of active classes. | |
107 */ | |
1204 | 108 (class_)) |
428 | 109 { |
1204 | 110 if (NILP (xemacs_debug_loop (X_VALIDATE, class_, Qnil))) |
563 | 111 invalid_argument ("No such debug class exists", Qunbound); |
428 | 112 else |
1204 | 113 xemacs_debug_loop (X_DELETE, class_, Qnil); |
428 | 114 |
436 | 115 return (xemacs_debug_loop (X_ACTIVE, Qnil, Qnil)); |
428 | 116 } |
117 | |
118 DEFUN ("debug-classes-being-checked", Fdebug_classes_being_checked, 0, 0, 0, /* | |
119 Return a list of active debug classes. | |
120 */ | |
121 ()) | |
122 { | |
436 | 123 return (xemacs_debug_loop (X_ACTIVE, Qnil, Qnil)); |
428 | 124 } |
125 | |
126 DEFUN ("debug-classes-list", Fdebug_classes_list, 0, 0, 0, /* | |
127 Return a list of all defined debug classes. | |
128 */ | |
129 ()) | |
130 { | |
436 | 131 return (xemacs_debug_loop (X_LIST, Qnil, Qnil)); |
428 | 132 } |
133 | |
134 DEFUN ("set-debug-classes-to-check", Fset_debug_classes_to_check, 1, 1, 0, /* | |
135 Set which classes of debug statements should be active. | |
136 CLASSES should be a list of debug classes. | |
137 */ | |
138 (classes)) | |
139 { | |
140 Lisp_Object rest; | |
141 | |
142 CHECK_LIST (classes); | |
143 | |
144 /* Make sure all objects in the list are valid. If anyone is not | |
145 valid, reject the entire list without doing anything. */ | |
1204 | 146 LIST_LOOP (rest, classes) |
428 | 147 { |
436 | 148 if (NILP (xemacs_debug_loop (X_VALIDATE, XCAR (rest), Qnil))) |
563 | 149 sferror ("Invalid object in class list", Qunbound); |
428 | 150 } |
151 | |
152 LIST_LOOP (rest, classes) | |
153 Fadd_debug_class_to_check (XCAR (rest)); | |
154 | |
436 | 155 return (xemacs_debug_loop (X_ACTIVE, Qnil, Qnil)); |
428 | 156 } |
157 | |
158 DEFUN ("set-debug-class-types-to-check", Fset_debug_class_types_to_check, 2, 2, 0, /* | |
159 For the given debug CLASS, set which TYPES are actually interesting. | |
160 TYPES should be an integer representing the or'd value of all desired types. | |
161 Lists of defined types and their values are located in the source code. | |
162 */ | |
1204 | 163 (class_, type)) |
428 | 164 { |
165 CHECK_INT (type); | |
1204 | 166 if (NILP (xemacs_debug_loop (X_VALIDATE, class_, Qnil))) |
563 | 167 invalid_argument ("Invalid debug class", Qunbound); |
428 | 168 |
1204 | 169 xemacs_debug_loop (X_SETTYPE, class_, type); |
428 | 170 |
1204 | 171 return (xemacs_debug_loop (X_TYPE, class_, Qnil)); |
428 | 172 } |
173 | |
174 DEFUN ("debug-types-being-checked", Fdebug_types_being_checked, 1, 1, 0, /* | |
175 For the given CLASS, return the associated type value. | |
176 */ | |
1204 | 177 (class_)) |
428 | 178 { |
1204 | 179 if (NILP (xemacs_debug_loop (X_VALIDATE, class_, Qnil))) |
563 | 180 invalid_argument ("Invalid debug class", Qunbound); |
428 | 181 |
1204 | 182 return (xemacs_debug_loop (X_TYPE, class_, Qnil)); |
428 | 183 } |
184 | |
185 void | |
186 syms_of_debug (void) | |
187 { | |
188 DEFSUBR (Fadd_debug_class_to_check); | |
189 DEFSUBR (Fdelete_debug_class_to_check); | |
190 DEFSUBR (Fdebug_classes_being_checked); | |
191 DEFSUBR (Fdebug_classes_list); | |
192 DEFSUBR (Fset_debug_classes_to_check); | |
193 DEFSUBR (Fset_debug_class_types_to_check); | |
194 DEFSUBR (Fdebug_types_being_checked); | |
195 } | |
196 | |
197 void | |
198 reinit_vars_of_debug (void) | |
199 { | |
200 /* If you need to have any classes active early on in startup, then | |
201 the flags should be set here. | |
202 All functions called by this function are "allowed" according | |
203 to emacs.c. */ | |
436 | 204 xemacs_debug_loop (X_INIT, Qnil, Qnil); |
428 | 205 } |
206 | |
207 void | |
208 vars_of_debug (void) | |
209 { | |
4852
e0138eaaca0c
need to provide debug-xemacs for debug-on-error changes to work
Ben Wing <ben@xemacs.org>
parents:
2367
diff
changeset
|
210 Fprovide (intern ("debug-xemacs")); |
428 | 211 } |