- doc/en/hashes.txt
- doc/en/rdddb.txt
* .gitattributes
* contrib/3rd/sqlite3/sqlite3.hbp
* contrib/hbbz2/3rd/bz2/bz2.hbp
* contrib/hbexpat/3rd/expat/expat.hbp
* contrib/hbfimage/hbfimage.hbp
* contrib/hbhpdf/3rd/libhpdf/libhpdf.hbp
* contrib/hblzf/3rd/liblzf/lzf.hbp
* contrib/hbmxml/3rd/minixml/mxml.hbp
* contrib/hbmzip/3rd/minizip/minizip.hbp
* contrib/hbodbc/hbodbc.hbp
* contrib/hbtinymt/3rd/tinymt/tinymt.hbp
* contrib/hbxdiff/3rd/libxdiff/xdiff.hbp
* contrib/sddsqlt3/tests/test.prg
* ChangeLog.txt
* doc/Makefile
* doc/oldnews.txt
* extras/ps32/readme.txt
* extras/superlib/readme.txt
* src/3rd/jpeg/Makefile
* src/3rd/pcre/Makefile
* src/3rd/png/Makefile
* src/3rd/tiff/Makefile
* src/3rd/zlib/Makefile
+ contrib/hbsms/DEPRECATED.txt
+ contrib/hbtpathy/DEPRECATED.txt
+ contrib/xhb/WARNING.txt
* contrib/3rd/sqlite3/sqlite3.dif -> contrib/3rd/sqlite3/sqlite3.diff
* contrib/hbbz2/3rd/bz2/bz2.dif -> contrib/hbbz2/3rd/bz2/bz2.diff
* contrib/hbexpat/3rd/expat/expat.dif -> contrib/hbexpat/3rd/expat/expat.diff
* contrib/hbhpdf/3rd/libhpdf/libhpdf.dif -> contrib/hbhpdf/3rd/libhpdf/libhpdf.diff
* contrib/hblzf/3rd/liblzf/liblzf.dif -> contrib/hblzf/3rd/liblzf/liblzf.diff
* contrib/hbmxml/3rd/minixml/minixml.dif -> contrib/hbmxml/3rd/minixml/minixml.diff
* contrib/hbmzip/3rd/minizip/minizip.dif -> contrib/hbmzip/3rd/minizip/minizip.diff
* contrib/hbtinymt/3rd/tinymt/tinymt.dif -> contrib/hbtinymt/3rd/tinymt/tinymt.diff
* contrib/hbxdiff/3rd/libxdiff/libxdiff.dif -> contrib/hbxdiff/3rd/libxdiff/xdiff.diff
* contrib/sddsqlt3/tests/test.sq3 -> contrib/sddsqlt3/tests/test.sqlite3
* extras/dbu/dbu52.dif -> extras/dbu/dbu52.patch
* extras/dbu/dbu53.dif -> extras/dbu/dbu53.patch
* extras/ps32/ps32.dif -> extras/ps32/ps32.patch
* extras/rl/rl.dif -> extras/rl/rl.patch
* extras/superlib/superlib.dif -> extras/superlib/superlib.patch
* extras/template/readme.txt -> extras/template/README.md
* src/3rd/hbdossrl/README -> src/3rd/hbdossrl/README.txt
* src/3rd/jpeg/jpeg.dif -> src/3rd/jpeg/jpeg.diff
* src/3rd/pcre/pcre.dif -> src/3rd/pcre/pcre.diff
* src/3rd/png/png.dif -> src/3rd/png/png.diff
* src/3rd/tiff/tiff.dif -> src/3rd/tiff/tiff.diff
* src/3rd/zlib/zlib.dif -> src/3rd/zlib/zlib.diff
* tests/hbpptest/_pp_test.prg -> tests/hbpp/_pp_test.prg
* tests/hbpptest/compare.hb -> tests/hbpp/compare.hb
* tests/hbpptest/hbpptest.hbp -> tests/hbpp/hbpptest.hbp
* tests/hbpptest/hbpptest.prg -> tests/hbpp/hbpptest.prg
* tests/tflock.prg -> tests/flock.prg
* contrib/hbfimage/fi_wrp.c -> contrib/hbfimage/core.c
* contrib/hbodbc/browodbc.prg -> contrib/hbodbc/browse.prg
* doc/cmdline.txt -> doc/cmdline.md
* extras/dbu/readme.txt -> extras/dbu/README.md
* extras/rl/readme.txt -> extras/rl/README.md
* some file renames synced with 3.4 fork, plus the content of
some of them. Some new text files added as well.
Note, 3rd party code rediffing won't work anymore on 8.3
filesystems.
99 lines
3.1 KiB
Markdown
99 lines
3.1 KiB
Markdown
# 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
|
|
`#pragma`s.
|
|
|
|
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 cannot 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 command-line the two style can be used together:
|
|
```
|
|
harbour -wnes2 /gc0/q0 -iC:\hb\include
|
|
```
|
|
|
|
Exceptions:
|
|
|
|
- Handling of the `/CREDIT` undocumented switch on Harbour command-line
|
|
is unusual, check the current code for this.
|
|
|
|
- `CLIPPER`, `HARBOUR` envvars and Harbour application command-line
|
|
parsing is a different beast, see `src/vm/cmdarg.c` for a NOTE.
|
|
|
|
Just some examples for the various accepted forms:
|
|
|
|
```
|
|
//F20 == /F20 == F20 == F:20 == F20X
|
|
F20//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
|