On 3/30/13, Calvin Morrison <mutanttur...@gmail.com> wrote:
>> - What guarantee do you have that the input file won't contain any lines
>> with length > LINE_MAX?  As far as I know, that's an arbitrary number,
>> and
>> there is no intrinsic limit on the length of the lines in a Unix text
>> file.
>
> I didn't feel very good about this either.
>
> Is there a better way to read a whole line? fgets requires a length
> argument, so I suppose it's not a very good solution

getline or getdelim if you have a reasonably modern system.  (Yes, GNU
introduced it, but it's useful.)


Robert Ransom

Reply via email to