To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.devOpen lugnet.cad.dev in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / Development / 8394
8393  |  8395
Subject: 
Are Meta-commands case-sensitive?
Newsgroups: 
lugnet.cad.dev
Date: 
Fri, 14 Mar 2003 07:44:59 GMT
Viewed: 
404 times
  
I have a question about Meta-commands.  Are meta-commands all supposed to be
case-sensitive?  As an example, is the 0 FILE MPD meta-command case-sensitive?

I'm asking this because I have an MPD file that contains sub-files that
themselves obviously originally contained comments such as "0 file".  The
following are two adjacent lines in the town.dat file that was sent to me
for Datsville:

0 FILE ttrcross.DAT
0 file m7835.dat

LDView's MPD-parsing is currently case-sensitive, so only the first command
would be treated as a FILE MPD meta-command.  Given that it seems to work
pretty well, I'm going to guess that it's doing the correct thing here.  (I
don't think I've received any bug reports on MPD-parsing in years, other
than the one regarding the fact that LDView crashes trying to load the above
town.dat MPD file due to excessive memory use.*)

So, while case-sensitive parsing seems to work, the MPD spec doesn't really
specify whether its meta-commands are case-sensitive, it just says what they
are ("0 FILE" and "0 NOFILE").

The DAT spec does say that "file type" meta-commands (there seem to be a
bunch of variations of these) should NOT be case-sensitive, so obviously at
least some meta-commands aren't case-sensitive.

Like the MPD spec, the BFC spec doesn't specify one way or another.

My personal vote would be to say that all MPD meta-commands and all BFC
meta-commands must be presented in all caps in order to be valid.  HOWEVER,
this will only work if the currently existing popular programs are already
coded in a way that enforces this.  Otherwise, we can pretty much guarantee
that files exist that don't use all caps.

So here's a question to DAT-related program authors: do you parse
meta-commands (other than "file type") in a case-sensitive fashion, or
case-insensitive?

I can start the responses:

LDView:
MPD - Case-sensitive
BFC - Unsupported

--Travis Cobbs

* Before anyone asks: no, the file won't load town.dat no matter how much
swap you have, for two reasons:

1) My MPD parsing is currently recursive in a creative way.  This made it
really easy to add to my original DAT loading code, but it uses a lot of
stack space, overflowing the default 1 meg stack on the above file.  Anyone
interested could get around this by using a tool to extract the original
files from the MPD.

2) Either Windows XP Pro has per-process memory constraints, or it can't use
more than about 2 gigs of virtual memory, because it crashes when LDView
reaches around 1.9 gigs.  (I got that far by recompiling LDView with a
bigger stack.)  The default swap file size Windows chose for me during
install was min 1.5 gigs, max 3 gigs, which added to my 1 gig of RAM would
be 2.5-4 gigs.  So, if it really does only support 2 gigs of virtual memory,
that would be really stupid on its part (not that it would particularly
surprise me).



Message has 2 Replies:
  Re: Are Meta-commands case-sensitive?
 
(...) L3P and L3Lab treat the FILE case-sensitive. (...) I think the "file type" meta-commands are the only ones that have been defined to NOT be case-sensitive. And yes, the "syntax" is a mess :-) (...) I agree. (...) L3P and L3Lab: MPD - (...) (22 years ago, 14-Mar-03, to lugnet.cad.dev)
  Re: Are Meta-commands case-sensitive?
 
(...) <snip> (...) I agree. (...) LPub and LSynth are case sensetive for all meta-command, including MPD's FILE and NOFILE meta-commands. Kevin Clague (22 years ago, 14-Mar-03, to lugnet.cad.dev)

3 Messages in This Thread:


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

Custom Search

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