Re: LINE_MAX

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2024-05-21 12:08:13 +0200, Alejandro Colomar wrote:
> On Tue, May 21, 2024 at 12:26:58AM GMT, Vincent Lefevre wrote:
> > See thread "fgets/strtok and LINE_MAX" I started on 2009-09-21
> > in the Austin Group mailing-list. It is available on gmane:
> > 
> > Path: news.gmane.org!not-for-mail
> > From: Vincent Lefevre <vincent-opgr-opTGSl+ZDNkdnm+yROfE0A@xxxxxxxxxxxxxxxx>
> > Newsgroups: gmane.comp.standards.posix.austin.general
> > Subject: fgets/strtok and LINE_MAX
> > Date: Mon, 21 Sep 2009 01:03:13 +0200
> > Lines: 31
> > Approved: news@xxxxxxxxx
> > Message-ID: <20090920230313.GV657@xxxxxxxxxxxxxxxxxxx>
> > [...]
> 
> Hmmm, how does that thing work?

You need a NNTP client, such a "tin", and the server is currently
news.gmane.io (news.gmane.org was the one at that time, but it
changed in January 2020). If you use "tin", you may use something
like

news.gmane.io .newsrc-gmane gmane

in the .tin/newsrctable file, and run "tin -g gmane".

> Any http link available?

For Gmane, it is no longer possible to access it via http.
And I don't know any website that has archives for such old
Austin Group messages.

> > There's the issue with the missing "+1", but also whether
> > LINE_MAX < INT_MAX.
> 
> I guess the LINE_MAX <? INT_MAX issue is not an actual issue as long as
> implementations do the Right Thing and don't set it to >= INT_MAX.

Unfortunately, the int type is typically a 32-bit type, even on
64-bit platforms. This would mean a silly limit for 64-bit platforms.
2^31 is quite large, but for some particular uses (hmm... GNU MPFR
tests, for instance?), one may want to support larger text files.

Note also that some XML files have all the contents on a single line.

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)




[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux