diff src/alloc.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 2c12fe2da451
children 79c6ff3eef26
line wrap: on
line diff
--- a/src/alloc.c	Tue Jun 04 17:40:00 2002 +0000
+++ b/src/alloc.c	Wed Jun 05 09:58:45 2002 +0000
@@ -1935,7 +1935,7 @@
   set_lheader_implementation (&s->u.lheader, &lrecord_string);
   
   set_lispstringp_data (s, BIG_STRING_FULLSIZE_P (fullsize)
-		   ? xnew_array (Intbyte, length + 1)
+		   ? xnew_array (Ibyte, length + 1)
 		   : allocate_string_chars_struct (wrap_string (s),
 						   fullsize)->chars);
 
@@ -2006,7 +2006,7 @@
 	    memmove (XSTRING_DATA (s) + pos + delta,
 		     XSTRING_DATA (s) + pos, len);
 	  XSET_STRING_DATA
-	    (s, (Intbyte *) xrealloc (XSTRING_DATA (s),
+	    (s, (Ibyte *) xrealloc (XSTRING_DATA (s),
 				      XSTRING_LENGTH (s) + delta + 1));
 	  if (delta > 0 && pos >= 0)
 	    memmove (XSTRING_DATA (s) + pos + delta, XSTRING_DATA (s) + pos,
@@ -2014,9 +2014,9 @@
 	}
       else /* String has been demoted from BIG_STRING. */
 	{
-	  Intbyte *new_data =
+	  Ibyte *new_data =
 	    allocate_string_chars_struct (s, newfullsize)->chars;
-	  Intbyte *old_data = XSTRING_DATA (s);
+	  Ibyte *old_data = XSTRING_DATA (s);
 
 	  if (pos >= 0)
 	    {
@@ -2039,7 +2039,7 @@
 	     constraints). */
 	  if (pos >= 0)
 	    {
-	      Intbyte *addroff = pos + XSTRING_DATA (s);
+	      Ibyte *addroff = pos + XSTRING_DATA (s);
 
 	      memmove (addroff + delta, addroff,
 		       /* +1 due to zero-termination. */
@@ -2048,10 +2048,10 @@
 	}
       else
 	{
-	  Intbyte *old_data = XSTRING_DATA (s);
-	  Intbyte *new_data =
+	  Ibyte *old_data = XSTRING_DATA (s);
+	  Ibyte *new_data =
 	    BIG_STRING_FULLSIZE_P (newfullsize)
-	    ? xnew_array (Intbyte, XSTRING_LENGTH (s) + delta + 1)
+	    ? xnew_array (Ibyte, XSTRING_LENGTH (s) + delta + 1)
 	    : allocate_string_chars_struct (s, newfullsize)->chars;
 
 	  if (pos >= 0)
@@ -2100,12 +2100,12 @@
 /* WARNING: If you modify an existing string, you must call
    CHECK_LISP_WRITEABLE() before and bump_string_modiff() afterwards. */
 void
-set_string_char (Lisp_Object s, Charcount i, Emchar c)
+set_string_char (Lisp_Object s, Charcount i, Ichar c)
 {
-  Intbyte newstr[MAX_EMCHAR_LEN];
+  Ibyte newstr[MAX_ICHAR_LEN];
   Bytecount bytoff = string_index_char_to_byte (s, i);
-  Bytecount oldlen = charptr_emchar_len (XSTRING_DATA (s) + bytoff);
-  Bytecount newlen = set_charptr_emchar (newstr, c);
+  Bytecount oldlen = itext_ichar_len (XSTRING_DATA (s) + bytoff);
+  Bytecount newlen = set_itext_ichar (newstr, c);
 
   sledgehammer_check_ascii_begin (s);
   if (oldlen != newlen)
@@ -2144,8 +2144,8 @@
   CHECK_NATNUM (length);
   CHECK_CHAR_COERCE_INT (character);
   {
-    Intbyte init_str[MAX_EMCHAR_LEN];
-    int len = set_charptr_emchar (init_str, XCHAR (character));
+    Ibyte init_str[MAX_ICHAR_LEN];
+    int len = set_itext_ichar (init_str, XCHAR (character));
     Lisp_Object val = make_uninit_string (len * XINT (length));
 
     if (len == 1)
@@ -2158,11 +2158,11 @@
     else
       {
 	EMACS_INT i;
-	Intbyte *ptr = XSTRING_DATA (val);
+	Ibyte *ptr = XSTRING_DATA (val);
 
 	for (i = XINT (length); i; i--)
 	  {
-	    Intbyte *init_ptr = init_str;
+	    Ibyte *init_ptr = init_str;
 	    switch (len)
 	      {
 	      case 4: *ptr++ = *init_ptr++;
@@ -2182,14 +2182,14 @@
 */
        (int nargs, Lisp_Object *args))
 {
-  Intbyte *storage = alloca_array (Intbyte, nargs * MAX_EMCHAR_LEN);
-  Intbyte *p = storage;
+  Ibyte *storage = alloca_array (Ibyte, nargs * MAX_ICHAR_LEN);
+  Ibyte *p = storage;
 
   for (; nargs; nargs--, args++)
     {
       Lisp_Object lisp_char = *args;
       CHECK_CHAR_COERCE_INT (lisp_char);
-      p += set_charptr_emchar (p, XCHAR (lisp_char));
+      p += set_itext_ichar (p, XCHAR (lisp_char));
     }
   return make_string (storage, p - storage);
 }
@@ -2202,7 +2202,7 @@
 #ifdef MULE
   int i;
   Bytecount length = XSTRING_LENGTH (string);
-  Intbyte *contents = XSTRING_DATA (string);
+  Ibyte *contents = XSTRING_DATA (string);
 
   for (i = 0; i < length; i++)
     {
@@ -2220,7 +2220,7 @@
 /* Take some raw memory, which MUST already be in internal format,
    and package it up into a Lisp string. */
 Lisp_Object
-make_string (const Intbyte *contents, Bytecount length)
+make_string (const Ibyte *contents, Bytecount length)
 {
   Lisp_Object val;
 
@@ -2250,17 +2250,17 @@
 }
 
 Lisp_Object
-build_intstring (const Intbyte *str)
+build_intstring (const Ibyte *str)
 {
   /* Some strlen's crash and burn if passed null. */
   return make_string (str, (str ? qxestrlen (str) : (Bytecount) 0));
 }
 
 Lisp_Object
-build_string (const CIntbyte *str)
+build_string (const CIbyte *str)
 {
   /* Some strlen's crash and burn if passed null. */
-  return make_string ((const Intbyte *) str, (str ? strlen (str) : 0));
+  return make_string ((const Ibyte *) str, (str ? strlen (str) : 0));
 }
 
 Lisp_Object
@@ -2272,19 +2272,19 @@
 }
 
 Lisp_Object
-build_msg_intstring (const Intbyte *str)
+build_msg_intstring (const Ibyte *str)
 {
   return build_intstring (GETTEXT (str));
 }
 
 Lisp_Object
-build_msg_string (const CIntbyte *str)
+build_msg_string (const CIbyte *str)
 {
   return build_string (CGETTEXT (str));
 }
 
 Lisp_Object
-make_string_nocopy (const Intbyte *contents, Bytecount length)
+make_string_nocopy (const Ibyte *contents, Bytecount length)
 {
   Lisp_String *s;
   Lisp_Object val;
@@ -2299,7 +2299,7 @@
   set_lheader_implementation (&s->u.lheader, &lrecord_string);
   SET_C_READONLY_RECORD_HEADER (&s->u.lheader);
   s->plist = Qnil;
-  set_lispstringp_data (s, (Intbyte *) contents);
+  set_lispstringp_data (s, (Ibyte *) contents);
   set_lispstringp_length (s, length);
   val = wrap_string (s);
   init_string_ascii_begin (val);
@@ -3315,7 +3315,7 @@
   stderr_out ("\"");
   for (i = 0; i < s; i++)
   {
-    Emchar ch = string_emchar (p, i);
+    Ichar ch = string_ichar (p, i);
     if (ch < 32 || ch >= 126)
       stderr_out ("\\%03o", ch);
     else if (ch == '\\' || ch == '\"')
@@ -3656,7 +3656,7 @@
 		     build_msg_string (gc_default_message));
 	  args[1] = build_string ("...");
 	  whole_msg = Fconcat (2, args);
-	  echo_area_message (f, (Intbyte *) 0, whole_msg, 0, -1,
+	  echo_area_message (f, (Ibyte *) 0, whole_msg, 0, -1,
 			     Qgarbage_collecting);
 	}
     }
@@ -3819,7 +3819,7 @@
 			 build_msg_string (gc_default_message));
 	      args[1] = build_msg_string ("... done");
 	      whole_msg = Fconcat (2, args);
-	      echo_area_message (selected_frame (), (Intbyte *) 0,
+	      echo_area_message (selected_frame (), (Ibyte *) 0,
 				 whole_msg, 0, -1,
 				 Qgarbage_collecting);
 	    }