/*
 1994.12.30 : SCA   : V0.00  : First code
 1995.01.03 : SCA   : V0.01  : ICM-Scanner
 1995.01.10 : SCA   : V0.02  : Logfile
 .. different changes...
 1995.04.04 : SCA   : V0.05  : In GRP-Files swapped EXE-Dir & Working-Dir
 1995.04.06 : SCA   : V0.06  : Only replace-CMD'files handled correctly
                             : fclose missing in DC-GRP-File
                             : Added full online-help
 1995.04.10 : SCA   :        : Leading blanks in ICM & CMD-Files ignored
 1995.05.05 : SCA   : V2.00  : First public release
 1995.05.11 : SCA   : V2.01  : VESA condition added
                             : IF ENV ==  !=
                             : IFENV           added support for "  blanks "
                             : IFNENV          
                             : IFENV has always tested for NOT EQUAL...
                             : String == '==' instead of String == "=="
 1995.05.17 : SCA   : V2.02  : In environment subst. = used instead of ==
 1995.05.23 : SCA   : V2.03  : Corrected Online help
 1995.05.29 : SCA   : V2.04  : When no INI file exists, a new one is created
                             : (Previous versions just hang)
                             : Terminate Online help with ESC
                             : Compiled for 8086 processors
                             : / and > commands now works as excpected
 1995.06.01 : SCA   : V2.05  : Added ININI & INFILE commands
 1995.06.07 : SCA   : V2.06  : r and R commands now work again
                             : Keys can be enclosed in "...."
 1995.06.16 : SCA   : V2.07  : NET.CFG support added
 1995.06.20 : SCA   : V2.08  : not existing INI files are not created when not specified
 1995.06.24 : SCA   : V2.09  : IF DEVICE == != spport added
 1995.07.07 : SCA   : V2.10  : Oneline-ifs now handled correctly (trailing 0x00 removed)
 1995.07.07 : SCA   : V2.11  : /e=<char> switch and =+ command added
 1995.07.12 : SCA   : V2.12  : SETENV implemented
 1995.07.17 : SCA   : V2.13  : .\ added in front of filenames with no path
 1995.07.19 : SCA   : V2.14  : Nested IF in CMD files
                             : IF ININI SECTION "[Control Panel]" now works
 1995.07.27 : SCA   : V2.15  : IF ININI CONTAINS implemented
                             : Nested IF in ICM files
 1995.07.28 : SCA   : V2.16  : Stack is now 33kB instead of 16kB
                             : Corrected a IF_nesting error when using old-style if's
 1995.08.02 : SCA   : V2.17  : Corrected the setting of environment variables
                             : - The line in the INI-file is now no longer deleted
                             : - The value of the environment value is no longer 
                             :   converted into upper case
                             : +[Netware DOS Requester]Preferred Fileserver = NW312 now works as
                             : it should, when the key not already exists.
 1995.08.04 : SCA   : V2.18  : A problem with adding new keys to a section, when the next section
                             : is a commented one are now solved.
                             : The logfile now contains the version,date and 
                             : used commandline parameters. (Not all problem-reports had 
                             : mentioned the version used.....)
                             : Added a remark in README.WRI concering the Netware SEARCH modes.
                             : Best resultst with set to 2 !!!!! (Default is 1)
 1995.08.20 : SCA   : V2.19a : r command removed trailing 0C
                             : New Stringhandling in RTrim, AllTrim and LTrim
                             : New compiler Watcom C++ V10.5 (previous 10.0b)
                             : Both together improved speed up to 40%
                             : Size reduced due to new compiler/linker by 15%
                             : IF commands in ICM files works now as they should (previous nesting errors)
 1995.08.21 : SCA   : V2.19b : Nested IF's now work as they should
                             : { and } can now be used instead of < and > commands
                             : Missing CMD and ICM files are now handled more gracefull
 1995.08.22 : SCA   : V2.19  : When decompiling -> recompiling a GRP file, and reloading it,
                             : then new GRP file whas 1 byte larger !!!!! Now corrected.
 1995.08.24 : SCA   : V2.20a : When using the /g option, a backslash is always added to the TEMP-directory
 1995.08.26 : SCA   : V2.20  : When using a ICM file, and the r command whas used before the last CMD file,
                             : then MTWIN crashed due to a invalid pointer (Linked List of replaces !!)
                             : New OS/2 release
 1995.09.22 : SCA   : V2.20  : New WIN95 and DLL release
                             : Corrected a problem in RTRIM function
 1995.10.03 : SCA   : V2.21b : Multiple CMD's per INI line are now supported
 1995.10.07 : SCA   : V2.21c : New filehandling, original INI file is left untouched, when
                             : no modification is made
                             : > and / commands can now be used for the same INI line
                             : /s0-/s3 implemented
                             : /v6 now protocols only the changes made to a INI file
                             : /w2 implemented for BAT files
                             : corrected a problem with the < command
 1995.10.10 : SCA   : V2.21d : Added the missing IconTitle in /s2 and /s3
                             : Corrected a problem in the InsideD command, when a substring
                             : is already contained in the searched expression.
 1995.10.16 : SCA   : V2.21  : Public release
 1995.10.20 : SCA   : V2.21e : All Versions with greater stack released
 1995.10.22 : SCA   : V2.22a : () .AND. and .OR. implemented
                             : A single backslash is no longer ignored
                             : The leading L in all logfiles is now removed !!!!!!
                             : uncomment command now works fine for single lines...
                             : .NOT. implemented
                             : DOS version now supports VESA & SET ENV again __MSDOS__ undefined
                             : .AND. -> AND .OR. -> OR .NOT. -> NOT renamed
 1995.11.10 : SCA   : V2.22b : Wildcards for INI&GRP files implemented                              
 1995.12.11 : SCA   : V2.22c : System variables implemented
                             : _NW_LOGINNAME _NW_LOGIN_TIME _NW_CONNECTION _NW_OBJID
                             : _NW_NICADDR _NW_INETADDR (_NW_FULLNAME not currently working)
                             : Beta release
 1995.12.12 : SCA   : V2.22d : GetKeyVal now returns the last (blank-delimitted) token, when processing
                             : NET.CFG files, and no = character is found in the original line (INI files)
                             : The same is now true for CMD files
 1995.12.19 : SCA   : V2.22e : $_ININAME$, $_INIPATH$, $_CMDNAME$ and $_CMDPATH$ implemented
                             : /n=<filename> implemented
                             : $_NW_FULLNAME$ implemented
                             : $_INIVALUE[..]...$ implemented
 1996.01.02 : SCA   : V2.22f : $...$ := is now only processed, when DoIt == TRUE (In IF - ELSE )
                             : Leading blanks in $..$ := lines are now accepted
                             : IF $VARIABLE$ == $VARIABLE$ is now working
                             : Implemented MTWIN16.EXE (16-Bit Windows application)
                             : Implemented O,W and E commands
                             : The S command is now executed immediatly, so that they can
                             : be used for CMD & $...$ processing (Look at OUTFILE.CMD)
 1996.01.04 : SCA   : V2.22g : EE command added
                             : $_FILEINIVALUE[..]...$ implemented
                             : $_NWOBJID$ returns now the correct value (NWLongSwap)
                             : %..% := can now be used to assign values to env-variables
                             : Full Support for %..% and $...$ in ICM files added
                             : Changed Version-info in Windows 16 & 32 versions
 1996.01.15 : SCA   : V2.22h : @..@ variables implemented, to allow nesting
                             : Variables are now no longer case-sensitive
                             : $_NWOBJID$ now works for the supervisor too
                             : Use \$ \% and \@ to insert these characters in your CMD files
                             : The + commands are now added in the way they are written down
                             : in the CMD file. - commands are still executed in front of +
 1996.01.20 : SCA   : V2.22i : use \\ to insert a single \ (especially usefull in front 
                             : of % $ and @ characters 
 1996.01.23 : SCA   : V2.22j : Corrected a problem with the \\ and \\$ variables
                             : Inside now compares all characters. (Last charater whas ignored)
                             : Added -t commandline switch
                             : Added ; SYNTAX=2.22   and ; SYNTAX<2.22
 1996.02.09 : SCA   : V2.22k : Removed all \ and -t and SYNTAX=... stuff
                             : Implemented variables as $(....) and environment as $(%...)
                             : Changed the GETxxxTOKEN to use all either GetToken or GetSToken
                             : User-defined Variables are now always in upper-case
                             : Corrected a problem with ((...) OR ...)
                             : Added Netware support for W95 version 
 1996.02.20 : SCA   : V2.50  : Public release
 1996.02.27 : SCA   : V2.51  : Win16 supports now the execute command
                             : Win32 version compiled without netware support
                             : NLM version implemented
                             : $(_MAXNUMKEY) and $(_FILEMAXNUMKEY) implemented
 1996.03.25 : SCA   : V2.52  : $(_FILEINIVALUE) and $(_INIVALUE) get now the correct size
                             : Wildcards now supported for filenames too
                             : The first character can now be a wildcard too
 1996.04.25                  : W95 version supports now IF MEMBER OF (wrong compilerswitch)
                             : W16 & W32 versions now without static links to NWCALLS.DLL
                             : so we don't need different versions for Netware & without Netware
 1996.04.26                  : OS/2 version now loads NWCALLS.DLL on runtime, so we no
                             : longer need two versions
                             : Netware calls need "Generate Stack Frame as needed" to be enabled
 1996.05.06 : SCA   : V2.52c : Betaversion for registry
 1996.05.08 : SCA   : V3.00a : WNLF and WLF implemented
                             : Corrected a problem with NWReadPropertyValue (for NWFULLNAME)
                             : Betaversion released
 1996.05.13 : SCA   : V3.00b : Win16 version correct problems with _NW_OBJID _NW_INETADDR
 1996.06.01 : SCA   : V3.01  : Win32 version correct hex: and upper byte in RCM files
                             : added support for dword: values

*/
