diff -r -c ../unarj241/environ.c ./environ.c
*** ../unarj241/environ.c	Wed Jun 23 07:07:20 1993
--- ./environ.c	Sun Apr 10 10:55:06 1994
***************
*** 495,501 ****
--- 495,503 ----
  case_path(name)
  char *name;
  {
+ #ifndef UNIX
      (char *) name;
+ #endif
  }
  
  void
***************
*** 590,595 ****
--- 592,599 ----
      return longtime;
  }
  
+ extern int utime();
+ 
  int
  set_ftime_mode(name, tstamp, attribute, host)
  char  *name;
***************
*** 604,612 ****
--- 608,618 ----
         time_t mtime;             /* New modification time */
      } tb;
  
+ #ifndef UNIX
      (char *) name;
      (uint) attribute;
      (uint) host;
+ #endif
  
      m_time = mstonix(tstamp) + gettz();
  
diff -r -c ../unarj241/unarj.c ./unarj.c
*** ../unarj241/unarj.c	Wed Jun 23 07:07:20 1993
--- ./unarj.c	Sun Apr 10 11:00:56 1994
***************
*** 40,45 ****
--- 40,46 ----
   * 11/24/91  R. Jung     Added more error_count processing.
   * 12/03/91  R. Jung     Added backup file processing.
   * 02/17/93  R. Jung     Added archive modified date support.
+  * 940410    aeb@cwi.nl  Added automatic directory creation for x mode.
   *
   */
  
***************
*** 118,124 ****
  NULL
  };
  
! char M_VERSION [] = "UNARJ (Demo version) 2.41 Copyright (c) 1991-93 Robert K Jung\n\n";
  
  char M_ARCDATE [] = "Archive created: %s";
  char M_ARCDATEM[] = ", modified: %s";
--- 119,125 ----
  NULL
  };
  
! char M_VERSION [] = "UNARJ (Demo version) 2.41a Copyright (c) 1991-93 Robert K Jung\n\n";
  
  char M_ARCDATE [] = "Archive created: %s";
  char M_ARCDATEM[] = ", modified: %s";
***************
*** 707,712 ****
--- 708,734 ----
      return 0;
  }
  
+ #ifdef UNIX
+ extern int mkdir();
+ #define DIRMODE 0755
+ 
+ static void
+ create_required_dirs(name)
+      char *name;
+ {
+     char dirname[FNAME_MAX];
+     char *cp;
+ 
+     strcpy(dirname, name);
+     cp = dirname;
+     while ((cp = strchr(cp, PATH_CHAR))) {
+ 	*cp = 0;
+ 	(void) mkdir(dirname, DIRMODE); /* this will fail if dir existed */
+ 	*cp++ = PATH_CHAR;
+     }
+ }
+ #endif
+ 
  static int
  extract()
  {
***************
*** 738,743 ****
--- 760,769 ----
          error_count++;
          return 0;
      }
+ #ifdef UNIX
+     if (command == 'X')
+         create_required_dirs(name);
+ #endif
      outfile = file_open(name, writemode[file_type & 1]);
      if (outfile == NULL)
      {
diff -r -c ../unarj241/unarj.doc ./unarj.doc
*** ../unarj241/unarj.doc	Wed Jun 23 07:07:21 1993
--- ./unarj.doc	Sun Apr 10 11:18:12 1994
***************
*** 1,11 ****
  
!      UNARJ.DOC, UNARJ 2.41                                   April 1993
  
  
          UNARJ software and manual copyright (c) 1991-93 by Robert K Jung.
  	All rights reserved.
  
!         UNARJ version 2.41 release
  
  
       This documents new or updated information since UNARJ 2.10.
--- 1,11 ----
  
!      UNARJ.DOC, UNARJ 2.41a                                  April 1993
  
  
          UNARJ software and manual copyright (c) 1991-93 by Robert K Jung.
  	All rights reserved.
  
!         UNARJ version 2.41a release
  
  
       This documents new or updated information since UNARJ 2.10.
***************
*** 51,57 ****
  
       UNARJ has been modified to support the four commands: "e", "l", "t",
       and "x".  These are similar to the ARJ version of these commands.
!      However, UNARJ does not create directories when using the "x" command.
  
       Usage:  UNARJ archive[.arj]    (list archive)
  	     UNARJ e archive	    (extract archive)
--- 51,57 ----
  
       UNARJ has been modified to support the four commands: "e", "l", "t",
       and "x".  These are similar to the ARJ version of these commands.
!      Moreover, UNARJ.241a does create directories when using the "x" command.
  
       Usage:  UNARJ archive[.arj]    (list archive)
  	     UNARJ e archive	    (extract archive)
***************
*** 103,110 ****
       This command extracts the contents of the ARJ archive to the pathnames
       stored in the archive.  If only filespecs are stored in the archive,
       then the files will be extracted to the current directory.  UNARJ will
!      not create missing directories in the pathnames.  You must create them
!      manually.	Use the UNARJ t command to see the full pathnames stored in
       the archive.
  
  
--- 103,110 ----
       This command extracts the contents of the ARJ archive to the pathnames
       stored in the archive.  If only filespecs are stored in the archive,
       then the files will be extracted to the current directory.  UNARJ will
!      create missing directories in the pathnames (aeb, 940410).
!      Use the UNARJ t command to see the full pathnames stored in
       the archive.
  
  
