To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.nqcOpen lugnet.robotics.rcx.nqc in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / NQC / 391
390  |  392
Subject: 
Re: NQC 2.1 b2 in beta test
Newsgroups: 
lugnet.robotics.rcx.nqc
Date: 
Sun, 16 Jan 2000 21:29:18 GMT
Viewed: 
1691 times
  
Dave Baum wrote:

If there are 2n+1 backslashes, then it is interpreted as n backslashes and
the quote becomes part of the arg (and the quoting state remains
unchanged)

If anyone knows the "official" rules here, please let me know.

Unfortunately, I don't know "official" rules nor did I find a place where to
look them up.

Nevertheless, I can only think that this whole escaping stuff is not compliant
with normal, expected Win32 behavior. The backslash is the standard character
for paths, and the doublequote is standard for embracing long filenames since
Win32. So, it makes hardly any sense to define just that backslash as the
escape character, where forms like "....\" really appear frequently in the
DOS/Win32 world. In other words: I am pretty sure (although can't prove it)
that using the backslash as an escape character is incorrect under Win32.

I checked with the only compiler I have at home (Delphi), and it has no problem
with the format RcxCC is using, and it does no escaping at all. Tomorrow, I can
check with at least two other common Win32 devtools (Visual C++, VB) in the
office...



I think the right fix in the end is to have Mark generate an appropriately
escaped command string ...


In shorter order, I can probably disable all escaping (essentially revert
to the old Metrowerks behavior) so that the next nqc build will work with
the current RcxCC.

My guess is that what you describe under "shorter order" would actually be the
"right fix".

Uwe



Message has 2 Replies:
  Re: NQC 2.1 b2 in beta test
 
(...) You are wrong. The precedent, naturally, is C, coz NQC, isn't quite, err, C. Backslash _is_ the escaping character in C, even on Windoze. So, to write \a\b\c as a correct C string (yes, even a VC++ one), you have to write "\\a\\b\\c", and if (...) (25 years ago, 16-Jan-00, to lugnet.robotics.rcx.nqc)
  Re: NQC 2.1 b2 in beta test
 
(...) My test was a program like this: #include <stdio.h> int main(int argc, char**argv) { int i; for(i=0; i<argc; ++i) printf("<%s>\n", argv[i]); } I built it under both Metrowerks and VC++. Then I called the program with various command lines to (...) (25 years ago, 17-Jan-00, to lugnet.robotics.rcx.nqc)

Message is in Reply To:
  Re: NQC 2.1 b2 in beta test
 
(...) the exec (...) The answer isn't pretty.... As near as I can tell (sorry, not much of a Windows expert), the command line gets passed in its entirety to the executable, which then is responsible for parsing it into separate arguments. For the (...) (25 years ago, 15-Jan-00, to lugnet.robotics.rcx.nqc)

25 Messages in This Thread:







Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR