Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Jun 2010 19:29:47 -0700
From:      Garrett Cooper <gcooper@FreeBSD.org>
To:        Benjamin Fiedler <bfiedler@freebsd.org>
Cc:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   Re: PERFORCE change 179341 for review
Message-ID:  <AANLkTin9N4E0L1rqpEzMR79cF5EuFQowiTSt0pKZARHn@mail.gmail.com>
In-Reply-To: <201006090217.o592H6M7095917@repoman.freebsd.org>
References:  <201006090217.o592H6M7095917@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

On Tue, Jun 8, 2010 at 7:17 PM, Benjamin Fiedler <bfiedler@freebsd.org> wrote:
> http://p4web.freebsd.org/@@179341?ac=10
>
> Change 179341 by bfiedler@freebsd-7803 on 2010/06/09 02:17:04
>
>        Added a few basic options (help, [no]ignore-file-name-case) and integer definitions. Changed makefile to use -g by default.

...

>
> +DEBUG = -g
>  PROG=  diff
>  SRCS=  diff.c diffdir.c diffreg.c
> -CFLAGS+=       -std=c99 -Wall -pedantic
> +CFLAGS+=       -std=c99 -Wall -pedantic $(DEBUG)

That's what the DEBUG_FLAG var does?

>  .include <bsd.prog.mk>
>
> ==== //depot/projects/soc2010/bsdtextproc/diff/diff.c#2 (text+ko) ====
>
> @@ -44,7 +44,7 @@
>
>  #include "diff.h"
>
> -int     aflag, bflag, dflag, iflag, lflag, Nflag, Pflag, pflag, rflag;
> +int     aflag, Bflag, bflag, dflag, iflag, lflag, Nflag, Pflag, pflag, rflag;

This could make merging patches entertaining if you add or remove a
variable; it probably would be easier if each variable was per-line.

This doesn't contradict style(9) though (and it says that that's ok as
long as it doesn't overflow 80 columns).

>  int     sflag, tflag, Tflag, wflag;
>  int     format, context, status;

...

> +                   strcmp(dent1->d_name, dent2->d_name) ;

This is kind of hard to read... can this be split up into if-based
branch statements?

>                if (pos == 0) {
>                        /* file exists in both dirs, diff it */
>                        diffit(dent1, path1, dirlen1, path2, dirlen2);

Thanks!
-Garrett



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTin9N4E0L1rqpEzMR79cF5EuFQowiTSt0pKZARHn>