diff src/sysdep.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 42375619fa45
children 79c6ff3eef26
line wrap: on
line diff
--- a/src/sysdep.c	Tue Jun 04 17:40:00 2002 +0000
+++ b/src/sysdep.c	Wed Jun 05 09:58:45 2002 +0000
@@ -569,10 +569,10 @@
 sys_subshell (void)
 {
   Lisp_Object dir;
-  Intbyte *str = 0;
+  Ibyte *str = 0;
   Bytecount len;
   struct gcpro gcpro1;
-  Intbyte *sh = 0;
+  Ibyte *sh = 0;
   Extbyte *shext;
 
   /* Use our buffer's default directory for the subshell.  */
@@ -590,7 +590,7 @@
   dir = Funhandled_file_name_directory (dir);
   dir = expand_and_dir_to_file (dir, Qnil);
 
-  str = (Intbyte *) ALLOCA (XSTRING_LENGTH (dir) + 2);
+  str = (Ibyte *) ALLOCA (XSTRING_LENGTH (dir) + 2);
   len = XSTRING_LENGTH (dir);
   memcpy (str, XSTRING_DATA (dir), len);
   if (!IS_ANY_SEP (str[len - 1]))
@@ -743,10 +743,10 @@
 
 /* Figure out the eof character for the FD. */
 
-Intbyte
+Ibyte
 get_eof_char (int fd)
 {
-  const Intbyte ctrl_d = (Intbyte) '\004';
+  const Ibyte ctrl_d = (Ibyte) '\004';
 
   if (!isatty (fd))
     return ctrl_d;
@@ -759,9 +759,9 @@
     if ((int) strlen ((const char *) t.c_cc) < (VEOF + 1))
       return ctrl_d;
     else
-      return (Intbyte) t.c_cc[VEOF];
+      return (Ibyte) t.c_cc[VEOF];
 #endif
-    return t.c_cc[VEOF] == _POSIX_VDISABLE ? ctrl_d : (Intbyte) t.c_cc[VEOF];
+    return t.c_cc[VEOF] == _POSIX_VDISABLE ? ctrl_d : (Ibyte) t.c_cc[VEOF];
   }
 #else /* ! HAVE_TERMIOS */
   /* On Berkeley descendants, the following IOCTL's retrieve the
@@ -770,7 +770,7 @@
   {
     struct tchars c;
     ioctl (fd, TIOCGETC, &c);
-    return (Intbyte) c.t_eofc;
+    return (Ibyte) c.t_eofc;
   }
 #else /* ! defined (TIOCGLTC) && defined (TIOCGETC) */
   /* On SYSV descendants, the TCGETA ioctl retrieves the current control
@@ -782,7 +782,7 @@
     if ((int) strlen ((const char *) t.c_cc) < (VINTR + 1))
       return ctrl_d;
     else
-      return (Intbyte) t.c_cc[VINTR];
+      return (Ibyte) t.c_cc[VINTR];
   }
 #else /* ! defined (TCGETA) */
   /* Rather than complain, we'll just guess ^D, which is what
@@ -2324,7 +2324,7 @@
   Vsystem_name = build_string (hostname);
 #endif /* HAVE_GETHOSTNAME  */
   {
-    Intbyte *p;
+    Ibyte *p;
     Bytecount i;
 
     for (i = 0, p = XSTRING_DATA (Vsystem_name);
@@ -2563,7 +2563,7 @@
    external encoding, interruptions, etc. */
 
 int
-qxe_open (const Intbyte *path, int oflag, ...)
+qxe_open (const Ibyte *path, int oflag, ...)
 {
   Extbyte *pathout;
   int mode;
@@ -2586,7 +2586,7 @@
    is not interrupted by C-g.  However, the worst that can happen is
    the fallback to simple open().  */
 int
-qxe_interruptible_open (const Intbyte *path, int oflag, int mode)
+qxe_interruptible_open (const Ibyte *path, int oflag, int mode)
 {
   /* This function can GC */
   Extbyte *pathout;
@@ -2773,7 +2773,7 @@
 }
 
 FILE *
-qxe_fopen (const Intbyte *path, const Char_ASCII *mode)
+qxe_fopen (const Ibyte *path, const Char_ASCII *mode)
 {
   Extbyte *pathout;
   PATHNAME_CONVERT_OUT (path, pathout);
@@ -2854,7 +2854,7 @@
 /********************* directory calls *******************/
 
 int
-qxe_chdir (const Intbyte *path)
+qxe_chdir (const Ibyte *path)
 {
   Extbyte *pathout;
   PATHNAME_CONVERT_OUT (path, pathout);
@@ -2869,7 +2869,7 @@
 }
 
 int
-qxe_mkdir (const Intbyte *path, mode_t mode)
+qxe_mkdir (const Ibyte *path, mode_t mode)
 {
   Extbyte *pathout;
   PATHNAME_CONVERT_OUT (path, pathout);
@@ -2884,7 +2884,7 @@
 }
 
 DIR *
-qxe_opendir (const Intbyte *filename)
+qxe_opendir (const Ibyte *filename)
 {
 #ifdef WIN32_NATIVE
   return mswindows_opendir (filename);
@@ -2921,7 +2921,7 @@
   {
     const Extbyte * const external_name = (const Extbyte *) rtnval->d_name;
     Bytecount external_len = strlen (rtnval->d_name);
-    const Intbyte *internal_name;
+    const Ibyte *internal_name;
     Bytecount internal_len;
 
     TO_INTERNAL_FORMAT (DATA, (external_name, external_len),
@@ -2934,13 +2934,13 @@
       return rtnval;
 
     { /* Non-ASCII filename */
-      static Intbyte_dynarr *internal_DIRENTRY;
+      static Ibyte_dynarr *internal_DIRENTRY;
       if (!internal_DIRENTRY)
-        internal_DIRENTRY = Dynarr_new (Intbyte);
+        internal_DIRENTRY = Dynarr_new (Ibyte);
       else
         Dynarr_reset (internal_DIRENTRY);
 
-      Dynarr_add_many (internal_DIRENTRY, (Intbyte *) rtnval,
+      Dynarr_add_many (internal_DIRENTRY, (Ibyte *) rtnval,
                        offsetof (DIRENTRY, d_name));
 
 
@@ -2969,7 +2969,7 @@
 }
 
 int
-qxe_rmdir (const Intbyte *path)
+qxe_rmdir (const Ibyte *path)
 {
   Extbyte *pathout;
   PATHNAME_CONVERT_OUT (path, pathout);
@@ -2983,7 +2983,7 @@
 #endif
 }
 
-Intbyte *
+Ibyte *
 qxe_allocating_getcwd (void)
 {
 #ifdef HAVE_GETCWD
@@ -3005,7 +3005,7 @@
 
       if (ret)
 	{
-	  Intbyte *retin;
+	  Ibyte *retin;
 	  TSTR_TO_C_STRING_MALLOC (ret, retin);
 	  xfree (cwd);
 	  return retin;
@@ -3014,7 +3014,7 @@
       Extbyte *ret = getcwd (cwd, cwdsize);
       if (ret)
 	{
-	  Intbyte *retin;
+	  Ibyte *retin;
 	  EXTERNAL_TO_C_STRING_MALLOC (ret, retin, Qfile_name);
 	  xfree (cwd);
 	  return retin;
@@ -3034,7 +3034,7 @@
     }
 #else
   Extbyte chingame_limitos_arbitrarios[PATH_MAX];
-  Intbyte *ret2;
+  Ibyte *ret2;
 
   if (!getwd (chingame_limitos_arbitrarios))
     return 0;
@@ -3046,7 +3046,7 @@
 /***************** file-information calls ******************/
 
 int
-qxe_access (const Intbyte *path, int mode)
+qxe_access (const Ibyte *path, int mode)
 {
 #ifdef WIN32_NATIVE
   return mswindows_access (path, mode);
@@ -3059,7 +3059,7 @@
 
 #if defined (HAVE_EACCESS)
 int
-qxe_eaccess (const Intbyte *path, int mode)
+qxe_eaccess (const Ibyte *path, int mode)
 {
   Extbyte *pathout;
   PATHNAME_CONVERT_OUT (path, pathout);
@@ -3068,7 +3068,7 @@
 #endif /* defined (HAVE_EACCESS) */
 
 int
-qxe_lstat (const Intbyte *path, struct stat *buf)
+qxe_lstat (const Ibyte *path, struct stat *buf)
 {
   /* if system does not have symbolic links, it does not have lstat.
      In that case, use ordinary stat instead.  */
@@ -3083,7 +3083,7 @@
 
 #if defined (HAVE_READLINK)
 int
-qxe_readlink (const Intbyte *path, Intbyte *buf, size_t bufsiz)
+qxe_readlink (const Ibyte *path, Ibyte *buf, size_t bufsiz)
 {
   int retval;
   Extbyte *pathout;
@@ -3093,7 +3093,7 @@
   if (retval < 0)
     return retval;
   {
-    Intbyte *intbuf;
+    Ibyte *intbuf;
     Bytecount tamanho;
 
     TO_INTERNAL_FORMAT (DATA, (buf, retval),
@@ -3118,7 +3118,7 @@
 }
 
 int
-qxe_stat (const Intbyte *path, struct stat *buf)
+qxe_stat (const Ibyte *path, struct stat *buf)
 {
 #ifdef WIN32_NATIVE
   return mswindows_stat (path, buf);
@@ -3133,7 +3133,7 @@
 /****************** file-manipulation calls *****************/
 
 int
-qxe_chmod (const Intbyte *path, mode_t mode)
+qxe_chmod (const Ibyte *path, mode_t mode)
 {
   Extbyte *pathout;
   PATHNAME_CONVERT_OUT (path, pathout);
@@ -3149,7 +3149,7 @@
 
 #if defined (HAVE_LINK)
 int
-qxe_link (const Intbyte *existing, const Intbyte *new)
+qxe_link (const Ibyte *existing, const Ibyte *new)
 {
 #ifdef WIN32_NATIVE
   return mswindows_link (existing, new);
@@ -3163,7 +3163,7 @@
 #endif /* defined (HAVE_LINK) */
 
 int
-qxe_rename (const Intbyte *old, const Intbyte *new)
+qxe_rename (const Ibyte *old, const Ibyte *new)
 {
 #ifdef WIN32_NATIVE
   /* Windows rename fails if NEW exists */
@@ -3184,7 +3184,7 @@
 
 #if defined (HAVE_SYMLINK)
 int
-qxe_symlink (const Intbyte *name1, const Intbyte *name2)
+qxe_symlink (const Ibyte *name1, const Ibyte *name2)
 {
   Extbyte *name1out, *name2out;
   PATHNAME_CONVERT_OUT (name1, name1out);
@@ -3194,7 +3194,7 @@
 #endif /* defined (HAVE_SYMLINK) */
 
 int
-qxe_unlink (const Intbyte *path)
+qxe_unlink (const Ibyte *path)
 {
 #ifdef WIN32_NATIVE
   return mswindows_unlink (path);
@@ -3209,8 +3209,8 @@
 /****************** process calls *****************/
 
 int
-qxe_execve (const Intbyte *filename, Intbyte * const argv[],
-	    Intbyte * const envp[])
+qxe_execve (const Ibyte *filename, Ibyte * const argv[],
+	    Ibyte * const envp[])
 {
   int i, argc, envc;
   Extbyte *pathext;
@@ -3288,7 +3288,7 @@
 }
 
 struct passwd *
-qxe_getpwnam (const Intbyte *name)
+qxe_getpwnam (const Ibyte *name)
 {
 #ifdef WIN32_NATIVE
   /* Synthetic versions are defined in nt.c and already do conversion. */
@@ -3325,14 +3325,14 @@
 
 /****************** time calls *****************/
 
-static Intbyte *ctime_static;
-
-Intbyte *
+static Ibyte *ctime_static;
+
+Ibyte *
 qxe_ctime (const time_t *t)
 {
   Extbyte *str = (Extbyte *) ctime (t);
   if (!str) /* can happen on MS Windows */
-    return (Intbyte *) "Sun Jan 01 00:00:00 1970";
+    return (Ibyte *) "Sun Jan 01 00:00:00 1970";
   if (ctime_static)
     xfree (ctime_static);
   EXTERNAL_TO_C_STRING_MALLOC (str, ctime_static, Qnative);