* bin/check.hb
* config/*/*.mk
* contrib/gtwvg/wvgwing.c
* contrib/hbcomm/comm.prg
* contrib/hbfbird/tfirebrd.prg
* contrib/hbfimage/fi_wrp.c
* contrib/hbformat/hbfmtcls.prg
* contrib/hbformat/utils/hbformat.prg
* contrib/hbhttpd/core.prg
* contrib/hbnetio/utils/hbnetio/hbnetio.prg
* contrib/hbnetio/utils/hbnetio/netiomgm.hb
* contrib/hbsqlit3/hdbc.prg
* contrib/hbwin/win_bmp.c
* contrib/xhb/htmutil.prg
* contrib/xhb/thtm.prg
* contrib/xhb/xhbarr.c
* contrib/xhb/xhbtedit.prg
* ChangeLog.txt
* debian/control
* debian/copyright
* doc/*.txt
* LICENSE.txt
* package/harbour.spec
* README.md
* src/compiler/hbusage.c
* src/pp/hbpp.c
* src/rtl/memoedit.prg
* src/rtl/teditor.prg
* src/rtl/tget.prg
* src/rtl/version.c
* utils/hbi18n/hbi18n.prg
* utils/hbmk2/hbmk2.prg
* utils/hbmk2/po/hbmk2.hu.po
* utils/hbtest/hbtest.prg
* sync with 3.4 fork (no change in functionality)
CC3 -> CC4 license, copyright banners, some strings, minor
code changes, doc folder, TOFIX -> FIXME
99 lines
3.0 KiB
Plaintext
99 lines
3.0 KiB
Plaintext
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.
|
|
|
|
Switch Resulting options
|
|
|
|
-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.
|
|
|
|
Switch Resulting options
|
|
|
|
/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:
|
|
|
|
- Handling 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.
|
|
|
|
|
|
[ Copyright (c) 1999-2009 Viktor Szakats (vszakats.net/harbour)
|
|
Licensed under Creative Commons Attribution-ShareAlike 4.0:
|
|
<https://creativecommons.org/licenses/by-sa/4.0/>
|
|
See LICENSE.txt ]
|