* contrib/examples/guestbk/guestbk.ini
* contrib/examples/guestbk/testcgi.prg
* contrib/examples/hscript/hscript.prg
* contrib/examples/pp/hbppdef.h
* contrib/examples/pp/hbpptbl.c
* contrib/gtwvg/tests/demowvg.prg
* contrib/gtwvg/wvgclass.prg
* contrib/hbapollo/tests/apollo.prg
* contrib/hbgd/ChangeLog
* contrib/hbgt/doc/gendoc.bat
* contrib/hbmisc/doc/gendoc.bat
* contrib/hbvpdf/hbvpdf.prg
* contrib/hbvpdf/hbvpdft.prg
* contrib/hbwhat32/_winclpb.c
* contrib/hbwhat32/_windate.c
* contrib/hbwhat32/_windc.c
* contrib/hbwhat32/_windir.c
* contrib/hbwhat32/_windraw.c
* contrib/hbwhat32/_wingdi.c
* contrib/hbwhat32/_winmisc.c
* contrib/hbwhat32/_winpen.c
* contrib/hbwhat32/_winprn.c
* contrib/hbwhat32/_winrect.c
* contrib/hbwhat32/_winrgn.c
* contrib/hbwhat32/_winsock.c
* contrib/hbwhat32/_wintbar.c
* contrib/hbwhat32/import.ch
* contrib/hbwhat32/sqltypes.ch
* contrib/hbwhat32/windebug.prg
* contrib/hbwhat32/winerror.prg
* contrib/hbwhat32/winini.prg
* contrib/hbwhat32/winrbar.prg
* contrib/hbwhat32/winstruc.ch
* contrib/hbwhat32/wintbar.prg
* contrib/hbziparch/hbziparc.c
* contrib/rddads/doc/gendoc.bat
* doc/cmdline.txt
* doc/dirstruc.txt
* doc/en/cmdline.txt
* doc/en/dbstrux.txt
* doc/en/dir.txt
* doc/en/file.txt
* doc/en/rddord.txt
* doc/es/dbstrux.txt
* doc/es/file.txt
* doc/es/hbpplib.txt
* doc/howtomak.txt
* doc/hrb_faq.txt
* doc/windll.txt
* include/dbinfo.ch
* source/debug/dbghelp.prg
* source/vm/classes.c
* source/vm/hvm.c
* tests/keywords.ch
* tests/output.prg
* tests/statics1.prg
* tests/statics2.prg
* tests/test_all.prg
* tests/testcgi.prg
* tests/testpre.prg
* tests/testrdd2.prg
* utils/hbmake/hbmake.prg
* utils/hbmake/hbmutils.prg
! Some filename casing related fixes, cleanups.
* Some non-ASCII drawing chars in comments changed to ASCII ones.
95 lines
2.8 KiB
Plaintext
95 lines
2.8 KiB
Plaintext
/*
|
|
* $Id$
|
|
*/
|
|
|
|
Harbour switch handling spec
|
|
============================
|
|
|
|
This spec goes for CLIPPERCMD, HARBOURCMD, Harbour
|
|
compiler and #pragma directives in the source code.
|
|
|
|
The command line always overrides the envvar.
|
|
|
|
Note that some switches are not accepted in envvar,
|
|
some others in #pragmas.
|
|
|
|
First the parser should start to step through
|
|
all the tokens in the string separated by
|
|
whitespace. (or just walk through all argv[])
|
|
|
|
1.) If the token begins with "-", it
|
|
should be treated as a new style switch.
|
|
|
|
One or more switch characters can follow
|
|
this. The "-" sign inside the token
|
|
will turn off the switch.
|
|
|
|
If the switch has an argument all the following
|
|
characters are treated as part of the argument.
|
|
|
|
The "/" sign has no special meaning here.
|
|
|
|
-wn ( W N )
|
|
-w-n ( !W N )
|
|
-wi/harbour/include/ ( W I=/harbour/include/ )
|
|
-wi/harbour/include/n ( W I=/harbour/include/n )
|
|
-wes0n ( W ES=0 N )
|
|
-wen ( W [invalid switch: e] N )
|
|
-wesn ( W ES=default(0) N )
|
|
-wses ( W S ES=default(0) )
|
|
-wess ( W ES=default(0) S )
|
|
- ( [invalid switch] )
|
|
-w-n-p ( !W !N P )
|
|
-w-n-p- ( !W !N !P )
|
|
|
|
-w- -w -w- ( finally: !W )
|
|
|
|
2.) If the token begins with "/", it
|
|
should be treated as a compatibility style switch.
|
|
|
|
The parser scans the token for the next "/" sign or EOS
|
|
and treats the resulting string as one switch.
|
|
|
|
This means that a switch with an argument containing
|
|
"/" sign has some limitations. This may be solved by
|
|
allowing the usage of quote characters. This is mostly
|
|
a problem on systems which use "/" as path separator.
|
|
|
|
The "-" sign has no special meaning here, it can't be
|
|
used to disable a switch.
|
|
|
|
/w/n ( W N )
|
|
/wo/n ( [invalid switch: wo] N )
|
|
/ihello/world/ ( I=hello [invalid switch: world] [invalid switch: /] )
|
|
/i"hello/world/"/w ( I=hello/world/ W )
|
|
/ihello\world\ ( I=hello\world\ )
|
|
|
|
3.) If the token begins with anything else it should
|
|
be skipped.
|
|
|
|
The Harbour switches are always case insensitive.
|
|
|
|
In the Harbour commandline the two style can be used together:
|
|
HARBOUR -wnes2 /gc0/q0 -ic:\hello
|
|
|
|
Exceptions:
|
|
|
|
- Handlig of the /CREDIT undocumented switch
|
|
on Harbour command line is unusual, check the current code
|
|
for this.
|
|
|
|
- The CLIPPER, HARBOUR and Harbour application
|
|
command line parsing is a different beast,
|
|
see cmdarg.c for a NOTE.
|
|
|
|
Just some examples for the various accepted forms:
|
|
//F20 == /F20 == F20 == F:20 == F20X
|
|
//TMPPATH:C:\HELLO
|
|
F20//TMPPATH:/TEMP///F:30000000 NOIDLE
|
|
F0NOIDLEX10
|
|
SQUAWKNOIDLE
|
|
|
|
"//" should always be used on the command line.
|
|
|
|
Viktor Szakats <viktor.szakats@syenar.hu>
|