included commits to RCS files with non-trunk default branches.
** 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
+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.
+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.
+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.
}
/* 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. */
*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)
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);
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);
of a few bytes */
}
+/* Returns the home directory, in external format */
char *
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, /*
*/
())
{
- 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, /*
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;
}
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 */
}
/*
- * 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.
*
{
/* 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))
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). */
*/
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
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. */
#!/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