WARNING: If your source files are bigger than 8-10k and you only have
         8 meg of memory, this script will take a *very* long time
	 to complete (on the order of an hour).

This directory contains a script file which will aid in porting DR5
sources to DR6.  The script converts old style constants to new style
(i.e. with a prepended B_) and converts the names of functions that
have changed.

The script file will go through all the sources in a directory and
filter them with sed (a BeBox sed executable is also included).  Files
that end in *.cpp, *.c++, *.cxx, *.c, or *.h are considered source
files.  

The script makes backup copies of the sources, so there is no need to 
worry about it trashing your sources.  The backup versions of the
files have a ".save" appended to their name.

To start with, these files should have been extracted into the
directory:

     /boot/be/Tools/dr6convert

as that is where the script expects to find the sed executable 
and the sed filter files.

To run the script you need to open a shell window (run the Terminal
app) and cd to the directory where your sources are.  Once you are 
there, run the following command:

     /boot/be/Tools/dr6convert/dr6convert

and it will start processing all of the source files in your
directory.

The script will convert everything it knows about, however some
functions are totally gone in DR6 (notably the BApplication member,
IsQuitting()).  Handling those cases is more delicate and will have to
be done on a one-by-one basis.  Luckily IsQuitting() is an easy case
most of the time, as all you have to do is delete the call.

Thanks go to William Adams for porting version 2.05 of sed (which then
prompted me to go get version 3.0) and to Don here at Be for the
excellent sed script.  The sed executable (and source archive) have
been placed in the directory /boot/be/Tools/dr6convert as a temporary
place.  Future releases of the Be operating system will have sed (and
various other GNU shell/text utilities) in a more standard place.

Feel free to send comments and suggestions for enhancements.  BTW, if
you know of a better way to do the conversion of ~600 different
strings, I'd love to hear it.


Happy hacking,
--dominic (dbg@be.com)
