Files com073/28.com and com074/28.com are identical
Files com073/alias.c and com074/alias.c are identical
Files com073/alias.h and com074/alias.h are identical
Files com073/batch.c and com074/batch.c are identical
diff --new-file --recursive --ignore-space-change --unified --report-identical-files --minimal com073/bugs.txt com074/bugs.txt
--- com073/bugs.txt	Thu Jul 16 11:29:10 1998
+++ com074/bugs.txt	Thu Jul 16 11:29:10 1998
@@ -2,21 +2,28 @@
 ~~~~~~~~~~
 COMMAND.COM has problems when loaded from CONFIG.SYS
 
-When switching to a drive with no disk in it, it doesn't notice, and you get
-garbage.
+When switching to a drive with no disk in it, it doesn't notice, and
+you get garbage.
 
 Command-Line editing is really slow because it redraws each time.
 
-COMMAND.COM wastes memory by not freeing back what it doesn't use.
+COMMAND.COM (specifically the set command, but maybe others) wastes
+memory by not freeing back what it doesn't use.
+
+The exec function that was being used by version 0.73 and earlier
+does not copy the envirnment to the child process.  In 0.74 this was
+changed to use spawnl, but the exec function should probably be fixed
+instead.
+
 
 Reported Bugs
 ~~~~~~~~~~~~~
 
 From: rschanke@falcon.lhup.edu (Robert C. Schanke)
 o  the "/?" help option does not work
-o  if you type <tab> and multiple names exist it goes beep. If you type
-   tab again it beeps but does not show all the possibilities like bash 
-   does.
+o  if you type <tab> and multiple names exist it goes beep. If you
+   type tab again it beeps but does not show all the possibilities
+   like bash does.
 
 From: Steffan
 o  let set work with or without the '=' sign.  People like it that way.
Files com073/clean.bat and com074/clean.bat are identical
Files com073/cmdinput.c and com074/cmdinput.c are identical
diff --new-file --recursive --ignore-space-change --unified --report-identical-files --minimal com073/command.c com074/command.c
--- com073/command.c	Thu Jul 16 11:29:10 1998
+++ com074/command.c	Thu Jul 16 11:29:10 1998
@@ -51,6 +51,13 @@
  * 06/21/98 (Rob Lake) ------------------------------------------------------
  *    Fixed up /C so that arguments for the program
  *
+ *  07/08/1998 (John P. Price)
+ *  - Now sets COMSPEC environment variable
+ *  - misc clean up and optimization
+ *  - added date and time commands
+ *  - changed to using spawnl instead of exec.  exec does not copy the
+ *     environment to the child process!
+ *
  */
 
 #include <stdio.h>
@@ -104,6 +111,9 @@
 #define RMDIR     "rmdir"
 #define SET       "set"
 #define VER       "ver"
+#define DATE      "date"
+#define TIME      "time"
+#define TYPE      "type"
 
 int exitflag = 0;               /* indicates EXIT was typed */
 int canexit = 1;                /* indicates if this shell is exitable */
@@ -209,47 +219,56 @@
     batch(fullname, rest);
   }
   /* else exec the program */
-  else if ((r = exec(fullname, rest, EnvSeg)) != 0)
-  {
-    switch (r)
-    {
-      case 1:
-        {
-          printf("%s\n", INVALIDFUNCTION);
-          break;
-        }
-      case 2:
-        {
-          printf("%s\n", FILENOTFOUND);
-          break;
-        }
-      case 5:
-        {
-          printf("%s\n", ACCESSDENIED);
-          break;
-        }
-      case 8:
-        {
-          printf("%s\n", NOTENOUGHMEMORY);
-          break;
-        }
-      case 10:
-        {
-          printf("%s\n", BADENVIROMENT);
-          break;
-        }
-      case 11:
-        {
-          printf("%s\n", BADFORMAT);
-          break;
-        }
-      default:
+  /* JPP 07/08/1998 changed to using spawnl.  exec does not copy environment
+   * to the child process! */
+  else if (spawnl(P_WAIT, fullname, rest, NULL) == -1)
         {
-          printf("ERROR: unknown error %d.\n", errno);
-          break;
-        }
-    }
+    perror("executing spawnl function");
   }
+
+/*
+ * else if ((r = exec(fullname, rest, EnvSeg)) != 0)
+ * {
+ * switch (r)
+ * {
+ * case 1:
+ * {
+ * printf("%s\n", INVALIDFUNCTION);
+ * break;
+ * }
+ * case 2:
+ * {
+ * printf("%s\n", FILENOTFOUND);
+ * break;
+ * }
+ * case 5:
+ * {
+ * printf("%s\n", ACCESSDENIED);
+ * break;
+ * }
+ * case 8:
+ * {
+ * printf("%s\n", NOTENOUGHMEMORY);
+ * break;
+ * }
+ * case 10:
+ * {
+ * printf("%s\n", BADENVIROMENT);
+ * break;
+ * }
+ * case 11:
+ * {
+ * printf("%s\n", BADFORMAT);
+ * break;
+ * }
+ * default:
+ * {
+ * printf("ERROR: unknown error %d.\n", errno);
+ * break;
+ * }
+ * }
+ * }
+ */
 }
 
 /* a list of all the internal commands, associating their command names */
@@ -346,6 +365,18 @@
   }
   ,
   {
+    DATE, cmd_date
+  }
+  ,
+  {
+    TIME, cmd_time
+  }
+  ,
+  {
+    TYPE, cmd_type
+  }
+  ,
+  {
     NULL, NULL
   }
 };
@@ -612,7 +643,13 @@
   {
     printprompt();
     readcommand(commandline, 128);
+
+    /* JPP 07/08/1998 make things closer to MS-DOS */
+    if (*commandline)
+    {
     parsecommandline(commandline);
+      putchar('\n');
+    }
   }
   while (!canexit || !exitflag);
 
@@ -642,6 +679,8 @@
 void
 initialize(int argc, char *argv[])
 {
+  char temp[256];
+
   ctrlbrk(c_brk);
 
   /* Added by Rob Lake 06/16/98.  This enables the command.com
@@ -673,12 +712,17 @@
   /* set up environment space and such */
   if (!EnvSeg)                  /* fix this to later make its own environment */
   {
-    printf("%s\n", NOENVERR);
+    /* JPP 07/08/1998 - use puts instead of printf */
+    puts(NOENVERR);
     exit(1);
   }
 
   /* figure out if we're a permanent shell... and make it do this */
   /* OwnerPSP = _psp; */
+
+  /* JPP 07/08/1998 - Set COMSPEC environment variable */
+  sprintf(temp, "COMSPEC=%s", argv[0]);
+  set("SET", temp);
 
   return;
 }
Binary files com073/command.com and com074/command.com differ
Binary files com073/command.dsk and com074/command.dsk differ
diff --new-file --recursive --ignore-space-change --unified --report-identical-files --minimal com073/command.h com074/command.h
--- com073/command.h	Thu Jul 16 11:29:10 1998
+++ com074/command.h	Thu Jul 16 11:29:10 1998
@@ -52,6 +52,10 @@
 int doskey(char *, char *);
 int prompt(char *, char *);
 int path(char *, char *);
+int cmd_date(char *, char *);   /*JPP 07/08/1998 */
+int cmd_time(char *, char *);   /*JPP 07/08/1998 */
+int cmd_type(char *, char *);   /*JPP 07/08/1998 */
+
 int chkCBreak(int);
 int cgetchar(void);
 
diff --new-file --recursive --ignore-space-change --unified --report-identical-files --minimal com073/command.mak com074/command.mak
--- com073/command.mak	Thu Jul 16 10:25:08 1998
+++ com074/command.mak	Thu Jul 16 10:25:10 1998
@@ -25,17 +25,19 @@
  cmdinput.obj \
  command.obj \
  dir.obj \
- environ.obj \
- exec.obj \
  history.obj \
  internal.obj \
  loadhigh.obj \
  prompt.obj \
  redir.obj \
  where.obj \
- lowexec.obj \
  lh.obj \
- tempfile.obj
+ tempfile.obj \
+ date.obj \
+ time.obj \
+ exec.obj \
+ lowexec.obj \
+ type.obj
 
 #		*Explicit Rules*
 command.exe: command.cfg $(EXE_dependencies)
@@ -46,17 +48,19 @@
 cmdinput.obj+
 command.obj+
 dir.obj+
-environ.obj+
-exec.obj+
 history.obj+
 internal.obj+
 loadhigh.obj+
 prompt.obj+
 redir.obj+
 where.obj+
-lowexec.obj+
 lh.obj+
-tempfile.obj
+tempfile.obj+
+date.obj+
+time.obj+
+exec.obj+
+lowexec.obj+
+type.obj
 command
 		# no map file
 cs.lib
@@ -74,10 +78,6 @@
 
 dir.obj: command.cfg dir.c 
 
-environ.obj: command.cfg environ.c 
-
-exec.obj: command.cfg exec.c 
-
 history.obj: command.cfg history.c 
 
 internal.obj: command.cfg internal.c 
@@ -90,13 +90,21 @@
 
 where.obj: command.cfg where.c 
 
-lowexec.obj: command.cfg lowexec.asm 
-	$(TASM) /MX /ZI /O LOWEXEC.ASM,LOWEXEC.OBJ
-
 lh.obj: command.cfg lh.asm 
 	$(TASM) /MX /ZI /O LH.ASM,LH.OBJ
 
 tempfile.obj: command.cfg tempfile.c 
+
+date.obj: command.cfg date.c 
+
+time.obj: command.cfg time.c 
+
+exec.obj: command.cfg exec.c 
+
+lowexec.obj: command.cfg lowexec.asm 
+	$(TASM) /MX /ZI /O LOWEXEC.ASM,LOWEXEC.OBJ
+
+type.obj: command.cfg type.c 
 
 #		*Compiler Configuration File*
 command.cfg: command.mak
Binary files com073/command.prj and com074/command.prj differ
diff --new-file --recursive --ignore-space-change --unified --report-identical-files --minimal com073/date.c com074/date.c
--- com073/date.c	Wed Dec 31 18:00:00 1969
+++ com074/date.c	Thu Jul 16 11:29:10 1998
@@ -0,0 +1,144 @@
+/*
+ *  DATE.C - date internal command
+ *
+ *  Comments:
+ *
+ *  07/08/1998 (John P. Price)
+ *    started.
+ *
+ *
+ */
+
+#include <stdio.h>
+#include <dos.h>
+#include <ctype.h>
+#include <string.h>
+
+#include "command.h"
+
+static unsigned char months[2][13] =
+{
+  {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 30},
+  {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 30}
+};
+
+static unsigned char *dowstring[7] =
+{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"};
+
+int
+parsedate(char *s)
+{
+  struct date d;
+  unsigned char leap;
+
+  if (!*s)
+    return 1;
+
+  d.da_year = 0;
+  d.da_day = 0;
+  d.da_mon = 0;
+
+  // first get mon
+  if (isdigit(*s))
+  {
+    while (isdigit(*s))
+      d.da_mon = d.da_mon * 10 + (*s++) - '0';
+  }
+  else
+    return 0;
+
+  // get divider
+  if (*s == '/' || *s == '-')
+    s++;
+  else
+    return 0;
+
+  // now get day
+  if (isdigit(*s))
+  {
+    while (isdigit(*s))
+      d.da_day = d.da_day * 10 + (*s++) - '0';
+  }
+  else
+    return 0;
+
+  // get divider
+  if (*s == '/' || *s == '-')
+    s++;
+  else
+    return 0;
+
+  // now get year
+  if (isdigit(*s))
+  {
+    while (isdigit(*s))
+      d.da_year = d.da_year * 10 + (*s++) - '0';
+  }
+  else
+    return 0;
+
+  //if only entered two digits, assume 1900's
+  if (d.da_year >= 0 && d.da_year <= 99)
+    d.da_year = 1900 + d.da_year;
+
+  leap = (!(d.da_year % 4) && (d.da_year % 100)) || !(d.da_year % 400);
+
+  if ((d.da_mon >= 1 && d.da_mon <= 12) &&
+      (d.da_day >= 1 && d.da_day <= months[leap][d.da_mon]) &&
+      (d.da_year >= 1980 && d.da_year <= 2099))
+  {
+    setdate(&d);
+    return 1;
+  }
+
+  return 0;
+}
+
+int
+cmd_date(char *first, char *rest)
+{
+  char s[40];
+
+  if (strcmp(rest, "/?") == 0)
+  {
+    puts(
+          "Displays or sets the date.\n\n"
+          "DATE [date]\n\n"
+    "Type DATE without parameters to display the current date setting and\n"
+          "a prompt for a new one.  Press ENTER to keep the same date."
+        );
+    return 0;
+  }
+
+  if (!*rest)
+  {
+    struct dosdate_t d;
+
+    _dos_getdate(&d);
+
+    printf("Current date is %s %02d-%02d-%d\n",
+           dowstring[d.dayofweek], d.month, d.day, d.year);
+  }
+
+  while (1)                     //forever loop
+
+  {
+    if (!*rest)
+    {
+      printf("Enter new date (mm-dd-yy): ");
+      fgets(s, sizeof(s), stdin);
+      while (*s && s[strlen(s) - 1] < ' ')
+        s[strlen(s) - 1] = '\0';
+      if (parsedate(s))
+        return 0;
+    }
+    else
+    {
+      if (parsedate(rest))
+        return 0;
+      // force input the next time around.
+      *rest = '\0';
+    }
+    printf("Invalid date.\n");
+  }
+}
Files com073/dir-test.txt and com074/dir-test.txt are identical
diff --new-file --recursive --ignore-space-change --unified --report-identical-files --minimal com073/dir.c com074/dir.c
--- com073/dir.c	Thu Jul 16 11:29:10 1998
+++ com074/dir.c	Thu Jul 16 11:29:10 1998
@@ -1,3 +1,4 @@
+
 /*
  *  DIR.C - dir internal command
  *
@@ -79,6 +80,11 @@
  * 06/29/98 (Rob Lake)
  *      - error message now found in command.h
  *
+ * 07/08/1998 (John P. Price)
+ * - removed extra returns; closer to MSDOS
+ * - fixed wide display so that an extra return is not displayed when
+ *   there is five filenames in the last line.
+ *
  */
 
 #include <stdio.h>
@@ -462,7 +468,7 @@
   {
     printf("Press any key to continue . . .");
     c = getch();
-    printf("\n");
+    putchar('\n');
     if (c == 27 || c == 3)
     {
       return 1;
@@ -793,8 +799,13 @@
   while (findnext(&file) == 0);
 
 /* Rob Lake, need to make clean output */
-  if (flags & DIR_WIDE)
+/* JPP 07/08/1998 added check for count != 0 */
+  if ((flags & DIR_WIDE) && (count != 0))
+  {
     printf("\n");
+    if (incline(line, flags) != 0)
+      return 1;
+  }
 
   if (filecount || dircount)
   {
@@ -811,12 +822,13 @@
     printf("File not found\n");
     return 1;
   }
-  if ((flags & DIR_BARE) == 0)
-  {
-    printf("\n");
-    if (incline(line, flags) != 0)
-      return 1;
-  }
+/* JPP 07/08/1998 removed extra return; closer to MSDOS */
+//  if ((flags & DIR_BARE) == 0)
+  //  {
+  //    printf("\n");
+  //    if (incline(line, flags) != 0)
+  //      return 1;
+  //  }
 
   return 0;
 }
@@ -923,9 +935,9 @@
     if (incline(line, flags) != 0)
       return 1;
   }
-  printf("\n");
-  if (incline(line, flags) != 0)
-    return 1;
+//  printf("\n");
+  //  if (incline(line, flags) != 0)
+  //    return 1;
   chdir(cur_dir);
   return 0;
 }
diff --new-file --recursive --ignore-space-change --unified --report-identical-files --minimal com073/environ.c com074/environ.c
--- com073/environ.c	Thu Jul 16 11:29:10 1998
+++ com074/environ.c	Thu Jul 16 11:29:10 1998
@@ -12,20 +12,27 @@
  *    i have cleaned up the source code. changes now bring this source into
  *    guidelines for recommended programming practice.
  *
+ *  07/08/1998 (John P. Price)
+ *  - commented out show_environment function.  Not used anymore.
+ *
  */
 
 #include <stdlib.h>
 #include <stdio.h>
 
-void
-show_environment(void)
-{
-  unsigned char count;
-
-  for (count = 0; environ[count]; count++)
-  {
-    puts(environ[count]);
-  }
-
-  return;
-}
+/* JPP 07/08/1998 not used now. */
+/*
+ * void
+ * show_environment(void)
+ * {
+ * unsigned char count;
+ * 
+ * for (count = 0; environ[count]; count++)
+ * {
+ * puts(environ[count]);
+ * }
+ * 
+ * return;
+ * }
+ * 
+ */
Files com073/exe2bin.com and com074/exe2bin.com are identical
Files com073/exec.c and com074/exec.c are identical
diff --new-file --recursive --ignore-space-change --unified --report-identical-files --minimal com073/files.txt com074/files.txt
--- com073/files.txt	Thu Jul 16 11:29:10 1998
+++ com074/files.txt	Thu Jul 16 11:29:10 1998
@@ -19,6 +19,7 @@
 cmdinput.c      Command-line input functions
 command.c       Main code for command-line interpreter
 command.h       Command header file
+date.c          Date command code
 dir.c           Directory listing code
 environ.c       Environment handling
 exec.c          Exec C interface code
@@ -34,6 +35,8 @@
 tempfile.c      Re-implementation of tmpfile library function
 tempfile.h      tempfile.c header file
 testenv.c       Code to test environment passing
+time.c          Time command code
+type.c          Type command code
 where.c         Code to search path for executables
 
 28.com          program to switch to 28-line mode (lost?)
Files com073/history.c and com074/history.c are identical
diff --new-file --recursive --ignore-space-change --unified --report-identical-files --minimal com073/history.txt com074/history.txt
--- com073/history.txt	Thu Jul 16 11:29:10 1998
+++ com074/history.txt	Thu Jul 16 11:29:10 1998
@@ -156,3 +156,27 @@
 o Changed version routine to print out copyright notice
   with no args, and with appropriate switches, warranty
   and redistribution notices and developer listing
+
+07/08/1998 version 0.74 (John P. Price (linux-guru@gcfl.net))
+~~~~~~~~~~~~~~~~~~~~~~~~
+COMMAND.C/COMMAND.H:
+o Now sets COMSPEC environment variable
+o misc clean up and optimization
+o added date, time and type commands
+o changed to using spawnl instead of exec.  exec does not copy the
+  environment to the child process!
+DIR.C
+o removed extra returns; closer to MSDOS
+o fixed wide display so that an extra return is not displayed when
+  there is five filenames in the last line.
+ENVIRON.C
+o commented out show_environment function.  Not used anymore.
+INTERAL.C
+o removed call to show_environment in set command.
+o moved test for syntax before allocating memory in set command.
+o misc clean up and optimization.
+
+o created DATE.C
+o created TIME.C
+o created TYPE.C
+
diff --new-file --recursive --ignore-space-change --unified --report-identical-files --minimal com073/internal.c com074/internal.c
--- com073/internal.c	Thu Jul 16 11:29:10 1998
+++ com074/internal.c	Thu Jul 16 11:29:10 1998
@@ -106,9 +106,10 @@
  *  06/30/98 (Rob Lake) ------------------------------------------------------
  *      rewrote ver command to accept switches, now ver alone prints
  *      copyright notice only.
- *  07/02/98 (Rob Lake) ------------------------------------------------------
- *      del now supports /P as first or second parameter
- *
+ *  07/08/1998 (John P. Price)
+ *  - removed call to show_environment in set command.
+ *  - moved test for syntax before allocating memory in set command.
+ *  - misc clean up and optimization.
  */
 
 #include <stdlib.h>
@@ -124,8 +125,8 @@
 #include "command.h"
 
 #define SHELLINFO    "FreeDOS Command Line Interface"
-#define SHELLVER     "version 0.73"
-#define BADCMDLINE   "bad or incorrect commandline"
+#define SHELLVER     "version 0.74"
+#define BADCMDLINE   "bad or incorrect command line"
 #define USAGE        "usage"
 #define CD           "change to directory   CD [d:][path]"
 #define MD           "make directory   MD [d:]path"
@@ -247,22 +248,25 @@
   /* if no parameters, show the environment */
   if (rest[0] == 0)
   {
-    void show_environment(void);
-
-    show_environment();
+    /* JPP 07/08/1998 removed call to show_environment */
+    for (count = 0; environ[count]; count++)
+    {
+      puts(environ[count]);
+    }
     return 0;
   }
 
-  if ((env_temp = strdup(rest)) == NULL)
+  /* make sure there is an = in the command */
+  /* JPP 07/08/1998 moved test for syntax before allocating memory */
+  if (strchr(rest, '=') == NULL)
   {
-    puts("Memory error");
+    puts("Syntax error");
     return 1;
   }
 
-  /* make sure there is an = in the command */
-  if (strchr(env_temp, '=') == NULL)
+  if ((env_temp = strdup(rest)) == NULL)
   {
-    puts("Syntax error");
+    puts("Memory error");
     return 1;
   }
 
@@ -346,8 +350,8 @@
     /* if there is more than 1 parameter */
     if (parse_firstarg(rest) != NULL)
     {
-      printf("%s\n", BADCMDLINE);
-      printf("%s: %s\n", USAGE, usage);
+      puts(BADCMDLINE);         /* JPP 07/08/1998 clean up */
+      printf(USAGE ": %s\n", usage);  /*JPP 07/08/1998 clean up */
       return 1;
     }
     else
@@ -436,20 +440,18 @@
 {
   int i;
 
-  printf("\n%s %s, Copyright (C) 1994-1998 Tim Norman\n", SHELLINFO,
-         SHELLVER);
+  /* JPP 07/08/1998 clean up and shortened info. */
+
+  printf("\n" SHELLINFO " " SHELLVER ", (C) 1994-1998 Tim Norman\n");
   /* Basic copyright notice */
   if (rest[0] == 0)
   {
-    printf("\n" \
-    "%s comes with ABSOLUTELY NO WARRANTY; for details\ntype: \`ver /w\'." \
-           "  This is free software, and you are welcome to redistribute" \
-           "\n" \
-           "it under certain conditions; type \`ver /r\' for details. Type \`ver /c\'" \
-           "for a\nlisting of credits.  Leading /'s not required." \
-           "\n" \
-           "Read README.TXT and the other documentation that came with this program." \
-           "\n\n", SHELLINFO);
+    printf("\n"
+           "%s comes with ABSOLUTELY NO WARRANTY; for details\n"
+           "type: `ver /w'. This is free software, and you are welcome to redistribute\n"
+           "it under certain conditions; type `ver /r' for details. Type `ver /c' for a\n"
+           "listing of credits.\n"
+           "\n", SHELLINFO);
     return 0;
   }
 
@@ -477,29 +479,29 @@
     }
     if (toupper(rest[i]) == 'W')
     {                           /* Warranty notice */
-      printf("\n This program is distributed in the hope that it will be useful,\n");
-      printf(" but WITHOUT ANY WARRANTY; without even the implied warranty of\n");
-      printf(" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n");
-      printf(" GNU General Public License for more details.\n");
+      /* JPP 07/08/1998 removed extra printf calls */
+      puts("\n This program is distributed in the hope that it will be useful,\n"
+         " but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
+           " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n"
+           " GNU General Public License for more details.");
     }
     else if (toupper(rest[i]) == 'R')
     {                           /* Redistribution notice */
-      printf("\n This program is free software; you can redistribute it and/or modify\n");
-      printf(" it under the terms of the GNU General Public License as published by\n");
-      printf(" the Free Software Foundation; either version 2 of the License, or\n");
-      printf(" (at your option) any later version.\n");
+      /* JPP 07/08/1998 removed extra printf calls */
+      puts("\n This program is free software; you can redistribute it and/or modify\n"
+           " it under the terms of the GNU General Public License as published by\n"
+      " the Free Software Foundation; either version 2 of the License, or\n"
+           " (at your option) any later version.");
     }
     else if (toupper(rest[i]) == 'C')
     {                           /* Developer listing */
-      printf("\ndeveloped by: Tim Norman\n");
-      printf("              Matt Rains\n");
-      printf("              Evan Jeffrey\n");
-      printf("              Steffen Kaiser\n");
-      printf("              Svante Frey\n");
-      printf("              Oliver Mueller\n");
-      printf("              Aaron Kaufman\n");
-      printf("              Marc Desrochers\n");
-      printf("              Rob Lake\n");
+      /* JPP 07/08/1998 removed extra printf calls; rearranged names */
+      puts("\ndeveloped by:\n"
+           "    Tim Norman      Matt Rains\n"
+           "    Evan Jeffrey    Steffen Kaiser\n"
+           "    Svante Frey     Oliver Mueller\n"
+           "    Aaron Kaufman   Marc Desrochers\n"
+           "    Rob Lake        John P. Price");
     }
     else
     {
@@ -507,7 +509,6 @@
       return 1;
     }
   }
-  printf("\n");
   return 0;
 }
 
@@ -526,8 +527,7 @@
     flags,
     orig_disk,
     args,
-    inter,
-    filespec;
+    inter;
   struct ffblk f;
   static char drive[MAXDRIVE],
     dir[MAXDIR],
@@ -542,7 +542,6 @@
 
   args = split(rest, arg);
   inter = 0;
-  filespec = 0;
 
   if (args > 2)
   {
@@ -553,24 +552,18 @@
   {
     struct stat stbuf;
     /* check for /? anywhere in command line */
-    if (stricmp(arg[1], "/?") == 0 ||
+    if (stricmp(arg[2], "/?") == 0 ||
+        stricmp(arg[1], "/?") == 0 ||
         stricmp(arg[0], "/?") == 0)
     {
       printf("%s: %s\n", USAGE, DEL);
       return 0;
     }
     /* check for /p as the first or second, MS-DOS
-     * allows only in second parameter, but we don't now! */
-    if (stricmp(arg[1], "/p") == 0)
-    {
-      inter = 1;
-      filespec = 0;
-    }
-    else if (stricmp(arg[0], "/p") == 0)
-    {
+     * only allows for it as the second arg, so do we :) */
+    if (stricmp(arg[1], "/p") == 0 ||
+        stricmp(arg[0], "/p") == 0)
       inter = 1;
-      filespec = 1;
-    }
     /* only one argument and that's /P */
     if (args == 1 && inter)
     {
@@ -578,17 +571,17 @@
       return 1;
     }
     /* check whether the file actually exists */
-    if (stat(arg[filespec], &stbuf) == -1)
+    if (stat(arg[0], &stbuf) == -1)
     {
       fprintf(stderr, FILE_NOT_FOUND);
       return 1;
     }
     /* check if it is a directory */
     if ((stbuf.st_mode & S_IFMT) == S_IFDIR
-        && strchr(arg[filespec], '*') == NULL)
-      strcat(arg[filespec], "\\");
+        && strchr(arg[0], '*') == NULL)
+      strcat(arg[0], "\\");
 
-    flags = fnsplit(arg[filespec], drive, dir, file, ext);
+    flags = fnsplit(arg[0], drive, dir, file, ext);
     /* build the filename, wildcards allowed */
     if (flags & FILENAME && flags && EXTENSION)
       sprintf(fn, "%s%s", file, ext);
Files com073/lh.asm and com074/lh.asm are identical
Files com073/license.txt and com074/license.txt are identical
Files com073/loadhigh.c and com074/loadhigh.c are identical
Files com073/loadhigh.h and com074/loadhigh.h are identical
Files com073/lowexec.asm and com074/lowexec.asm are identical
diff --new-file --recursive --ignore-space-change --unified --report-identical-files --minimal com073/makecom.bat com074/makecom.bat
--- com073/makecom.bat	Thu Jul  9 07:14:52 1998
+++ com074/makecom.bat	Wed Jul  8 16:39:24 1998
@@ -1,2 +1,2 @@
 exe2bin command.exe command.com
-del command.exe
+
Files com073/model.def and com074/model.def are identical
Files com073/prompt.c and com074/prompt.c are identical
diff --new-file --recursive --ignore-space-change --unified --report-identical-files --minimal com073/readme.txt com074/readme.txt
--- com073/readme.txt	Thu Jul 16 11:29:10 1998
+++ com074/readme.txt	Thu Jul 16 11:29:10 1998
@@ -4,9 +4,9 @@
 About
 ~~~~~
 This software is part of the FreeDOS project. Please email
-freedos@sunsite.unc.edu for more information, or visit the freedos archive
-at "ftp://sunsite.unc.edu/pub/micro/pc-stuff/freedos".  Also, visit our web
-page at http://www.freedos.org/.
+freedos@sunsite.unc.edu for more information, or visit the freedos
+archive at "ftp://sunsite.unc.edu/pub/micro/pc-stuff/freedos".  Also,
+visit our web page at http://www.freedos.org/.
 
 Please send any bug reports, comments or other info to:
    
@@ -24,15 +24,17 @@
    Aaron Kaufman (morgan@remarque.berkeley.edu)
    Marc Desrochers (bitzero@hotmail.com)
    Rob Lake (rlake@cs.mun.ca)
+   John P. Price (linux-guru@gcfl.net)
 
-Please note that this software is separate from the DOS-C kernel and may or
-may not work properly under it.  Of course I am making every effort to
-make it compatible.
+Please note that this software is separate from the DOS-C kernel and
+may or may not work properly under it.  Of course I am making every
+effort to make it compatible.
 
 Installation
 ~~~~~~~~~~~~
-To use this shell, just run the COMMAND.COM file.  Eventually, you will be
-able to add this to your CONFIG.SYS file, but this doesn't currently work.
+To use this shell, just run the COMMAND.COM file.  Eventually, you
+will be able to add this to your CONFIG.SYS file, but this doesn't
+currently work.
 
 When it does, you'll be able to add this line to CONFIG.SYS:
 
@@ -42,8 +44,8 @@
 
 SHELL=C:\FREEDOS\COMMAND.COM
 
-(This may or not work... I've received complaints that it doesn't, so I'd
-imagine that's the case!)
+(This may or not work... I've received complaints that it doesn't, so
+I'd imagine that's the case!)
 
 Current Features
 ~~~~~~~~~~~~~~~~
Files com073/redir.c and com074/redir.c are identical
Files com073/tempfile.c and com074/tempfile.c are identical
Files com073/tempfile.h and com074/tempfile.h are identical
Files com073/test.bat and com074/test.bat are identical
Files com073/testenv.c and com074/testenv.c are identical
diff --new-file --recursive --ignore-space-change --unified --report-identical-files --minimal com073/time.c com074/time.c
--- com073/time.c	Wed Dec 31 18:00:00 1969
+++ com074/time.c	Thu Jul 16 11:29:10 1998
@@ -0,0 +1,156 @@
+/*
+ *  TIME.C - time internal command
+ *
+ *  Comments:
+ *
+ *  07/08/1998 (John P. Price)
+ *    started.
+ *
+ *
+ */
+
+#include <stdio.h>
+#include <dos.h>
+#include <ctype.h>
+#include <string.h>
+
+#include "command.h"
+
+int
+parsetime(char *s)
+{
+  struct dostime_t t;
+
+  if (!*s)
+    return 1;
+
+  t.hour = 0;
+  t.minute = 0;
+  t.second = 0;
+  t.hsecond = 0;
+
+  // first get hour
+  if (isdigit(*s))
+  {
+    while (isdigit(*s))
+      t.hour = t.hour * 10 + (*s++) - '0';
+  }
+  else
+    return 0;
+
+  // get colon
+  if (*s == ':')
+  {
+    s++;
+
+    // now get minutes
+    if (isdigit(*s))
+    {
+      while (isdigit(*s))
+        t.minute = t.minute * 10 + (*s++) - '0';
+
+      // get colon
+      if (*s == ':')
+      {
+        s++;
+
+        // now get seconds
+        if (isdigit(*s))
+        {
+          while (isdigit(*s))
+            t.second = t.second * 10 + (*s++) - '0';
+
+          // get period
+          if (*s == '.')
+          {
+            s++;
+
+            // now get hundreths
+            if (isdigit(*s))
+            {
+              while (isdigit(*s))
+                t.hsecond = t.hsecond * 10 + (*s++) - '0';
+            }
+          }
+        }
+      }
+    }
+  }
+
+  if (toupper(*s) == 'P')
+  {
+    t.hour += 12;
+  }
+
+  if ((toupper(*s) == 'A') && (t.hour == 12))
+  {
+    t.hour = 0;
+  }
+
+  if (t.hour > 23 || t.minute > 60 || t.second > 60 || t.hsecond > 99)
+    return 0;
+
+  _dos_settime(&t);
+  return 1;
+}
+
+int
+cmd_time(char *first, char *rest)
+{
+  struct dostime_t t;
+  char ampm;
+  char s[40];
+
+  if (strcmp(rest, "/?") == 0)
+  {
+    puts(
+          "Displays or sets the system time.\n\n"
+          "TIME [time]\n\n"
+          "Type TIME with no parameters to display the current time setting and a prompt\n"
+          "for a new one.  Press ENTER to keep the same time."
+        );
+    return 0;
+  }
+
+  if (!*rest)
+  {
+    _dos_gettime(&t);
+
+    if (t.hour > 12)
+    {
+      ampm = 'p';
+      t.hour -= 12;
+    }
+    else
+      ampm = 'a';
+
+    if (t.hour == 0)
+      t.hour += 12;
+
+    printf("Current time is %2d:%02d:%02d.%02d%c\n", t.hour, t.minute,
+           t.second, t.hsecond, ampm);
+  }
+
+  while (1)
+  {
+    if (!*rest)
+    {
+      printf("Enter new time: ");
+      fgets(s, sizeof(s), stdin);
+      while (*s && s[strlen(s) - 1] < ' ')
+        s[strlen(s) - 1] = '\0';
+      if (parsetime(s))
+        return 0;
+    }
+    else
+    {
+      if (parsetime(rest))
+        return 0;
+      // force input the next time around.
+      *rest = '\0';
+    }
+    printf("Invalid time.\n");
+  }
+
+  return 0;
+}
diff --new-file --recursive --ignore-space-change --unified --report-identical-files --minimal com073/todo.txt com074/todo.txt
--- com073/todo.txt	Thu Jul 16 11:29:10 1998
+++ com074/todo.txt	Thu Jul 16 11:29:10 1998
@@ -7,21 +7,23 @@
 Optimize the code!  For size and speed.  There are numerous places where the
 code is hardly optimal for either.
 
-Swap out when exec'ing?
+Swap out when exec'ing? YES! Unless running from a floppy?
 
 ^S and ^Q to pause/resume displays.
 
-ECHO, TYPE, COPY, BREAK commands on command-line.
+ECHO, COPY, BREAK commands on command-line.
 
 Fix environment handling, probably using Steffan Kaiser's library.
 
-Find and fix NULL pointer assignment (shows up when compiling in small model).
+Find and fix NULL pointer assignment (shows up when compiling in
+small model).
 
 Add wildcard support to REN.
 
-Allow customization at compile time to take out history, aliasing, etc.
+Allow customization at compile time to take out history, aliasing,
+etc.
 
 Support '>>' redirection.  Currently this overwrites files instead of
 adding to them.
 
-Last Updated: 06/30/98 By Rob Lake
+Last Updated: 07/08/1998 by John P. Price
diff --new-file --recursive --ignore-space-change --unified --report-identical-files --minimal com073/type.c com074/type.c
--- com073/type.c	Wed Dec 31 18:00:00 1969
+++ com074/type.c	Thu Jul 16 11:29:10 1998
@@ -0,0 +1,57 @@
+/*
+ *  TYPE.C - type internal command
+ *
+ *  Comments:
+ *
+ *  07/08/1998 (John P. Price)
+ *    started.
+ *
+ *
+ */
+
+#include <stdio.h>
+#include <string.h>
+
+#include "command.h"
+
+int
+cmd_type(char *first, char *rest)
+{
+  char buf[128];
+  FILE *f;
+
+  if (strcmp(rest, "/?") == 0)
+  {
+    puts(
+          "Displays the contents of text files.\n\n"
+          "TYPE [drive:][path]filename"
+        );
+    return 0;
+  }
+
+  if (!*rest)
+  {
+    printf("Required parameter missing.\n");
+    return 1;
+  }
+
+  if (strchr(rest, ' '))
+  {
+    printf("Too many parameters.\n");
+    return 1;
+  }
+
+  if ((f = fopen(rest, "r")) == NULL)
+  {
+    printf("File not found - %s\n", rest);
+    return 1;
+  }
+
+  while (fgets(buf, sizeof(buf), f))
+  {
+    fputs(buf, stdout);
+  }
+  fclose(f);
+
+  return 0;
+}
Files com073/where.c and com074/where.c are identical
