[comp.sources.atari.st] v02i068: emacs.diff -- Diffs to GNU-EMACS 18.52 for Atari part01/02

koreth%panarthea.ebay@sun.com (Steven Grimm) (08/09/89)

Submitted-by: uunet.UU.NET!unido!sbsvax!roeder (Edgar Roeder)
Posting-number: Volume 2, Issue 68
Archive-name: emacs.diff/part01

Here are the context diffs from GNU-Emacs version 18.52 to the corresponding
atari st version. You need to get the original sources of emacs and apply
patch with this file as input.
You may want to wait for my patches to the GCC library before trying to compile
this. I am currently adding some comments and will post the library as soon as
possible.
The binary version of GNU Emacs 18.51 (ST) was posted in the binaries group.

- Edgar

[I have split this into two parts.  You will need to stick them together
 manually before unsharring. -sg]

--------------------------------------------------------------------------------
#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of shell archive."
# Contents:  cdiff-18.52-atari s-tos.h m-atari.h
# Wrapped by roeder@helga on Tue Aug  8 19:40:51 1989
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'cdiff-18.52-atari' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'cdiff-18.52-atari'\"
else
echo shar: Extracting \"'cdiff-18.52-atari'\" \(45058 characters\)
sed "s/^X//" >'cdiff-18.52-atari' <<'END_OF_FILE'
XOnly in .: Makefile
Xdiff -c original/alloc.c ./alloc.c
X*** original/alloc.c	Mon Jul 17 20:52:25 1989
X--- ./alloc.c	Mon Jul 17 21:51:21 1989
X***************
X*** 1438,1450 ****
X    DEFVAR_INT ("pure-bytes-used", &pureptr,
X      "Number of bytes of sharable Lisp data allocated so far.");
X  
X- #if 0
X    DEFVAR_INT ("data-bytes-used", &malloc_sbrk_used,
X      "Number of bytes of unshared memory allocated in this session.");
X  
X    DEFVAR_INT ("data-bytes-free", &malloc_sbrk_unused,
X      "Number of bytes of unshared memory remaining available in this session.");
X- #endif
X  
X    DEFVAR_LISP ("purify-flag", &Vpurify_flag,
X      "Non-nil means loading Lisp code in order to dump an executable.");
X--- 1441,1451 ----
Xdiff -c original/callproc.c ./callproc.c
X*** original/callproc.c	Mon Jul 17 20:52:29 1989
X--- ./callproc.c	Mon Jul 17 20:47:45 1989
X***************
X*** 41,46 ****
X--- 41,50 ----
X  
X  #define max(a, b) ((a) > (b) ? (a) : (b))
X  
X+ #ifdef atarist
X+ Lisp_Object Vshell_tmpfile;
X+ #endif
X+ 
X  Lisp_Object Vexec_path, Vexec_directory;
X  
X  Lisp_Object Vshell_file_name;
X***************
X*** 63,73 ****
X--- 67,79 ----
X  call_process_cleanup (fdpid)
X       Lisp_Object fdpid;
X  {
X+ #ifndef atarist
X    register Lisp_Object fd, pid;
X    fd = Fcar (fdpid);
X    pid = Fcdr (fdpid);
X    close (XFASTINT (fd));
X    kill (XFASTINT (pid), SIGKILL);
X+ #endif
X    return Qnil;
X  }
X  
X***************
X*** 92,98 ****
X--- 98,108 ----
X  {
X    Lisp_Object display, buffer, path;
X    int fd[2];
X+ #ifdef atarist
X+   unsigned char *filefd;
X+ #else
X    int filefd;
X+ #endif
X    register int pid;
X    char buf[1024];
X    int count = specpdl_ptr - specpdl;
X***************
X*** 140,145 ****
X--- 150,158 ----
X      new_argv[i - 3] = 0;
X    }
X  
X+ #ifdef atarist
X+   filefd = XSTRING (args[1])->data;
X+ #else
X    filefd = open (XSTRING (args[1])->data, O_RDONLY, 0);
X    if (filefd < 0)
X      {
X***************
X*** 153,158 ****
X--- 166,172 ----
X        report_file_error ("Searching for program", Fcons (args[0], Qnil));
X      }
X    new_argv[0] = XSTRING (path)->data;
X+ #endif
X  
X    if (XTYPE (buffer) == Lisp_Int)
X  #ifdef VMS
X***************
X*** 162,168 ****
X--- 176,186 ----
X  #endif /* not VMS */
X    else
X      {
X+ #ifdef atarist
X+       fd[0] = fd[1] = -2;
X+ #else
X        pipe (fd);
X+ #endif
X  #if 0
X        /* Replaced by close_process_descs */
X        set_exclusive_use (fd[0]);
X***************
X*** 183,218 ****
X--- 201,248 ----
X      env = environ;
X  #endif /* MAINTAIN_ENVIRONMENT */
X  
X+ #ifndef atarist
X      pid = vfork ();
X+ #endif
X  #ifdef BSD4_1
X      /* cause SIGCHLD interrupts to look for this pid. */
X      synch_process_pid = pid;
X  #endif /* BSD4_1 */
X  
X+ #ifndef atarist
X      if (pid == 0)
X+ #endif
X        {
X+ #ifndef atarist
X  	if (fd[0] >= 0)
X  	  close (fd[0]);
X+ #endif
X  	child_setup (filefd, fd1, fd1, new_argv, env);
X        }
X  
X      environ = save_environ;
X  
X+ #ifndef atarist
X      close (filefd);
X      close (fd1);
X+ #endif
X    }
X  
X+ #ifndef atarist
X    if (pid < 0)
X      {
X        close (fd[0]);
X        report_file_error ("Doing vfork", Qnil);
X      }
X+ #endif
X  
X    if (XTYPE (buffer) == Lisp_Int)
X      {
X+ #ifndef atarist
X  #ifndef subprocesses
X        wait_without_blocking ();
X  #endif subprocesses
X+ #endif
X        return Qnil;
X      }
X  
X***************
X*** 229,234 ****
X--- 259,268 ----
X    {
X      register int nread;
X  
X+ #ifdef atarist
X+     CHECK_STRING (Vshell_tmpfile, 0);
X+     fd[0] = open(XSTRING (Vshell_tmpfile)->data, O_RDONLY);
X+ #endif
X      while ((nread = read (fd[0], buf, sizeof buf)) > 0)
X        {
X  	immediate_quit = 0;
X***************
X*** 239,248 ****
X--- 273,288 ----
X  	immediate_quit = 1;
X  	QUIT;
X        }
X+ #ifdef atarist
X+     close(fd[0]);
X+     unlink(XSTRING (Vshell_tmpfile)->data);
X+ #endif
X    }
X  
X+ #ifndef atarist
X    /* Wait for it to terminate, unless it already has.  */
X    wait_for_termination (pid);
X+ #endif
X  
X    immediate_quit = 0;
X  
X***************
X*** 299,308 ****
X--- 339,354 ----
X     ENV is the environment */
X  
X  child_setup (in, out, err, new_argv, env)
X+ #ifdef atarist
X+      char *in;
X+      int out, err;
X+ #else
X       int in, out, err;
X+ #endif
X       register char **new_argv;
X       char **env;
X  {
X+ #ifndef atarist
X    register int pid = getpid();
X  
X    setpriority (PRIO_PROCESS, pid, 0);
X***************
X*** 311,316 ****
X--- 357,363 ----
X    /* Close Emacs's descriptors that this process should not have.  */
X    close_process_descs ();
X  #endif
X+ #endif
X  
X    /* Note that use of alloca is always safe here.  It's obvious for systems
X       that do not have true vfork or that have true (stack) alloca.
X***************
X*** 358,363 ****
X--- 405,411 ----
X    }
X  #endif /* Not MAINTAIN_ENVIRONMENT */
X  
X+ #ifndef atarist
X    close (0);
X    close (1);
X    close (2);
X***************
X*** 375,380 ****
X--- 423,429 ----
X    setpgrp (pid, pid);
X  #endif /* USG */
X    setpgrp_of_tty (pid);
X+ #endif
X  
X  #ifdef vipc
X    something missing here;
X***************
X*** 384,394 ****
X--- 433,472 ----
X       to pass this environment is to set environ.  Our caller
X       is responsible for restoring the ambient value of environ.  */
X    environ = env;
X+ #ifdef atarist
X+   {
X+     register int i, len;
X+     char *argument;
X+ 
X+     for(i = len = 1; new_argv[i]; i++) len += strlen(new_argv[i]) + 1;
X+     if(strcmp(in,"/dev/null")) len += 2 + strlen(in);
X+     if (!NULL (Vshell_tmpfile)) {
X+ 	    CHECK_STRING (Vshell_tmpfile, 0);
X+ 	    len += 3 + strlen(XSTRING (Vshell_tmpfile)->data);
X+     } else len += 17;
X+     argument = (char *) alloca(len);
X+     *argument = '\0';
X+     for(i = 0; new_argv[i]; i++) {
X+       strcat(argument,new_argv[i]);
X+       strcat(argument," ");
X+     }
X+     if(strcmp(in,"/dev/null")) {
X+       strcat(argument,"< ");
X+       strcat(argument,in);
X+     }
X+     if (!NULL (Vshell_tmpfile)) {
X+ 	    strcat(argument," > ");
X+ 	    strcat(argument,XSTRING (Vshell_tmpfile)->data);
X+     } else strcat(argument, " ==> SHELL_OUTPUT");
X+     system(argument);
X+   }
X+ #else
X    execvp (new_argv[0], new_argv);
X  
X    write (1, "Couldn't exec the program ", 26);
X    write (1, new_argv[0], strlen (new_argv[0]));
X    _exit (1);
X+ #endif
X  }
X  
X  init_callproc ()
X***************
X*** 397,402 ****
X--- 475,483 ----
X    extern char **environ;
X    register char **envp;
X  
X+ #ifdef atarist
X+   Vshell_tmpfile = build_string ("GNUemacs.tmp");
X+ #endif
X    Vexec_path = decode_env_path ("==", PATH_EXEC);
X    Vexec_directory = Ffile_name_as_directory (Fcar (Vexec_path));
X    Vexec_path = nconc2 (decode_env_path ("PATH", ""), Vexec_path);
X***************
X*** 437,442 ****
X--- 518,529 ----
X    DEFVAR_LISP ("exec-directory", &Vexec_directory,
X      "Directory that holds programs that come with GNU Emacs,\n\
X  intended for Emacs to invoke.");
X+ 
X+ #ifdef atarist
X+   DEFVAR_LISP ("shell-tmpfile", &Vshell_tmpfile,
X+     "Filename used for pipe simulation\n\
X+ or nil (use variable redirection into SHELL_OUTPUT).");
X+ #endif
X  
X  #ifndef MAINTAIN_ENVIRONMENT
X    DEFVAR_LISP ("process-environment", &Vprocess_environment,
Xdiff -c original/config.h ./config.h
X*** original/config.h	Mon Jul 17 20:52:31 1989
X--- ./config.h	Sat Jul  8 16:46:07 1989
X***************
X*** 24,30 ****
X     See the file ../etc/MACHINES for a list of systems and
X     the names of the s- files to use for them.
X     See s-template.h for documentation on writing s- files.  */
X! #include "s-bsd4-3.h"
X   
X  /* Include here a m- file that describes the machine and system you use.
X     See the file ../etc/MACHINES for a list of machines and
X--- 24,30 ----
X     See the file ../etc/MACHINES for a list of systems and
X     the names of the s- files to use for them.
X     See s-template.h for documentation on writing s- files.  */
X! #include "s-tos.h"
X   
X  /* Include here a m- file that describes the machine and system you use.
X     See the file ../etc/MACHINES for a list of machines and
X***************
X*** 31,37 ****
X     the names of the m- files to use for them.
X     See m-template.h for info on what m- files should define.
X     */
X! #include "m-vax.h"
X  
X  /* Load in the conversion definitions if this system
X     needs them and the source file being compiled has not
X--- 31,37 ----
X     the names of the m- files to use for them.
X     See m-template.h for info on what m- files should define.
X     */
X! #include "m-atari.h"
X  
X  /* Load in the conversion definitions if this system
X     needs them and the source file being compiled has not
X***************
X*** 61,69 ****
X--- 61,71 ----
X  
X  #ifndef VMS
X  #ifndef USG
X+ #ifndef atarist
X  #define subprocesses
X  #endif
X  #endif
X+ #endif
X  
X  /* Define USER_FULL_NAME to return a string
X   that is the user's full name.
X***************
X*** 80,86 ****
X  /* Define AMPERSAND_FULL_NAME if you use the convention
X    that & in the full name stands for the login id.  */
X  
X! #define AMPERSAND_FULL_NAME
X  
X  /* Maximum screen width we handle. */
X  
X--- 82,88 ----
X  /* Define AMPERSAND_FULL_NAME if you use the convention
X    that & in the full name stands for the login id.  */
X  
X! /* #define AMPERSAND_FULL_NAME */
X  
X  /* Maximum screen width we handle. */
X  
Xdiff -c original/dired.c ./dired.c
X*** original/dired.c	Mon Jul 17 20:52:34 1989
X--- ./dired.c	Sat Jul  8 16:46:08 1989
X***************
X*** 207,216 ****
X       If nothing found then try again with passcount = 1, don't ignore them.
X       If looking for all completions, start with passcount = 1,
X       so always take even the ignored ones.  */
X    for (passcount = !!all_flag; NULL (bestmatch) && passcount < 2; passcount++)
X      {
X!       if (!(d = opendir (XSTRING (Fdirectory_file_name (dirname))->data)))
X! 	report_file_error ("Opening directory", Fcons (dirname, Qnil));
X  
X        /* Loop reading blocks */
X        /* (att3b compiler bug requires do a null comparison this way) */
X--- 207,217 ----
X       If nothing found then try again with passcount = 1, don't ignore them.
X       If looking for all completions, start with passcount = 1,
X       so always take even the ignored ones.  */
X+   if (!(d = opendir (XSTRING (Fdirectory_file_name (dirname))->data)))
X+     report_file_error ("Opening directory", Fcons (dirname, Qnil));
X    for (passcount = !!all_flag; NULL (bestmatch) && passcount < 2; passcount++)
X      {
X!       rewinddir(d);
X  
X        /* Loop reading blocks */
X        /* (att3b compiler bug requires do a null comparison this way) */
X***************
X*** 309,316 ****
X  		}
X  	    }
X  	}
X-       closedir (d);
X      }
X  
X    if (all_flag || NULL (bestmatch))
X      return bestmatch;
X--- 310,317 ----
X  		}
X  	    }
X  	}
X      }
X+   closedir (d);
X  
X    if (all_flag || NULL (bestmatch))
X      return bestmatch;
X***************
X*** 414,420 ****
X--- 415,425 ----
X    else					/* if we can't tell, assume worst */
X      values[9] = Qt;
X  #else					/* file gid will be egid */
X+ #ifdef atarist
X+   values[9] = Qt;
X+ #else
X    values[9] = (s.st_gid != getegid ()) ? Qt : Qnil;
X+ #endif
X  #endif	/* BSD4_2 (or BSD4_3) */
X  #ifdef BSD4_3
X  #undef BSD4_2 /* ok, you can look again without throwing up */
Xdiff -c original/dispnew.c ./dispnew.c
X*** original/dispnew.c	Mon Jul 17 20:52:35 1989
X--- ./dispnew.c	Mon Jul 17 20:47:47 1989
X***************
X*** 1361,1366 ****
X--- 1361,1369 ----
X    terminal_type = (char *) getenv ("TERM");
X    if (!terminal_type)
X      {
X+ #ifdef atarist
X+       terminal_type = "atari";
X+ #endif /* atarist */
X  #ifdef VMS
X        fprintf (stderr, "Please specify your terminal type.\n\
X  For types defined in VMS, use  set term /device=TYPE.\n\
X***************
X*** 1369,1375 ****
X--- 1372,1382 ----
X  #else
X        fprintf (stderr, "Please set the environment variable TERM; see tset(1).\n");
X  #endif
X+ #ifdef atarist
X+       fprintf (stderr, "I assume that your terminal type is \"%s\".\n", terminal_type);
X+ #else
X        exit (1);
X+ #endif /* atarist */
X      }
X    term_init (terminal_type);
X  
Xdiff -c original/editfns.c ./editfns.c
X*** original/editfns.c	Mon Jul 17 20:52:37 1989
X--- ./editfns.c	Mon Jul 17 20:47:46 1989
X***************
X*** 20,26 ****
X--- 20,28 ----
X  
X  
X  #include "config.h"
X+ #ifndef atarist
X  #include <pwd.h>
X+ #endif
X  #include "lisp.h"
X  #include "buffer.h"
X  #include "window.h"
X***************
X*** 40,46 ****
X--- 42,50 ----
X  init_editfns ()
X  {
X    register char *p;
X+ #ifndef atarist
X    struct passwd *pw;	/* password entry for the current user */
X+ #endif
X    extern char *index ();
X  
X    /* Set up system_name even when dumping.  */
X***************
X*** 66,76 ****
X--- 70,84 ----
X      return;
X  #endif /* not CANNOT_DUMP */
X  
X+ #ifndef atarist
X    pw = (struct passwd *) getpwuid (getuid ());
X    if (pw == 0)
X+ #endif atarist
X      strcpy (user_real_name, "unknown");
X+ #ifndef atarist
X    else
X      strncpy (user_real_name, pw->pw_name, sizeof user_real_name);
X+ #endif
X  
X    user_name = (char *) getenv ("USER");
X    if (!user_name)
X***************
X*** 78,96 ****
X--- 86,113 ----
X    if (!user_name)
X      user_name = user_real_name;
X  
X+ #ifndef atarist
X    if (strcmp (user_name, user_real_name))
X      pw = (struct passwd *) getpwnam (user_name);
X+ #endif
X    
X  #ifndef AMPERSAND_FULL_NAME
X+ #ifndef atarist
X    if (pw == 0)
X+ #endif
X      strcpy (user_full_name, "unknown");
X+ #ifndef atarist
X    else
X      strncpy (user_full_name, USER_FULL_NAME, sizeof user_full_name);
X    p = index (user_full_name, ',');
X    if (p) *p = 0;
X+ #endif
X  #else
X+ #ifndef atarist
X    if (pw == 0)
X+ #endif
X      p = "unknown";
X+ #ifndef atarist
X    else
X      p = USER_FULL_NAME;
X    {
X***************
X*** 122,127 ****
X--- 139,145 ----
X        }
X      *q = 0;
X    }
X+ #endif
X  #endif /* AMPERSAND_FULL_NAME */
X  }
X  
X***************
X*** 414,419 ****
X--- 432,438 ----
X    return build_string (user_real_name);
X  }
X  
X+ #ifndef atarist
X  DEFUN ("user-uid", Fuser_uid, Suser_uid, 0, 0, 0,
X    "Return the effective uid of Emacs, as an integer.")
X    ()
X***************
X*** 427,432 ****
X--- 446,452 ----
X  {
X    return make_number (getuid ());
X  }
X+ #endif
X  
X  DEFUN ("user-full-name", Fuser_full_name, Suser_full_name, 0, 0, 0,
X    "Return the full name of the user logged in, as a string.")
X***************
X*** 451,456 ****
X--- 471,500 ----
X    tem [24] = 0;
X    return build_string (tem);
X  }
X+ #ifdef atarist
X+ DEFUN ("time-to-string", Ftime_to_string, Stime_to_string, 1, 1, 0,
X+   "Convert arg TIME (a list of two integers) to a string describing that time.")
X+   (t)
X+      register Lisp_Object t;
X+ {
X+   long	n;
X+   register Lisp_Object tmp;
X+   register char	*tem;
X+ 
X+   CHECK_LIST (t, 0);
X+   tmp = Fcdr (t);
X+   CHECK_LIST (tmp, 1);
X+   tmp = Fcar (tmp);
X+   CHECK_NUMBER (tmp, 1);
X+   n = XINT (tmp);
X+   tmp = Fcar (t);
X+   CHECK_NUMBER (tmp, 0);
X+   n |= XINT (tmp) << 16;
X+   tem = (char *) ctime (&n);
X+   tem[24] = 0;
X+   return build_string (tem);
X+ }
X+ #endif /* atarist */
X  
X  DEFUN ("insert", Finsert, Sinsert, 0, MANY, 0,
X    "Any number of args, strings or chars.  Insert them after point, moving point forward.")
X***************
X*** 1013,1022 ****
X--- 1057,1071 ----
X  
X    defsubr (&Suser_login_name);
X    defsubr (&Suser_real_login_name);
X+ #ifndef atarist
X    defsubr (&Suser_uid);
X    defsubr (&Suser_real_uid);
X+ #endif atarist
X    defsubr (&Suser_full_name);
X    defsubr (&Scurrent_time_string);
X+ #ifdef atarist
X+   defsubr (&Stime_to_string);
X+ #endif /* atarist */
X    defsubr (&Ssystem_name);
X    defsubr (&Smessage);
X    defsubr (&Sformat);
Xdiff -c original/emacs.c ./emacs.c
X*** original/emacs.c	Mon Jul 17 20:52:37 1989
X--- ./emacs.c	Sat Jul  8 16:46:10 1989
X***************
X*** 171,176 ****
X--- 171,177 ----
X    int skip_args = 0;
X    extern int errno;
X    extern void malloc_warning ();
X+   extern void puts ();
X  
X  #ifdef VMS
X  #ifdef LINK_CRTL_SHARE
X***************
X*** 210,221 ****
X      default_acl (USE_DEFACL);
X  #endif /* APOLLO */
X  
X  #ifdef APOLLO			/* Reserve memory space for sbrk to get */
X    set_sbrk_size (4000000);
X  #else /* not APOLLO */
X  #ifndef SYSTEM_MALLOC
X    /* Arrange for warnings when nearly out of space.  */
X!   malloc_init (0, malloc_warning);
X  #endif
X  #endif /* not APOLLO */
X  
X--- 212,223 ----
X      default_acl (USE_DEFACL);
X  #endif /* APOLLO */
X  
X  #ifdef APOLLO			/* Reserve memory space for sbrk to get */
X    set_sbrk_size (4000000);
X  #else /* not APOLLO */
X  #ifndef SYSTEM_MALLOC
X    /* Arrange for warnings when nearly out of space.  */
X!   malloc_init (0, puts);	/* until everything is initialized */
X  #endif
X  #endif /* not APOLLO */
X  
X***************
X*** 425,430 ****
X--- 440,446 ----
X        keys_of_window ();
X      }
X  
X+   malloc_init (0, malloc_warning);
X    if (!initialized)
X      {
X        /* Handle -l loadup-and-dump, args passed by Makefile. */
X***************
X*** 558,564 ****
X  
X  #endif /* not CANNOT_DUMP */
X  
X! #ifdef VMS
X  #define SEPCHAR ','
X  #else
X  #define SEPCHAR ':'
X--- 579,585 ----
X  
X  #endif /* not CANNOT_DUMP */
X  
X! #if defined(VMS) || defined(atarist)
X  #define SEPCHAR ','
X  #else
X  #define SEPCHAR ':'
Xdiff -c original/environ.c ./environ.c
X*** original/environ.c	Mon Jul 17 20:52:38 1989
X--- ./environ.c	Mon Jul 17 20:47:45 1989
X***************
X*** 255,260 ****
X--- 255,295 ----
X  
X  #endif /* dead code */
X  
X+ #ifdef atarist
X+ DEFUN ("getvar", Fgetvar, Sgetvar, 1, 2, "sEnvironment variable: \np",
X+   "Get the contents of the shell variable VAR and set as an environment\n
X+ variable with the same name. Return the value of VAR as a string.\n
X+ VAR is a string, the name of the variable.")
X+   (str, interactivep)
X+      Lisp_Object str, interactivep;
X+ {
X+   Lisp_Object val;
X+   unsigned char *value;
X+   extern unsigned char *m_getenv();
X+ 
X+   CHECK_STRING (str, 0);
X+   value = m_getenv(XSTRING (str)->data);
X+   if (value)
X+     val = build_string(value);
X+   else
X+     val = Qnil;
X+   
X+   if (!NULL (val)) {
X+     CHECK_STRING (val, 0);
X+     set_environment_alist (str, val);
X+   }
X+ 
X+   if (!NULL (interactivep))
X+     {
X+       if (NULL (val))
X+ 	message ("%s not defined in shell", XSTRING (str)->data);
X+       else
X+ 	message ("\"%s\"", XSTRING (val)->data);
X+     }
X+   return val;
X+ }
X+ #endif /* atarist */
X+ 
X  
X  DEFUN ("getenv", Fgetenv, Sgetenv, 1, 2, "sEnvironment variable: \np",
X    "Return the value of environment variable VAR, as a string.\n\
X***************
X*** 267,273 ****
X  {
X    Lisp_Object val;
X    
X!   if (str == Qt)		/* If arg is t, return whole environment */
X      return (Fcopy_alist (Venvironment_alist));
X  
X    CHECK_STRING (str, 0);
X--- 302,308 ----
X  {
X    Lisp_Object val;
X    
X!   if (EQ(str, Qt))		/* If arg is t, return whole environment */
X      return (Fcopy_alist (Venvironment_alist));
X  
X    CHECK_STRING (str, 0);
X***************
X*** 305,310 ****
X--- 340,346 ----
X  syms_of_environ ()
X  {
X    staticpro (&Venvironment_alist);
X+   defsubr (&Sgetvar);
X    defsubr (&Ssetenv);
X    defsubr (&Sgetenv);
X  }
Xdiff -c original/fileio.c ./fileio.c
X*** original/fileio.c	Mon Jul 17 20:52:40 1989
X--- ./fileio.c	Mon Jul 17 20:47:45 1989
X***************
X*** 21,27 ****
X--- 21,29 ----
X  
X  #include <sys/types.h>
X  #include <sys/stat.h>
X+ #ifndef atarist
X  #include <pwd.h>
X+ #endif
X  #include <ctype.h>
X  #include <sys/dir.h>
X  #include <errno.h>
X***************
X*** 65,70 ****
X--- 67,76 ----
X  #include <errnet.h>
X  #endif
X  
X+ #ifdef atarist
X+ #include <file.h>
X+ #endif
X+ 
X  #define min(a, b) ((a) < (b) ? (a) : (b))
X  #define max(a, b) ((a) > (b) ? (a) : (b))
X  
X***************
X*** 430,436 ****
X--- 436,444 ----
X    register unsigned char *newdir, *p, *o;
X    int tlen;
X    unsigned char *target;
X+ #ifndef atarist
X    struct passwd *pw;
X+ #endif
X    int lose;
X  #ifdef VMS
X    unsigned char * colon = 0;
X***************
X*** 576,581 ****
X--- 584,592 ----
X        {
X  	if (!(newdir = (unsigned char *) egetenv ("HOME")))
X  	  newdir = (unsigned char *) "";
X+ #ifdef atarist
X+ 	else tos_to_unix(newdir);
X+ #endif /* atarist */
X  	nm++;
X  #ifdef VMS
X  	nm++;			/* Don't leave the slash in nm.  */
X***************
X*** 592,600 ****
X--- 603,618 ----
X  	bcopy ((char *) nm, o, p - nm);
X  	o [p - nm] = 0;
X  
X+ #ifdef atarist
X+ 	newdir = "/dev/A";
X+ 	newdir[5] = toupper(o[p - nm - 1]);
X+         if ((newdir[5] < 'A') || (newdir[5] > 'P'))
X+ 	  error ("\"%s\" isn't an allowed drive", o + 1);
X+ #else
X  	pw = (struct passwd *) getpwnam (o + 1);
X  	if (!pw)
X  	  error ("\"%s\" isn't a registered user", o + 1);
X+ #endif
X  
X  #ifdef VMS
X  	nm = p + 1;		/* skip the terminator */
X***************
X*** 601,607 ****
X--- 619,627 ----
X  #else
X  	nm = p;
X  #endif /* VMS */
X+ #ifndef atarist
X  	newdir = (unsigned char *) pw -> pw_dir;
X+ #endif
X        }
X  
X    if (nm[0] != '/'
X***************
X*** 756,762 ****
X  
X    for (p = nm; p != endp; p++)
X      {
X!       if ((p[0] == '~' ||
X  #ifdef APOLLO
X  	   /* // at start of file name is meaningful in Apollo system */
X  	   (p[0] == '/' && p - 1 != nm)
X--- 776,782 ----
X  
X    for (p = nm; p != endp; p++)
X      {
X!       if (((p[0] == '~' ||
X  #ifdef APOLLO
X  	   /* // at start of file name is meaningful in Apollo system */
X  	   (p[0] == '/' && p - 1 != nm)
X***************
X*** 772,777 ****
X--- 792,798 ----
X  #ifdef VMS
X  	  )
X  #endif /* VMS */
X+ 	)
X  	{
X  	  nm = p;
X  	  substituted = 1;
X***************
X*** 801,811 ****
X  	    substituted = 1;
X  	    continue;
X  	  }
X! 	else if (*p == '{')
X  	  {
X  	    o = ++p;
X! 	    while (p != endp && *p != '}') p++;
X! 	    if (*p != '}') goto missingclose;
X  	    s = p;
X  	  }
X  	else
X--- 822,832 ----
X  	    substituted = 1;
X  	    continue;
X  	  }
X! 	else if (*p == '{') /*}*/
X  	  {
X  	    o = ++p;
X! 	    /*{*/while (p != endp && *p != '}') p++;
X! 	    /*{*/if (*p != '}') goto missingclose;
X  	    s = p;
X  	  }
X  	else
X***************
X*** 860,866 ****
X  	  {
X  	    o = ++p;
X  	    while (p != endp && *p != '}') p++;
X! 	    if (*p != '}') goto missingclose;
X  	    s = p++;
X  	  }
X  	else
X--- 881,887 ----
X  	  {
X  	    o = ++p;
X  	    while (p != endp && *p != '}') p++;
X! 	    /*{*/ if (*p != '}') goto missingclose;
X  	    s = p++;
X  	  }
X  	else
X***************
X*** 896,902 ****
X    /* If /~ or // appears, discard everything through first slash. */
X  
X    for (p = xnm; p != x; p++)
X!     if ((p[0] == '~' ||
X  #ifdef APOLLO
X  	 /* // at start of file name is meaningful in Apollo system */
X  	 (p[0] == '/' && p - 1 != xnm)
X--- 917,923 ----
X    /* If /~ or // appears, discard everything through first slash. */
X  
X    for (p = xnm; p != x; p++)
X!     if (((p[0] == '~' ||
X  #ifdef APOLLO
X  	 /* // at start of file name is meaningful in Apollo system */
X  	 (p[0] == '/' && p - 1 != xnm)
X***************
X*** 905,910 ****
X--- 926,932 ----
X  #endif /* not APOLLO */
X  	 )
X  	&& p != nm && p[-1] == '/')
X+ 	)
X        xnm = p;
X  
X    return make_string (xnm, x - xnm);
X***************
X*** 912,918 ****
X   badsubst:
X    error ("Bad format environment-variable substitution");
X   missingclose:
X!   error ("Missing \"}\" in environment-variable substitution");
X   badvar:
X    error ("Substituting nonexistent environment variable \"%s\"", target);
X  
X--- 934,940 ----
X   badsubst:
X    error ("Bad format environment-variable substitution");
X   missingclose:
X!   /*{*/ error ("Missing \"}\" in environment-variable substitution");
X   badvar:
X    error ("Substituting nonexistent environment variable \"%s\"", target);
X  
X***************
X*** 1100,1105 ****
X--- 1122,1128 ----
X    return Qnil;
X  }
X  
X+ #ifndef atarist
X  DEFUN ("add-name-to-file", Fadd_name_to_file, Sadd_name_to_file, 2, 3,
X    "fAdd name to file: \nFName to add to %s: \np",
X    "Give FILE additional name NEWNAME.  Both args strings.\n\
X***************
X*** 1136,1141 ****
X--- 1159,1165 ----
X  
X    return Qnil;
X  }
X+ #endif
X  
X  #ifdef S_IFLNK
X  DEFUN ("make-symbolic-link", Fmake_symbolic_link, Smake_symbolic_link, 2, 3,
X***************
X*** 1682,1687 ****
X--- 1706,1712 ----
X  	}
X      }
X  
X+ #ifndef atarist
X  #ifndef USG
X  #ifndef VMS
X  #ifndef BSD4_1
X***************
X*** 1692,1697 ****
X--- 1717,1723 ----
X  #endif
X  #endif
X  #endif
X+ #endif
X  
X  #if 0
X    /* Spurious "file has changed on disk" warnings have been 
X***************
X*** 2028,2033 ****
X--- 2058,2066 ----
X  
X    /* If dir starts with user's homedir, change that to ~. */
X    homedir = (char *) egetenv ("HOME");
X+ #ifdef atarist
X+   tos_to_unix(homedir);
X+ #endif
X    if (homedir != 0
X        && XTYPE (dir) == Lisp_String
X        && !strncmp (homedir, XSTRING (dir)->data, strlen (homedir))
X***************
X*** 2103,2109 ****
X--- 2136,2144 ----
X    defsubr (&Scopy_file);
X    defsubr (&Sdelete_file);
X    defsubr (&Srename_file);
X+ #ifndef atarist
X    defsubr (&Sadd_name_to_file);
X+ #endif
X  #ifdef S_IFLNK
X    defsubr (&Smake_symbolic_link);
X  #endif /* S_IFLNK */
Xdiff -c original/fns.c ./fns.c
X*** original/fns.c	Mon Jul 17 20:52:42 1989
X--- ./fns.c	Sat Jul  8 16:46:13 1989
X***************
X*** 47,53 ****
X--- 47,57 ----
X  #ifndef NLIST_STRUCT
X  #include <a.out.h> 
X  #else /* NLIST_STRUCT */
X+ #ifdef atarist
X+ #include <gnu-out.h>
X+ #else
X  #include <nlist.h>
X+ #endif
X  #endif /* NLIST_STRUCT */
X  #endif /* not VMS */
X  #endif /* LOAD_AVE_TYPE */
Xdiff -c original/keyboard.c ./keyboard.c
X*** original/keyboard.c	Mon Jul 17 20:52:45 1989
X--- ./keyboard.c	Sat Jul  8 16:46:47 1989
X***************
X*** 42,47 ****
X--- 42,50 ----
X  #include <termio.h>
X  #include <fcntl.h>
X  #else /* not USG */
X+ #ifdef atarist
X+ #include <fcntl.h>
X+ #endif
X  #ifndef VMS
X  #include <sys/ioctl.h>
X  #endif /* not VMS */
X***************
X*** 176,186 ****
X--- 179,197 ----
X  int flow_control;
X  
X  #ifndef BSD4_1
X+ #ifdef atarist
X+ #define sigfree()
X+ #define sigholdx(sig)
X+ #define sigblockx(sig)
X+ #define sigunblockx(sig)
X+ #define sigpausex(sig)
X+ #else
X  #define sigfree() sigsetmask (0)
X  #define sigholdx(sig) sigsetmask (1 << ((sig) - 1))
X  #define sigblockx(sig) sigblock (1 << ((sig) - 1))
X  #define sigunblockx(sig) sigblock (0)
X  #define sigpausex(sig) sigpause (0)
X+ #endif
X  #endif /* not BSD4_1 */
X  
X  #ifdef BSD4_1
X***************
X*** 1047,1053 ****
X      }
X  
X  #else /* no FIONREAD */
X! #ifdef USG
X    if (kbd_count)
X      abort ();
X  
X--- 1058,1064 ----
X      }
X  
X  #else /* no FIONREAD */
X! #if defined(USG) || defined(atarist)
X    if (kbd_count)
X      abort ();
X  
X***************
X*** 1101,1107 ****
X    extern int select_alarmed;
X  #endif
X  
X! #ifdef USG
X    /* USG systems forget handlers when they are used;
X       must reestablish each time */
X    signal (signo, input_available_signal);
X--- 1112,1118 ----
X    extern int select_alarmed;
X  #endif
X  
X! #if defined(USG) || defined(atarist)
X    /* USG systems forget handlers when they are used;
X       must reestablish each time */
X    signal (signo, input_available_signal);
X***************
X*** 1682,1688 ****
X    char c;
X    extern Lisp_Object Vwindow_system;
X  
X! #ifdef USG
X    /* USG systems forget handlers when they are used;
X       must reestablish each time */
X    signal (SIGINT, interrupt_signal);
X--- 1693,1699 ----
X    char c;
X    extern Lisp_Object Vwindow_system;
X  
X! #if defined(USG) || defined(atarist)
X    /* USG systems forget handlers when they are used;
X       must reestablish each time */
X    signal (SIGINT, interrupt_signal);
X***************
X*** 1805,1811 ****
X    if (!noninteractive)
X      {
X        signal (SIGINT, interrupt_signal);
X! #ifdef USG
X        /* On USG systems, C-g is set up for both SIGINT and SIGQUIT
X  	 and we can't tell which one it will give us.  */
X        signal (SIGQUIT, interrupt_signal);
X--- 1816,1822 ----
X    if (!noninteractive)
X      {
X        signal (SIGINT, interrupt_signal);
X! #if defined(USG) || defined(atarist)
X        /* On USG systems, C-g is set up for both SIGINT and SIGQUIT
X  	 and we can't tell which one it will give us.  */
X        signal (SIGQUIT, interrupt_signal);
Xdiff -c original/keymap.c ./keymap.c
X*** original/keymap.c	Mon Jul 17 20:52:46 1989
X--- ./keymap.c	Sat Jul  8 16:46:48 1989
X***************
X*** 778,785 ****
X