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

Re: dpkg with triggers support (again)



On mar, mar 11, 2008 at 09:41:57 +0000, Ian Jackson wrote:
> [2] His most recent commit is 402 diff lines of stuff like this:
>   -static void usage(void) {
>   +void
>   +usage(void)
>   +{

  You know what you're doing is FUD from the worst kind ?


On mar, mar 11, 2008 at 11:37:22 +0000, John Goerzen wrote:
> On Tuesday 11 March 2008 4:41:57 pm Ian Jackson wrote:
> > [2] His most recent commit is 402 diff lines of stuff like this:
> >   -static void usage(void) {
> >   +void
> >   +usage(void)
> >   +{
> 
> Ugh.  I laughed when I first read this, but now I feel more revulsion.

  You didn't looked at the history right ?


  FWIW the commit is here:
http://git.debian.org/?p=dpkg/dpkg.git;a=commitdiff;h=122fdc0fa5fe90a7d5f6919f2d3177fd0830c360

  Code has been refactored in a generic module to deal with usages and
so on. The functions aren't static anymore, because they *do* have a
proper prototype in lib/myopt.h. I welcome such changes fwiw, because
they _do_ make the code smaller and less repetitive, hence easier to
maintain.

  FWIW dpkg is built using a quite strict (it could be even better, but
it's nice enough) set of warning flags, without a glitch. And it
continues to do so.


  And to be thorough, the same commit removed horrors like:

-static void helponly(const struct cmdinfo *cip, const char *value) NONRETURNING;
-static void helponly(const struct cmdinfo *cip, const char *value) {
-  usage(); exit(0);
-}

  Yay for portability: many compilers don't support forward static prototypes
properly. And then we hear about using (char *)0 instead of NULL for
portability reasons, "because someone could have hacked glibc headers to put
#define NULL 0 in it"

  Oh yeah, you've got nice trolling skills Ian.

-- 
·O·  Pierre Habouzit
··O                                                madcoder@debian.org
OOO                                                http://www.madism.org

Attachment: pgp5BTvKsAsmX.pgp
Description: PGP signature


Reply to: