Re: A challenging file to parse



On 2007-08-22 16:56, Walter Roberson <roberson@xxxxxxxxxxxxxxxxxx> wrote:
In article <46CC1AEA.FBA2EF83@xxxxxxxxx>,
CBFalconer <cbfalconer@xxxxxxxxxxxxx> wrote:

That's why I stated the assumption. A thousand lines would have to
be up to a million chars long, and that seems highly inconvenient,
especially since C i/o has possible limitations on line lengths.
C99 can barely handle thousand character lines. C90 can't
guarantee it.

I can't think at the moment of which constraint you might be
referring to? The only one that comes to mind right now is the
constraint on source line length, but that's compilation phase,
not execution time.

N1124, section 7.9.12 Streams:

| An implementation shall support text files with lines containing at
| least 254 characters, including the terminating new-line character.
| The value of the macro BUFSIZ shall be at least 256.

I think C90 had a similar limit, but I don't have that at hand.

However, since most systems support text files with arbitrarily long
lines, this is no argument against the existence of files with
ludicrously long lines. All you need is one implementation which
supports long lines and this doesn't even have to be a C implementation.

hp


--
_ | Peter J. Holzer | I know I'd be respectful of a pirate
|_|_) | Sysadmin WSR | with an emu on his shoulder.
| | | hjp@xxxxxx |
__/ | http://www.hjp.at/ | -- Sam in "Freefall"
.



Relevant Pages

  • Re: learning with constraints
    ... > frequency of each character in a text string. ... > an input with constraint. ... I make use of the "knowledge" in the rain gauge. ... turn on the irrigation system. ...
    (comp.ai.philosophy)
  • Re: learning with constraints
    ... frequency of each character in a text string. ... an input with constraint. ... if I put a rain gauge out in my yard ... tenaciously to such ridiculous notions? ...
    (comp.ai.philosophy)
  • Re: C Variables Length
    ... I K&R they stated that atleast 31 character. ... identifiers and 6 for external identifiers in C90, ... I'm using a C90 compiler. ...
    (comp.lang.c)
  • learning with constraints
    ... frequency of each character in a text string. ... Thus we can say the program has *learnt* how ... an input with constraint. ... There is no reward system involved, ...
    (comp.ai.philosophy)
  • Re: check constraint**
    ... The check constraint that you have defined needs to have mininum of 9 ... you are doing positional comparison of the ... character of the emp_id must be in the range of A-Z, ... insert into t values--success (2nd check constraint clause ...
    (microsoft.public.sqlserver.programming)