Subversion Repositories SvarDOS

Rev

Rev 2020 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2019 mateusz.vi 1
pdTree v1.04
2
It is released US public domain.  [note: may use LGPL Cats]
3
Run tree with /? for help in using tree.
4
 
5
Usage: TREE [/A] [/F] [path]
6
/A  - use ASCII (7bit) characters for graphics (lines)
7
/F  - show files
8
path indicates which directory to start display from, default is current.
9
 
10
Note: The following nonstandard options are not documented
11
      with the /? switch.
12
/V  - show version information,
13
/S  - force ShortFileNames (SFNs, disable LFN support)
14
/P  - pause after each page
15
/DF - display filesizes
16
/DA - display attributes (Hidden,System,Readonly,Archive)
17
/DH - display hidden and system files (normally not shown)
18
 
19
TODO:
20
/On - sort* output, where n is F (filesize), N (name), E (extension)
21
* Output is sorted provided enough memory is available, otherwise output is
22
  unsorted to avoid aborting due to out of memory errors.
23
 
24
This version is written with the following goals:
25
  Internationalization, at least support for messages in other languages.
26
  Long File Name support if available.
27
  Nearly identical to Win32 version of tree [NT 4 as basis, 98 lacks tree].
28
  Support for directories with more than 32000 entries. [Yes I've seen this]
29
  Provide compatibility with FreeDOS tree, so compatible replacement (/Dx options).
30
  Provide useful enhancements, built in pause (/P), file details (/Dx options),
31
  sorted* output, and GUI usable output (/U).
32
 
33
 
34
This version has a set of hard coded messages.  The messages are
35
  separated from the code, so they may easily be changed and tree recompiled.
36
  Additionally, optional support for catgets is included, for easier
37
  changes without recompiling (except to indicate use of catgets).
38
  To use the cats message catalogs, the NLSPATH and LANG environment variables
39
  should be set.  NLSPATH should point to the directory containing the
40
  message catalogs (files) and LANG should be set to the proper language
41
  abbreviation.  E.g set NLSPATH=.  set LANG=EN  will result in tree.en
42
  being using if it is in the current directory, followed by set LANG=ES
43
  will result in tree.es (the Spanish version) being used.
44
  When compiled under Windows or DOS with catgets it uses the LGPL
45
  (refer to LGPL.txt) cats library written by Jim Hall, cats38s.zip.
46
    Cats, Copyright (C) 1999,2000 Jim Hall <jhall@freedos.org>
47
    FreeDOS internationalization library
48
    An implementation of UNIX catgets( ) for DOS
49
  Note: The necessary files from cats38s.zip are included along with
50
        the license file, however the full archive should also be
51
        available at the same location this archive was downloaded from.
52
        See files.lst for a list of which files are part of Jim Hall's
2029 mateusz.vi 53
        cats implementation and thus not public domain.
2019 mateusz.vi 54
  Version 3.8 (unmodified) is the current version of Jim Hall's cats used.
55
 
56
Since I wanted lfn support, I choose the win32 versions of
57
  findfirst, findnext, findclose as the basis for my routines
58
  that implement support for lfns.  This allowed me to write tree
59
  first under windows and test for compatibility with the win32 tree.
60
  This version should compile under Windows (copyright Microsoft) console mode
2029 mateusz.vi 61
  using only the tree.cpp and stack.c files.  To compile under DOS, a
2019 mateusz.vi 62
  second file w32fDOS.cpp is needed, which implements the
63
  findfirst/next/close routines and any extra routines.
64
 
65
This version (win32 tree.exe and DOS tree.exe [stub]) as best as I
2029 mateusz.vi 66
  can tell produces nearly identical output to the WinNT 4 tree program
2019 mateusz.vi 67
  except:
68
  The volume only includes the 0000:0000 serial number, as I do not know
69
  where NT's tree is getting the other 8digit number from. 00000000 0000:0000
70
  (other than it is machine and not volume specific).
71
  And my program makes no attempt to display the expanded filepath,
72
  ie changing D:. to D:\somedir\somesubdir
73
  The error level matches that of the [IBM's] PC DOS 7r1 tree.exe;
2029 mateusz.vi 74
  This implementation sets the error level (return value) consistant
75
  with the tree program distributed with (copyright) IBM PC DOS 7R1,
76
  i.e. 0 on successful display and 1 on most errors (critical errors
77
  such as ctrl-C return unspecified values) and if an option is given
78
  on the command line (outside of a path to begin at).  Additionally
79
  the text displayed on error may show different paths (NT2000pro
80
  displays full current path + bad path, followed by error with full
2019 mateusz.vi 81
  path, whereas this implementation shows error with bad path unmodified).
82
  The only differences I have seen between this version and the WinNT 5
83
  (aka Windows 2000 Pro.) version are the same as with the WinNT 4 tree,
84
  and WinNT 5 refers to directories as folders. (This can be changed,
85
  by editing the tree catalog file if really desired.)
86
 
87
It may be somewhat slower than other implementations, because it must
88
  open a directory twice, once to get a count of subdirectories and
89
  then again to actually display information.  The only known
90
  limitations are on filename length (limited by OS mostly), and the
91
  maximum depth limited by available memory (a linked list is used to
2029 mateusz.vi 92
  store subdirectory information).  Other than slower, it should work
93
  (though not tested) with directories with more than 32000 files.
94
  (Note w98 explorer will die if you try to 'select all' on that many
2019 mateusz.vi 95
  files. :)
96
 
97
pdTree v1.04
98
Original location: http://www.darklogic.org/fdos/tree/
99
 
100
  Written by: Kenneth J. Davis
101
  Date:       August, 2000
102
  Updated:    September, 2000; October, 2000; November, 2000; January, 2001;
103
              May, 2004; Sept, 2005
104
  Contact:    jeremyd@computer.org
105
 
106
 
107
Copyright (c): Public Domain [United States Definition]
108
[Note: may use LGPL cats by Jim Hall jhall@freedos.org]
109
 
110
Permission is hereby granted, free of charge, to any person obtaining a copy
111
of this software and associated documentation files (the "Software"), to deal
112
in the Software without restriction, including without limitation the rights
113
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
114
copies of the Software, and to permit persons to whom the Software is
115
furnished to do so, subject to the following conditions:
116
 
117
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
118
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
119
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
120
NONINFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR AUTHORS BE
121
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
122
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT
123
OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
124
DEALINGS IN THE SOFTWARE.