[patch]rcs: merge typo

2015-06-18 Thread Fritjof Bornebusch
What about this comma.
I saw a few manpages, having it at this location.

Regards,
--F.


Index: merge.1
===
RCS file: /cvs/src/usr.bin/rcs/merge.1,v
retrieving revision 1.3
diff -u -p -r1.3 merge.1
--- merge.1 28 Oct 2010 15:08:50 -  1.3
+++ merge.1 18 Jun 2015 20:52:30 -
@@ -45,7 +45,7 @@ for details.
 .It Fl e
 Same as
 .Fl E
-but does not warn about conflicts.
+, but does not warn about conflicts.
 .It Fl L Ar label
 Specifies labels to be used in place of corresponding file names
 in conflict reports.



Re: [patch]rcs: merge typo

2015-06-18 Thread Jason McIntyre
On Thu, Jun 18, 2015 at 10:59:37PM +0200, Fritjof Bornebusch wrote:
 What about this comma.
 I saw a few manpages, having it at this location.
 
 Regards,
 --F.
 
 
 Index: merge.1
 ===
 RCS file: /cvs/src/usr.bin/rcs/merge.1,v
 retrieving revision 1.3
 diff -u -p -r1.3 merge.1
 --- merge.1   28 Oct 2010 15:08:50 -  1.3
 +++ merge.1   18 Jun 2015 20:52:30 -
 @@ -45,7 +45,7 @@ for details.
  .It Fl e
  Same as
  .Fl E
 -but does not warn about conflicts.
 +, but does not warn about conflicts.
  .It Fl L Ar label
  Specifies labels to be used in place of corresponding file names
  in conflict reports.

it would be .Fl E , if you wanted it...but again a matter of
preference. the but makes it redundant really.

jmc



Re: [PATCH] rcs merge

2014-05-08 Thread Janne Johansson
Can't say if this was the motivation here, but some people like to put
constants before variables for comparisons so as to easily catch the
difference between
if (a = 5) ...
and
if (5 = a) ..
when you really meant if (a == 5).



2014-05-08 0:13 GMT+02:00 Fritjof Bornebusch frit...@alokat.org:

 Hi tech,

 I think labels = 3 is more readable than 3 = labels.

 fritjof

 Index: merge.c
 ===
 RCS file: /cvs/src/usr.bin/rcs/merge.c,v
 retrieving revision 1.7
 diff -u -p -r1.7 merge.c
 --- merge.c 23 Jul 2010 21:46:05 -  1.7
 +++ merge.c 7 May 2014 22:10:06 -
 @@ -62,7 +62,7 @@ merge_main(int argc, char **argv)
 flags |= MERGE_EFLAG;
 break;
 case 'L':
 -   if (3 = labels)
 +   if (labels = 3)
 errx(D_ERROR, too many -L options);
 label[labels++] = optarg;
 break;




-- 
May the most significant bit of your life be positive.


Re: [PATCH] rcs merge

2014-05-08 Thread Fritjof Bornebusch
On Thu, May 08, 2014 at 09:45:22AM +0200, Janne Johansson wrote:
 Can't say if this was the motivation here, but some people like to put
 constants before variables for comparisons so as to easily catch the
 difference between
 if (a = 5) ...
 and
 if (5 = a) ..
 when you really meant if (a == 5).
 
You are right, some people like to see constants before variables for 
comparisions.
But if you look later in the code you see something like if (argc != 3) or 
for (; labels  3; labels++).
As you can see the variables are the first parameter for comparisions.

So this diff makes it more consistent what format is used, too.

fritjof 
 
 
 2014-05-08 0:13 GMT+02:00 Fritjof Bornebusch frit...@alokat.org:
 
  Hi tech,
 
  I think labels = 3 is more readable than 3 = labels.
 
  fritjof
 
  Index: merge.c
  ===
  RCS file: /cvs/src/usr.bin/rcs/merge.c,v
  retrieving revision 1.7
  diff -u -p -r1.7 merge.c
  --- merge.c 23 Jul 2010 21:46:05 -  1.7
  +++ merge.c 7 May 2014 22:10:06 -
  @@ -62,7 +62,7 @@ merge_main(int argc, char **argv)
  flags |= MERGE_EFLAG;
  break;
  case 'L':
  -   if (3 = labels)
  +   if (labels = 3)
  errx(D_ERROR, too many -L options);
  label[labels++] = optarg;
  break;
 
 
 
 
 -- 
 May the most significant bit of your life be positive.



[PATCH] rcs merge

2014-05-07 Thread Fritjof Bornebusch
Hi tech,

I think labels = 3 is more readable than 3 = labels.

fritjof

Index: merge.c
===
RCS file: /cvs/src/usr.bin/rcs/merge.c,v
retrieving revision 1.7
diff -u -p -r1.7 merge.c
--- merge.c 23 Jul 2010 21:46:05 -  1.7
+++ merge.c 7 May 2014 22:10:06 -
@@ -62,7 +62,7 @@ merge_main(int argc, char **argv)
flags |= MERGE_EFLAG;
break;
case 'L':
-   if (3 = labels)
+   if (labels = 3)
errx(D_ERROR, too many -L options);
label[labels++] = optarg;
break;