Subject:
|
Proposed solution to RcxCC / NQC problem
|
Newsgroups:
|
lugnet.robotics.rcx.nqc
|
Date:
|
Tue, 18 Jan 2000 05:22:32 GMT
|
Viewed:
|
1629 times
|
| |
| |
This is my proposed solution to the problem with the NQC beta and RcxCC.
As a quick recap, the problem is that RcxCC uses an exec line which has
one quoted argument ending with a backslash:
nqc -E"temp.log" -L"temp.lst" -I"C:\NQC\CC\" temp.nqc
The \" combination confuses both VC++ and CodeWarrior runtimes - they
think the " is being escaped and parse the args as:
argv[0]: nqc
argv[1]: -Etemp.log
argv[2]: -Ltemp.lst
argv[3]: -IC:\Program Files\RcxCC" temp.nqc
Robert Del Favero suggested avoiding this problem by mandating that
options like -I don't end with a backslash. This is a really good idea
since it will eliminate what appears to be a grey area of writing C
programs for Win32. However, I don't want to break anything out there
depending on the present behavior under MPW or Unix (neither of which
suffer from the same sort of dilemma since breaking a command line into
args happens in the shell rather than the program being called).
So, the next release of NQC will make the trailing directory separator (\
for Win32, / for Unix, : for Mac) optional. If the path doesn't end in a
separator, one is implied. That way, RcxCC could then do this:
nqc -E"temp.log" -L"temp.lst" -I"C:\NQC\CC" temp.nqc
which would be interpreted the intended way regardless of whether the
Win32 runtime in question was escaping or not. Hopefully this will be a
simple enough fix for Mark to implement. I'll also disable the escaping
within the runtime I use for building NQC, so the following should work
new NQC built by me + existing RcxCC
new NQC built by me + modified RcxCC
new NQC built by anyone + modified RcxCC
What won't work is the new NQC built by standard VC++ or CW runtimes used
with the existing RcxCC.
Dave Baum
--
reply to: dbaum at enteract dot com
|
|
Message has 1 Reply:
2 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|