Re: [dev] print utility

From: Robert Ransom <rransom.8774_AT_gmail.com>
Date: Sat, 30 Mar 2013 19:31:57 -0700

On 3/30/13, Calvin Morrison <mutantturkey_AT_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
Received on Sun Mar 31 2013 - 04:31:57 CEST

This archive was generated by hypermail 2.3.0 : Sun Mar 31 2013 - 04:36:10 CEST