Liste des Groupes | Revenir à cl c |
On Sun, 16 Jun 2024 05:41:12 +0200
Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote:
On 16.06.2024 05:26, Lawrence D'Oliveiro wrote:On Sun, 16 Jun 2024 01:56:49 +0300, Michael S wrote:>
If you want to preserve you sanity, never use fscanf().>
Quoth the man page <https://manpages.debian.org/3/scanf.3.en.html>:
>
It is very difficult to use these functions correctly, and it is
preferable to read entire lines with fgets(3) or getline(3) and
parse them later with sscanf(3) or more specialized functions
such as strtol(3).
This would be also my first impulse, but you'd have to know
_in advance_ how long the data stream would be; the function
requires an existing buffer.
Define formats with sensible maximal line length (512 sounds about
right) and refuse any input that has longer lines.
So you'd anyway need a stepwise
input. On the plus side there's maybe a better performance
to read large buffer junks and compose them on demand? But
a problem is the potential cut of the string of a number; it
requires additional clumsy handling. So it might anyway be
better (i.e. much more convenient) to use fscanf() ?
>
No, the behaviour of fsacnf() is too non-intuitive.
Date | Sujet | # | Auteur | |
15 Jun 24 | Whaddaya think? | 96 | DFS | |
15 Jun 24 | Re: Whaddaya think? | 1 | Malcolm McLean | |
16 Jun 24 | Re: Whaddaya think? | 5 | Ben Bacarisse | |
16 Jun 24 | Re: Whaddaya think? | 2 | bart | |
16 Jun 24 | Re: Whaddaya think? | 1 | Ben Bacarisse | |
16 Jun 24 | Re: Whaddaya think? | 2 | DFS | |
17 Jun 24 | Re: Whaddaya think? | 1 | Ben Bacarisse | |
16 Jun 24 | Re: Whaddaya think? | 23 | Keith Thompson | |
16 Jun 24 | Re: Whaddaya think? | 22 | DFS | |
16 Jun 24 | Re: Whaddaya think? | 1 | Keith Thompson | |
17 Jun 24 | Re: Whaddaya think? | 19 | James Kuyper | |
17 Jun 24 | Re: Whaddaya think? | 1 | Tim Rentsch | |
17 Jun 24 | Re: Whaddaya think? | 13 | Kaz Kylheku | |
17 Jun 24 | Re: Whaddaya think? | 1 | Chris M. Thomasson | |
17 Jun 24 | Re: Whaddaya think? | 6 | DFS | |
17 Jun 24 | Re: Whaddaya think? | 5 | Richard Harnden | |
17 Jun 24 | Re: Whaddaya think? | 1 | David Brown | |
23 Jun 24 | Re: Whaddaya think? | 3 | Kaz Kylheku | |
23 Jun 24 | Re: Whaddaya think? | 1 | Keith Thompson | |
23 Jun 24 | Re: Whaddaya think? | 1 | Phil Carmody | |
18 Jun 24 | Re: Whaddaya think? | 5 | Tim Rentsch | |
18 Jun 24 | Re: Whaddaya think? | 4 | Keith Thompson | |
19 Jun 24 | Re: Whaddaya think? | 3 | Tim Rentsch | |
19 Jun 24 | Re: Whaddaya think? | 2 | Keith Thompson | |
19 Jun 24 | Re: Whaddaya think? | 1 | Kaz Kylheku | |
17 Jun 24 | Re: Whaddaya think? | 4 | DFS | |
17 Jun 24 | Re: Whaddaya think? | 3 | Ben Bacarisse | |
18 Jun 24 | Re: Whaddaya think? | 2 | Janis Papanagnou | |
18 Jun 24 | Re: Whaddaya think? | 1 | Keith Thompson | |
17 Jun 24 | Re: Whaddaya think? | 1 | James Kuyper | |
16 Jun 24 | Re: Whaddaya think? | 60 | Michael S | |
16 Jun 24 | Re: Whaddaya think? | 58 | Lawrence D'Oliveiro | |
16 Jun 24 | Re: Whaddaya think? | 57 | Janis Papanagnou | |
16 Jun 24 | Re: Whaddaya think? | 8 | Keith Thompson | |
16 Jun 24 | Re: Whaddaya think? | 1 | Lawrence D'Oliveiro | |
16 Jun 24 | Re: Whaddaya think? | 6 | Janis Papanagnou | |
16 Jun 24 | Re: Whaddaya think? | 5 | DFS | |
16 Jun 24 | Re: Whaddaya think? | 4 | David Brown | |
16 Jun 24 | Re: Whaddaya think? | 2 | bart | |
17 Jun 24 | Re: Whaddaya think? | 1 | David Brown | |
17 Jun 24 | Re: Whaddaya think? | 1 | DFS | |
16 Jun 24 | Re: Whaddaya think? | 45 | Janis Papanagnou | |
16 Jun 24 | Re: Whaddaya think? | 44 | Keith Thompson | |
16 Jun 24 | Re: Whaddaya think? | 43 | Janis Papanagnou | |
16 Jun 24 | Re: Whaddaya think? | 20 | Keith Thompson | |
16 Jun 24 | Re: Whaddaya think? | 19 | Janis Papanagnou | |
16 Jun 24 | Re: Whaddaya think? | 2 | Malcolm McLean | |
16 Jun 24 | Re: Whaddaya think? | 1 | Janis Papanagnou | |
16 Jun 24 | Re: Whaddaya think? | 16 | Keith Thompson | |
17 Jun 24 | Re: Whaddaya think? | 15 | Janis Papanagnou | |
17 Jun 24 | Re: Whaddaya think? | 12 | Keith Thompson | |
17 Jun 24 | Re: Whaddaya think? | 11 | Janis Papanagnou | |
17 Jun 24 | Re: Whaddaya think? | 5 | James Kuyper | |
18 Jun 24 | Re: Whaddaya think? | 1 | Keith Thompson | |
18 Jun 24 | Re: Whaddaya think? | 3 | Janis Papanagnou | |
18 Jun 24 | Re: Whaddaya think? | 1 | James Kuyper | |
18 Jun 24 | Re: Whaddaya think? | 1 | Keith Thompson | |
18 Jun 24 | Re: Whaddaya think? | 5 | Keith Thompson | |
18 Jun 24 | Re: Whaddaya think? | 1 | Janis Papanagnou | |
19 Jun 24 | Re: Whaddaya think? | 3 | Keith Thompson | |
19 Jun 24 | Re: Whaddaya think? | 2 | David Brown | |
19 Jun 24 | Re: Whaddaya think? | 1 | Keith Thompson | |
17 Jun 24 | Re: Whaddaya think? | 2 | James Kuyper | |
17 Jun 24 | Re: Whaddaya think? | 1 | Janis Papanagnou | |
16 Jun 24 | Re: Whaddaya think? | 7 | Michael S | |
16 Jun 24 | Re: Whaddaya think? | 6 | Janis Papanagnou | |
16 Jun 24 | Re: Whaddaya think? | 5 | Michael S | |
16 Jun 24 | Re: Whaddaya think? | 4 | Janis Papanagnou | |
16 Jun 24 | Re: Whaddaya think? | 3 | Michael S | |
16 Jun 24 | Re: Whaddaya think? | 2 | Janis Papanagnou | |
16 Jun 24 | Re: Whaddaya think? | 1 | Michael S | |
17 Jun 24 | Re: Whaddaya think? | 15 | Keith Thompson | |
17 Jun 24 | Re: Whaddaya think? | 11 | Tim Rentsch | |
17 Jun 24 | Re: Whaddaya think? | 8 | Janis Papanagnou | |
17 Jun 24 | Re: Whaddaya think? | 6 | DFS | |
17 Jun 24 | Re: Whaddaya think? | 2 | Chris M. Thomasson | |
18 Jun 24 | Re: Whaddaya think? | 1 | Keith Thompson | |
18 Jun 24 | Re: Whaddaya think? | 2 | Keith Thompson | |
18 Jun 24 | Re: Whaddaya think? | 1 | David Brown | |
18 Jun 24 | Re: Whaddaya think? | 1 | Janis Papanagnou | |
18 Jun 24 | Re: Whaddaya think? | 1 | Tim Rentsch | |
17 Jun 24 | Re: Whaddaya think? | 2 | James Kuyper | |
19 Jun 24 | Re: Whaddaya think? | 1 | Tim Rentsch | |
17 Jun 24 | Re: Whaddaya think? | 3 | Janis Papanagnou | |
17 Jun 24 | Re: Whaddaya think? | 2 | Keith Thompson | |
17 Jun 24 | Re: Whaddaya think? | 1 | Janis Papanagnou | |
16 Jun 24 | Re: Whaddaya think? | 1 | Malcolm McLean | |
16 Jun 24 | Re: Whaddaya think? | 2 | Michael S | |
16 Jun 24 | Re: Whaddaya think? | 1 | Janis Papanagnou | |
16 Jun 24 | Re: Whaddaya think? | 1 | DFS | |
16 Jun 24 | Re: Whaddaya think? | 6 | Lew Pitcher | |
16 Jun 24 | Re: Whaddaya think? | 1 | Malcolm McLean | |
18 Jun 24 | Re: Whaddaya think? | 1 | Lawrence D'Oliveiro | |
25 Jun 24 | Re: Whaddaya think? | 3 | Lew Pitcher | |
25 Jun 24 | Re: Whaddaya think? | 2 | DFS | |
25 Jun 24 | Re: Whaddaya think? | 1 | Lew Pitcher |
Les messages affichés proviennent d'usenet.