Re: A challenging file to parse
- From: "Peter J. Holzer" <hjp-usenet2@xxxxxx>
- Date: Fri, 24 Aug 2007 15:40:59 +0200
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"
.
- Follow-Ups:
- Re: A challenging file to parse
- From: Walter Roberson
- Re: A challenging file to parse
- References:
- A challenging file to parse
- From: david . deram
- Re: A challenging file to parse
- From: CBFalconer
- Re: A challenging file to parse
- From: Chris Dollin
- Re: A challenging file to parse
- From: CBFalconer
- Re: A challenging file to parse
- From: Walter Roberson
- A challenging file to parse
- Prev by Date: Re: Are there books about C data structures?
- Next by Date: Re: Dynamically resizing a buffer
- Previous by thread: Re: A challenging file to parse
- Next by thread: Re: A challenging file to parse
- Index(es):
Relevant Pages
|