[Top][All Lists]

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

Re: factor [Was: coreutils v5.2.1 - stat.c]

From: ThMO
Subject: Re: factor [Was: coreutils v5.2.1 - stat.c]
Date: Mon, 03 Oct 2005 11:07:56 +0200

Good morning Alfred and others listening,

>    Additionally the error message regarding to factorize 0 will go to
>    stderr, but I do not return an error status in this case.
> Wouldn't it be better to make it go to stdout and call it a warning?
> I atleast kinda frown stderr messages that don't set a proper error
> status.

there are three arguments regarding to this handling:
· if an error code would be returned, gfactor would print the ugly
    Try `gfactor --help' for more information
  in this case, although it would continue processing it's other argu­
  ments, although fixing this shouldn't be of a great deal
· signalling an error code, even though all other operations were success­
  full, looks a little bit strange, IMHO - just consider the following
    ./gfactor `seq -- -50 100`
  which works perfectly 150 times and only has to signal, that 0 can't
  be factorized...  and in this case I think returning a non-zero status
  wouldn't be correct, but YMMV
· my previous patch wrote this message to stdout, but if someone uses
  this command inside a shell script, he has to specifically lookup the
  one case, where gfactor outputs an error message instead of digits...
IMHO each side could give some arguments, which were correct or not, so
this needs to be discussed a little bit longer, I guess.

> As for the patch, you might want to follow the GNU Coding Standards
> when it comes to indentation, it will make the life of Jim and Paul
> easier to spot differences.

As I said in an earlier mail:  (Re6: coreutils v5.2.1 - stat.c)
: One word, before you're going to blame me - it's coded with my longstanding
: coding style, but if you're willing to integrate it, it should be no problem
: to run it through `indent' in order to be compatible with the GNU coding
: style, which I dislike.

THX for listening.

CU Tom.
(Thomas M.Ott)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]