comparison src/ChangeLog @ 665:fdefd0186b75

[xemacs-hg @ 2001-09-20 06:28:42 by ben] The great integral types renaming. The purpose of this is to rationalize the names used for various integral types, so that they match their intended uses and follow consist conventions, and eliminate types that were not semantically different from each other. The conventions are: -- All integral types that measure quantities of anything are signed. Some people disagree vociferously with this, but their arguments are mostly theoretical, and are vastly outweighed by the practical headaches of mixing signed and unsigned values, and more importantly by the far increased likelihood of inadvertent bugs: Because of the broken "viral" nature of unsigned quantities in C (operations involving mixed signed/unsigned are done unsigned, when exactly the opposite is nearly always wanted), even a single error in declaring a quantity unsigned that should be signed, or even the even more subtle error of comparing signed and unsigned values and forgetting the necessary cast, can be catastrophic, as comparisons will yield wrong results. -Wsign-compare is turned on specifically to catch this, but this tends to result in a great number of warnings when mixing signed and unsigned, and the casts are annoying. More has been written on this elsewhere. -- All such quantity types just mentioned boil down to EMACS_INT, which is 32 bits on 32-bit machines and 64 bits on 64-bit machines. This is guaranteed to be the same size as Lisp objects of type `int', and (as far as I can tell) of size_t (unsigned!) and ssize_t. The only type below that is not an EMACS_INT is Hashcode, which is an unsigned value of the same size as EMACS_INT. -- Type names should be relatively short (no more than 10 characters or so), with the first letter capitalized and no underscores if they can at all be avoided. -- "count" == a zero-based measurement of some quantity. Includes sizes, offsets, and indexes. -- "bpos" == a one-based measurement of a position in a buffer. "Charbpos" and "Bytebpos" count text in the buffer, rather than bytes in memory; thus Bytebpos does not directly correspond to the memory representation. Use "Membpos" for this. -- "Char" refers to internal-format characters, not to the C type "char", which is really a byte. -- For the actual name changes, see the script below. I ran the following script to do the conversion. (NOTE: This script is idempotent. You can safely run it multiple times and it will not screw up previous results -- in fact, it will do nothing if nothing has changed. Thus, it can be run repeatedly as necessary to handle patches coming in from old workspaces, or old branches.) There are two tags, just before and just after the change: `pre-integral-type-rename' and `post-integral-type-rename'. When merging code from the main trunk into a branch, the best thing to do is first merge up to `pre-integral-type-rename', then apply the script and associated changes, then merge from `post-integral-type-change' to the present. (Alternatively, just do the merging in one operation; but you may then have a lot of conflicts needing to be resolved by hand.) Script `fixtypes.sh' follows: ----------------------------------- cut ------------------------------------ files="*.[ch] s/*.h m/*.h config.h.in ../configure.in Makefile.in.in ../lib-src/*.[ch] ../lwlib/*.[ch]" gr Memory_Count Bytecount $files gr Lstream_Data_Count Bytecount $files gr Element_Count Elemcount $files gr Hash_Code Hashcode $files gr extcount bytecount $files gr bufpos charbpos $files gr bytind bytebpos $files gr memind membpos $files gr bufbyte intbyte $files gr Extcount Bytecount $files gr Bufpos Charbpos $files gr Bytind Bytebpos $files gr Memind Membpos $files gr Bufbyte Intbyte $files gr EXTCOUNT BYTECOUNT $files gr BUFPOS CHARBPOS $files gr BYTIND BYTEBPOS $files gr MEMIND MEMBPOS $files gr BUFBYTE INTBYTE $files gr MEMORY_COUNT BYTECOUNT $files gr LSTREAM_DATA_COUNT BYTECOUNT $files gr ELEMENT_COUNT ELEMCOUNT $files gr HASH_CODE HASHCODE $files ----------------------------------- cut ------------------------------------ `fixtypes.sh' is a Bourne-shell script; it uses 'gr': ----------------------------------- cut ------------------------------------ #!/bin/sh # Usage is like this: # gr FROM TO FILES ... # globally replace FROM with TO in FILES. FROM and TO are regular expressions. # backup files are stored in the `backup' directory. from="$1" to="$2" shift 2 echo ${1+"$@"} | xargs global-replace "s/$from/$to/g" ----------------------------------- cut ------------------------------------ `gr' in turn uses a Perl script to do its real work, `global-replace', which follows: ----------------------------------- cut ------------------------------------ : #-*- Perl -*- ### global-modify --- modify the contents of a file by a Perl expression ## Copyright (C) 1999 Martin Buchholz. ## Copyright (C) 2001 Ben Wing. ## Authors: Martin Buchholz <martin@xemacs.org>, Ben Wing <ben@xemacs.org> ## Maintainer: Ben Wing <ben@xemacs.org> ## Current Version: 1.0, May 5, 2001 # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program 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; see the file COPYING. If not, write to the Free # Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. eval 'exec perl -w -S $0 ${1+"$@"}' if 0; use strict; use FileHandle; use Carp; use Getopt::Long; use File::Basename; (my $myName = $0) =~ s@.*/@@; my $usage=" Usage: $myName [--help] [--backup-dir=DIR] [--line-mode] [--hunk-mode] PERLEXPR FILE ... Globally modify a file, either line by line or in one big hunk. Typical usage is like this: [with GNU print, GNU xargs: guaranteed to handle spaces, quotes, etc. in file names] find . -name '*.[ch]' -print0 | xargs -0 $0 's/\bCONST\b/const/g'\n [with non-GNU print, xargs] find . -name '*.[ch]' -print | xargs $0 's/\bCONST\b/const/g'\n The file is read in, either line by line (with --line-mode specified) or in one big hunk (with --hunk-mode specified; it's the default), and the Perl expression is then evalled with \$_ set to the line or hunk of text, including the terminating newline if there is one. It should destructively modify the value there, storing the changed result in \$_. Files in which any modifications are made are backed up to the directory specified using --backup-dir, or to `backup' by default. To disable this, use --backup-dir= with no argument. Hunk mode is the default because it is MUCH MUCH faster than line-by-line. Use line-by-line only when it matters, e.g. you want to do a replacement only once per line (the default without the `g' argument). Conversely, when using hunk mode, *ALWAYS* use `g'; otherwise, you will only make one replacement in the entire file! "; my %options = (); $Getopt::Long::ignorecase = 0; &GetOptions ( \%options, 'help', 'backup-dir=s', 'line-mode', 'hunk-mode', ); die $usage if $options{"help"} or @ARGV <= 1; my $code = shift; die $usage if grep (-d || ! -w, @ARGV); sub SafeOpen { open ((my $fh = new FileHandle), $_[0]); confess "Can't open $_[0]: $!" if ! defined $fh; return $fh; } sub SafeClose { close $_[0] or confess "Can't close $_[0]: $!"; } sub FileContents { my $fh = SafeOpen ("< $_[0]"); my $olddollarslash = $/; local $/ = undef; my $contents = <$fh>; $/ = $olddollarslash; return $contents; } sub WriteStringToFile { my $fh = SafeOpen ("> $_[0]"); binmode $fh; print $fh $_[1] or confess "$_[0]: $!\n"; SafeClose $fh; } foreach my $file (@ARGV) { my $changed_p = 0; my $new_contents = ""; if ($options{"line-mode"}) { my $fh = SafeOpen $file; while (<$fh>) { my $save_line = $_; eval $code; $changed_p = 1 if $save_line ne $_; $new_contents .= $_; } } else { my $orig_contents = $_ = FileContents $file; eval $code; if ($_ ne $orig_contents) { $changed_p = 1; $new_contents = $_; } } if ($changed_p) { my $backdir = $options{"backup-dir"}; $backdir = "backup" if !defined ($backdir); if ($backdir) { my ($name, $path, $suffix) = fileparse ($file, ""); my $backfulldir = $path . $backdir; my $backfile = "$backfulldir/$name"; mkdir $backfulldir, 0755 unless -d $backfulldir; print "modifying $file (original saved in $backfile)\n"; rename $file, $backfile; } WriteStringToFile ($file, $new_contents); } } ----------------------------------- cut ------------------------------------ In addition to those programs, I needed to fix up a few other things, particularly relating to the duplicate definitions of types, now that some types merged with others. Specifically: 1. in lisp.h, removed duplicate declarations of Bytecount. The changed code should now look like this: (In each code snippet below, the first and last lines are the same as the original, as are all lines outside of those lines. That allows you to locate the section to be replaced, and replace the stuff in that section, verifying that there isn't anything new added that would need to be kept.) --------------------------------- snip ------------------------------------- /* Counts of bytes or chars */ typedef EMACS_INT Bytecount; typedef EMACS_INT Charcount; /* Counts of elements */ typedef EMACS_INT Elemcount; /* Hash codes */ typedef unsigned long Hashcode; /* ------------------------ dynamic arrays ------------------- */ --------------------------------- snip ------------------------------------- 2. in lstream.h, removed duplicate declaration of Bytecount. Rewrote the comment about this type. The changed code should now look like this: --------------------------------- snip ------------------------------------- #endif /* The have been some arguments over the what the type should be that specifies a count of bytes in a data block to be written out or read in, using Lstream_read(), Lstream_write(), and related functions. Originally it was long, which worked fine; Martin "corrected" these to size_t and ssize_t on the grounds that this is theoretically cleaner and is in keeping with the C standards. Unfortunately, this practice is horribly error-prone due to design flaws in the way that mixed signed/unsigned arithmetic happens. In fact, by doing this change, Martin introduced a subtle but fatal error that caused the operation of sending large mail messages to the SMTP server under Windows to fail. By putting all values back to be signed, avoiding any signed/unsigned mixing, the bug immediately went away. The type then in use was Lstream_Data_Count, so that it be reverted cleanly if a vote came to that. Now it is Bytecount. Some earlier comments about why the type must be signed: This MUST BE SIGNED, since it also is used in functions that return the number of bytes actually read to or written from in an operation, and these functions can return -1 to signal error. Note that the standard Unix read() and write() functions define the count going in as a size_t, which is UNSIGNED, and the count going out as an ssize_t, which is SIGNED. This is a horrible design flaw. Not only is it highly likely to lead to logic errors when a -1 gets interpreted as a large positive number, but operations are bound to fail in all sorts of horrible ways when a number in the upper-half of the size_t range is passed in -- this number is unrepresentable as an ssize_t, so code that checks to see how many bytes are actually written (which is mandatory if you are dealing with certain types of devices) will get completely screwed up. --ben */ typedef enum lstream_buffering --------------------------------- snip ------------------------------------- 3. in dumper.c, there are four places, all inside of switch() statements, where XD_BYTECOUNT appears twice as a case tag. In each case, the two case blocks contain identical code, and you should *REMOVE THE SECOND* and leave the first.
author ben
date Thu, 20 Sep 2001 06:31:11 +0000
parents 6e99cc8c6ca5
children 53ec80338ec1
comparison
equal deleted inserted replaced
664:6e99cc8c6ca5 665:fdefd0186b75
1 2001-09-19 Ben Wing <ben@xemacs.org>
2
3 * abbrev.c (abbrev_match_mapper):
4 * abbrev.c (abbrev_oblookup):
5 * abbrev.c (obarray_has_blank_p):
6 * abbrev.c (abbrev_count_case):
7 * abbrev.c (Fexpand_abbrev):
8 * alloc.c (xmalloc):
9 * alloc.c (xcalloc):
10 * alloc.c (xmalloc_and_zero):
11 * alloc.c (xrealloc):
12 * alloc.c (deadbeef_memory):
13 * alloc.c (allocate_lisp_storage):
14 * alloc.c (alloc_lcrecord):
15 * alloc.c (size_vector):
16 * alloc.c (vector_hash):
17 * alloc.c (make_vector_internal):
18 * alloc.c (make_vector):
19 * alloc.c (make_bit_vector_internal):
20 * alloc.c (make_bit_vector):
21 * alloc.c (make_bit_vector_from_byte_vector):
22 * alloc.c (Fmake_marker):
23 * alloc.c (noseeum_make_marker):
24 * alloc.c (make_uninit_string):
25 * alloc.c (resize_string):
26 * alloc.c (set_string_char):
27 * alloc.c (Fmake_string):
28 * alloc.c (Fstring):
29 * alloc.c (make_string):
30 * alloc.c (build_string):
31 * alloc.c (build_translated_string):
32 * alloc.c (make_string_nocopy):
33 * alloc.c (make_lcrecord_list):
34 * alloc.c (tick_lcrecord_stats):
35 * alloc.c (garbage_collect_1):
36 * alloc.c (malloced_storage_size):
37 * alloc.c (fixed_type_block_overhead):
38 * blocktype.c (Blocktype_newf):
39 * blocktype.h:
40 * blocktype.h (Blocktype_declare):
41 * buffer.c:
42 * buffer.c (Fkill_buffer):
43 * buffer.c (compute_buffer_text_usage):
44 * buffer.c (struct):
45 * buffer.c (reinit_vars_of_buffer):
46 * buffer.c (directory_is_current_directory):
47 * buffer.h:
48 * buffer.h (struct buffer_text):
49 * buffer.h (struct buffer):
50 * buffer.h (VALID_CHARPTR_P):
51 * buffer.h (REAL_INC_CHARBYTEBPOS):
52 * buffer.h (INC_CHARBYTEBPOS):
53 * buffer.h (DEC_CHARPTR):
54 * buffer.h (VALIDATE_CHARPTR_FORWARD):
55 * buffer.h (charptr_n_addr):
56 * buffer.h (simple_set_charptr_emchar):
57 * buffer.h (charptr_emchar):
58 * buffer.h (set_charptr_emchar):
59 * buffer.h (charptr_copy_char):
60 * buffer.h (BI_BUF_BEG):
61 * buffer.h (BI_BUF_PTR_BYTE_POS):
62 * buffer.h (BUF_PTR_BYTE_POS):
63 * buffer.h (BI_BUF_BYTE_ADDRESS):
64 * buffer.h (BUF_BYTE_ADDRESS):
65 * buffer.h (BI_BUF_BYTE_ADDRESS_BEFORE):
66 * buffer.h (BUF_BYTE_ADDRESS_BEFORE):
67 * buffer.h (valid_membpos_p):
68 * buffer.h (bytebpos_to_membpos):
69 * buffer.h (membpos_to_bytebpos):
70 * buffer.h (membpos_to_charbpos):
71 * buffer.h (buffer_or_string_bytebpos_to_membpos):
72 * buffer.h (buffer_or_string_membpos_to_bytebpos):
73 * buffer.h (buffer_or_string_charbpos_to_bytebpos):
74 * buffer.h (VALID_BYTEBPOS_P):
75 * buffer.h (ASSERT_VALID_BYTEBPOS_UNSAFE):
76 * buffer.h (VALIDATE_BYTEBPOS_BACKWARD):
77 * buffer.h (VALIDATE_BYTEBPOS_FORWARD):
78 * buffer.h (INC_BYTEBPOS):
79 * buffer.h (DEC_BYTEBPOS):
80 * buffer.h (prev_bytebpos):
81 * buffer.h (next_bytebpos):
82 * buffer.h (BYTEBPOS_INVALID):
83 * buffer.h (real_charbpos_to_bytebpos):
84 * buffer.h (real_bytebpos_to_charbpos):
85 * buffer.h (charbpos_to_bytebpos):
86 * buffer.h (make_charbpos):
87 * buffer.h (BUF_FETCH_CHAR):
88 * buffer.h (BUF_CHARPTR_COPY_CHAR):
89 * buffer.h (union):
90 * buffer.h (DFC_LISP_STRING_USE_CONVERTED_DATA):
91 * buffer.h (BUF_CEILING_OF):
92 * buffer.h (BUF_FLOOR_OF):
93 * buffer.h (BUF_CEILING_OF_IGNORE_ACCESSIBLE):
94 * buffer.h (BUF_FLOOR_OF_IGNORE_ACCESSIBLE):
95 * buffer.h (BUFFER_ALLOC):
96 * buffer.h (intbyte_strcmp):
97 * buffer.h (intbyte_memcmp):
98 * bytecode.c (invalid_byte_code):
99 * bytecode.c (optimize_byte_code):
100 * bytecode.c (compiled_function_hash):
101 * bytecode.c (compiled_function_instructions):
102 * callint.c (check_mark):
103 * callint.c (callint_prompt):
104 * callint.c (PROMPT):
105 * callint.c (Fcall_interactively):
106 * callproc.c (Fold_call_process_internal):
107 * callproc.c (getenv_internal):
108 * callproc.c (Fgetenv):
109 * callproc.c (egetenv):
110 * callproc.c (init_callproc):
111 * casefiddle.c (casify_object):
112 * casefiddle.c (casify_region_internal):
113 * casefiddle.c (casify_word):
114 * chartab.c (char_table_entry_hash):
115 * chartab.c (char_table_hash):
116 * cmds.c (Fforward_char):
117 * cmds.c (Fforward_line):
118 * cmds.c (Fdelete_char):
119 * config.h.in:
120 * console-msw.c (mswindows_output_console_string):
121 * console-msw.c (Fmswindows_debugging_output):
122 * console-msw.c (DSTRING):
123 * console-msw.c (DSYMNAME):
124 * console-msw.c (mswindows_lisp_error):
125 * console-msw.h:
126 * console-x.c (split_up_display_spec):
127 * console-x.c (x_semi_canonicalize_console_connection):
128 * console.c (stuff_buffered_input):
129 * console.h (struct console_methods):
130 * data.c (weak_list_hash):
131 * database.c (berkdb_get):
132 * database.c (berkdb_map):
133 * device-msw.c (msprinter_default_printer):
134 * device-msw.c (hash_devmode):
135 * device-msw.c (Fmswindows_printer_list):
136 * device-x.c (validify_resource_component):
137 * device-x.c (Fx_get_resource_prefix):
138 * device.h (struct pixel_to_glyph_translation_cache):
139 * dialog-msw.c (push_intbyte_string_as_unicode):
140 * dialog-msw.c (handle_question_dialog_box):
141 * dired.c (Fdirectory_files):
142 * dired.c (file_name_completion):
143 * dired.c (struct user_name):
144 * dired.c (user_name_completion):
145 * dired.c (make_directory_hash_table):
146 * dired.c (Ffile_attributes):
147 * doc.c (string_join):
148 * doc.c (Fsnarf_documentation):
149 * doc.c (Fsubstitute_command_keys):
150 * doprnt.c (union printf_arg):
151 * doprnt.c (doprnt_1):
152 * doprnt.c (parse_off_posnum):
153 * doprnt.c (parse_doprnt_spec):
154 * doprnt.c (get_doprnt_args):
155 * doprnt.c (emacs_doprnt_1):
156 * doprnt.c (emacs_doprnt_2):
157 * doprnt.c (emacs_doprnt_c):
158 * doprnt.c (emacs_doprnt_va):
159 * doprnt.c (emacs_doprnt_lisp):
160 * doprnt.c (emacs_doprnt_lisp_2):
161 * doprnt.c (emacs_doprnt_string_c):
162 * doprnt.c (emacs_doprnt_string_va):
163 * doprnt.c (emacs_doprnt_string_lisp):
164 * doprnt.c (emacs_doprnt_string_lisp_2):
165 * dumper.c:
166 * dumper.c (struct):
167 * dumper.c (dump_add_opaque):
168 * dumper.c (pdump_align_stream):
169 * dumper.c (pdump_size_to_align):
170 * dumper.c (pdump_entry_list_elt):
171 * dumper.c (pdump_add_entry):
172 * dumper.c (pdump_get_indirect_count):
173 * dumper.c (pdump_register_sub):
174 * dumper.c (pdump_dump_data):
175 * dumper.c (pdump_reloc_one):
176 * dumper.c (pdump_allocate_offset):
177 * dumper.c (pdump_dump_root_struct_ptrs):
178 * dumper.c (pdump_dump_root_objects):
179 * dumper.c (pdump_load_finish):
180 * dumper.c (pdump_resource_get):
181 * dumper.c (pdump_file_get):
182 * dynarr.c (Dynarr_memory_usage):
183 * editfns.c (Fchar_to_string):
184 * editfns.c (buildmark):
185 * editfns.c (charbpos_clip_to_bounds):
186 * editfns.c (bytebpos_clip_to_bounds):
187 * editfns.c (Fgoto_char):
188 * editfns.c (save_excursion_save):
189 * editfns.c (beginning_of_line_p):
190 * editfns.c (Fchar_after):
191 * editfns.c (Fchar_before):
192 * editfns.c (Fformat_time_string):
193 * editfns.c (Fcurrent_time_string):
194 * editfns.c (Finsert_char):
195 * editfns.c (Fbuffer_substring):
196 * editfns.c (Fbuffer_substring_no_properties):
197 * editfns.c (Finsert_buffer_substring):
198 * editfns.c (Fcompare_buffer_substrings):
199 * editfns.c (Fsubst_char_in_region):
200 * editfns.c (Ftranslate_region):
201 * editfns.c (Fdelete_region):
202 * editfns.c (Fnarrow_to_region):
203 * editfns.c (save_restriction_restore):
204 * editfns.c (transpose_markers):
205 * editfns.c (Ftranspose_regions):
206 * eldap.c (Fldap_open):
207 * eldap.c (Fldap_add):
208 * eldap.c (Fldap_modify):
209 * elhash.c:
210 * elhash.c (struct Lisp_Hash_Table):
211 * elhash.c (HASHCODE):
212 * elhash.c (hash_table_size):
213 * elhash.c (lisp_string_hash):
214 * elhash.c (lisp_object_eql_hash):
215 * elhash.c (lisp_object_equal_hash):
216 * elhash.c (hash_table_hash):
217 * elhash.c (compute_hash_table_derived_values):
218 * elhash.c (make_standard_lisp_hash_table):
219 * elhash.c (make_general_lisp_hash_table):
220 * elhash.c (make_lisp_hash_table):
221 * elhash.c (decode_hash_table_size):
222 * elhash.c (resize_hash_table):
223 * elhash.c (pdump_reorganize_hash_table):
224 * elhash.c (enlarge_hash_table):
225 * elhash.c (find_hentry):
226 * elhash.c (remhash_1):
227 * elhash.c (internal_array_hash):
228 * elhash.c (internal_hash):
229 * elhash.h:
230 * emacs.c (split_string_by_emchar_1):
231 * emacs.c (decode_path):
232 * emacs.c (vars_of_emacs):
233 * emodules.c (emodules_load):
234 * emodules.c (emodules_doc_subr):
235 * emodules.c (emodules_doc_sym):
236 * eval.c (print_subr):
237 * eval.c (build_error_data):
238 * eval.c (signal_error):
239 * eval.c (maybe_signal_error):
240 * eval.c (signal_continuable_error):
241 * eval.c (maybe_signal_continuable_error):
242 * eval.c (signal_error_2):
243 * eval.c (maybe_signal_error_2):
244 * eval.c (signal_continuable_error_2):
245 * eval.c (maybe_signal_continuable_error_2):
246 * eval.c (signal_ferror):
247 * eval.c (maybe_signal_ferror):
248 * eval.c (signal_continuable_ferror):
249 * eval.c (maybe_signal_continuable_ferror):
250 * eval.c (signal_ferror_with_frob):
251 * eval.c (maybe_signal_ferror_with_frob):
252 * eval.c (signal_continuable_ferror_with_frob):
253 * eval.c (maybe_signal_continuable_ferror_with_frob):
254 * eval.c (syntax_error):
255 * eval.c (syntax_error_2):
256 * eval.c (maybe_syntax_error):
257 * eval.c (sferror):
258 * eval.c (sferror_2):
259 * eval.c (maybe_sferror):
260 * eval.c (invalid_argument):
261 * eval.c (invalid_argument_2):
262 * eval.c (maybe_invalid_argument):
263 * eval.c (invalid_constant):
264 * eval.c (invalid_constant_2):
265 * eval.c (maybe_invalid_constant):
266 * eval.c (invalid_operation):
267 * eval.c (invalid_operation_2):
268 * eval.c (maybe_invalid_operation):
269 * eval.c (invalid_change):
270 * eval.c (invalid_change_2):
271 * eval.c (maybe_invalid_change):
272 * eval.c (invalid_state):
273 * eval.c (invalid_state_2):
274 * eval.c (maybe_invalid_state):
275 * eval.c (wtaerror):
276 * eval.c (stack_overflow):
277 * eval.c (out_of_memory):
278 * eval.c (printing_unreadable_object):
279 * eval.c (caught_a_squirmer):
280 * eval.c (eval_in_buffer_trapping_errors):
281 * eval.c (run_hook_trapping_errors):
282 * eval.c (safe_run_hook_trapping_errors):
283 * eval.c (call0_trapping_errors):
284 * eval.c (call1_trapping_errors):
285 * eval.c (call2_trapping_errors):
286 * eval.c (warn_when_safe):
287 * event-Xt.c (x_event_to_emacs_event):
288 * event-Xt.c (describe_event_window):
289 * event-gtk.c (dragndrop_data_received):
290 * event-msw.c (ntpipe_slurp_reader):
291 * event-msw.c (ntpipe_shove_writer):
292 * event-msw.c (struct winsock_stream):
293 * event-msw.c (winsock_initiate_read):
294 * event-msw.c (winsock_reader):
295 * event-msw.c (winsock_writer):
296 * event-msw.c (emacs_mswindows_create_stream_pair):
297 * event-stream.c:
298 * event-stream.c (allocate_command_builder):
299 * event-stream.c (echo_key_event):
300 * event-stream.c (lookup_command_event):
301 * event-stream.c (dribble_out_event):
302 * event-unixoid.c (event_stream_unixoid_create_stream_pair):
303 * events.c (event_hash):
304 * events.c (format_event_object):
305 * events.c (event_pixel_translation):
306 * events.c (Fevent_point):
307 * events.c (Fevent_closest_point):
308 * events.h (struct command_builder):
309 * extents.c:
310 * extents.c (stack_of_extents):
311 * extents.c (membpos_to_startind):
312 * extents.c (bytebpos_to_startind):
313 * extents.c (buffer_or_string_bytebpos_to_startind):
314 * extents.c (buffer_or_string_bytebpos_to_endind):
315 * extents.c (gap_array_adjust_markers):
316 * extents.c (gap_array_move_gap):
317 * extents.c (extent_list_locate_from_pos):
318 * extents.c (extent_list_at):
319 * extents.c (soe_dump):
320 * extents.c (soe_move):
321 * extents.c (extent_endpoint_bytebpos):
322 * extents.c (extent_endpoint_charbpos):
323 * extents.c (extent_changed_for_redisplay):
324 * extents.c (extent_in_region_p):
325 * extents.c (map_extents_bytebpos):
326 * extents.c (map_extents):
327 * extents.c (adjust_extents):
328 * extents.c (adjust_extents_for_deletion):
329 * extents.c (extent_find_end_of_run):
330 * extents.c (extent_find_beginning_of_run):
331 * extents.c (extent_fragment_update):
332 * extents.c (extent_hash):
333 * extents.c (extent_endpoint_external):
334 * extents.c (Fextent_length):
335 * extents.c (Fnext_extent_change):
336 * extents.c (Fprevious_extent_change):
337 * extents.c (set_extent_endpoints_1):
338 * extents.c (set_extent_endpoints):
339 * extents.c (make_extent_internal):
340 * extents.c (copy_extent):
341 * extents.c (Fmake_extent):
342 * extents.c (Fset_extent_endpoints):
343 * extents.c (Fextent_in_region_p):
344 * extents.c (Fmap_extents):
345 * extents.c (struct slow_map_extent_children_arg):
346 * extents.c (slow_map_extent_children_function):
347 * extents.c (Fmap_extent_children):
348 * extents.c (struct extent_at_arg):
349 * extents.c (extent_at_bytebpos):
350 * extents.c (Fextent_at):
351 * extents.c (Fextents_at):
352 * extents.c (struct verify_extents_arg):
353 * extents.c (verify_extent_modification):
354 * extents.c (struct process_extents_for_insertion_arg):
355 * extents.c (process_extents_for_insertion_mapper):
356 * extents.c (process_extents_for_insertion):
357 * extents.c (struct process_extents_for_deletion_arg):
358 * extents.c (process_extents_for_deletion):
359 * extents.c (report_extent_modification_mapper):
360 * extents.c (report_extent_modification):
361 * extents.c (run_extent_copy_paste_internal):
362 * extents.c (run_extent_copy_function):
363 * extents.c (run_extent_paste_function):
364 * extents.c (update_extent):
365 * extents.c (insert_extent):
366 * extents.c (Finsert_extent):
367 * extents.c (struct add_string_extents_arg):
368 * extents.c (add_string_extents_mapper):
369 * extents.c (add_string_extents):
370 * extents.c (struct splice_in_string_extents_arg):
371 * extents.c (splice_in_string_extents_mapper):
372 * extents.c (splice_in_string_extents):
373 * extents.c (copy_string_extents_mapper):
374 * extents.c (copy_string_extents):
375 * extents.c (get_text_property_bytebpos):
376 * extents.c (get_text_property_1):
377 * extents.c (struct put_text_prop_arg):
378 * extents.c (put_text_prop_mapper):
379 * extents.c (put_text_prop_openness_mapper):
380 * extents.c (put_text_prop):
381 * extents.c (Fput_text_property):
382 * extents.c (Fadd_text_properties):
383 * extents.c (Fremove_text_properties):
384 * extents.h:
385 * extents.h (struct extent):
386 * faces.c (face_hash):
387 * file-coding.c:
388 * file-coding.c (detect_eol_type):
389 * file-coding.c (detect_coding_type):
390 * file-coding.c (determine_real_coding_system):
391 * file-coding.c (Fdetect_coding_region):
392 * file-coding.c (decoding_reader):
393 * file-coding.c (decoding_writer):
394 * file-coding.c (mule_decode):
395 * file-coding.c (Fdecode_coding_region):
396 * file-coding.c (encoding_reader):
397 * file-coding.c (encoding_writer):
398 * file-coding.c (mule_encode):
399 * file-coding.c (Fencode_coding_region):
400 * file-coding.c (detect_coding_sjis):
401 * file-coding.c (decode_coding_sjis):
402 * file-coding.c (encode_coding_sjis):
403 * file-coding.c (detect_coding_big5):
404 * file-coding.c (decode_coding_big5):
405 * file-coding.c (encode_coding_big5):
406 * file-coding.c (decode_ucs4):
407 * file-coding.c (detect_coding_ucs4):
408 * file-coding.c (decode_coding_ucs4):
409 * file-coding.c (encode_coding_ucs4):
410 * file-coding.c (detect_coding_utf8):
411 * file-coding.c (decode_coding_utf8):
412 * file-coding.c (encode_coding_utf8):
413 * file-coding.c (detect_coding_iso2022):
414 * file-coding.c (decode_coding_iso2022):
415 * file-coding.c (encode_coding_iso2022):
416 * file-coding.c (decode_coding_no_conversion):
417 * file-coding.c (encode_coding_no_conversion):
418 * file-coding.h (INTBYTE_FIRST_BYTE_P):
419 * fileio.c (normalize_filename):
420 * fileio.c (report_file_type_error):
421 * fileio.c (report_error_with_errno):
422 * fileio.c (report_file_error):
423 * fileio.c (read_allowing_quit):
424 * fileio.c (write_allowing_quit):
425 * fileio.c (Ffile_name_directory):
426 * fileio.c (Ffile_name_nondirectory):
427 * fileio.c (Fmake_temp_name):
428 * fileio.c (Fexpand_file_name):
429 * fileio.c (Ffile_truename):
430 * fileio.c (Fsubstitute_in_file_name):
431 * fileio.c (barf_or_query_if_file_exists):
432 * fileio.c (Ffile_name_absolute_p):
433 * fileio.c (Ffile_symlink_p):
434 * fileio.c (Fdo_auto_save):
435 * filelock.c (MAKE_LOCK_NAME):
436 * filelock.c (fill_in_lock_file_name):
437 * floatfns.c (float_hash):
438 * fns.c (print_bit_vector):
439 * fns.c (bit_vector_hash):
440 * fns.c (size_bit_vector):
441 * fns.c (Flength):
442 * fns.c (Fsafe_length):
443 * fns.c (Fstring_lessp):
444 * fns.c (copy_list):
445 * fns.c (concat):
446 * fns.c (Ffillarray):
447 * fns.c (bytecode_nconc2):
448 * fns.c (Fnconc):
449 * fns.c (mapcar1):
450 * fns.c (Fmapcar):
451 * fns.c (Fmapvector):
452 * fns.c (ADVANCE_INPUT):
453 * fns.c (base64_encode_1):
454 * fns.c (base64_decode_1):
455 * fns.c (XMALLOC_OR_ALLOCA):
456 * fns.c (Fbase64_encode_region):
457 * fns.c (Fbase64_encode_string):
458 * fns.c (Fbase64_decode_region):
459 * fns.c (Fbase64_decode_string):
460 * font-lock.c (struct context_cache):
461 * font-lock.c (font_lock_maybe_update_syntactic_caches):
462 * font-lock.c (beginning_of_defun):
463 * font-lock.c (end_of_defun):
464 * font-lock.c (setup_context_cache):
465 * font-lock.c (find_context):
466 * font-lock.c (Fsyntactically_sectionize):
467 * frame-gtk.c (gtk_set_frame_text_value):
468 * frame-gtk.c (gtk_set_title_from_intbyte):
469 * frame-gtk.c (gtk_set_icon_name_from_intbyte):
470 * frame-gtk.c (console_type_create_frame_gtk):
471 * frame-msw.c (mswindows_set_title_from_intbyte):
472 * frame-msw.c (console_type_create_frame_mswindows):
473 * frame-x.c (x_set_frame_text_value):
474 * frame-x.c (x_set_title_from_intbyte):
475 * frame-x.c (x_set_icon_name_from_intbyte):
476 * frame-x.c (x_set_frame_properties):
477 * frame-x.c (x_cde_transfer_callback):
478 * frame-x.c (console_type_create_frame_x):
479 * frame.c (Fmake_frame):
480 * frame.c (Fmouse_position):
481 * frame.c (generate_title_string):
482 * frame.c (update_frame_title):
483 * gif_io.c (GifStdRead):
484 * gif_io.c (GifStdWrite):
485 * gif_io.c (GifRead):
486 * gif_io.c (GifWrite):
487 * gifrlib.h:
488 * glyphs-eimage.c (jpeg_memory_src):
489 * glyphs-eimage.c (jpeg_instantiate):
490 * glyphs-eimage.c (gif_memory_storage):
491 * glyphs-eimage.c (gif_read_from_memory):
492 * glyphs-eimage.c (gif_instantiate):
493 * glyphs-eimage.c (struct png_memory_storage):
494 * glyphs-eimage.c (png_read_from_memory):
495 * glyphs-eimage.c (png_instantiate):
496 * glyphs-eimage.c (tiff_memory_storage):
497 * glyphs-eimage.c (tiff_memory_read):
498 * glyphs-eimage.c (tiff_instantiate):
499 * glyphs-msw.c (mswindows_xpm_instantiate):
500 * glyphs-msw.c (bmp_instantiate):
501 * glyphs-msw.c (mswindows_xface_instantiate):
502 * glyphs-msw.c (mswindows_image_instance_hash):
503 * glyphs-msw.c (mswindows_widget_property):
504 * glyphs-msw.c (mswindows_combo_box_property):
505 * glyphs-x.c (x_image_instance_hash):
506 * glyphs-x.c (write_lisp_string_to_temp_file):
507 * glyphs.c (image_instance_hash):
508 * glyphs.c (incompatible_image_types):
509 * glyphs.c (query_string_geometry):
510 * glyphs.c (query_string_font):
511 * glyphs.c (instantiator_eq_hash):
512 * glyphs.c (glyph_hash):
513 * glyphs.h (struct Lisp_Image_Instance):
514 * gpmevent.c (tty_get_foreign_selection):
515 * gui-x.c (menu_separator_style_and_to_external):
516 * gui-x.c (add_accel_and_to_external):
517 * gui-x.c (button_item_to_widget_value):
518 * gui-x.h:
519 * gui.c (separator_string_p):
520 * gui.c (gui_name_accelerator):
521 * gui.c (gui_item_hash):
522 * gui.h:
523 * gutter.c (gutter_extent_signal_changed_region_maybe):
524 * gutter.h:
525 * hash.c:
526 * hash.c (memory_hash):
527 * hash.c (string_hash):
528 * hash.c (hash_table_size):
529 * hash.c (gethash):
530 * hash.c (make_hash_table):
531 * hash.c (make_general_hash_table):
532 * hash.c (grow_hash_table):
533 * hash.c (puthash):
534 * hash.c (rehash):
535 * hash.c (remhash):
536 * hash.h:
537 * hash.h (struct hash_table):
538 * hpplay.c (player_error_internal):
539 * indent.c:
540 * indent.c (last_visible_position):
541 * indent.c (column_at_point):
542 * indent.c (string_column_at_point):
543 * indent.c (Findent_to):
544 * indent.c (bi_spaces_at_point):
545 * indent.c (Fcurrent_indentation):
546 * indent.c (Fmove_to_column):
547 * indent.c (vmotion_1):
548 * indent.c (vmotion):
549 * indent.c (vertical_motion_1):
550 * indent.c (vmotion_pixels):
551 * indent.c (Fvertical_motion_pixels):
552 * insdel.c:
553 * insdel.c (MAX_CHARBPOS_GAP_SIZE_3):
554 * insdel.c (bytecount_to_charcount):
555 * insdel.c (charcount_to_bytecount):
556 * insdel.c (charbpos_to_bytebpos_func):
557 * insdel.c (bytebpos_to_charbpos_func):
558 * insdel.c (buffer_mule_signal_inserted_region):
559 * insdel.c (buffer_mule_signal_deleted_region):
560 * insdel.c (charbpos_to_bytebpos):
561 * insdel.c (bytebpos_to_charbpos):
562 * insdel.c (get_buffer_pos_char):
563 * insdel.c (get_buffer_pos_byte):
564 * insdel.c (get_buffer_range_char):
565 * insdel.c (get_buffer_range_byte):
566 * insdel.c (get_string_range_char):
567 * insdel.c (get_buffer_or_string_pos_char):
568 * insdel.c (get_buffer_or_string_pos_byte):
569 * insdel.c (get_buffer_or_string_range_char):
570 * insdel.c (get_buffer_or_string_range_byte):
571 * insdel.c (buffer_or_string_accessible_begin_char):
572 * insdel.c (buffer_or_string_accessible_end_char):
573 * insdel.c (buffer_or_string_accessible_begin_byte):
574 * insdel.c (buffer_or_string_accessible_end_byte):
575 * insdel.c (buffer_or_string_absolute_begin_char):
576 * insdel.c (buffer_or_string_absolute_end_char):
577 * insdel.c (buffer_or_string_absolute_begin_byte):
578 * insdel.c (buffer_or_string_absolute_end_byte):
579 * insdel.c (JUST_SET_POINT):
580 * insdel.c (set_buffer_point):
581 * insdel.c (do_marker_adjustment):
582 * insdel.c (adjust_markers):
583 * insdel.c (adjust_markers_for_insert):
584 * insdel.c (gap_left):
585 * insdel.c (gap_right):
586 * insdel.c (move_gap):
587 * insdel.c (merge_gap_with_end_gap):
588 * insdel.c (make_gap):
589 * insdel.c (buffer_signal_changed_region):
590 * insdel.c (buffer_extent_signal_changed_region):
591 * insdel.c (cancel_multiple_change):
592 * insdel.c (begin_multiple_change):
593 * insdel.c (signal_before_change):
594 * insdel.c (signal_after_change):
595 * insdel.c (prepare_to_modify_buffer):
596 * insdel.c (fixup_internal_substring):
597 * insdel.c (buffer_insert_string_1):
598 * insdel.c (buffer_insert_raw_string_1):
599 * insdel.c (buffer_insert_lisp_string_1):
600 * insdel.c (buffer_insert_c_string_1):
601 * insdel.c (buffer_insert_emacs_char_1):
602 * insdel.c (buffer_insert_c_char_1):
603 * insdel.c (buffer_insert_from_buffer_1):
604 * insdel.c (buffer_delete_range):
605 * insdel.c (buffer_replace_char):
606 * insdel.c (make_string_from_buffer_1):
607 * insdel.c (make_string_from_buffer):
608 * insdel.c (make_string_from_buffer_no_extents):
609 * insdel.c (barf_if_buffer_read_only):
610 * insdel.c (find_charsets_in_intbyte_string):
611 * insdel.c (intbyte_string_displayed_columns):
612 * insdel.c (convert_intbyte_string_into_emchar_dynarr):
613 * insdel.c (convert_intbyte_string_into_emchar_string):
614 * insdel.c (convert_emchar_string_into_intbyte_dynarr):
615 * insdel.c (convert_emchar_string_into_malloced_string):
616 * insdel.c (reinit_vars_of_insdel):
617 * insdel.c (init_buffer_text):
618 * insdel.h:
619 * insdel.h (struct buffer_text_change_data):
620 * keymap.c (make_key_description):
621 * keymap.c (make_keymap):
622 * keymap.c (define_key_check_and_coerce_keysym):
623 * keymap.c (Fsingle_key_description):
624 * keymap.c (Ftext_char_description):
625 * keymap.c (vars_of_keymap):
626 * line-number.c (invalidate_line_number_cache):
627 * line-number.c (insert_invalidate_line_number_cache):
628 * line-number.c (delete_invalidate_line_number_cache):
629 * line-number.c (get_nearest_line_number):
630 * line-number.c (add_position_to_cache):
631 * line-number.c (buffer_line_number):
632 * line-number.h:
633 * line-number.h (buffer_line_number):
634 * lisp.h:
635 * lisp.h (DO_REALLOC):
636 * lisp.h (struct):
637 * lisp.h (struct Lisp_Buffer_Cons):
638 * lisp.h (struct Lisp_String):
639 * lisp.h (set_string_char):
640 * lisp.h (struct Lisp_Bit_Vector):
641 * lisp.h (bit_vector_bit):
642 * lisp.h (set_bit_vector_bit):
643 * lisp.h (struct Lisp_Marker):
644 * lisp.h (struct lcrecord_list):
645 * lisp.h (struct overhead_stats):
646 * lread.c:
647 * lread.c (readchar):
648 * lread.c (Fload_internal):
649 * lread.c (read_atom):
650 * lread.c (parse_integer):
651 * lread.c (isfloat_string):
652 * lrecord.h:
653 * lrecord.h (struct lrecord_implementation):
654 * lrecord.h (lrecord_description_type):
655 * lrecord.h (struct struct_description):
656 * lstream.c:
657 * lstream.c (aligned_sizeof_lstream):
658 * lstream.c (sizeof_lstream):
659 * lstream.c (Lstream_flush_out):
660 * lstream.c (Lstream_adding):
661 * lstream.c (Lstream_write_1):
662 * lstream.c (Lstream_write):
663 * lstream.c (Lstream_raw_read):
664 * lstream.c (Lstream_read_more):
665 * lstream.c (Lstream_read):
666 * lstream.c (Lstream_unread):
667 * lstream.c (Lstream_fputc):
668 * lstream.c (stdio_reader):
669 * lstream.c (stdio_writer):
670 * lstream.c (struct filedesc_stream):
671 * lstream.c (filedesc_reader):
672 * lstream.c (filedesc_writer):
673 * lstream.c (filedesc_stream_set_pty_flushing):
674 * lstream.c (lisp_string_reader):
675 * lstream.c (lisp_string_rewinder):
676 * lstream.c (struct fixed_buffer_stream):
677 * lstream.c (make_fixed_buffer_input_stream):
678 * lstream.c (make_fixed_buffer_output_stream):
679 * lstream.c (fixed_buffer_reader):
680 * lstream.c (fixed_buffer_writer):
681 * lstream.c (struct resizing_buffer_stream):
682 * lstream.c (resizing_buffer_writer):
683 * lstream.c (dynarr_writer):
684 * lstream.c (make_lisp_buffer_stream_1):
685 * lstream.c (make_lisp_buffer_input_stream):
686 * lstream.c (make_lisp_buffer_output_stream):
687 * lstream.c (lisp_buffer_reader):
688 * lstream.c (lisp_buffer_writer):
689 * lstream.c (lisp_buffer_stream_startpos):
690 * lstream.h:
691 * lstream.h (lstream_implementation):
692 * lstream.h (struct lstream):
693 * malloc.c:
694 * marker.c (marker_equal):
695 * marker.c (marker_hash):
696 * marker.c (set_marker_internal):
697 * marker.c (bi_marker_position):
698 * marker.c (marker_position):
699 * marker.c (set_bi_marker_position):
700 * marker.c (set_marker_position):
701 * md5.c (Fmd5):
702 * menubar-msw.c (mswindows_translate_menu_or_dialog_item):
703 * menubar-msw.c (displayable_menu_item):
704 * menubar-x.c (menu_item_descriptor_to_widget_value_1):
705 * menubar-x.c (menu_accelerator_junk_on_error):
706 * menubar.c (Fnormalize_menu_item_name):
707 * minibuf.c (scmp_1):
708 * minibuf.c (regexp_ignore_completion_p):
709 * minibuf.c (clear_echo_area_internal):
710 * minibuf.c (echo_area_append):
711 * minibuf.c (echo_area_message):
712 * minibuf.c (message_internal):
713 * minibuf.c (message_append_internal):
714 * minibuf.c (message_1):
715 * minibuf.c (message_append_1):
716 * mule-ccl.c (CCL_WRITE_CHAR):
717 * mule-ccl.c (CCL_WRITE_STRING):
718 * mule-charset.c (non_ascii_set_charptr_emchar):
719 * mule-charset.c (non_ascii_charptr_emchar):
720 * mule-charset.c (non_ascii_charptr_copy_char):
721 * mule-charset.c (Lstream_get_emchar_1):
722 * mule-charset.c (Lstream_fput_emchar):
723 * mule-charset.c (Lstream_funget_emchar):
724 * mule-charset.c (make_charset):
725 * mule-charset.c (lookup_composite_char):
726 * mule-charset.h:
727 * mule-charset.h (LEADING_BYTE_PREFIX_P):
728 * mule-charset.h (INTBYTE_FIRST_BYTE_P):
729 * mule-charset.h (INTBYTE_LEADING_BYTE_P):
730 * mule-charset.h (struct Lisp_Charset):
731 * mule-charset.h (CHARSET_LEADING_BYTE):
732 * mule-charset.h (CHARSET_BY_LEADING_BYTE):
733 * mule-charset.h (REP_BYTES_BY_FIRST_BYTE):
734 * mule-charset.h (CHAR_LEADING_BYTE):
735 * mule-wnnfns.c (Fwnn_dict_list):
736 * mule-wnnfns.c (Fwnn_fuzokugo_get):
737 * mule-wnnfns.c (m2w):
738 * objects-gtk.c (gtk_parse_nearest_color):
739 * objects-gtk.c (gtk_font_spec_matches_charset):
740 * objects-gtk.c (gtk_find_charset_font):
741 * objects-gtk.h:
742 * objects-msw.c (mswindows_font_spec_matches_charset):
743 * objects-tty.c (tty_initialize_font_instance):
744 * objects-tty.c (tty_font_spec_matches_charset):
745 * objects-tty.c (tty_find_charset_font):
746 * objects-x.c (x_font_instance_properties):
747 * objects-x.c (x_font_spec_matches_charset):
748 * objects-x.c (x_find_charset_font):
749 * objects.c (font_spec_matches_charset):
750 * objects.h:
751 * opaque.c (aligned_sizeof_opaque):
752 * opaque.c (sizeof_opaque):
753 * opaque.c (make_opaque):
754 * opaque.c (equal_opaque):
755 * opaque.h:
756 * opaque.h (Lisp_Opaque):
757 * print.c (std_handle_out_external):
758 * print.c (std_handle_out_va):
759 * print.c (write_string_to_stdio_stream):
760 * print.c (output_string):
761 * print.c (write_char_internal):
762 * print.c (write_string_1):
763 * print.c (write_c_string):
764 * print.c (Fwrite_char):
765 * print.c (float_to_string):
766 * print.c (print_string):
767 * print.c (print_internal):
768 * print.c (print_symbol):
769 * print.c (Falternate_debugging_output):
770 * print.c (Fexternal_debugging_output):
771 * process-nt.c (alloc_process_memory):
772 * process-nt.c (run_in_other_process):
773 * process-nt.c (nt_send_process):
774 * process-unix.c (unix_send_process):
775 * process-unix.c (unix_process_send_eof):
776 * process-unix.c (unix_kill_child_process):
777 * process-unix.c (unix_canonicalize_host_name):
778 * process-unix.c (unix_open_network_stream):
779 * process.c:
780 * process.c (read_process_output):
781 * process.c (send_process):
782 * process.c (Fprocess_send_region):
783 * process.c (status_notify):
784 * process.c (decode_signal):
785 * procimpl.h:
786 * redisplay-gtk.c (gtk_output_display_block):
787 * redisplay-output.c:
788 * redisplay-output.c (compare_runes):
789 * redisplay-output.c (ADJ_CHARBPOS):
790 * redisplay-output.c (redisplay_move_cursor):
791 * redisplay-output.c (redisplay_output_layout):
792 * redisplay-output.c (redisplay_update_line):
793 * redisplay-tty.c:
794 * redisplay-tty.c (tty_output_intbyte_string):
795 * redisplay-tty.c (tty_output_emchar_dynarr):
796 * redisplay-tty.c (substitute_in_dynamic_color_string):
797 * redisplay-tty.c (set_foreground_to):
798 * redisplay-tty.c (set_background_to):
799 * redisplay.c:
800 * redisplay.c (position_redisplay_data_type):
801 * redisplay.c (struct prop_block):
802 * redisplay.c (redisplay_text_width_string):
803 * redisplay.c (redisplay_frame_text_width_string):
804 * redisplay.c (generate_display_line):
805 * redisplay.c (add_hscroll_rune):
806 * redisplay.c (add_emchar_rune):
807 * redisplay.c (add_intbyte_string_runes):
808 * redisplay.c (add_blank_rune):
809 * redisplay.c (add_disp_table_entry_runes_1):
810 * redisplay.c (add_propagation_runes):
811 * redisplay.c (add_glyph_rune):
812 * redisplay.c (create_text_block):
813 * redisplay.c (create_overlay_glyph_block):
814 * redisplay.c (add_margin_blank):
815 * redisplay.c (generate_formatted_string_db):
816 * redisplay.c (generate_modeline):
817 * redisplay.c (add_string_to_fstring_db_runes):
818 * redisplay.c (generate_fstring_runes):
819 * redisplay.c (create_string_text_block):
820 * redisplay.c (generate_string_display_line):
821 * redisplay.c (generate_displayable_area):
822 * redisplay.c (regenerate_window):
823 * redisplay.c (REGEN_INC_FIND_START_END):
824 * redisplay.c (regenerate_window_extents_only_changed):
825 * redisplay.c (regenerate_window_incrementally):
826 * redisplay.c (regenerate_window_point_center):
827 * redisplay.c (point_visible):
828 * redisplay.c (line_at_center):
829 * redisplay.c (point_at_center):
830 * redisplay.c (redisplay_window):
831 * redisplay.c (call_redisplay_end_triggers):
832 * redisplay.c (window_line_number):
833 * redisplay.c (decode_mode_spec):
834 * redisplay.c (update_internal_cache_list):
835 * redisplay.c (line_start_cache_start):
836 * redisplay.c (line_start_cache_end):
837 * redisplay.c (point_in_line_start_cache):
838 * redisplay.c (point_would_be_visible):
839 * redisplay.c (start_end_of_last_line):
840 * redisplay.c (start_of_last_line):
841 * redisplay.c (end_of_last_line):
842 * redisplay.c (end_of_last_line_may_error):
843 * redisplay.c (start_with_line_at_pixpos):
844 * redisplay.c (start_with_point_on_display_line):
845 * redisplay.c (update_line_start_cache):
846 * redisplay.c (UPDATE_CACHE_RETURN):
847 * redisplay.c (pixel_to_glyph_translation):
848 * redisplay.c (init_redisplay):
849 * redisplay.h:
850 * redisplay.h (struct line_start_cache):
851 * redisplay.h (struct rune):
852 * redisplay.h (struct display_line):
853 * redisplay.h (struct extent_fragment):
854 * regex.c (struct):
855 * regex.c (PATFETCH_EXTENDED):
856 * regex.c (PATFETCH_RAW_EXTENDED):
857 * regex.c (regex_compile):
858 * regex.c (compile_extended_range):
859 * regex.c (re_compile_fastmap):
860 * regex.c (re_match_2_internal):
861 * regex.c (regerror):
862 * regex.h (Elemcount):
863 * scrollbar-gtk.h (struct gtk_scrollbar_data):
864 * scrollbar-msw.c (mswindows_handle_mousewheel_event):
865 * scrollbar-x.h (struct x_scrollbar_data):
866 * scrollbar.c (scrollbar_point):
867 * scrollbar.c (update_scrollbar_instance):
868 * scrollbar.c (scrollbar_reset_cursor):
869 * scrollbar.c (Fscrollbar_page_up):
870 * scrollbar.c (Fscrollbar_vertical_drag):
871 * search.c:
872 * search.c (fixup_search_regs_for_buffer):
873 * search.c (looking_at_1):
874 * search.c (fast_string_match):
875 * search.c (bi_scan_buffer):
876 * search.c (scan_buffer):
877 * search.c (bi_find_next_newline_no_quit):
878 * search.c (find_next_newline_no_quit):
879 * search.c (find_next_newline):
880 * search.c (bi_find_next_emchar_in_string):
881 * search.c (find_before_next_newline):
882 * search.c (skip_chars):
883 * search.c (search_command):
884 * search.c (trivial_regexp_p):
885 * search.c (search_buffer):
886 * search.c (simple_search):
887 * search.c (boyer_moore):
888 * search.c (set_search_regs):
889 * search.c (wordify):
890 * search.c (Freplace_match):
891 * search.c (Fmatch_data):
892 * search.c (Fregexp_quote):
893 * select-common.h (selection_data_to_lisp_data):
894 * select-common.h (lisp_data_to_selection_data):
895 * select-gtk.c (atom_to_symbol):
896 * select-gtk.c (emacs_gtk_selection_handle):
897 * select-x.c (hack_motif_clipboard_selection):
898 * select-x.c (x_reply_selection_request):
899 * select-x.c (x_handle_selection_request):
900 * select-x.c (copy_multiple_data):
901 * select-x.c (x_get_window_property):
902 * select-x.c (receive_incremental_selection):
903 * select-x.c (x_get_window_property_as_lisp_data):
904 * select-x.c (Fx_get_cutbuffer_internal):
905 * select-x.c (Fx_store_cutbuffer_internal):
906 * sheap.c (report_sheap_usage):
907 * sound.c (Fplay_sound):
908 * sound.h (sound_perror):
909 * sound.h (sound_warn):
910 * specifier.c (aligned_sizeof_specifier):
911 * specifier.c (sizeof_specifier):
912 * specifier.c (make_specifier_internal):
913 * symbols.c (intern):
914 * symbols.c (oblookup):
915 * symbols.c (hash_string):
916 * symbols.c (init_symbols_once_early):
917 * symbols.c (defsymbol_massage_name_1):
918 * symbols.c (defsymbol_nodump):
919 * symbols.c (defsymbol):
920 * symbols.c (defvar_magic):
921 * syntax.c:
922 * syntax.c (struct lisp_parse_state):
923 * syntax.c (find_defun_start):
924 * syntax.c (scan_words):
925 * syntax.c (Fforward_word):
926 * syntax.c (find_start_of_comment):
927 * syntax.c (find_end_of_comment):
928 * syntax.c (Fforward_comment):
929 * syntax.c (scan_lists):
930 * syntax.c (char_quoted):
931 * syntax.c (Fbackward_prefix_chars):
932 * syntax.c (scan_sexps_forward):
933 * syntax.c (Fparse_partial_sexp):
934 * syntax.h:
935 * syntax.h (struct syntax_cache):
936 * syntax.h (SYNTAX_CACHE_BYTE_TO_CHAR):
937 * syntax.h (SYNTAX_CACHE_OBJECT_BYTE_TO_CHAR):
938 * sysdep.c (get_eof_char):
939 * sysdep.c (init_system_name):
940 * sysdep.c (sys_readdir):
941 * sysdep.h:
942 * syswindows.h:
943 * syswindows.h (LOCAL_FILE_FORMAT_TO_TSTR):
944 * syswindows.h (LOCAL_TO_WIN32_FILE_FORMAT):
945 * syswindows.h (WIN32_TO_LOCAL_FILE_FORMAT):
946 * tests.c (Ftest_data_format_conversion):
947 * toolbar-gtk.c (gtk_output_toolbar_button):
948 * toolbar-x.c (x_output_toolbar_button):
949 * tooltalk.c (check_status):
950 * tooltalk.c (tt_message_arg_bval_vector):
951 * tparam.c:
952 * undo.c:
953 * undo.c (record_insert):
954 * undo.c (record_delete):
955 * undo.c (record_change):
956 * undo.c (record_property_change):
957 * undo.c (Fprimitive_undo):
958 * win32.c (tstr_to_local_file_format):
959 * window.c (Fpos_visible_in_window_p):
960 * window.c (Fwindow_end):
961 * window.c (unshow_buffer):
962 * window.c (Fdelete_other_windows):
963 * window.c (Fselect_window):
964 * window.c (window_scroll):
965 * window.c (Fcenter_to_window_line):
966 * window.c (Fmove_to_window_line):
967 * window.c (sizeof_window_config_for_n_windows):
968 * window.c (sizeof_window_config):
969 * window.c (Fcurrent_pixel_column):
970 * window.h (struct window):
971
972 The great integral types renaming.
973
974 The purpose of this is to rationalize the names used for various
975 integral types, so that they match their intended uses and follow
976 consist conventions, and eliminate types that were not semantically
977 different from each other.
978
979 The conventions are:
980
981 -- All integral types that measure quantities of anything are
982 signed. Some people disagree vociferously with this, but their
983 arguments are mostly theoretical, and are vastly outweighed by
984 the practical headaches of mixing signed and unsigned values,
985 and more importantly by the far increased likelihood of
986 inadvertent bugs: Because of the broken "viral" nature of
987 unsigned quantities in C (operations involving mixed
988 signed/unsigned are done unsigned, when exactly the opposite is
989 nearly always wanted), even a single error in declaring a
990 quantity unsigned that should be signed, or even the even more
991 subtle error of comparing signed and unsigned values and
992 forgetting the necessary cast, can be catastrophic, as
993 comparisons will yield wrong results. -Wsign-compare is turned
994 on specifically to catch this, but this tends to result in a
995 great number of warnings when mixing signed and unsigned, and
996 the casts are annoying. More has been written on this
997 elsewhere.
998
999 -- All such quantity types just mentioned boil down to EMACS_INT,
1000 which is 32 bits on 32-bit machines and 64 bits on 64-bit
1001 machines. This is guaranteed to be the same size as Lisp
1002 objects of type `int', and (as far as I can tell) of size_t
1003 (unsigned!) and ssize_t. The only type below that is not an
1004 EMACS_INT is Hashcode, which is an unsigned value of the same
1005 size as EMACS_INT.
1006
1007 -- Type names should be relatively short (no more than 10
1008 characters or so), with the first letter capitalized and no
1009 underscores if they can at all be avoided.
1010
1011 -- "count" == a zero-based measurement of some quantity. Includes
1012 sizes, offsets, and indexes.
1013
1014 -- "bpos" == a one-based measurement of a position in a buffer.
1015 "Charbpos" and "Bytebpos" count text in the buffer, rather than
1016 bytes in memory; thus Bytebpos does not directly correspond to
1017 the memory representation. Use "Membpos" for this.
1018
1019 -- "Char" refers to internal-format characters, not to the C type
1020 "char", which is really a byte.
1021
1022 -- For the actual name changes, see the script below.
1023
1024 I ran the following script to do the conversion. (NOTE: This script
1025 is idempotent. You can safely run it multiple times and it will
1026 not screw up previous results -- in fact, it will do nothing if
1027 nothing has changed. Thus, it can be run repeatedly as necessary
1028 to handle patches coming in from old workspaces, or old branches.)
1029 There are two tags, just before and just after the change:
1030 `pre-integral-type-rename' and `post-integral-type-rename'. When
1031 merging code from the main trunk into a branch, the best thing to
1032 do is first merge up to `pre-integral-type-rename', then apply the
1033 script and associated changes, then merge from
1034 `post-integral-type-change' to the present. (Alternatively, just do
1035 the merging in one operation; but you may then have a lot of
1036 conflicts needing to be resolved by hand.)
1037
1038 Script `fixtypes.sh' follows:
1039
1040
1041 ----------------------------------- cut ------------------------------------
1042 files="*.[ch] s/*.h m/*.h config.h.in ../configure.in Makefile.in.in ../lib-src/*.[ch] ../lwlib/*.[ch]"
1043 gr Memory_Count Bytecount $files
1044 gr Lstream_Data_Count Bytecount $files
1045 gr Element_Count Elemcount $files
1046 gr Hash_Code Hashcode $files
1047 gr extcount bytecount $files
1048 gr bufpos charbpos $files
1049 gr bytind bytebpos $files
1050 gr memind membpos $files
1051 gr bufbyte intbyte $files
1052 gr Extcount Bytecount $files
1053 gr Bufpos Charbpos $files
1054 gr Bytind Bytebpos $files
1055 gr Memind Membpos $files
1056 gr Bufbyte Intbyte $files
1057 gr EXTCOUNT BYTECOUNT $files
1058 gr BUFPOS CHARBPOS $files
1059 gr BYTIND BYTEBPOS $files
1060 gr MEMIND MEMBPOS $files
1061 gr BUFBYTE INTBYTE $files
1062 gr MEMORY_COUNT BYTECOUNT $files
1063 gr LSTREAM_DATA_COUNT BYTECOUNT $files
1064 gr ELEMENT_COUNT ELEMCOUNT $files
1065 gr HASH_CODE HASHCODE $files
1066 ----------------------------------- cut ------------------------------------
1067
1068
1069 `fixtypes.sh' is a Bourne-shell script; it uses 'gr':
1070
1071
1072 ----------------------------------- cut ------------------------------------
1073 #!/bin/sh
1074
1075 # Usage is like this:
1076
1077 # gr FROM TO FILES ...
1078
1079 # globally replace FROM with TO in FILES. FROM and TO are regular expressions.
1080 # backup files are stored in the `backup' directory.
1081 from="$1"
1082 to="$2"
1083 shift 2
1084 echo ${1+"$@"} | xargs global-replace "s/$from/$to/g"
1085 ----------------------------------- cut ------------------------------------
1086
1087
1088 `gr' in turn uses a Perl script to do its real work,
1089 `global-replace', which follows:
1090
1091
1092 ----------------------------------- cut ------------------------------------
1093 : #-*- Perl -*-
1094
1095 ### global-modify --- modify the contents of a file by a Perl expression
1096
1097 ## Copyright (C) 1999 Martin Buchholz.
1098 ## Copyright (C) 2001 Ben Wing.
1099
1100 ## Authors: Martin Buchholz <martin@xemacs.org>, Ben Wing <ben@xemacs.org>
1101 ## Maintainer: Ben Wing <ben@xemacs.org>
1102 ## Current Version: 1.0, May 5, 2001
1103
1104 # This program is free software; you can redistribute it and/or modify
1105 # it under the terms of the GNU General Public License as published by
1106 # the Free Software Foundation; either version 2, or (at your option)
1107 # any later version.
1108 #
1109 # This program is distributed in the hope that it will be useful, but
1110 # WITHOUT ANY WARRANTY; without even the implied warranty of
1111 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1112 # General Public License for more details.
1113 #
1114 # You should have received a copy of the GNU General Public License
1115 # along with XEmacs; see the file COPYING. If not, write to the Free
1116 # Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1117 # 02111-1307, USA.
1118
1119 eval 'exec perl -w -S $0 ${1+"$@"}'
1120 if 0;
1121
1122 use strict;
1123 use FileHandle;
1124 use Carp;
1125 use Getopt::Long;
1126 use File::Basename;
1127
1128 (my $myName = $0) =~ s@.*/@@; my $usage="
1129 Usage: $myName [--help] [--backup-dir=DIR] [--line-mode] [--hunk-mode]
1130 PERLEXPR FILE ...
1131
1132 Globally modify a file, either line by line or in one big hunk.
1133
1134 Typical usage is like this:
1135
1136 [with GNU print, GNU xargs: guaranteed to handle spaces, quotes, etc.
1137 in file names]
1138
1139 find . -name '*.[ch]' -print0 | xargs -0 $0 's/\bCONST\b/const/g'\n
1140
1141 [with non-GNU print, xargs]
1142
1143 find . -name '*.[ch]' -print | xargs $0 's/\bCONST\b/const/g'\n
1144
1145
1146 The file is read in, either line by line (with --line-mode specified)
1147 or in one big hunk (with --hunk-mode specified; it's the default), and
1148 the Perl expression is then evalled with \$_ set to the line or hunk of
1149 text, including the terminating newline if there is one. It should
1150 destructively modify the value there, storing the changed result in \$_.
1151
1152 Files in which any modifications are made are backed up to the directory
1153 specified using --backup-dir, or to `backup' by default. To disable this,
1154 use --backup-dir= with no argument.
1155
1156 Hunk mode is the default because it is MUCH MUCH faster than line-by-line.
1157 Use line-by-line only when it matters, e.g. you want to do a replacement
1158 only once per line (the default without the `g' argument). Conversely,
1159 when using hunk mode, *ALWAYS* use `g'; otherwise, you will only make one
1160 replacement in the entire file!
1161 ";
1162
1163 my %options = ();
1164 $Getopt::Long::ignorecase = 0;
1165 &GetOptions (
1166 \%options,
1167 'help', 'backup-dir=s', 'line-mode', 'hunk-mode',
1168 );
1169
1170
1171 die $usage if $options{"help"} or @ARGV <= 1;
1172 my $code = shift;
1173
1174 die $usage if grep (-d || ! -w, @ARGV);
1175
1176 sub SafeOpen {
1177 open ((my $fh = new FileHandle), $_[0]);
1178 confess "Can't open $_[0]: $!" if ! defined $fh;
1179 return $fh;
1180 }
1181
1182 sub SafeClose {
1183 close $_[0] or confess "Can't close $_[0]: $!";
1184 }
1185
1186 sub FileContents {
1187 my $fh = SafeOpen ("< $_[0]");
1188 my $olddollarslash = $/;
1189 local $/ = undef;
1190 my $contents = <$fh>;
1191 $/ = $olddollarslash;
1192 return $contents;
1193 }
1194
1195 sub WriteStringToFile {
1196 my $fh = SafeOpen ("> $_[0]");
1197 binmode $fh;
1198 print $fh $_[1] or confess "$_[0]: $!\n";
1199 SafeClose $fh;
1200 }
1201
1202 foreach my $file (@ARGV) {
1203 my $changed_p = 0;
1204 my $new_contents = "";
1205 if ($options{"line-mode"}) {
1206 my $fh = SafeOpen $file;
1207 while (<$fh>) {
1208 my $save_line = $_;
1209 eval $code;
1210 $changed_p = 1 if $save_line ne $_;
1211 $new_contents .= $_;
1212 }
1213 } else {
1214 my $orig_contents = $_ = FileContents $file;
1215 eval $code;
1216 if ($_ ne $orig_contents) {
1217 $changed_p = 1;
1218 $new_contents = $_;
1219 }
1220 }
1221
1222 if ($changed_p) {
1223 my $backdir = $options{"backup-dir"};
1224 $backdir = "backup" if !defined ($backdir);
1225 if ($backdir) {
1226 my ($name, $path, $suffix) = fileparse ($file, "");
1227 my $backfulldir = $path . $backdir;
1228 my $backfile = "$backfulldir/$name";
1229 mkdir $backfulldir, 0755 unless -d $backfulldir;
1230 print "modifying $file (original saved in $backfile)\n";
1231 rename $file, $backfile;
1232 }
1233 WriteStringToFile ($file, $new_contents);
1234 }
1235 }
1236 ----------------------------------- cut ------------------------------------
1237
1238
1239 In addition to those programs, I needed to fix up a few other
1240 things, particularly relating to the duplicate definitions of
1241 types, now that some types merged with others. Specifically:
1242
1243 1. in lisp.h, removed duplicate declarations of Bytecount. The
1244 changed code should now look like this: (In each code snippet
1245 below, the first and last lines are the same as the original, as
1246 are all lines outside of those lines. That allows you to locate
1247 the section to be replaced, and replace the stuff in that
1248 section, verifying that there isn't anything new added that
1249 would need to be kept.)
1250
1251 --------------------------------- snip -------------------------------------
1252 /* Counts of bytes or chars */
1253 typedef EMACS_INT Bytecount;
1254 typedef EMACS_INT Charcount;
1255
1256 /* Counts of elements */
1257 typedef EMACS_INT Elemcount;
1258
1259 /* Hash codes */
1260 typedef unsigned long Hashcode;
1261
1262 /* ------------------------ dynamic arrays ------------------- */
1263 --------------------------------- snip -------------------------------------
1264
1265 2. in lstream.h, removed duplicate declaration of Bytecount.
1266 Rewrote the comment about this type. The changed code should
1267 now look like this:
1268
1269
1270 --------------------------------- snip -------------------------------------
1271 #endif
1272
1273 /* The have been some arguments over the what the type should be that
1274 specifies a count of bytes in a data block to be written out or read in,
1275 using Lstream_read(), Lstream_write(), and related functions.
1276 Originally it was long, which worked fine; Martin "corrected" these to
1277 size_t and ssize_t on the grounds that this is theoretically cleaner and
1278 is in keeping with the C standards. Unfortunately, this practice is
1279 horribly error-prone due to design flaws in the way that mixed
1280 signed/unsigned arithmetic happens. In fact, by doing this change,
1281 Martin introduced a subtle but fatal error that caused the operation of
1282 sending large mail messages to the SMTP server under Windows to fail.
1283 By putting all values back to be signed, avoiding any signed/unsigned
1284 mixing, the bug immediately went away. The type then in use was
1285 Lstream_Data_Count, so that it be reverted cleanly if a vote came to
1286 that. Now it is Bytecount.
1287
1288 Some earlier comments about why the type must be signed: This MUST BE
1289 SIGNED, since it also is used in functions that return the number of
1290 bytes actually read to or written from in an operation, and these
1291 functions can return -1 to signal error.
1292
1293 Note that the standard Unix read() and write() functions define the
1294 count going in as a size_t, which is UNSIGNED, and the count going
1295 out as an ssize_t, which is SIGNED. This is a horrible design
1296 flaw. Not only is it highly likely to lead to logic errors when a
1297 -1 gets interpreted as a large positive number, but operations are
1298 bound to fail in all sorts of horrible ways when a number in the
1299 upper-half of the size_t range is passed in -- this number is
1300 unrepresentable as an ssize_t, so code that checks to see how many
1301 bytes are actually written (which is mandatory if you are dealing
1302 with certain types of devices) will get completely screwed up.
1303
1304 --ben
1305 */
1306
1307 typedef enum lstream_buffering
1308 --------------------------------- snip -------------------------------------
1309
1310
1311 3. in dumper.c, there are four places, all inside of switch()
1312 statements, where XD_BYTECOUNT appears twice as a case tag. In
1313 each case, the two case blocks contain identical code, and you
1314 should *REMOVE THE SECOND* and leave the first.
1315
1 2001-09-17 Ben Wing <ben@xemacs.org> 1316 2001-09-17 Ben Wing <ben@xemacs.org>
2 1317
3 * fileio.c (normalize_filename): 1318 * fileio.c (normalize_filename):
4 * fileio.c (Fexpand_file_name): 1319 * fileio.c (Fexpand_file_name):
5 Fix various C++ compile errors in Andy's recent code. 1320 Fix various C++ compile errors in Andy's recent code.