From 5625b2eceaf697f104b5f883ffa73dca6e8fc005 Mon Sep 17 00:00:00 2001 From: tomo Date: Mon, 17 May 1999 09:41:43 +0000 Subject: [PATCH] XEmacs 21.2.8 --- CHANGES-beta | 3 ++ ChangeLog | 8 +++++ PROBLEMS | 10 ++++++ lib-src/ChangeLog | 4 +++ lisp/ChangeLog | 4 +++ man/ChangeLog | 4 +++ nt/ChangeLog | 4 +++ src/ChangeLog | 58 ++++++++++++++++++++++++++++++++-- src/alloc.c | 27 ++++------------ src/buffer.c | 89 +++++++++++++++++++++++++++++++--------------------- src/buffer.h | 1 + src/callproc.c | 43 ++++++++++++------------- src/editfns.c | 25 ++++++--------- src/fileio.c | 10 ++++-- src/process-unix.c | 72 +++++++++++++++++++++--------------------- version.sh | 4 +-- 16 files changed, 227 insertions(+), 139 deletions(-) diff --git a/CHANGES-beta b/CHANGES-beta index 847627f..4b4d5ae 100644 --- a/CHANGES-beta +++ b/CHANGES-beta @@ -1,4 +1,7 @@ -*- indented-text -*- +to 21.2 beta8 "Artemis" +-- A bunch of Mule fixes from Martin Buchholz + to 21.2 beta7 "Ares" -- mswindows modeline crash fix from Jonathan Harris -- picon glyph fix from Gunnar Evermann diff --git a/ChangeLog b/ChangeLog index 14386a0..42862c5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +1998-12-28 Martin Buchholz + + * XEmacs 21.2.8 is released. + +1998-12-28 Martin Buchholz + + * PROBLEMS: Document Linux GNU Libc 2.0 I18N crashes. + 1998-12-24 Martin Buchholz * XEmacs 21.2.7 is released. diff --git a/PROBLEMS b/PROBLEMS index da815d4..448cc36 100644 --- 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 diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 099f980..a9429e0 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,7 @@ +1998-12-28 Martin Buchholz + + * XEmacs 21.2.8 is released. + 1998-12-24 Martin Buchholz * XEmacs 21.2.7 is released. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 80077b5..ca5b6b9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +1998-12-28 Martin Buchholz + + * XEmacs 21.2.8 is released. + 1998-12-24 Martin Buchholz * XEmacs 21.2.7 is released. diff --git a/man/ChangeLog b/man/ChangeLog index 790c7a7..ce72582 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,7 @@ +1998-12-28 Martin Buchholz + + * XEmacs 21.2.8 is released. + 1998-12-24 Martin Buchholz * XEmacs 21.2.7 is released. diff --git a/nt/ChangeLog b/nt/ChangeLog index dea20d2..37ef852 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog @@ -1,3 +1,7 @@ +1998-12-28 Martin Buchholz + + * XEmacs 21.2.8 is released. + 1998-12-24 Martin Buchholz * XEmacs 21.2.7 is released. diff --git a/src/ChangeLog b/src/ChangeLog index b3395f9..abcaa7a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,55 @@ +1998-12-28 Martin Buchholz + + * XEmacs 21.2.8 is released. + +1998-12-28 Martin Buchholz + + * editfns.c (get_home_directory): + (user-home-directory): Simplify. + + + * callproc.c (child_setup): + - Environment variables were being passed to inferior processes + using internal encoding. + - Convert to external encoding. + - Rename local var `tem' to better name `tail'. + - Use Flength instead of `manual' calculation. + + * buffer.c (kill-buffer): + (record-buffer): + (set-buffer-major-mode): + (current-buffer): + - Fix up parameter names to correspond to docstrings. + - Don't use `bufname' when a buffer will do as well. + - Remove one unneeded GCPRO. + + * buffer.h (initial_directory): + * buffer.c (init_initial_directory): + - use correct conversions between internal and external format. + (directory_is_current_directory): new function + (init_buffer): convert initial_directory to internal format. + - solve crashes when current working directory is non-ASCII. + + * alloc.c (xmalloc): + (xcalloc): + (xrealloc): + - remove stupid casts, since XEmacs requires an ANSI C system. + (lrecord_type_index): replace abort() with more readable assert(). + + (reset_lcrecord_stats): remove. + (sweep_lcrecords_1): + - replace call to reset_lcrecord_stats() with call to xzero(). + +1998-12-27 Martin Buchholz + + * process-unix.c (unix_create_process): + - Fix crash invoking program with non-ASCII name. + Try invoking xemacs with SHELL=/bin/üsh, then M-x shell. + - Remove unused variable `env'. + - Rename `temp' to better name `save_errno'. + - Reorganize code for clarity. But still too chicken to nuke the + BSD 4.2 support. + 1998-12-24 Martin Buchholz * XEmacs 21.2.7 is released. @@ -8,11 +60,11 @@ - Fix indentation. - Use GET_C_STRING_FILENAME_DATA_ALLOCA with char *, not Extbyte *. - * glyphs-x.c (x_subwindow_instantiate): + * glyphs-x.c (x_subwindow_instantiate): - A image instance mask was being assigned to a image instance type! - X_SUBWINDOW_INSTANCE_DATA (ii) is not an lvalue in C++. - - * glyphs-msw.c (mswindows_initialize_dibitmap_image_instance): + + * glyphs-msw.c (mswindows_initialize_dibitmap_image_instance): Fix indentation. * glyphs-x.h: Make indentation consistent. diff --git a/src/alloc.c b/src/alloc.c index 509da0f..86a75e0 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -376,7 +376,7 @@ memory_full (void) void * xmalloc (size_t size) { - void *val = (void *) malloc (size); + void *val = malloc (size); if (!val && (size != 0)) memory_full (); return val; @@ -385,7 +385,7 @@ xmalloc (size_t size) static void * xcalloc (size_t nelem, size_t elsize) { - void *val = (void *) calloc (nelem, elsize); + void *val = calloc (nelem, elsize); if (!val && (nelem != 0)) memory_full (); return val; @@ -406,7 +406,7 @@ xrealloc (void *block, size_t size) { /* We must call malloc explicitly when BLOCK is 0, since some reallocs don't do this. */ - void *val = (void *) (block ? realloc (block, size) : malloc (size)); + void *val = block ? realloc (block, size) : malloc (size); if (!val && (size != 0)) memory_full (); return val; @@ -3378,8 +3378,7 @@ lrecord_type_index (CONST struct lrecord_implementation *implementation) if (type_index < 0 || type_index > max_lrecord_type || lrecord_implementations_table[type_index] != implementation) { - if (last_lrecord_type_index_assigned == max_lrecord_type) - abort (); + assert (last_lrecord_type_index_assigned < max_lrecord_type); type_index = ++last_lrecord_type_index_assigned; lrecord_implementations_table[type_index] = implementation; *(implementation->lrecord_type_index) = type_index; @@ -3398,21 +3397,6 @@ static struct int instances_on_free_list; } lcrecord_stats [countof (lrecord_implementations_table)]; - -static void -reset_lcrecord_stats (void) -{ - int i; - for (i = 0; i < countof (lcrecord_stats); i++) - { - lcrecord_stats[i].instances_in_use = 0; - lcrecord_stats[i].bytes_in_use = 0; - lcrecord_stats[i].instances_freed = 0; - lcrecord_stats[i].bytes_freed = 0; - lcrecord_stats[i].instances_on_free_list = 0; - } -} - static void tick_lcrecord_stats (CONST struct lrecord_header *h, int free_p) { @@ -3452,7 +3436,8 @@ sweep_lcrecords_1 (struct lcrecord_header **prev, int *used) struct lcrecord_header *header; int num_used = 0; /* int total_size = 0; */ - reset_lcrecord_stats (); + + xzero (lcrecord_stats); /* Reset all statistics to 0. */ /* First go through and call all the finalize methods. Then go through and free the objects. There used to diff --git a/src/buffer.c b/src/buffer.c index d235117..30489d4 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -126,6 +126,7 @@ struct buffer buffer_local_flags; /* This is the initial (startup) directory, as used for the *scratch* buffer. We're making this a global to make others aware of the startup directory. + `initial_directory' is stored in external format. */ char initial_directory[MAXPATHLEN+1]; @@ -1125,7 +1126,7 @@ No argument or nil as argument means do this for the current buffer. } DEFUN ("kill-buffer", Fkill_buffer, 1, 1, "bKill buffer: ", /* -Kill the buffer BUFNAME. +Kill the buffer BUFFER. The argument may be a buffer or may be the name of a buffer. An argument of nil means kill the current buffer. @@ -1139,21 +1140,21 @@ when the hook functions are called. Any processes that have this buffer as the `process-buffer' are killed with `delete-process'. */ - (bufname)) + (buffer)) { /* This function can call lisp */ Lisp_Object buf; REGISTER struct buffer *b; struct gcpro gcpro1, gcpro2; - if (NILP (bufname)) + if (NILP (buffer)) buf = Fcurrent_buffer (); - else if (BUFFERP (bufname)) - buf = bufname; + else if (BUFFERP (buffer)) + buf = buffer; else { - buf = get_buffer (bufname, 0); - if (NILP (buf)) nsberror (bufname); + buf = get_buffer (buffer, 0); + if (NILP (buf)) nsberror (buffer); } b = XBUFFER (buf); @@ -1175,7 +1176,7 @@ with `delete-process'. && BUF_MODIFF (b) > BUF_SAVE_MODIFF (b)) { Lisp_Object killp; - GCPRO2 (buf, bufname); + GCPRO1 (buf); killp = call1 (Qyes_or_no_p, (emacs_doprnt_string_c @@ -1361,7 +1362,7 @@ with `delete-process'. } DEFUN ("record-buffer", Frecord_buffer, 1, 1, 0, /* -Place buffer BUF first in the buffer order. +Place buffer BUFFER first in the buffer order. Call this function when a buffer is selected "visibly". This function changes the global buffer order and the per-frame buffer @@ -1369,7 +1370,7 @@ order for the selected frame. The buffer order keeps track of recency of selection so that `other-buffer' will return a recently selected buffer. See `other-buffer' for more information. */ - (buf)) + (buffer)) { REGISTER Lisp_Object lynk, prev; struct frame *f = selected_frame (); @@ -1377,7 +1378,7 @@ buffer. See `other-buffer' for more information. prev = Qnil; for (lynk = Vbuffer_alist; CONSP (lynk); lynk = XCDR (lynk)) { - if (EQ (XCDR (XCAR (lynk)), buf)) + if (EQ (XCDR (XCAR (lynk)), buffer)) break; prev = lynk; } @@ -1394,7 +1395,7 @@ buffer. See `other-buffer' for more information. prev = Qnil; for (lynk = f->buffer_alist; CONSP (lynk); lynk = XCDR (lynk)) { - if (EQ (XCDR (XCAR (lynk)), buf)) + if (EQ (XCDR (XCAR (lynk)), buffer)) break; prev = lynk; } @@ -1413,15 +1414,14 @@ Set an appropriate major mode for BUFFER, according to `default-major-mode'. Use this function before selecting the buffer, since it may need to inspect the current buffer's major mode. */ - (buf)) + (buffer)) { int speccount = specpdl_depth (); - REGISTER Lisp_Object function, tem; + Lisp_Object function = XBUFFER (Vbuffer_defaults)->major_mode; - function = XBUFFER (Vbuffer_defaults)->major_mode; if (NILP (function)) { - tem = Fget (current_buffer->major_mode, Qmode_class, Qnil); + Lisp_Object tem = Fget (current_buffer->major_mode, Qmode_class, Qnil); if (NILP (tem)) function = current_buffer->major_mode; } @@ -1434,7 +1434,7 @@ the current buffer's major mode. record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); - Fset_buffer (buf); + Fset_buffer (buffer); call0 (function); return unbind_to (speccount, Qnil); @@ -1452,9 +1452,9 @@ Return the current buffer as a Lisp object. */ ()) { - Lisp_Object buf; - XSETBUFFER (buf, current_buffer); - return buf; + Lisp_Object buffer; + XSETBUFFER (buffer, current_buffer); + return buffer; } /* Set the current buffer to B. */ @@ -2688,37 +2688,53 @@ handled: } } +/* Is PWD another name for `.' ? */ +static int +directory_is_current_directory (char *pwd) +{ + Bufbyte *pwd_internal; + struct stat dotstat, pwdstat; + + GET_C_CHARPTR_INT_FILENAME_DATA_ALLOCA (pwd, pwd_internal); + + return (IS_DIRECTORY_SEP (*pwd_internal) + && stat (pwd_internal, &pwdstat) == 0 + && stat ("." , &dotstat) == 0 + && dotstat.st_ino == pwdstat.st_ino + && dotstat.st_dev == pwdstat.st_dev + && (int) strlen (pwd_internal) < MAXPATHLEN); +} + void init_initial_directory (void) { /* This function can GC */ char *pwd; - struct stat dotstat, pwdstat; - int rc; initial_directory[0] = 0; /* If PWD is accurate, use it instead of calling getcwd. This is faster when PWD is right, and may avoid a fatal error. */ - if ((pwd = getenv ("PWD")) != 0 && IS_DIRECTORY_SEP (*pwd) - && stat (pwd, &pwdstat) == 0 - && stat (".", &dotstat) == 0 - && dotstat.st_ino == pwdstat.st_ino - && dotstat.st_dev == pwdstat.st_dev - && (int) strlen (pwd) < MAXPATHLEN) + if ((pwd = getenv ("PWD")) != NULL + && directory_is_current_directory (pwd)) strcpy (initial_directory, pwd); else if (getcwd (initial_directory, MAXPATHLEN) == NULL) fatal ("`getcwd' failed: %s\n", strerror (errno)); - /* Maybe this should really use some standard subroutine + /* Make sure pwd is DIRECTORY_SEP-terminated. + Maybe this should really use some standard subroutine whose definition is filename syntax dependent. */ - rc = strlen (initial_directory); - if (!(IS_DIRECTORY_SEP (initial_directory[rc - 1]))) - { - initial_directory[rc] = DIRECTORY_SEP; - initial_directory[rc + 1] = '\0'; - } + { + int len = strlen (initial_directory); + + if (! IS_DIRECTORY_SEP (initial_directory[len - 1])) + { + initial_directory[len] = DIRECTORY_SEP; + initial_directory[len + 1] = '\0'; + } + } + /* XEmacs change: store buffer's default directory using preferred (i.e. as defined at compile-time) directory separator. --marcpa */ @@ -2739,7 +2755,8 @@ init_buffer (void) Fset_buffer (Fget_buffer_create (QSscratch)); - current_buffer->directory = build_string (initial_directory); + current_buffer->directory = + build_ext_string (initial_directory, FORMAT_FILENAME); #if 0 /* FSFmacs */ /* #### is this correct? */ diff --git a/src/buffer.h b/src/buffer.h index f9bf6c1..9347064 100644 --- a/src/buffer.h +++ b/src/buffer.h @@ -1513,6 +1513,7 @@ extern struct buffer *current_buffer; /* This is the initial (startup) directory, as used for the *scratch* buffer. We're making this a global to make others aware of the startup directory. + `initial_directory' is stored in external format. */ extern char initial_directory[]; extern void init_initial_directory (void); /* initialize initial_directory */ diff --git a/src/callproc.c b/src/callproc.c index 808d930..5bdcb78 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -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); diff --git a/src/editfns.c b/src/editfns.c index 9bb9b8e..ce1f101 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -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, /* diff --git a/src/fileio.c b/src/fileio.c index a9db0b5..6844d96 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -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 */ diff --git a/src/process-unix.c b/src/process-unix.c index a62b7f9..6f8e7c6 100644 --- a/src/process-unix.c +++ b/src/process-unix.c @@ -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. */ diff --git a/version.sh b/version.sh index b313f11..04b14a6 100644 --- a/version.sh +++ b/version.sh @@ -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 -- 1.7.10.4