How to? tcc inifile (%_ininame)

Oct 18, 2008
317
2
Hello — The INI file (%_ininame) TCC is using (at least for me) has multiple sections – going back to 4NT recall that were was a “primary” and “secondary” sections to change the settings for sub-shells

now, with tcc does it try to read all the sections in the ini file or now does it just read one “primary” section? Thanks
 
May 20, 2008
10,939
84
Syracuse, NY, USA
Put some bogus directives in there. They should produce error messages if/when the sections are read.

[Primary]
BogusPrimaryDirective=Yes
[Secondary]
BogusSecondaryDirective=Yes
 
May 20, 2008
10,939
84
Syracuse, NY, USA
With these in place:

Code:
[Primary]
BogusPrimaryDirective=Yes
[Secondary]
BogusSecondaryDirective=Yes
[4NT]
Bogus4NTDirective=Yes

Here's an instance newly started by Explorer.

Code:
Error on line 2 of D:\tc26\TCMD.INI:
  Invalid item name "BogusPrimaryDirective=Yes"
Press any key when ready...
Error on line 6 of D:\tc26\TCMD.INI:
  Invalid item name "Bogus4NTDirective=Yes"
Press any key when ready...

v:\> d:\tc26\tcc
Error on line 4 of D:\tc26\TCMD.INI:
  Invalid item name "BogusSecondaryDirective=Yes"
Error on line 6 of D:\tc26\TCMD.INI:
  Invalid item name "Bogus4NTDirective=Yes"

v:\> exit

v:\> d:\tc26\tcc /c
Error on line 4 of D:\tc26\TCMD.INI:
  Invalid item name "BogusSecondaryDirective=Yes"
Error on line 6 of D:\tc26\TCMD.INI:
  Invalid item name "Bogus4NTDirective=Yes"

v:\> echo foo | findstr foo
foo

v:\> echo foo | findstr foo | findstr foo
Error on line 4 of D:\tc26\TCMD.INI:
  Invalid item name "BogusSecondaryDirective=Yes"
Error on line 6 of D:\tc26\TCMD.INI:
  Invalid item name "Bogus4NTDirective=Yes"
foo

v:\>

Based solely on that, my guess is ...

1. Every instance reads [4NT].
2. Instances not started by TCC read [Primary] (and not [Secondary]).
3. Instances started by TCC read [Secondary] (and not [Primary]).