home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / d / dshar116.zip / DSHARDOC.ENG < prev    next >
Text File  |  1993-03-10  |  5KB  |  145 lines

  1.   note: This is only a summary of the Japanese document translated into
  2. English.  Sorry for my poor English.  (^_^)
  3.  ---------------------------------------------------------------------
  4.  
  5.  
  6.     dshar(MS-DOS command.com archiver, like UNIX shar) document (V1.13)
  7.  
  8.                     nide@nara-wu.ac.jp  93.02.25
  9.  
  10.   This program, named `dshar' and works under MS-DOS, bundles some (text
  11. or binary) files and produces a self-extract archive.  The archive it
  12. creates is a batch file, and you can extract the original files by
  13. executing it under command.com.  Since the archive contains only 7-bit
  14. visible characters (unless you're using 8-bit characters in filenames)
  15. and spaces and CRLFs, you can send it through text-only networks.
  16. Moreover, you need no special tools other than command.com to unbundle
  17. it.
  18.   Warning: Batch files created by the old version of dshar (until 1.10)
  19. does not work correctly on some machines.  Please use a newer version.
  20.  
  21.  
  22. The contents
  23. ~~~~~~~~~~~~
  24.     dshar.doc    ...Japanese document
  25.     dshardoc.eng    ...This file
  26.     dshar.c    dshardat.c dosfn.c setargs.c getopt.c common.h
  27.             ...sources
  28.     makefile    ...makefile for MS-C & ASCII(C)Software Tools make.exe
  29.     makefile.unx    ...makefile for UNIX
  30.     dshar.exe    ...MS-DOS executable
  31.     undshar.sh    ...a shell script on UNIX to unbundle dshar'ed file
  32.  
  33.   If your compiler has _dos_findfirst() etc, you don't need dosfn.c.
  34. You don't need getopt.c unless you're compiling dshar on UNIX which
  35. lacks getopt().
  36.  
  37.  
  38. Usage on MS-DOS (how to archive)
  39. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  40.     dshar FILE FILE ... > ARCHIVE.bat
  41.  
  42.   Arguments are the names of files you want to archive.  You can use
  43. wildcards (but except in the middle of the path).
  44.   If an argument is a directory, all files in it will be recursively
  45. archived.
  46.   You can specify `response file' by adding `@' at the head of the name
  47. of it.  For example, if a file named `cfiles' contains the following
  48. strings:
  49.  
  50.     aaa.c bbb.*
  51.     cc/ddd.c
  52.  
  53. then, when you type `dshar z.exe @cfiles z.doc', it's just same as
  54. typing `dshar z.exe aaa.c bbb.* cc/ddd.c z.doc'.
  55.   If one of the arguments is `@-', the standard input is regarded as a
  56. response file.  For example, you can type `ls a*/b*.c | dshar @-', if
  57. you have UNIX-like ls.
  58.  
  59.  
  60. How to extract from archive (On MS-DOS)
  61. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  62.   You can extract the original files by simply executing it.  If you
  63. received an dshar'ed archive via e-mail, first you have to cut off the
  64. lines above the `echo off' line.
  65.   Unless you're specifying the `-c' option, the existing files are not
  66. overwritten.
  67.  
  68.             *    *    *
  69.  
  70.   You can find the following string near the end of the created archive:
  71.  
  72.     `You may put any additional commands to be executed here.'
  73.  
  74. It means that you can add any optional commands after that.  For
  75. example, if you have an LHa's SFX and have archived it by dshar, then
  76. you can add a command to extract the SFX after that string.  If you do
  77. so, when you execute it the SFX is extracted first, and then the SFX is
  78. executed.  Therefore you can easily extract the LHa'ed files in one
  79. command.  It's an efficient way to archive many or big files by dshar, I
  80. think, since dshar doesn't have any abilities of compressing files.
  81.  
  82.   But, note that you MAY NOT add or delete anything at any other places,
  83. because an archive produced by dshar DEPENDS ON the positions of data in
  84. the file.
  85.  
  86.  
  87. Making archive and extracting on UNIX
  88. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  89.   You can compile dshar on UNIX by typing:
  90.  
  91.     cc -DUNIX dshar.c dshardat.c setargs.c -o dshar
  92.  
  93. but, don't forget to define `-DUNIX'.
  94.   The usage of dshar on UNIX is
  95.  
  96.     dshar [-b] [-t] FILE FILE ... > ARCHIVE.bat
  97.  
  98. which is almost same as on MS-DOS, but two options are added.  They have
  99. the following meanings:
  100.  
  101.     -b  produces the archive whose EOL marks are CR+LF.
  102.     -t  archiving files while converting EOL marks from LF to CR+LF
  103.  
  104.   On UNIX, dshar produces a batch file as a text file (unless you
  105. specify -b option).  If you transfar it to MS-DOS, please do so in TEXT
  106. mode.
  107.   If you want to archive text files by dshar on UNIX, the archived files
  108. must have CR+NL at the end of each line (unless you specify -t option).
  109.  
  110.   Warning: On UNIX, dshar doesn't check whether the filenames are
  111. permitted on MS-DOS (ex.  whether they are within 8 letters + 3 letters
  112. extention).
  113.  
  114.             *    *    *
  115.  
  116.   You can extract the dshar'ed archive on UNIX by using undshar.sh.
  117. Please transfer it to UNIX and rename it to `undshar', and make it
  118. executable.  The usage of undshar is
  119.  
  120.     undshar [-c] [-t] [-n] archive_file
  121.  
  122. and, the EOL marks of the archive can be either NL or CR+NL.  Options
  123. have the following meanings:
  124.  
  125.     -c  Overwrites the existing files
  126.     -t  Trims CR and ^Z from the extracted files
  127.     -n  Don't perform extraction but produce a shell script to do so
  128.  
  129.   Undshar needs awk and uudecode.  Archives created by old version of
  130. dshar (before 1.04) can't be extracted by undshar.
  131.  
  132.  
  133. Others
  134. ~~~~~~
  135.   Dshar is a free software, but not a PDS (except getopt.c, which is in
  136. public domain).  You can freely use or improve it, but you can
  137. redistribute it only if:
  138.  
  139.     - You give all files included in original archive
  140.     - If any changes are added, the position of modification and the
  141.       name of the person who changed it are clearly written
  142.  
  143.   If you have bugs, please send a e-mail to nide@nara-wu.ac.jp, or
  144. report it to fj.binaries.msdos.d.
  145.