diff src/mule-coding.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 5d09ddada9ae
children 7f62a956b825
line wrap: on
line diff
--- a/src/mule-coding.c	Tue Jun 04 17:40:00 2002 +0000
+++ b/src/mule-coding.c	Wed Jun 05 09:58:45 2002 +0000
@@ -116,7 +116,7 @@
 	      /* Previous character was first byte of Shift-JIS Kanji char. */
 	      if (byte_shift_jis_two_byte_2_p (c))
 		{
-		  Intbyte e1, e2;
+		  Ibyte e1, e2;
 
 		  Dynarr_add (dst, LEADING_BYTE_JAPANESE_JISX0208);
 		  DECODE_SHIFT_JIS (ch, c, e1, e2);
@@ -151,13 +151,13 @@
     {
       while (n--)
 	{
-	  Intbyte c = *src++;
+	  Ibyte c = *src++;
 	  if (byte_ascii_p (c))
 	    {
 	      Dynarr_add (dst, c);
 	      ch = 0;
 	    }
-	  else if (intbyte_leading_byte_p (c))
+	  else if (ibyte_leading_byte_p (c))
 	    ch = (c == LEADING_BYTE_KATAKANA_JISX0201 ||
 		  c == LEADING_BYTE_JAPANESE_JISX0208_1978 ||
 		  c == LEADING_BYTE_JAPANESE_JISX0208) ? c : 0;
@@ -206,7 +206,7 @@
       byte_shift_jis_two_byte_2_p (s2))
     {
       DECODE_SHIFT_JIS (s1, s2, c1, c2);
-      return make_char (make_emchar (Vcharset_japanese_jisx0208,
+      return make_char (make_ichar (Vcharset_japanese_jisx0208,
 				     c1 & 0x7F, c2 & 0x7F));
     }
   else
@@ -223,7 +223,7 @@
   int c1, c2, s1, s2;
 
   CHECK_CHAR_COERCE_INT (character);
-  BREAKUP_EMCHAR (XCHAR (character), charset, c1, c2);
+  BREAKUP_ICHAR (XCHAR (character), charset, c1, c2);
   if (EQ (charset, Vcharset_japanese_jisx0208))
     {
       ENCODE_SHIFT_JIS (c1 | 0x80, c2 | 0x80, s1, s2);
@@ -451,7 +451,7 @@
 	      /* Previous character was first byte of Big5 char. */
 	      if (byte_big5_two_byte_2_p (c))
 		{
-		  Intbyte b1, b2, b3;
+		  Ibyte b1, b2, b3;
 		  DECODE_BIG5 (ch, c, b1, b2, b3);
 		  Dynarr_add (dst, b1);
 		  Dynarr_add (dst, b2);
@@ -480,13 +480,13 @@
     {
       while (n--)
 	{
-	  Intbyte c = *src++;
+	  Ibyte c = *src++;
 	  if (byte_ascii_p (c))
 	    {
 	      /* ASCII. */
 	      Dynarr_add (dst, c);
 	    }
-	  else if (intbyte_leading_byte_p (c))
+	  else if (ibyte_leading_byte_p (c))
 	    {
 	      if (c == LEADING_BYTE_CHINESE_BIG5_1 ||
 		  c == LEADING_BYTE_CHINESE_BIG5_2)
@@ -522,7 +522,7 @@
   return orign;
 }
 
-Emchar
+Ichar
 decode_big5_char (int b1, int b2)
 {
   if (byte_big5_two_byte_1_p (b1) &&
@@ -534,7 +534,7 @@
 
       DECODE_BIG5 (b1, b2, leading_byte, c1, c2);
       charset = charset_by_leading_byte (leading_byte);
-      return make_emchar (charset, c1 & 0x7F, c2 & 0x7F);
+      return make_ichar (charset, c1 & 0x7F, c2 & 0x7F);
     }
   else
     return -1;
@@ -552,7 +552,7 @@
 */
        (code))
 {
-  Emchar ch;
+  Ichar ch;
 
   CHECK_CONS (code);
   CHECK_INT (XCAR (code));
@@ -576,7 +576,7 @@
   int c1, c2, b1, b2;
 
   CHECK_CHAR_COERCE_INT (character);
-  BREAKUP_EMCHAR (XCHAR (character), charset, c1, c2);
+  BREAKUP_ICHAR (XCHAR (character), charset, c1, c2);
   if (EQ (charset, Vcharset_chinese_big5_1) ||
       EQ (charset, Vcharset_chinese_big5_2))
     {
@@ -1223,7 +1223,7 @@
 }
 
 static Lisp_Object
-charset_by_attributes_or_create_one (int type, Intbyte final, int dir)
+charset_by_attributes_or_create_one (int type, Ibyte final, int dir)
 {
   Lisp_Object charset = charset_by_attributes (type, final, dir);
 
@@ -1802,23 +1802,23 @@
 		  break;
 		case ISO_ESC_END_COMPOSITE:
 		  {
-		    Intbyte comstr[MAX_EMCHAR_LEN];
+		    Ibyte comstr[MAX_ICHAR_LEN];
 		    Bytecount len;
-		    Emchar emch = lookup_composite_char (Dynarr_atp (dst, 0),
+		    Ichar emch = lookup_composite_char (Dynarr_atp (dst, 0),
 							 Dynarr_length (dst));
 		    dst = real_dst;
-		    len = set_charptr_emchar (comstr, emch);
+		    len = set_itext_ichar (comstr, emch);
 		    Dynarr_add_many (dst, comstr, len);
 		    break;
 		  }
 #else
 		case ISO_ESC_START_COMPOSITE:
 		  {
-		    Intbyte comstr[MAX_EMCHAR_LEN];
+		    Ibyte comstr[MAX_ICHAR_LEN];
 		    Bytecount len;
-		    Emchar emch = make_emchar (Vcharset_composite, c - '0' + ' ',
+		    Ichar emch = make_ichar (Vcharset_composite, c - '0' + ' ',
 					     0);
-		    len = set_charptr_emchar (comstr, emch);
+		    len = set_itext_ichar (comstr, emch);
 		    Dynarr_add_many (dst, comstr, len);
 		    break;
 		  }
@@ -2101,11 +2101,11 @@
 /* Convert internally-formatted data to ISO2022 format. */
 
 static Bytecount
-iso2022_encode (struct coding_stream *str, const Intbyte *src,
+iso2022_encode (struct coding_stream *str, const Ibyte *src,
 		unsigned_char_dynarr *dst, Bytecount n)
 {
   unsigned char charmask;
-  Intbyte c;
+  Ibyte c;
   unsigned char char_boundary;
   unsigned int ch             = str->ch;
   Lisp_Object codesys         = str->codesys;
@@ -2121,7 +2121,7 @@
   /* flags for handling composite chars.  We do a little switcheroo
      on the source while we're outputting the composite char. */
   Bytecount saved_n = 0;
-  const Intbyte *saved_src = NULL;
+  const Ibyte *saved_src = NULL;
   int in_composite = 0;
 #endif /* ENABLE_COMPOSITE_CHARS */
 
@@ -2184,7 +2184,7 @@
 	  char_boundary = 1;
 	}
 
-      else if (intbyte_leading_byte_p (c) || intbyte_leading_byte_p (ch))
+      else if (ibyte_leading_byte_p (c) || ibyte_leading_byte_p (ch))
 	{ /* Processing Leading Byte */
 	  ch = 0;
 	  charset = charset_by_leading_byte (c);
@@ -2333,7 +2333,7 @@
 			    }
 			  else
 			    {
-			      Emchar emch = make_emchar (Vcharset_composite,
+			      Ichar emch = make_ichar (Vcharset_composite,
 						       ch & 0x7F, c & 0x7F);
 			      Lisp_Object lstr = composite_char_string (emch);
 			      saved_n = n;