CVS commit: src/gnu/usr.bin/rcs/lib
Module Name:src Committed By: joerg Date: Thu Jan 12 14:10:56 UTC 2012 Modified Files: src/gnu/usr.bin/rcs/lib: rcsbase.h Log Message: Second try to sort out the dangling elses. Just use {} markers. Produces identical on amd64. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/gnu/usr.bin/rcs/lib/rcsbase.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/gnu/usr.bin/rcs/lib/rcsbase.h diff -u src/gnu/usr.bin/rcs/lib/rcsbase.h:1.11 src/gnu/usr.bin/rcs/lib/rcsbase.h:1.12 --- src/gnu/usr.bin/rcs/lib/rcsbase.h:1.11 Sun Jan 8 13:57:31 2012 +++ src/gnu/usr.bin/rcs/lib/rcsbase.h Thu Jan 12 14:10:56 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: rcsbase.h,v 1.11 2012/01/08 13:57:31 tron Exp $ */ +/* $NetBSD: rcsbase.h,v 1.12 2012/01/12 14:10:56 joerg Exp $ */ /* RCS common definitions and data structures */ @@ -33,6 +33,10 @@ Report problems and direct all questions /* * $Log: rcsbase.h,v $ + * Revision 1.12 2012/01/12 14:10:56 joerg + * Second try to sort out the dangling elses. Just use {} markers. + * Produces identical on amd64. + * * Revision 1.11 2012/01/08 13:57:31 tron * Revert last change. The extra while loop intruced by the macro changes * causes an end-less loop in ci(1) which uses break inside one of the @@ -291,14 +295,14 @@ Report problems and direct all questions # if maps_memory # define declarecache register Iptr_type ptr, lim # define setupcache(f) (lim = (f)-lim) -# define Igeteof_(f,c,s) if ((f)-ptr==(f)-lim) s else (c)= *(f)-ptr++; -# define cachegeteof_(c,s) if (ptr==lim) s else (c)= *ptr++; +# define Igeteof_(f,c,s) { if ((f)-ptr==(f)-lim) s else (c)= *(f)-ptr++; } +# define cachegeteof_(c,s) { if (ptr==lim) s else (c)= *ptr++; } # else int Igetmore P((RILE*)); # define declarecache register Iptr_type ptr; register RILE *rRILE # define setupcache(f) (rRILE = (f)) -# define Igeteof_(f,c,s) if ((f)-ptr==(f)-readlim !Igetmore(f)) s else (c)= *(f)-ptr++; -# define cachegeteof_(c,s) if (ptr==rRILE-readlim !Igetmore(rRILE)) s else (c)= *ptr++; +# define Igeteof_(f,c,s) { if ((f)-ptr==(f)-readlim !Igetmore(f)) s else (c)= *(f)-ptr++; } +# define cachegeteof_(c,s) { if (ptr==rRILE-readlim !Igetmore(rRILE)) s else (c)= *ptr++; } # endif # define uncache(f) ((f)-ptr = ptr) # define cache(f) (ptr = (f)-ptr)
CVS commit: src/gnu/usr.bin/rcs/lib
Module Name:src Committed By: tron Date: Sun Jan 8 13:57:31 UTC 2012 Modified Files: src/gnu/usr.bin/rcs/lib: rcsbase.h Log Message: Revert last change. The extra while loop intruced by the macro changes causes an end-less loop in ci(1) which uses break inside one of the macros. /etc/security will now no longer fill up / (or /var depending on file-system layout). To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/gnu/usr.bin/rcs/lib/rcsbase.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/gnu/usr.bin/rcs/lib/rcsbase.h diff -u src/gnu/usr.bin/rcs/lib/rcsbase.h:1.10 src/gnu/usr.bin/rcs/lib/rcsbase.h:1.11 --- src/gnu/usr.bin/rcs/lib/rcsbase.h:1.10 Fri Jan 6 15:16:03 2012 +++ src/gnu/usr.bin/rcs/lib/rcsbase.h Sun Jan 8 13:57:31 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: rcsbase.h,v 1.10 2012/01/06 15:16:03 joerg Exp $ */ +/* $NetBSD: rcsbase.h,v 1.11 2012/01/08 13:57:31 tron Exp $ */ /* RCS common definitions and data structures */ @@ -33,8 +33,13 @@ Report problems and direct all questions /* * $Log: rcsbase.h,v $ - * Revision 1.10 2012/01/06 15:16:03 joerg - * Don't use dangling elses. + * Revision 1.11 2012/01/08 13:57:31 tron + * Revert last change. The extra while loop intruced by the macro changes + * causes an end-less loop in ci(1) which uses break inside one of the + * macros. + * + * /etc/security will now no longer fill up / (or /var depending on + * file-system layout). * * Revision 1.9 1998/09/14 18:36:07 tv * Increase keylength to 32, inspired by pr...@newn.cam.ac.uk in PR @@ -286,14 +291,14 @@ Report problems and direct all questions # if maps_memory # define declarecache register Iptr_type ptr, lim # define setupcache(f) (lim = (f)-lim) -# define Igeteof_(f,c,s) do { if ((f)-ptr==(f)-lim) s else (c)= *(f)-ptr++; } while(0); -# define cachegeteof_(c,s) do { if (ptr==lim) s else (c)= *ptr++; } while(0); +# define Igeteof_(f,c,s) if ((f)-ptr==(f)-lim) s else (c)= *(f)-ptr++; +# define cachegeteof_(c,s) if (ptr==lim) s else (c)= *ptr++; # else int Igetmore P((RILE*)); # define declarecache register Iptr_type ptr; register RILE *rRILE # define setupcache(f) (rRILE = (f)) -# define Igeteof_(f,c,s) do { if ((f)-ptr==(f)-readlim !Igetmore(f)) s else (c)= *(f)-ptr++; } while (0); -# define cachegeteof_(c,s) do { if (ptr==rRILE-readlim !Igetmore(rRILE)) s else (c)= *ptr++; } } while (0); +# define Igeteof_(f,c,s) if ((f)-ptr==(f)-readlim !Igetmore(f)) s else (c)= *(f)-ptr++; +# define cachegeteof_(c,s) if (ptr==rRILE-readlim !Igetmore(rRILE)) s else (c)= *ptr++; # endif # define uncache(f) ((f)-ptr = ptr) # define cache(f) (ptr = (f)-ptr)
CVS commit: src/gnu/usr.bin/rcs/lib
Module Name:src Committed By: christos Date: Sun May 15 14:31:13 UTC 2011 Modified Files: src/gnu/usr.bin/rcs/lib: rcsedit.c Log Message: register c - int c To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/gnu/usr.bin/rcs/lib/rcsedit.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/gnu/usr.bin/rcs/lib/rcsedit.c diff -u src/gnu/usr.bin/rcs/lib/rcsedit.c:1.8 src/gnu/usr.bin/rcs/lib/rcsedit.c:1.9 --- src/gnu/usr.bin/rcs/lib/rcsedit.c:1.8 Tue Mar 25 08:56:38 1997 +++ src/gnu/usr.bin/rcs/lib/rcsedit.c Sun May 15 10:31:13 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: rcsedit.c,v 1.8 1997/03/25 13:56:38 lukem Exp $ */ +/* $NetBSD: rcsedit.c,v 1.9 2011/05/15 14:31:13 christos Exp $ */ /* RCS stream editor */ @@ -38,6 +38,9 @@ /* * $Log: rcsedit.c,v $ + * Revision 1.9 2011/05/15 14:31:13 christos + * register c - int c + * * Revision 1.8 1997/03/25 13:56:38 lukem * Add #define has_mkstemp 1 (which needs #define has_mktemp 1), * and hack to use mkstemp() instead of mktemp(). This *does* cause the @@ -633,7 +636,7 @@ * editline is incremented by the number of lines copied. * Assumption: next character read is first string character. */ -{ register c; +{ int c; declarecache; register FILE *frew, *fcop; register int amidline; @@ -878,7 +881,7 @@ * 2 if a complete line is copied; adds 1 to yield if expansion occurred. */ { - register c; + int c; declarecache; register FILE *out, *frew; register char * tp;