Subversion Repositories SvarDOS

Rev

Rev 2029 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2029 Rev 2124
Line -... Line 1...
-
 
1
 
1
pdTree v1.04
2
SvarDOS TREE
2
It is released US public domain.  [note: may use LGPL Cats]
-
 
-
 
3
 
3
Run tree with /? for help in using tree.
4
Run tree with /? for help in using tree.
4
 
5
 
5
Usage: TREE [/A] [/F] [path]
6
Usage: TREE [/A] [/F] [path]
6
/A  - use ASCII (7bit) characters for graphics (lines)
7
/A  - use ASCII (7bit) characters for graphics (lines)
7
/F  - show files
8
/F  - show files
Line 14... Line 15...
14
/P  - pause after each page
15
/P  - pause after each page
15
/DF - display filesizes
16
/DF - display filesizes
16
/DA - display attributes (Hidden,System,Readonly,Archive)
17
/DA - display attributes (Hidden,System,Readonly,Archive)
17
/DH - display hidden and system files (normally not shown)
18
/DH - display hidden and system files (normally not shown)
18
 
19
 
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
-
 
53
        cats implementation and thus not public domain.
-
 
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
-
 
61
  using only the tree.cpp and stack.c files.  To compile under DOS, a
-
 
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
-
 
66
  can tell produces nearly identical output to the WinNT 4 tree program
-
 
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;
-
 
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
-
 
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
-
 
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
-
 
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
 
20
 
-
 
21
=== ORIGINS ===
-
 
22
 
-
 
23
This program was originally written as pdTREE by Kenneth J. Davis who
-
 
24
maintained it in years 2000-2005.
-
 
25
 
-
 
26
This version has been forked from pdTREE v1.04 in 2024 by Mateusz Viste who
-
 
27
made a number of changes to simplify the program, port it to Open Watcom,
-
 
28
strip it from non-DOS features, replace all GPL parts, make if faster, lighter
-
 
29
and more memory efficient.
-
 
30
 
-
 
31
 
-
 
32
=== LICENSE ===
106
 
33
 
107
Copyright (c): Public Domain [United States Definition]
34
Copyright (c): Public Domain [United States Definition]
108
[Note: may use LGPL cats by Jim Hall jhall@freedos.org]
35
[Note: uses MIT SvarLANG]
109
 
36
 
110
Permission is hereby granted, free of charge, to any person obtaining a copy
37
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
38
of this software and associated documentation files (the "Software"), to deal
112
in the Software without restriction, including without limitation the rights
39
in the Software without restriction, including without limitation the rights
113
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
40
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell