I propose to change all code in linuxCNC requiring ini variables as follows:

- any code needing to access ini file variables is to investigate the 
environment for the INI_FILE_NAME variable
- drop any use of '-ini' from programs 
- if needed, run said programs with  'INI_FILE_NAME=<pathname> command'

Rationale:

- there is a duplicity of mechanisms to start with - both getenv() and '-ini' 
are used. There is no discernible justification to have both.
- the '-ini' syntax (note single dash) is incompatible with every single option 
parsing library code ever written since Alan Turing.

The numbers:
- in total of 18 files are affected, 3 of which are manpages


Motivation: http://www.despair.com/tradition.html

Timing: if this proposal isnt shot down for good reasons, I encourage this 
(minor) work be picked up by somebody other than me. If this doesnt happen, I 
will do it myself as of July.

- Michael







mah@ubuntu-10:~/emc2-rtos/configs$ egrep -re "-ini[\s\'\"]" ..

../bin/linuxcnctop:if len(sys.argv) > 1 and sys.argv[1] == '-ini':
../bin/touchy:        if len(sys.argv) > 2 and sys.argv[1] == '-ini':
../bin/axis:if sys.argv[1] != "-ini":
../bin/debuglevel:if len(sys.argv) > 1 and sys.argv[1] == '-ini':
../docs/man/man1/haltcl.1:\fB-ini\fR \fIinifile\fR -- declining usage, use 
\fB-i\fR \fIinifile\fR
../docs/man/man1/vfs11_vfd.1:.IP -I\ --ini\ <inifilename>
../docs/man/man1/axis.1:\fI-ini\fR \fIINIFILE\fR
../src/emc/nml_intf/emcargs.cc: if (!strcmp(argv[t], "-ini")) {
../src/emc/usr_intf/touchy/touchy.py:        if len(sys.argv) > 2 and 
sys.argv[1] == '-ini':
../src/emc/usr_intf/axis/scripts/linuxcnctop.py:if len(sys.argv) > 1 and 
sys.argv[1] == '-ini':
../src/emc/usr_intf/axis/scripts/debuglevel.py:if len(sys.argv) > 1 and 
sys.argv[1] == '-ini':
../src/emc/usr_intf/axis/scripts/axis.py:if sys.argv[1] != "-ini":
../src/emc/usr_intf/keystick.cc:      if (!strcmp(argv[t], "-ini"))
../src/emc/iotask/ioControl_v2.cc:      if (!strcmp(argv[t], "-ini")) {
../src/emc/iotask/ioControl.cc: if (!strcmp(argv[t], "-ini")) {
../src/libnml/inifile/inivar.cc:        if (!strcmp(argv[t], "-ini")) {
../src/libnml/inifile/inivar.cc:                    "%s: ini file not specified 
after -ini\n", argv[0]);
../tests/motion/g0/checkresult:        "-ini",
../tests/motion/g0/checkresult:        "-ini",
../tests/motion/g0/checkresult:        "-ini",
../scripts/haltcl.in:    && (  ([lindex $argv 0] == "-i") || ([lindex $argv 0] 
== "-ini")  )} {
../scripts/haltcl:    && (  ([lindex $argv 0] == "-i") || ([lindex $argv 0] == 
"-ini")  )} {
mah@ubuntu-10:~/emc2-rtos/configs$ egrep -re "-ini[\s\'\"]" ..|wc -l
22



------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to