Re: [dev] [PATCH 1/2] slstatus: allow pscanf to continue on the same file

From: Kurt Van Dijck <dev.kurt_AT_vandijck-laurijssen.be>
Date: Fri, 15 Sep 2017 21:33:10 +0200

--- Original message ---
> Date: Fri, 15 Sep 2017 20:00:26 +0200
> From: Laslo Hunhold <dev_AT_frign.de>
>
> On Fri, 15 Sep 2017 19:50:47 +0200
> Kurt Van Dijck <dev.kurt_AT_vandijck-laurijssen.be> wrote:
>
> Dear Kurt,
>
> > strtok() inspired me to let pscanf continue on the same file.
> > Only if a new filename was specified (the default case), the pending
> > open file is closed.
> >
> > Signed-off-by: Kurt Van Dijck <dev.kurt_AT_vandijck-laurijssen.be>

I suppose you read the subsequent patch also, which makes use of this
new semantic.
>
> I think this just makes the code more complicated,

Did you notice that the users of the function did not require modifying,
i.e. the remain readable as the did before.

Changing API's is the source of many bugs to come, isn't it.

> as pscanf()
> is now no longer preëmtive. Especially with languages like C, one
> should avoid such things in my opinion.

The lack of preemption contributes to the abscence of bugs to come,
isn't it.
Why make a local API preemptive whithout using it?
That sounds like over-engineering in my opinion.

>
> With best regards
Equal best regards,
Kurt
Received on Fri Sep 15 2017 - 21:33:10 CEST

This archive was generated by hypermail 2.3.0 : Fri Sep 15 2017 - 21:36:48 CEST