Lisp_Object Vexec_path, Vexec_directory, Vexec_suffixes;
Lisp_Object Vdata_directory, Vdoc_directory;
-Lisp_Object Vconfigure_info_directory;
+Lisp_Object Vconfigure_info_directory, Vshared_game_score_directory;
Lisp_Object Vtemp_file_name_pattern;
Lisp_Object Vshell_file_name;
call_process_cleanup (fdpid)
Lisp_Object fdpid;
{
-#if defined (MSDOS) || defined (macintosh)
+#if defined (MSDOS) || defined (MAC_OS8)
/* for MSDOS fdpid is really (fd . tempfile) */
register Lisp_Object file;
file = Fcdr (fdpid);
emacs_close (XFASTINT (Fcar (fdpid)));
if (strcmp (XSTRING (file)-> data, NULL_DEVICE) != 0)
unlink (XSTRING (file)->data);
-#else /* not MSDOS and not macintosh */
+#else /* not MSDOS and not MAC_OS8 */
register int pid = XFASTINT (Fcdr (fdpid));
if (call_process_exited)
char *outf, *tempfile;
int outfilefd;
#endif
-#ifdef macintosh
+#ifdef MAC_OS8
char *tempfile;
int outfilefd;
#endif
struct gcpro gcpro1;
GCPRO1 (current_dir);
- openp (Vexec_path, args[0], Vexec_suffixes, &path, 1);
+ openp (Vexec_path, args[0], Vexec_suffixes, &path, make_number (X_OK));
UNGCPRO;
}
if (NILP (path))
fd[1] = outfilefd;
#endif /* MSDOS */
-#ifdef macintosh
+#ifdef MAC_OS8
/* Since we don't have pipes on the Mac, create a temporary file to
hold the output of the subprocess. */
tempfile = (char *) alloca (STRING_BYTES (XSTRING (Vtemp_file_name_pattern)) + 1);
}
fd[0] = filefd;
fd[1] = outfilefd;
-#endif /* macintosh */
+#endif /* MAC_OS8 */
if (INTEGERP (buffer))
fd[1] = emacs_open (NULL_DEVICE, O_WRONLY, 0), fd[0] = -1;
else
{
#ifndef MSDOS
-#ifndef macintosh
+#ifndef MAC_OS8
errno = 0;
if (pipe (fd) == -1)
{
current_dir = ENCODE_FILE (current_dir);
-#ifdef macintosh
+#ifdef MAC_OS8
{
/* Call run_mac_command in sysdep.c here directly instead of doing
a child_setup as for MSDOS and other platforms. Note that this
report_file_error ("Cannot re-open temporary file", Qnil);
}
}
-#else /* not macintosh */
+#else /* not MAC_OS8 */
#ifdef MSDOS /* MW, July 1993 */
/* Note that on MSDOS `child_setup' actually returns the child process
exit status, not its PID, so we assign it to `synch_process_retcode'
if (fd_error >= 0)
emacs_close (fd_error);
#endif /* not MSDOS */
-#endif /* not macintosh */
+#endif /* not MAC_OS8 */
environ = save_environ;
/* Enable sending signal if user quits below. */
call_process_exited = 0;
-#if defined(MSDOS) || defined(macintosh)
+#if defined(MSDOS) || defined(MAC_OS8)
/* MSDOS needs different cleanup information. */
record_unwind_protect (call_process_cleanup,
Fcons (make_number (fd[0]), build_string (tempfile)));
#else
record_unwind_protect (call_process_cleanup,
Fcons (make_number (fd[0]), make_number (pid)));
-#endif /* not MSDOS and not macintosh */
+#endif /* not MSDOS and not MAC_OS8 */
if (BUFFERP (buffer))
but not past 64k. */
if (bufsize < 64 * 1024 && total_read > 32 * bufsize)
{
+ char *tempptr;
bufsize *= 2;
- bufptr = (char *) alloca (bufsize);
+
+ tempptr = (char *) alloca (bufsize);
+ bcopy (bufptr, tempptr, bufsize / 2);
+ bufptr = tempptr;
}
if (!NILP (display) && INTERACTIVE)
#ifdef SET_EMACS_PRIORITY
{
- extern int emacs_priority;
+ extern EMACS_INT emacs_priority;
if (emacs_priority < 0)
nice (- emacs_priority);
#ifndef DOS_NT
/* MSDOS uses wrapped binaries, so don't do this. */
if (NILP (Fmember (tem, Vexec_path)))
- Vexec_path = nconc2 (Vexec_path, Fcons (tem, Qnil));
+ {
+ Vexec_path = decode_env_path ("EMACSPATH", PATH_EXEC);
+ Vexec_path = Fcons (tem, Vexec_path);
+ Vexec_path = nconc2 (decode_env_path ("PATH", ""), Vexec_path);
+ }
Vexec_directory = Ffile_name_as_directory (tem);
#endif /* not DOS_NT */
source directory. */
if (data_dir == 0)
{
- Lisp_Object tem, tem1, newdir;
+ Lisp_Object tem, tem1, srcdir;
+ srcdir = Fexpand_file_name (build_string ("../src/"),
+ build_string (PATH_DUMPLOADSEARCH));
tem = Fexpand_file_name (build_string ("GNU"), Vdata_directory);
tem1 = Ffile_exists_p (tem);
- if (NILP (tem1))
+ if (!NILP (Fequal (srcdir, Vinvocation_directory)) || NILP (tem1))
{
+ Lisp_Object newdir;
newdir = Fexpand_file_name (build_string ("../etc/"),
build_string (PATH_DUMPLOADSEARCH));
tem = Fexpand_file_name (build_string ("GNU"), newdir);
includes this. */);
Vconfigure_info_directory = build_string (PATH_INFO);
+ DEFVAR_LISP ("shared-game-score-directory", &Vshared_game_score_directory,
+ doc: /* Directory of score files for games which come with GNU Emacs.
+If this variable is nil, then Emacs is unable to use a shared directory. */);
+#ifdef HAVE_SHARED_GAME_DIR
+ Vshared_game_score_directory = build_string(HAVE_SHARED_GAME_DIR);
+#else
+ Vshared_game_score_directory = Qnil;
+#endif
+
DEFVAR_LISP ("temp-file-name-pattern", &Vtemp_file_name_pattern,
doc: /* Pattern for making names for temporary files.
This is used by `call-process-region'. */);