Jan 16 2000

wcd  2.2.9 (Jan 16 2000) - Wherever Change Directory

Usage: wcd [drive:][dir] [-h] [-q] [-Q] [-b] [-l] [-c] [-v] [-e[e]] [-E <path>]
       [-g] [-s] [-S <path>] [-a[a]] [-A <path>] [-u <username>] [-f <treefile>]
       [-n <path>] [-i] [-d <drive>] [-[m|M|r|rmtree] <dir>] [-t]
       [-z #] [-[#]] [+[#]] [=]

  dir (partial) name of directory to change to.
      Wildcards *, ? and [SET] are supported!

  -h      show this Help
  -q      unQuiet operation
  -Q      Quieter operation
  -u      add treefile of other User, skip default treedata file (Unix only)
  +u      add treefile of other User (Unix only)
  -f      add extra treeFile, skip default treedata file
  +f      add extra treeFile
  -n      add relative treefile , skip default treedata file
  +n      add relative treefile
  -s      (re)Scan disk from $HOME
  -S      Scan disk from <path>
  +S      Scan disk from <path>, make relative treefile
  -a      Add current path to treedata
  -aa     Add current and all parent paths to treedata
  -A      Add tree from <path>
  -c      direct CD mode
  -w      Wild matching only
  -l      aLias current dir
  -b      Ban current path
  -v      print Version info
  -g      print software licence
  -e      add current path to Extra treedata
  -ee     add current and all parent paths to Extra treedata
  -E      add tree from <path> to Extra treedata
  -i      Ignore case
  +i      Regard case
  -m      Make directory and add to treedata file
  -M      Make directory and add to extra treedata file
  -r      Remove directory and remove from treedata file
  -rmtree Remove directory Recursive and remove from treedata file
  -d      set <Drive> for stack & go files (DOS only)
  -t      Do not strip tmp mount dir /tmp_mnt/ (Unix only)
  -z      set max stack siZe
  -       Push dir (# times)
  +       Pop dir (# times)
  =       Show stack

Examples:
   wcd -s                  wcd src/wcd
   wcd -S /                wcd doe*/vhdl -u doe
   wcd w*[1-3]             wcd src -q -f /home/doe/.extra.wcd
   wcd d:games             wcd -a
   wcd -3                  wcd -z 0 -i howto
   wcd +                   wcd -E .
   wcd -d H doc            wcd -n /mnt/network src
   wcd - +                 wcd -S c: -A d: -A e:

======================================================================
= 0 Contents                                                         =
======================================================================
 1 Manual
 2 DOS/Windows installation
   - dos 16 bit
   - dos 32 bit
   - dos Bourne Again Shell (bash)
   - Z shell (zsh)
   - Long directory name support
   - Using default options
   - Use of environment variable HOME / WCDHOME
 3 Win32 console (Windows NT) installation
   - Z shell (zsh)
   - UNC support
 4 Cygwin (Windows 9x / NT) installation
 5 Unix installation
   - Korn Shell (ksh)
   - C Shell (csh)
   - Bourne Again Shell (bash)
   - Z shell (zsh)
   - Hints
 6 Bugs
 7 Source code
 8 Modification history
 9 Copyright
10 Acknowledgements
11 Contact / Download new versions

======================================================================
= 1 Manual                                                           =
======================================================================

WCD(1)							   WCD(1)


NAME
       wcd - Wherever Change Directory
       chdir for DOS and Unix

SYNOPSIS
       wcd [drive:][dir] [-h] [-q] [-Q] [-b] [-l] [-c] [-w] [-v]
       [-e[e]] [-E <path>] [-s] [-S <path>] [-a[a]] [-A <path>]
       [-[m|M|r|rmtree] <dir>] [-u <username>] [-f <treefile>]
       [-g]  [-n  <path>]  [-i]	 [-t]  [-d <drive>] [-z #] [-[#]]
       [+[#]] [=]

DESCRIPTION
       Wcd.  Directory changer for DOS and  Unix.   Another  NCD-
       clone  (Norton  Change  Directory)  that	 also works under
       Unix.

       This program jumps to a	(sub)directory	anywhere  in  the
       directory-tree or to directories of other users if you are
       on a Unix network.

       Wcd generates a treedata file were it searches the  direc-
       tory.

       Wcd  does  add  links to the treedata files while scanning
       the disk, but does not follow them.  While following links
       wcd  could  end	up  scanning infinite loops, or scan very
       large portions of a network.

	     wcd adir

       searches for a directory matching adir* In case of  multi-
       ple  matches  the  user can choose from a list of matching
       directories.

       The directory to jump to can be given by	 only  the  first
       characters  or  a regular expression in the way it is used
       in filename matching, i.e. the wildcards *,  ?  and  [SET]
       can be used.

       `*' matches any sequence of characters (zero or more)
       `?' matches any character
       [SET] matches any character in the specified set,
       [!SET]  or  [^SET] matches any character not in the speci-
       fied set.

       A set is composed of characters or ranges; a  range  looks
       like  ``character  hyphen  character'' (as in 0-9 or A-Z).
       [0-9a-zA-Z_] is the minimal set of characters  allowed  in
       the  [..] pattern construct.  Other characters are allowed
       (ie. 8 bit characters) if your system will  support  them.
       To  suppress  the special syntactic significance of any of
       ``[]*?!^-\'', in- side or outside  a  [..]  construct  and
       match  the  character  exactly,	precede	 it  with a ``\''
       (backslash).

       If no wildcards are used and wcd finds  a  perfect  match,
       wcd   will  ignore  all	wild  matches  by  default.  This
       behaviour can be changed with the -w option.

       Wcd can also change to directories that	are  not  in  the
       treedata file.

	     wcd ..

       It  is  also  possible to give a part of a directory path.
       Eg.

	     wcd adir1/adir2

       wcd searches  for  directory  adir2*  which  path  matches
       *adir1/adir2*

       It  is allowed to type any kind of expression with slashes
       and wildcards.

	     wcd 1/ad

	     wcd src*/*1?/a*2

       In DOS it does not matter if you use a slash  or a  back-
       slash  as  directory-separator.	It is also possible under
       DOS to change drive and directory in one go  by	preceding
       the directory name with the drive name.

	     wcd d:games

       If wcd found a match but cannot change to the directory it
       tries to remove it from the default  treedata  file.   Not
       from the extra treedata file.

       Wcd  keeps  a  directory stack which is stored on disk. De
       stack has a default size of 10 and is cyclic. See  options
       -, + and =.


FILES
       wcd.exe
	   The binary. Do not rename it to 'wcd' on Unix systems.
	   On Unix systems the binary is always	 executed  via	a
	   function or alias.


       default treedata file
	   DOS: \treedata.wcd or %HOME%\treedata.wcd
	   UNIX: $HOME/.treedata.wcd

	   This	 is  the default treedata file where wcd searches
	   for matches.	 If it is not readable wcd will create	a
	   new one.


       extra treedata file
	   DOS: \extra.wcd or %HOME%\extra.wcd
	   UNIX: $HOME/.extra.wcd

	   An  optional	 extra treedata file. If it exists and is
	   readable wcd will try to find  matches  in  this  file
	   also.


       ban file
	   DOS: \ban.wcd or %HOME%\ban.wcd
	   UNIX: $HOME/.ban.wcd

	   In  this  optional  file  wcd places banned paths. See
	   option -b.


       alias file
	   DOS: \alias.wcd or %HOME%\alias.wcd
	   UNIX: $HOME/.alias.wcd

	   Optional file with wcd aliases. See option -l.


       stack file
	   DOS: c:\stack.wcd or %HOME%\stack.wcd
	   UNIX: $HOME/.stack.wcd

	   In this file wcd stores it's stack.	The  drive-letter
	   can be changed with the -d option.


       go-script
	   DOS BASH: c:\wcd.go or %HOME%\wcd.go
	   WIN32 CONSOLE: c:\wcdgo.bat or %HOME%\wcdgo.bat
	   WIN32 ZSH: %HOME%\wcd.go
	   UNIX: $HOME/bin/wcd.go

	   This	 is  the  shell script which wcd.exe creates each
	   time.  It has to be executed	 via  a	 function  or  an
	   alias.  The	drive-letter  can  be changed with the -d
	   option.


       relative treedata file
	   DOS: <path>\rtdata.wcd
	   UNIX: <path>/.rtdata.wcd

	   Text file with relative paths from <path>. See options
	   +S, -n and +n.


       The  win32  console version of wcd behaves as the DOS ver-
       sion.  The Cygwin version  of  wcd  behaves  as	the  UNIX
       version.


       All  .wcd  files	 are ASCII text files. They can be edited
       with a text-editor.


       If the environment variable WCDHOME is set  wcd	will  use
       WCDHOME instead of HOME.


OPTIONS
       -s     (re)Scan disk from your $HOME directory.

	      This  is	recommended  if	 you  are on a large Unix
	      server network with very much users.  This  is  the
	      default  scanning mode.  Wcd for DOS scans the cur-
	      rent disk from root \ or from  %HOME%  if	 HOME  is
	      set.   The  existing default treedata file is over-
	      written.

       -S <path>
	      Scan disk from a certain path.

	      If you have a small Unix system like a  PC  with	a
	      few users you can scan the disk from /.  The exist-
	      ing default treedata file is overwritten.

       +S <path>
	      Scan disk from a certain path. Make relative  tree-
	      data file.

	      Scan disk from path <path> and place relative paths
	      in a relative treedata file.  This file is used  by
	      the  -n  and +n options of wcd. E.g.  wcd -n <path>
	      src

       -a     Add current path to default treedata file.

	      Use this option to quickly add the current path  to
	      the default treedata file. Re-scanning the complete
	      disk can take a long time in some cases.

       -aa    Add current and all parent paths to  default  tree-
	      data.

       -A <path>
	      Add directory tree from <path> to default treedata.

	      The directory tree starting from <path> is appended
	      to the default treedata file.

		  Example: wcd -A .

       -e     Add current path to extra treedata file.

	      Use  this option to quickly add the current path to
	      the extra treedata file.

       -ee    Add current and all parent paths to extra	 treedata
	      file.

       -E <path>
	      Add  directory  tree  from <path> to Extra treedata
	      file.

	      The directory tree starting from <path> is appended
	      to the Extra treedata file

       -c     direct CD mode

	      By default wcd works as follows:
	       1. Try to find a match in the treedata file(s)
	       2.  If  no  match,  try	to open the directory you
	      typed.

	       In direct CD mode wcd works in reversed order.
	       1. Try to open the directory you typed.
	       2. If not, try to find a	 match	in  the	 treedata
	      file(s).

       -w     Wild matching only.

	      Treat all matches as wild matches.

       -b     Ban current path.

	      Wcd  places  the current path in the ban file. This
	      means that wcd ignores all matches of  this  direc-
	      tory  and its subdirectories.  The match is printed
	      in unquiet operation.

       -l     aLias current path.  Wcd places  the  current  path
	      and  the alias in the alias file.	 Aliases are case
	      sensitive.

       -q     unQuiet operation.

	      With this option wcd prints all the  matches  while
	      wcd  is  scanning	 the  treedata files. Also banned
	      matches are printed.

       -Q     Quieter operation.

	      Printing of the final match is suppressed.

       -u <username>
	      Add default treedata file of  other  user,  do  not
	      scan your own default treedata file (Unix only).

	      Wcd  now	scans the ~/.treedata.wcd of another user
	      It is assumed to be  /home/<username>/.treedata.wcd
	      The default treedata file is not scanned.


       +u <username>
	      Add  default  treedata  file  of	other  user (Unix
	      only).


       -f <filename>
	      Add another treedata file to  be	scanned,  do  not
	      scan the default treedata file.

       +f <filename>
	      Add another treedata file to be scanned.

       -n <path>
	      Add      relative	     treedata	  file	   (Unix:
	      <path>/.rtdata.wcd,   DOS:  <path>\rtdata.wcd),  do
	      not  scan the default treedata file. If <path> is a
	      file,   wcd   will   add	  <path>    instead    of
	      <path>/.rtdata.wcd  or <path>\rtdata.wcd.	 See also
	      option +S.

	      Example:
	      suppose another system  has  been	 NFS  mounted  to
	      mount point /mnt/network


		    wcd -n /mnt/network src

	      Wcd  now	opens  file  /mnt/network/.rtdata.wcd The
	      file contains the paths relative from that point.

	      The relative treedata file should already have been
	      created using the wcd +S option.


       +n <path>
	      Add  another relative treedata file. See option -n.


       -i     Ignore case.   Dos  and  Windows	versions  of  wcd
	      ignore  case  by default. Unix versions regard case
	      by default.


       +i     Regard case.  See also option -i.


       -m <dir>
	      Make directory and add to treedata file.


       -M <dir>
	      Make directory and add to extra treedata file.


       -r <dir>
	      Remove directory and remove from treedata file.

	      If the directory is empty, wcd will remove it,  and
	      try to remove it from the treedata file.


       -rmtree <dir>
	      Recursively  remove directory and remove from tree-
	      data file.

	      Wcd will remove the directory and all  it's  subdi-
	      rectories	 and  files,  and  remove the directories
	      from the treedata file.


       -d <drive>
	      Set drive for stack and go file (DOS only).

	      The stack file and the  go-script	 are  by  default
	      stored  on drive c: if environment variable HOME is
	      not set. Use this option if drive C: is a read-only
	      drive.   This  option must be used before any stack
	      option (-,+,=).

       -t     Do not strip tmp mount dir /tmp_mnt (Unix only)

	      Wcd strips by default  /tmp_mnt/	from  the  match.
	      Directory /tmp_mnt is used by the automounter. This
	      behaviour can be turned off with the -t option.


       -z #   Set maximum stack size.

	      The default size of the stack is 10.  Stack  opera-
	      tion  can	 be  turned off by setting the size to 0.
	      This option must be used before  any  stack  option
	      (-,+,=).

       -[#]   Push dir [ # times ].

	      Go  back	a  directory.  'wcd -' goes one directory
	      back. To go more directories back add a  number  to
	      it. E.g. wcd -3 The stack is cyclic.

       +[#]   Pop dir [ # times ].

	      Go  forward a directory. 'wcd +' goes one directory
	      forward. To go more directories forward add a  num
	      ber to it. E.g. wcd +2 The stack is cyclic.

       =      Show stack.

	      Use  this	 option	 if  don't  know anymore how many
	      times to push or pop.  The stack is printed and you
	      can choose a number. The current place in the stack
	      is marked with an asterisk '*'.


======================================================================
= 2 DOS/Windows installation                                         =
======================================================================
- dos 16 bit version:

 Make sure that wcd.exe is in your path.

......................................................................
- dos 32 bit version:

 Make sure that wcd.exe and cwsdpmi.exe are in your path.
 (requires 80386 CPU or higher)

......................................................................
- dos Bourne Again Shell (bash):

(32 bit)

1)

 copy wcd.exe to your c:/bin directory.

2)

 Add the following function to your ~/_bashrc
 file. Notice that under Windows 95/NT the ~/.bashrc
 file overrides the ~/_bashrc file. In that case place
 the function in ~/.bashrc

function wcd
{
   c:/bin/wcd.exe $*
   source c:/wcd.go
}

Start a new bash

Attention!
wcd 2.1 and later writes the wcd.go file now always on drive C: unless
other specified with the -d option.

If you use environment variable HOME make a funtion like this:

function wcd
{
   c:/bin/wcd.exe $*
   source $HOME/wcd.go
}

......................................................................
- Z shell (zsh)

The dos bash version of wcd can also be used for the win32 port of zsh if it is used  under
Windows  95 or 98. It is required that enviroment variable HOME or WCDHOME is set. A function
like the following must be defined.  This can be done in $HOME/zshenv


function wcd
{
   c:/bin/wcd.exe $*
   . $HOME/wcd.go
}
......................................................................
- Long directory name support

The 32 bit DOS versions for DOS supports long directory names
in a Windows 95/98 Dos-box.

Wcd makes use of DJGPP's LFN (long filename) API, which works under
Windows 95 and 98. LFN support does not work if you started your PC
in MS-DOS mode.

LFN support can be controlled with the environment variable LFN.

set LFN=y  enables LFN support.
set LFN=n  disables LFN support.

If variable LFN is not set, LFN is by default enabled.

Notice that you need to have set LFN=y in your DJGPP.ENV file
if you have the DJGPP compiler installed.

...

Current DOS version of Wcd does not support LFN under Windows NT.

An alpha version of an LFN driver for NT which enables long file name
support for DJGPP programs, written by Andrew Crabtree, can be downloaded
from Andrew's site (http://www.goof.com/pcg/data/djgpp/lfn0106.zip).

If you nead LFN support under Windows NT use the win32 console
version of wcd.

......................................................................
- Using default options

If you want to use some options by default use an alias or macro to do that.
Smarter shells like 4DOS and NDOS are able to set aliases like this:
alias wcd=wcd.exe -q

In DOS BASH add the options in your function.

In the MS-DOS COMMAND.COM shell you can use the 'doskey' command to define
a macro. You could add the following line to you AUTOEXEC.BAT file:
doskey wcd=wcd.exe -Q $*

......................................................................
- Use of environment variable HOME / WCDHOME

The DOS versions of wcd can make use of environment variable HOME.
(UNIX version always uses HOME.)

set HOME=c:/home/waterlan

If HOME is set, wcd will place all it's files (treedata.wcd, extra.wcd,
alias.wcd, ban.wcd, wcd.go) in directory %HOME% .
The behaviour of wcd is then equal to the UNIX version of wcd.
Wcd will scan the disk default from %HOME%. Drives will not
be automaticly scanned by changing to them.
You need to tell wcd explicitly. E.g.:

wcd -S c: -A d: -A e:

Matching of directories is now global over all scanned drives.

...

If HOME is set, DJGPP bash will read '_bashrc' from %HOME%.
Your wcd function could now look like:

function wcd
{
   c:/bin/wcd.exe $*
   source $HOME/wcd.go
}

If the evironment variable WCDHOME is set wcd will use
WCDHOME instead of HOME.

......................................................................

Adding extra directories:

You can add an extra directory-list in the file \extra.wcd or %HOME%\extra.wcd

Example:

d:/games
d:/games/invaders
e:/project_a

See also options -e and -E

======================================================================
= 3 Win32 console (Windows NT) installation                          =
======================================================================

Notice that under Windows NT console (MS-DOS prompt) a win32-program cannot
change the current workdirectory (although a DOS-program can).
That is why wcd generates a batchscript (c:\wcdgo.bat or %HOME%\wcdgo.bat)
which must be executed in the current shell.

1)
Copy wcd.bat and wcdwin32.exe somewhere in PATH.


2)
Edit wcd.bat depending if you use environment variable HOME or not.

Suppose you installed wcd in c:\bin

If you don't use environment variable HOME wcd.bat looks like:

 @echo off
 c:\bin\wcdwin32.exe %*
 c:\wcdgo.bat

If you do use environment variable HOME wcd.bat looks like:

 @echo off
 c:\bin\wcdwin32.exe %*
 %HOME%\wcdgo.bat

3)
To be sure that you execute the correct 'wcd.bat' you could
optionally create a macro for wcd:

 doskey wcd=c:\bin\wcd.bat $*


Notice that environment variable WCDHOME overrides HOME.

......................................................................
- Z shell (zsh)

A win32 port of zsh has been made by Amol Deshpande (ftp://ftp.blarg.net/users/amol/zsh).

It  is  required that enviroment variable HOME or WCDHOME is set.  A function must be defined
(e.g. in $HOME/zshenv) like this:


function wcd
{
   c:/bin/wcdwin32.exe $*
   . $HOME/wcd.go
}

......................................................................

- UNC support

UNC stands for Universal Naming Convention.
It is a Windows 9x/NT way of accessing network drives without
using a drive letter. (I don't know what is so universal about it.)
It's from Windows SMB LAN manager networking.
A UNC path looks like: \\servername\sharename

In Windows networking, you can map a drive letter to a UNC:
  net use G: \\gui_fileserv\apps

Wcd does not support UNC notation. You need to map the UNC
to a drive letter to access it via wcd.

======================================================================
= 4 Cygwin (Windows 9x / NT) installation                            =
======================================================================

1)
Make sure that environment variable HOME is set.
Create a directory $HOME/bin

2)

 copy wcd.exe to your $HOME/bin directory.

3)

 Add the following function to your ~/.bashrc file.

function wcd
{
   $HOME/bin/wcd.exe $*
   source $HOME/bin/wcd.go
}

Start a new bash

......................................................................

The Cygwin version behaves exactly as the Unix version of wcd.

o) regards case by default.
   - Use option -i to ignore case.
o) does not use drive letters.
   - Use Cygwin's 'mount' command to access other drives than C:
o) Uses the same filenames for treedata files etc.

Use Cygwin's 'mount' command to access UNC named drives.

======================================================================
= 5 UNIX installation                                                =
======================================================================

Notice that under Unix a program cannot change the current
workdirectory. That is why wcd generates a shellscript
($HOME/bin/wcd.go) which must be executed in the current shell via a
function or an alias. The following examples show the installation
on a system where you don't have root privileges. Read the manpage
of the shell you are using on how to define a function or an alias.

If the environment variable WCDHOME is set wcd will use
WCDHOME instead of HOME.

......................................................................

Korn Shell (ksh):

1)

 copy wcd.exe to your $HOME/bin directory.

2)

 Add the following function to your $HOME/.kshrc
 file.

function wcd
{
   $HOME/bin/wcd.exe $*
   . $HOME/bin/wcd.go
}

Start a new Korn Shell

......................................................................

C Shell (csh):

1)

 copy wcd.exe to your $HOME/bin directory.

2)

 Add the following alias to your $HOME/.cshrc
 file.

alias wcd "$HOME/bin/wcd.exe \!* ; source $HOME/bin/wcd.go"

Start a new C Shell

......................................................................

Bourne Again Shell (bash):

1)

 copy wcd.exe to your $HOME/bin directory.

2)

 Add the following function to your $HOME/.bashrc
 file.

function wcd
{
   $HOME/bin/wcd.exe $*
   source $HOME/bin/wcd.go
}

Start a new bash

......................................................................
Z shell (zsh):

 1)

 copy wcd.exe to your $HOME/bin directory.

2)
 Add the following function to your $HOME/.zshenv
 file.

function wcd
{
  $HOME/bin/wcd.exe $*
  . $HOME/bin/wcd.go
}

Start a new zsh


......................................................................

The executable can be shared among all users. The wcd.go file
is personal:

function wcd
{
   /usr/local/bin/wcd.exe $*
   source $HOME/bin/wcd.go
}

......................................................................

The first time wcd is used the program will scan your
disk and build a .treedata.wcd file in your HOME-directory.
The .treedata.wcd file can be updated by feeding the -s option.

wcd.exe will generate each time a script wcd.go in your
$HOME/bin directory which must be executed via the function.

......................................................................

Adding extra directories not on your own account:

You can add an extra directory-list in the file $HOME/.extra.wcd


Example:

/home/piet/vhdl
/home/piet/project_a/c/src
/home/jan/perl

See also options -e and -E

......................................................................

It is possible to turn off the automatic expanding of arguments
(globbing) of the unix shell.

In the C shell (csh) you can use 'set noglob' to turn it off, and
'unset noglob' to turn it on again. You could make the following
wcd alias:

alias wcd "set noglob; $HOME/bin/wcd.exe \!* ; unset noglob; source $HOME/bin/wcd.go"

In the Korn Shell and the Bash the globbing can be turned off and
on with 'set -o noglob' and 'set +o noglob' (or 'set -f' and 'set +f').
But the function

function wcd
{
 set -o noglob
 /home/waterlan/bin/wcd.exe $*
 set +o noglob
 . $HOME/bin/wcd.go
}

does not have the desired effect. Can somebody help?

======================================================================
= 6 BUGS                                                             =
======================================================================

1. Unix and DOS 32 bit version:
   - Strange behaviour when the argument has a wildcard and matches a
     file or directory in the current directory.

  This is the result of the automatic expanding of arguments (globbing).
  The work-around is to "doublequote" the argument (in some shells).
  See also the section Unix installation.

......................................................................

If you think you found a bug do the following.
First check that you have the latest version of WCD. The bug
may already have been solved.
If it has not been solved than send me an e-mail.
Describe the bug and tell me
what version of WCD you use and under what operating system.
Addresses are at the end of this file.

Also ideas to improve wcd are welcome.

======================================================================
= 7 Source code                                                      =
======================================================================

The source code for DOS 16 bit, win32 console, Cygwin and Unix is identical.

The 16 bit DOS version and the win32 console version have been
compiled with Borland C/C++ 4.02.

Win32 versions can be compiled with Cygwin and Mingw32.

Wcd for Unix compiles with gcc and with the native system
C compilers such as HP-UX cc or SunOS cc.

The 32 bit dos versions are compiled with DJGPP and have
a different 'wcd.c' file and do not use DOSDIR.

DJGPP is a project to port the GNU C/C++ compiler to DOS.
It includes a shell (bash) and many ported unix utilities.
For more information about DJGPP take a look at this
internet homepage:   http://www.delorie.com/djgpp/

Cygwin is a project to port the GNU C/C++ compiler to Windows.
It includes a shell (bash) and many ported unix utilities.
For more information about Cygwin take a look at this
internet homepage:   http://www.cygnus.com/misc/gnu-win32/

Mingw32 is a project to port GNU C/C++ compiler to Windows.
internet hompage: http://www.xraylith.wisc.edu/~khan/software/gnu-win32/index.html

======================================================================
= 8 Modification history                                             =
======================================================================

   V1.0 beta Oct-1996  Original version.
   V1.0      Nov 14 1996. Always let the user choose
             in case of multiple match.
   V1.2c     Feb 11 1997.
             Many bugs have been solved.
   V1.3a     May 2 1997
             The Unix version can now also deal with
             directory names with spaces, dollars,
             backslashes, single quotes and double quotes.
   V1.4      Jun 18 1997
             Search with subdirectory definition
             (Eg. wcd adir1/adir2).

   V1.4      Aug 18 1997
        Added 32 bit DOS version. Changed sourcecode
        for DJGPP compiler.
        This version is faster but needs a 80386 CPU
        or higher.

   V1.4b     Sep 12 1997
        Small bugfix perfect match list.
        Quiet option added.

   V1.5      Oct 28 1997
             More options: -Q -f -u
        Dos versions can work on read-only drives if
        TEMP environment variable is set.
        C shell support.

   V1.5a     Nov 10 1997
             Bugfix dos32 bit version long dir names support
        in Windows 95 dos-box

   V1.6      Nov 11 1997
        Added Unix bash support
        Added a DOS bash version

   V1.7e     Dec 9 1997
        - Add directories without scanning.
        - Improved choosing from a list.
        - quiet option default ON in DOS versions.
        - changed MAX_LIST and MAX_WILD_LIST to 22
        - no drive in treedata (DOS)
        - direct CD mode

   V1.8.0    Feb 9 1998
        - Change drive and dir in one go (Dos).
        - Ban paths
        - Alias directories

   V1.8.3    Feb 26 1998
        - Bugfix. Dos version crashed on read-only drive if
          TEMP environment variable was not set.

  V2.0.0     Mar 9 1998
        - Changed distribution conditions to GNU General
          Public Licence.

  V2.0.4   Mar 12 1998
         - More scanning options: -S <dir>, -A <dir>, -E <dir>
         - check for double matches
         - source Ansi C compliant
         - ending '/' allowed in database

   2.0.5 - Bug solved. Endless loop on 64 bit Unix system (SGI IRIX64)

  V2.1.0   Jun 18 1998
      - Directory stack
      - Datastructures with dynamic memory allocation
      - ignore case option (unix)
      - go $HOME when no directory is given
      - man page

        Jun 29 1998
   2.1.1   - Bug fix: alias, ban and stack could not deal with
                  paths with spaces.
   2.1.2   - Bug fix: backspace in long matchlist (DOS)
   2.1.3   - Bug fix: command line parsing (DOS 32 bit)
   2.1.4   - quiet option default ON (Unix)

        Jul 15 1998
   2.1.5   - Sort match lists

   2.1.6  Jul 22 1998
         - removed "dangerous" gets() function.
        (In the way gets() was used in wcd it was
       not dangerous. gets() has been removed to
       avoid warnings some compilers or systems give
       (eg. gcc or FreeBSD).)

   2.1.7  Sep 2 1998
         - bug fix: give warning if cannot change to directory
       that is in database.

   2.2.0 Jan 29 1999
         - changed name to Wherever Change Directory
         - automaticly remove directories from treedata to which cannot be changed.
         - links support (unix only)
         - restore text screen after list (dos only)
         new options:
          -m       make directory and add to treedata file
          -M       make directory and add to extra treedata file
          -r       remove directory and remove from treedata
          -rmtree  remove directory recursive and remove from treedata
          -n  +n   use relative treefile
          +S       make relative treefile
          -t       don't skip mountstring before /home (unix only)
         changed options: -u, +u, -f, +f
         - some minor changes.

2.2.1 Jan 29 1999

     bugfix +S,-n,+n options on directory /

2.2.2 Feb 24 1999

     bugfix on automounted directories (Unix).

2.2.3 Mar 21 1999

     -All versions can read DOS and UNIX textfiles.
     -INSTALLATION section in manpage

2.2.4 Apr 14 1999

     -DOS versions can use environment variable HOME
     -pathfixing
     -options -S, +S, -A, -E, -m, -M, -r, and -rmtree can be repeated.

2.2.5 Apr 15 1999
     - bugfix pathfixing

2.2.6 May 12 1999
     new options:
     -aa   Add current and all parent paths to treedata
     -ee   add current and all parent paths to Extra treedata

2.2.7 Sep 30 1999
     - environment variable WCDHOME overrides HOME.
     - improved choosing from list (DOS versions).
     - improved manpage
     - mode bits for new directory created with -m option
       are now only defined by umask.

2.2.8 Nov 19 1999
     - option -i now also for dos versions
     - new option: +i  regard case
     - minor update interface dos versions
     - win32 console port

2.2.9 Jan 16 2000
     - new option -w: Wild matching only.
     - made wcd compile with MINGW32 compiler.
     - win32 version for Amol Deshpande's Win32 port
       of zsh (ftp://ftp.blarg.net/users/amol/zsh).
     - bugfix: read long paths from stack file (dos 32 bit)

======================================================================
= 9 Copyright                                                        =
======================================================================

Copyright (C) 1997-2000 Erwin Waterlander

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

.......................................................................

Datastructures with dynamic memory allocation were created
with Ondrej Popp's C3PO ( Compiler Compiler Compiler Popp Ondrej ).

e-mail: ondrej@geocities.com
.......................................................................

For the DOS-16-bit and the Unix version I use DOSDIR. Only the parts
of DOSDIR that are distributed under GNU General Public Licence are
used in WCD.

DOSDIR: A Portable DOS/UNIX/VMS Directory Interface

DOSDIR minimizes the OS-specific directory access code for applications
allowing programmers to concentrate on the application itself and not
on the low-level directory and file structure.  DOSDIR applications
will run on their native operating systems with the appropriate file
syntax and handling, which is expected for that platform.

Copyright (C) 1994 Jason Mathews.

        Jason Mathews
        The MITRE Coporation
   202 Burlington Road
   Bedford, MA 01730-1420

   Email: mathews@mitre.org, mathews@computer.org

.......................................................................

wcd_fixpath() is a modified version of
_fixpath()  Copyright (C) 1995-1996 DJ Delorie, see COPYING.DJ for details

_fixpath() is a library function of libc for DJGPP.
See also http://www.delorie.com/djgpp/

.......................................................................

I used the regular matching algorithm, recmatch(), of Info-Zip's
unzip program.

recmatch() was written by Mark Adler.

Copyright (C) 1990-1992 Mark Adler, Richard B. Wales, Jean-loup Gailly,
Kai Uwe Rommel and Igor Mandrichenko.

Mark Adler (original Zip author; UnZip decompression; writer of
recmatch() ) and Greg Roelofs (former UnZip maintainer/co-author)
have given permission to me to distribute recmatch() (match.c,match.h)
under the GNU General Public Licence conditions as long as there's
some sort of comment included that indicates it came from Info-ZIP's
UnZip/Zip and was written by Mark Adler.

   Info-ZIP's home WWW site is listed on Yahoo and is at:

   http://www.cdrom.com/pub/infozip/

   e-mail : Zip-Bugs@lists.wku.edu

......................................................................

Both DOSDIR and UNZIP are among others distributed by the Simtel.Net(sm)
world-wide network.

DOSDIR can also be download from my own homepage
http://www.xs4all.nl/~waterlan/


======================================================================
= 10 Acknowledgements                                                =
======================================================================

Thanks to the following people for giving ideas and/or
reporting/solving bugs:

Leo Sevat
Paul Lippens
Ondrej Popp
Ad Vaassen
Michael Magan
Christopher Drexler
Richard Tietjen
Howard Schwartz
Ajit J. Thakkar


Thanks to the following people for using their Free software:

Ondrej Popp,     C3PO
Jason Mathews,   dosdir
Mark Adler,      recmatch()
DJ Delorie       _fixpath()

======================================================================
= 11 Contact / Download new versions                                 =
======================================================================

I can be contacted via E-mail addresses:
          waterlan@xs4all.nl
      or  waterlan@natlab.research.philips.com

normal mail:
Address : Jongemastate 125
          5655 HS Eindhoven, The Netherlands

The latest version of WCD, executables and sources, can be downloaded from
this internet-page:

http://www.xs4all.nl/~waterlan/


Wcd is also distributed by Simtel.Net:
http://www.simtel.net/pub/simtelnet/msdos/dirutl/
ftp://ftp.simtel.net/pub/simtelnet/msdos/dirutl/

and Garbo:
http://garbo.uwasa.fi/pc/dirutil/
ftp://garbo.uwasa.fi/pc/dirutil/

and Metalab (was SunSite):
ftp://metalab.unc.edu/pub/Linux/utils/shell/

Erwin Waterlander
