Mercurial > hg > xemacs-beta
comparison src/minibuf.c @ 867:804517e16990
[xemacs-hg @ 2002-06-05 09:54:39 by ben]
Textual renaming: text/char names
abbrev.c, alloc.c, buffer.c, buffer.h, bytecode.c, callint.c, casefiddle.c, casetab.c, charset.h, chartab.c, chartab.h, cmds.c, console-gtk.h, console-msw.c, console-msw.h, console-stream.c, console-tty.c, console-x.c, console-x.h, console.h, data.c, device-msw.c, device-x.c, dialog-msw.c, dired-msw.c, dired.c, doc.c, doprnt.c, editfns.c, eldap.c, emodules.c, eval.c, event-Xt.c, event-gtk.c, event-msw.c, event-stream.c, event-unixoid.c, events.c, events.h, file-coding.c, file-coding.h, fileio.c, filelock.c, fns.c, font-lock.c, frame-gtk.c, frame-msw.c, frame-x.c, frame.c, glyphs-eimage.c, glyphs-msw.c, glyphs-x.c, glyphs.c, glyphs.h, gpmevent.c, gui-x.c, gui-x.h, gui.c, gui.h, hpplay.c, indent.c, insdel.c, insdel.h, intl-win32.c, keymap.c, line-number.c, line-number.h, lisp-disunion.h, lisp-union.h, lisp.h, lread.c, lrecord.h, lstream.c, lstream.h, md5.c, menubar-msw.c, menubar-x.c, menubar.c, minibuf.c, mule-ccl.c, mule-charset.c, mule-coding.c, mule-wnnfns.c, ndir.h, nt.c, objects-gtk.c, objects-gtk.h, objects-msw.c, objects-tty.c, objects-x.c, objects.c, objects.h, postgresql.c, print.c, process-nt.c, process-unix.c, process.c, procimpl.h, realpath.c, redisplay-gtk.c, redisplay-msw.c, redisplay-output.c, redisplay-tty.c, redisplay-x.c, redisplay.c, redisplay.h, regex.c, search.c, select-common.h, select-gtk.c, select-x.c, sound.h, symbols.c, syntax.c, syntax.h, sysdep.c, sysdep.h, sysdir.h, sysfile.h, sysproc.h, syspwd.h, systime.h, syswindows.h, termcap.c, tests.c, text.c, text.h, toolbar-common.c, tooltalk.c, ui-gtk.c, unexnt.c, unicode.c, win32.c: Text/char naming rationalization.
[a] distinguish between "charptr" when it refers to operations on
the pointer itself and when it refers to operations on text; and
[b] use consistent naming for everything referring to internal
format, i.e.
Itext == text in internal format
Ibyte == a byte in such text
Ichar == a char as represented in internal character format
thus e.g.
set_charptr_emchar -> set_itext_ichar
The pre and post tags on either side of this change are:
pre-internal-format-textual-renaming
post-internal-format-textual-renaming
See the Internals Manual for details of exactly how this was done,
how to handle the change in your workspace, etc.
author | ben |
---|---|
date | Wed, 05 Jun 2002 09:58:45 +0000 |
parents | 2b6fa2618f76 |
children | 79c6ff3eef26 |
comparison
equal
deleted
inserted
replaced
866:613552a02607 | 867:804517e16990 |
---|---|
204 This is necessary for many reasons, one of which is that two | 204 This is necessary for many reasons, one of which is that two |
205 strings may match even if they have different numbers of bytes, | 205 strings may match even if they have different numbers of bytes, |
206 if IGNORE_CASE is true. */ | 206 if IGNORE_CASE is true. */ |
207 | 207 |
208 Charcount | 208 Charcount |
209 scmp_1 (const Intbyte *s1, const Intbyte *s2, Charcount len, | 209 scmp_1 (const Ibyte *s1, const Ibyte *s2, Charcount len, |
210 int ignore_case) | 210 int ignore_case) |
211 { | 211 { |
212 Charcount l = len; | 212 Charcount l = len; |
213 | 213 |
214 if (ignore_case) | 214 if (ignore_case) |
215 { | 215 { |
216 while (l) | 216 while (l) |
217 { | 217 { |
218 Emchar c1 = DOWNCASE (0, charptr_emchar (s1)); | 218 Ichar c1 = DOWNCASE (0, itext_ichar (s1)); |
219 Emchar c2 = DOWNCASE (0, charptr_emchar (s2)); | 219 Ichar c2 = DOWNCASE (0, itext_ichar (s2)); |
220 | 220 |
221 if (c1 == c2) | 221 if (c1 == c2) |
222 { | 222 { |
223 l--; | 223 l--; |
224 INC_CHARPTR (s1); | 224 INC_IBYTEPTR (s1); |
225 INC_CHARPTR (s2); | 225 INC_IBYTEPTR (s2); |
226 } | 226 } |
227 else | 227 else |
228 break; | 228 break; |
229 } | 229 } |
230 } | 230 } |
231 else | 231 else |
232 { | 232 { |
233 while (l && charptr_emchar (s1) == charptr_emchar (s2)) | 233 while (l && itext_ichar (s1) == itext_ichar (s2)) |
234 { | 234 { |
235 l--; | 235 l--; |
236 INC_CHARPTR (s1); | 236 INC_IBYTEPTR (s1); |
237 INC_CHARPTR (s2); | 237 INC_IBYTEPTR (s2); |
238 } | 238 } |
239 } | 239 } |
240 | 240 |
241 if (l == 0) | 241 if (l == 0) |
242 return -1; | 242 return -1; |
243 else return len - l; | 243 else return len - l; |
244 } | 244 } |
245 | 245 |
246 | 246 |
247 int | 247 int |
248 regexp_ignore_completion_p (const Intbyte *nonreloc, | 248 regexp_ignore_completion_p (const Ibyte *nonreloc, |
249 Lisp_Object reloc, Bytecount offset, | 249 Lisp_Object reloc, Bytecount offset, |
250 Bytecount length) | 250 Bytecount length) |
251 { | 251 { |
252 /* Ignore this element if it fails to match all the regexps. */ | 252 /* Ignore this element if it fails to match all the regexps. */ |
253 if (!NILP (Vcompletion_regexp_list)) | 253 if (!NILP (Vcompletion_regexp_list)) |
620 if (STRINGP (eltstring) | 620 if (STRINGP (eltstring) |
621 && (slength <= string_char_length (eltstring)) | 621 && (slength <= string_char_length (eltstring)) |
622 /* Reject alternatives that start with space | 622 /* Reject alternatives that start with space |
623 unless the input starts with space. */ | 623 unless the input starts with space. */ |
624 && ((string_char_length (string) > 0 && | 624 && ((string_char_length (string) > 0 && |
625 string_emchar (string, 0) == ' ') | 625 string_ichar (string, 0) == ' ') |
626 || string_emchar (eltstring, 0) != ' ') | 626 || string_ichar (eltstring, 0) != ' ') |
627 && (0 > scmp (XSTRING_DATA (eltstring), | 627 && (0 > scmp (XSTRING_DATA (eltstring), |
628 XSTRING_DATA (string), | 628 XSTRING_DATA (string), |
629 slength))) | 629 slength))) |
630 { | 630 { |
631 /* Yes. Now check whether predicate likes it. */ | 631 /* Yes. Now check whether predicate likes it. */ |
706 /* This function can call lisp */ | 706 /* This function can call lisp */ |
707 return clear_echo_area_internal (f, label, 1, no_restore); | 707 return clear_echo_area_internal (f, label, 1, no_restore); |
708 } | 708 } |
709 | 709 |
710 void | 710 void |
711 echo_area_append (struct frame *f, const Intbyte *nonreloc, Lisp_Object reloc, | 711 echo_area_append (struct frame *f, const Ibyte *nonreloc, Lisp_Object reloc, |
712 Bytecount offset, Bytecount length, | 712 Bytecount offset, Bytecount length, |
713 Lisp_Object label) | 713 Lisp_Object label) |
714 { | 714 { |
715 /* This function can call lisp */ | 715 /* This function can call lisp */ |
716 Lisp_Object obj; | 716 Lisp_Object obj; |
759 write_string_1 (Qexternal_debugging_output, nonreloc + offset, length); | 759 write_string_1 (Qexternal_debugging_output, nonreloc + offset, length); |
760 } | 760 } |
761 } | 761 } |
762 | 762 |
763 void | 763 void |
764 echo_area_message (struct frame *f, const Intbyte *nonreloc, | 764 echo_area_message (struct frame *f, const Ibyte *nonreloc, |
765 Lisp_Object reloc, Bytecount offset, Bytecount length, | 765 Lisp_Object reloc, Bytecount offset, Bytecount length, |
766 Lisp_Object label) | 766 Lisp_Object label) |
767 { | 767 { |
768 /* This function can call lisp */ | 768 /* This function can call lisp */ |
769 clear_echo_area (f, label, 1); | 769 clear_echo_area (f, label, 1); |
803 } | 803 } |
804 | 804 |
805 /* Dump an informative message to the echo area. This function takes a | 805 /* Dump an informative message to the echo area. This function takes a |
806 string in internal format. */ | 806 string in internal format. */ |
807 void | 807 void |
808 message_internal (const Intbyte *nonreloc, Lisp_Object reloc, | 808 message_internal (const Ibyte *nonreloc, Lisp_Object reloc, |
809 Bytecount offset, Bytecount length) | 809 Bytecount offset, Bytecount length) |
810 { | 810 { |
811 /* This function can call lisp */ | 811 /* This function can call lisp */ |
812 if (NILP (Vexecuting_macro)) | 812 if (NILP (Vexecuting_macro)) |
813 echo_area_message (selected_frame (), nonreloc, reloc, offset, length, | 813 echo_area_message (selected_frame (), nonreloc, reloc, offset, length, |
814 Qmessage); | 814 Qmessage); |
815 } | 815 } |
816 | 816 |
817 void | 817 void |
818 message_append_internal (const Intbyte *nonreloc, Lisp_Object reloc, | 818 message_append_internal (const Ibyte *nonreloc, Lisp_Object reloc, |
819 Bytecount offset, Bytecount length) | 819 Bytecount offset, Bytecount length) |
820 { | 820 { |
821 /* This function can call lisp */ | 821 /* This function can call lisp */ |
822 if (NILP (Vexecuting_macro)) | 822 if (NILP (Vexecuting_macro)) |
823 echo_area_append (selected_frame (), nonreloc, reloc, offset, length, | 823 echo_area_append (selected_frame (), nonreloc, reloc, offset, length, |
827 /* The next three functions are interfaces to message_internal() that | 827 /* The next three functions are interfaces to message_internal() that |
828 take strings in external format. message() does I18N3 translating | 828 take strings in external format. message() does I18N3 translating |
829 on the format string; message_no_translate() does not. */ | 829 on the format string; message_no_translate() does not. */ |
830 | 830 |
831 static void | 831 static void |
832 message_1 (const CIntbyte *fmt, va_list args) | 832 message_1 (const CIbyte *fmt, va_list args) |
833 { | 833 { |
834 /* This function can call lisp */ | 834 /* This function can call lisp */ |
835 if (fmt) | 835 if (fmt) |
836 { | 836 { |
837 struct gcpro gcpro1; | 837 struct gcpro gcpro1; |
845 else | 845 else |
846 message_internal (0, Qnil, 0, 0); | 846 message_internal (0, Qnil, 0, 0); |
847 } | 847 } |
848 | 848 |
849 static void | 849 static void |
850 message_append_1 (const CIntbyte *fmt, va_list args) | 850 message_append_1 (const CIbyte *fmt, va_list args) |
851 { | 851 { |
852 /* This function can call lisp */ | 852 /* This function can call lisp */ |
853 if (fmt) | 853 if (fmt) |
854 { | 854 { |
855 struct gcpro gcpro1; | 855 struct gcpro gcpro1; |