This commit was generated by cvs2svn to compensate for changes in r43, which
authortomo <tomo>
Mon, 17 May 1999 09:41:43 +0000 (09:41 +0000)
committertomo <tomo>
Mon, 17 May 1999 09:41:43 +0000 (09:41 +0000)
included commits to RCS files with non-trunk default branches.

PROBLEMS
lib-src/ChangeLog
man/ChangeLog
nt/ChangeLog
src/callproc.c
src/editfns.c
src/fileio.c
src/process-unix.c
version.sh

index da815d4..448cc36 100644 (file)
--- a/PROBLEMS
+++ b/PROBLEMS
@@ -1148,6 +1148,16 @@ affected virtually all ioctl() calls.
 
 
 ** Linux
+*** You get crashes in a non-C locale with Linux GNU Libc 2.0.
+
+Internationalization was not the top priority for GNU Libc 2.0.
+As of this writing (1998-12-28) you may get crashes while running
+XEmacs in a non-C locale.  For example, `LC_ALL=en_US xemacs' crashes
+while `LC_ALL=C xemacs' runs fine.  This happens for example with GNU
+libc 2.0.7.  Installing libintl.a and libintl.h built from gettext
+0.10.35 and re-building XEmacs solves the crashes.  Presumably soon 
+everyone will upgrade to GNU Libc 2.1 and this problem will go away.
+
 *** `C-z', or `M-x suspend-emacs' hangs instead of suspending.
 
 If you build with `gpm' support on Linux, you cannot suspend XEmacs
index 099f980..a9429e0 100644 (file)
@@ -1,3 +1,7 @@
+1998-12-28  Martin Buchholz <martin@xemacs.org>
+
+       * XEmacs 21.2.8 is released.
+
 1998-12-24  Martin Buchholz <martin@xemacs.org>
 
        * XEmacs 21.2.7 is released.
index 790c7a7..ce72582 100644 (file)
@@ -1,3 +1,7 @@
+1998-12-28  Martin Buchholz <martin@xemacs.org>
+
+       * XEmacs 21.2.8 is released.
+
 1998-12-24  Martin Buchholz <martin@xemacs.org>
 
        * XEmacs 21.2.7 is released.
index dea20d2..37ef852 100644 (file)
@@ -1,3 +1,7 @@
+1998-12-28  Martin Buchholz <martin@xemacs.org>
+
+       * XEmacs 21.2.8 is released.
+
 1998-12-24  Martin Buchholz <martin@xemacs.org>
 
        * XEmacs 21.2.7 is released.
index 808d930..5bdcb78 100644 (file)
@@ -626,19 +626,11 @@ child_setup (int in, int out, int err, char **new_argv,
   }
 
   /* Set `env' to a vector of the strings in Vprocess_environment.  */
+  /* + 2 to include PWD and terminating 0.  */
+  env = alloca_array (char *, XINT (Flength (Vprocess_environment)) + 2);
   {
-    REGISTER Lisp_Object tem;
-    REGISTER char **new_env;
-    REGISTER int new_length = 0;
-
-    for (tem = Vprocess_environment;
-        (CONSP (tem)
-         && STRINGP (XCAR (tem)));
-        tem = XCDR (tem))
-      new_length++;
-
-    /* new_length + 2 to include PWD and terminating 0.  */
-    env = new_env = alloca_array (char *, new_length + 2);
+    REGISTER Lisp_Object tail;
+    char **new_env = env;
 
     /* If we have a PWD envvar and we know the real current directory,
        pass one down, but with corrected value.  */
@@ -646,20 +638,23 @@ child_setup (int in, int out, int err, char **new_argv,
       *new_env++ = pwd;
 
     /* Copy the Vprocess_environment strings into new_env.  */
-    for (tem = Vprocess_environment;
-        (CONSP (tem)
-         && STRINGP (XCAR (tem)));
-        tem = XCDR (tem))
+    for (tail = Vprocess_environment;
+        CONSP (tail) && STRINGP (XCAR (tail));
+        tail = XCDR (tail))
     {
       char **ep = env;
-      char *string = (char *) XSTRING_DATA (XCAR (tem));
-      /* See if this string duplicates any string already in the env.
+      char *envvar_external;
+      Bufbyte *envvar_internal = XSTRING_DATA (XCAR (tail));
+
+      GET_C_CHARPTR_EXT_FILENAME_DATA_ALLOCA (envvar_internal, envvar_external);
+
+      /* See if envvar_external duplicates any string already in the env.
         If so, don't put it in.
         When an env var has multiple definitions,
         we keep the definition that comes first in process-environment.  */
       for (; ep != new_env; ep++)
        {
-         char *p = *ep, *q = string;
+         char *p = *ep, *q = envvar_external;
          while (1)
            {
              if (*q == 0)
@@ -672,17 +667,19 @@ child_setup (int in, int out, int err, char **new_argv,
              p++, q++;
            }
        }
-      if (pwd && !strncmp ("PWD=", string, 4))
+      if (pwd && !strncmp ("PWD=", envvar_external, 4))
        {
          *new_env++ = pwd;
          pwd = 0;
        }
       else
-        *new_env++ = string;
+        *new_env++ = envvar_external;
+
     duplicate: ;
     }
     *new_env = 0;
   }
+
 #ifdef WINDOWSNT
   prepare_standard_handles (in, out, err, handles);
   set_process_dir (current_dir);
@@ -699,11 +696,11 @@ child_setup (int in, int out, int err, char **new_argv,
   close (STDIN_FILENO);
   close (STDOUT_FILENO);
   close (STDERR_FILENO);
-  
+
   dup2 (in,  STDIN_FILENO);
   dup2 (out, STDOUT_FILENO);
   dup2 (err, STDERR_FILENO);
-  
+
   close (in);
   close (out);
   close (err);
index 9bb9b8e..ce1f101 100644 (file)
@@ -821,6 +821,7 @@ uncache_home_directory (void)
                                   of a few bytes */
 }
 
+/* Returns the home directory, in external format */
 char *
 get_home_directory (void)
 {
@@ -878,16 +879,16 @@ get_home_directory (void)
        }
       if (initialized && output_home_warning)
        {
-         warn_when_safe(Quser_files_and_directories, Qwarning, "\n"
+         warn_when_safe (Quser_files_and_directories, Qwarning, "\n"
 "      XEmacs was unable to determine a good value for the user's $HOME\n"
 "      directory, and will be using the value:\n"
 "              %s\n"
 "      This is probably incorrect.",
-                        cached_home_directory
-                        );
+                         cached_home_directory
+                         );
        }
     }
-  return (cached_home_directory);
+  return cached_home_directory;
 }
 
 DEFUN ("user-home-directory", Fuser_home_directory, 0, 0, 0, /*
@@ -895,18 +896,12 @@ Return the user's home directory, as a string.
 */
        ())
 {
-  Lisp_Object directory;
-  char *path;
+  char *path = get_home_directory ();
 
-  directory = Qnil;
-  path = get_home_directory ();
-  if (path != NULL)
-    {
-      directory =
-       Fexpand_file_name (Fsubstitute_in_file_name (build_string (path)),
-                          Qnil);
-    }
-  return (directory);
+  return path == NULL ? Qnil :
+    Fexpand_file_name (Fsubstitute_in_file_name
+                      (build_ext_string (path, FORMAT_FILENAME)),
+                      Qnil);
 }
 
 DEFUN ("system-name", Fsystem_name, 0, 0, 0, /*
index a9db0b5..6844d96 100644 (file)
@@ -981,8 +981,13 @@ See also the function `substitute-in-file-name'.
       if (IS_DIRECTORY_SEP (nm[1])
          || nm[1] == 0)        /* ~ by itself */
        {
-         if (!(newdir = (Bufbyte *) get_home_directory()))
+         char * newdir_external = get_home_directory ();
+
+         if (newdir_external == NULL)
            newdir = (Bufbyte *) "";
+         else
+           GET_C_CHARPTR_INT_FILENAME_DATA_ALLOCA (newdir_external, newdir);
+
          nm++;
 #ifdef WINDOWSNT
          collapse_newdir = 0;
@@ -1255,8 +1260,7 @@ See also the function `substitute-in-file-name'.
     }
   else
     {
-      if (!(IS_DIRECTORY_SEP (target[0]) && IS_DIRECTORY_SEP (target[1])))
-      abort ();
+      assert (IS_DIRECTORY_SEP (target[0]) && IS_DIRECTORY_SEP (target[1]));
     }
   CORRECT_DIR_SEPS (target);
 #endif /* WINDOWSNT */
index a62b7f9..6f8e7c6 100644 (file)
@@ -698,7 +698,7 @@ unix_init_process_io_handles (struct Lisp_Process *p, void* in, void* out, int f
 }
 
 /*
- * Fork off a subprocess. P is a pointer to newly created subprocess
+ * Fork off a subprocess. P is a pointer to a newly created subprocess
  * object. If this function signals, the caller is responsible for
  * deleting (and finalizing) the process object.
  *
@@ -714,30 +714,13 @@ unix_create_process (struct Lisp_Process *p,
 {
   /* This function rewritten by ben@xemacs.org. */
 
-  int pid, inchannel, outchannel;
+  int pid;
+  int inchannel  = -1;
+  int outchannel = -1;
   /* Use volatile to protect variables from being clobbered by longjmp.  */
-  volatile int forkin, forkout;
+  volatile int forkin   = -1;
+  volatile int forkout  = -1;
   volatile int pty_flag = 0;
-  char **env;
-  char **new_argv;
-  char *current_dir;
-  int i;
-
-  env = environ;
-
-  inchannel = outchannel = forkin = forkout = -1;
-
-  /* Nothing below here GCs so our string pointers shouldn't move. */
-  new_argv = alloca_array (char *, nargv + 2);
-  GET_C_STRING_FILENAME_DATA_ALLOCA (program, new_argv[0]);
-  for (i = 0; i < nargv; i++)
-    {
-      Lisp_Object tem = argv[i];
-      CHECK_STRING (tem);
-      new_argv[i + 1] = (char *) XSTRING_DATA (tem);
-    }
-  new_argv[i + 1] = 0;
-  GET_C_STRING_FILENAME_DATA_ALLOCA (cur_dir, current_dir);
 
 #ifdef HAVE_PTYS
   if (!NILP (Vprocess_connection_type))
@@ -755,7 +738,7 @@ unix_create_process (struct Lisp_Process *p,
         better error checking. */
 #if !defined(USG)
       /* On USG systems it does not work to open the pty's tty here
-              and then close and reopen it in the child.  */
+        and then close and reopen it in the child.  */
 #ifdef O_NOCTTY
       /* Don't let this terminal become our controlling terminal
         (in case we don't have one).  */
@@ -915,20 +898,38 @@ unix_create_process (struct Lisp_Process *p,
            */
            signal (SIGHUP, SIG_DFL);
          }
+
+       if (pty_flag)
+         /* Set up the terminal characteristics of the pty. */
+         child_setup_tty (xforkout);
+
 #endif /* HAVE_PTYS */
 
-       signal (SIGINT, SIG_DFL);
+       signal (SIGINT,  SIG_DFL);
        signal (SIGQUIT, SIG_DFL);
 
-       if (pty_flag)
-         {
-           /* Set up the terminal characteristics of the pty. */
-           child_setup_tty (xforkout);
-         }
+       {
+         char *current_dir;
+         char **new_argv = alloca_array (char *, nargv + 2);
+         int i;
 
-       child_setup (xforkin, xforkout, xforkout, new_argv, current_dir);
-      }
+         /* Nothing below here GCs so our string pointers shouldn't move. */
+         new_argv[0] = (char *) XSTRING_DATA (program);
+         for (i = 0; i < nargv; i++)
+           {
+             CHECK_STRING (argv[i]);
+             new_argv[i + 1] = (char *) XSTRING_DATA (argv[i]);
+           }
+         new_argv[i + 1] = 0;
 
+         GET_C_STRING_FILENAME_DATA_ALLOCA (cur_dir, current_dir);
+
+         child_setup (xforkin, xforkout, xforkout, new_argv, current_dir);
+       }
+
+      } /**** End of child code ****/
+
+    /**** Back in parent process ****/
 #if !defined(__CYGWIN32__)
     environ = save_environ;
 #endif
@@ -968,14 +969,13 @@ unix_create_process (struct Lisp_Process *p,
 
 io_failure:
   {
-    int temp = errno;
+    int save_errno = errno;
     close_descriptor_pair (forkin, forkout);
     close_descriptor_pair (inchannel, outchannel);
-    errno = temp;
+    errno = save_errno;
     report_file_error ("Opening pty or pipe", Qnil);
+    return 0; /* not reached */
   }
-
-  RETURN_NOT_REACHED (0);
 }
 
 /* Return nonzero if this process is a ToolTalk connection. */
index b313f11..04b14a6 100644 (file)
@@ -1,8 +1,8 @@
 #!/bin/sh
 emacs_major_version=21
 emacs_minor_version=2
-emacs_beta_version=7
-xemacs_codename="Ares"
+emacs_beta_version=8
+xemacs_codename="Artemis"
 infodock_major_version=4
 infodock_minor_version=0
 infodock_build_version=1