diff src/objects-msw.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 e7ee5f8bde58
children 79c6ff3eef26
line wrap: on
line diff
--- a/src/objects-msw.c	Tue Jun 04 17:40:00 2002 +0000
+++ b/src/objects-msw.c	Wed Jun 05 09:58:45 2002 +0000
@@ -915,7 +915,7 @@
 /************************************************************************/
 
 static int
-hexval (Intbyte c)
+hexval (Ibyte c)
 {
   /* assumes ASCII and isxdigit (c) */
   if (c >= 'a')
@@ -927,7 +927,7 @@
 }
 
 COLORREF
-mswindows_string_to_color (const Intbyte *name)
+mswindows_string_to_color (const Ibyte *name)
 {
   int i;
 
@@ -968,7 +968,7 @@
     {
       unsigned int r, g, b;
 
-      if (sscanf ((CIntbyte *) name, "rgb:%04x/%04x/%04x", &r, &g, &b) == 3)
+      if (sscanf ((CIbyte *) name, "rgb:%04x/%04x/%04x", &r, &g, &b) == 3)
 	{
 	  int len = qxestrlen (name);
 	  if (len == 18)
@@ -990,8 +990,8 @@
     }
   else if (*name)	/* Can't be an empty string */
     {
-      Intbyte *nospaces = (Intbyte *) ALLOCA (qxestrlen (name) + 1);
-      Intbyte *c = nospaces;
+      Ibyte *nospaces = (Ibyte *) ALLOCA (qxestrlen (name) + 1);
+      Ibyte *c = nospaces;
       while (*name)
 	if (*name != ' ')
 	  *c++ = *name++;
@@ -1032,10 +1032,10 @@
  * the corresponding field in the other pattern is either identical or blank.
  */
 static int
-match_font (Intbyte *pattern1, Intbyte *pattern2,
-	    Intbyte *fontname)
+match_font (Ibyte *pattern1, Ibyte *pattern2,
+	    Ibyte *fontname)
 {
-  Intbyte *c1 = pattern1, *c2 = pattern2, *e1 = 0, *e2 = 0;
+  Ibyte *c1 = pattern1, *c2 = pattern2, *e1 = 0, *e2 = 0;
   int i;
 
   if (fontname)
@@ -1093,10 +1093,10 @@
 font_enum_callback_2 (ENUMLOGFONTEXW *lpelfe, NEWTEXTMETRICEXW *lpntme,
 		      int FontType, struct font_enum_t *font_enum)
 {
-  Intbyte fontname[MSW_FONTSIZE * 2 * MAX_EMCHAR_LEN]; /* should be enough :)*/
+  Ibyte fontname[MSW_FONTSIZE * 2 * MAX_ICHAR_LEN]; /* should be enough :)*/
   Lisp_Object fontname_lispstr;
   int i;
-  Intbyte *facename;
+  Ibyte *facename;
 
   /*
    * The enumerated font weights are not to be trusted because:
@@ -1110,7 +1110,7 @@
    * those fonts that do get enumerated with different weights.
    */
   TSTR_TO_C_STRING (lpelfe->elfLogFont.lfFaceName, facename);
-  if (charptr_emchar (facename) == '@')
+  if (itext_ichar (facename) == '@')
     /* This is a font for writing vertically. We ignore it. */
     return 1;
 
@@ -1321,7 +1321,7 @@
 mswindows_finalize_font_instance (Lisp_Font_Instance *f);
 
 static HFONT
-create_hfont_from_font_spec (const Intbyte *namestr,
+create_hfont_from_font_spec (const Ibyte *namestr,
 			     HDC hdc,
 			     Lisp_Object name_for_errors,
 			     Lisp_Object device_font_list,
@@ -1330,9 +1330,9 @@
   LOGFONTW logfont;
   int fields, i;
   int pt;
-  Intbyte fontname[LF_FACESIZE], weight[LF_FACESIZE], *style, points[8];
-  Intbyte effects[LF_FACESIZE], charset[LF_FACESIZE];
-  Intbyte *c;
+  Ibyte fontname[LF_FACESIZE], weight[LF_FACESIZE], *style, points[8];
+  Ibyte effects[LF_FACESIZE], charset[LF_FACESIZE];
+  Ibyte *c;
   HFONT hfont;
 
   /*
@@ -1348,7 +1348,7 @@
    *	Courier New:Bold Italic:10:underline strikeout:western
    */
 
-  fields = sscanf ((CIntbyte *) namestr, "%31[^:]:%31[^:]:%7[^:]:%31[^:]:%31s",
+  fields = sscanf ((CIbyte *) namestr, "%31[^:]:%31[^:]:%7[^:]:%31[^:]:%31s",
 		   fontname, weight, points, effects, charset);
 
   /* This function is implemented in a fairly ad-hoc manner.
@@ -1451,7 +1451,7 @@
   logfont.lfStrikeOut = FALSE;
   if (fields >= 4 && effects[0] != '\0')
     {
-      Intbyte *effects2;
+      Ibyte *effects2;
 
       /* Maybe split effects into effects and effects2 */
       if ((c = qxestrchr (effects, ' ')))
@@ -1552,7 +1552,7 @@
   if (!NILP (device_font_list))
     {
       Lisp_Object fonttail;
-      Intbyte truename[MSW_FONTSIZE];
+      Ibyte truename[MSW_FONTSIZE];
 
       qxesprintf (truename, "%s:%s:%d:%s:%s", fontname, weight, pt, effects,
 		  charset);
@@ -1592,7 +1592,7 @@
 {
   HFONT hfont, hfont2;
   TEXTMETRICW metrics;
-  Intbyte *namestr = XSTRING_DATA (name);
+  Ibyte *namestr = XSTRING_DATA (name);
 
   hfont = create_hfont_from_font_spec (namestr, hdc, name, device_font_list,
 				       errb);
@@ -1698,7 +1698,7 @@
 
   LIST_LOOP (fonttail, font_list)
     {
-      Intbyte fontname[MSW_FONTSIZE];
+      Ibyte fontname[MSW_FONTSIZE];
 
       if (match_font (XSTRING_DATA (XCAR (fonttail)), XSTRING_DATA (pattern),
 		      fontname))
@@ -1728,8 +1728,8 @@
      with initialize_font_instance(). */
 
   int nsep = 0;
-  Intbyte *ptr = (Intbyte *) XSTRING_DATA (f->name);
-  Intbyte *name = (Intbyte *) ALLOCA (XSTRING_LENGTH (f->name) + 19);
+  Ibyte *ptr = (Ibyte *) XSTRING_DATA (f->name);
+  Ibyte *name = (Ibyte *) ALLOCA (XSTRING_LENGTH (f->name) + 19);
 
   qxestrcpy (name, ptr);
 
@@ -1762,7 +1762,7 @@
 #ifdef MULE
 
 static int
-mswindows_font_spec_matches_charset_stage_1 (const Intbyte *font_charset,
+mswindows_font_spec_matches_charset_stage_1 (const Ibyte *font_charset,
 					     Lisp_Object charset)
 {
   int i, ms_charset = 0;
@@ -1800,13 +1800,13 @@
 
 static int
 mswindows_font_spec_matches_charset (struct device *d, Lisp_Object charset,
-				     const Intbyte *nonreloc,
+				     const Ibyte *nonreloc,
 				     Lisp_Object reloc,
 				     Bytecount offset, Bytecount length)
 {
-  const Intbyte *the_nonreloc = nonreloc;
+  const Ibyte *the_nonreloc = nonreloc;
   int i;
-  const Intbyte *c;
+  const Ibyte *c;
   Bytecount the_length = length;
 
 /* The idea is that, when trying to find a suitable font for a character,
@@ -1831,7 +1831,7 @@
   c = the_nonreloc;
   for (i = 0; i < 4; i++)
     {
-      Intbyte *newc = (Intbyte *) memchr (c, ':', the_length);
+      Ibyte *newc = (Ibyte *) memchr (c, ':', the_length);
       if (!newc)
 	break;
       newc++;
@@ -1910,14 +1910,14 @@
       if (dim == 1)
 	{
 	  for (i = lowlim; i <= highlim; i++)
-	    if ((cp = emchar_to_unicode (make_emchar (charset, i, 0))) >= 0)
+	    if ((cp = ichar_to_unicode (make_ichar (charset, i, 0))) >= 0)
 	      break;
 	}
       else
 	{
 	  for (i = lowlim; i <= highlim; i++)
 	    for (j = lowlim; j <= highlim; j++)
-	      if ((cp = emchar_to_unicode (make_emchar (charset, i, j))) >= 0)
+	      if ((cp = ichar_to_unicode (make_ichar (charset, i, j))) >= 0)
 		break;
 	}