comment #else and #endif lines when using -D (4.3BSD-tahoe/bin/14)
authorKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Thu, 12 Jan 1989 05:41:21 +0000 (21:41 -0800)
committerKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Thu, 12 Jan 1989 05:41:21 +0000 (21:41 -0800)
SCCS-vsn: usr.bin/diff/diff/diffreg.c 4.19

usr/src/usr.bin/diff/diff/diffreg.c

index 0dfe598..a2435de 100644 (file)
@@ -1,4 +1,4 @@
-static char sccsid[] = "@(#)diffreg.c 4.18 %G%";
+static char sccsid[] = "@(#)diffreg.c 4.19 %G%";
 
 #include "diff.h"
 /*
 
 #include "diff.h"
 /*
@@ -776,7 +776,7 @@ change(a,b,c,d)
        if ((opt ==D_EDIT || opt == D_REVERSE) && c<=d)
                prints(".\n");
        if (inifdef) {
        if ((opt ==D_EDIT || opt == D_REVERSE) && c<=d)
                prints(".\n");
        if (inifdef) {
-               fprintf(stdout, "#endif %s\n", endifname);
+               fprintf(stdout, "#endif /* %s */\n", endifname);
                inifdef = 0;
        }
 }
                inifdef = 0;
        }
 }
@@ -816,7 +816,7 @@ char *s;
                return;
        if (opt == D_IFDEF) {
                if (inifdef)
                return;
        if (opt == D_IFDEF) {
                if (inifdef)
-                       fprintf(stdout, "#else %s%s\n", oneflag && oldfile==1 ? "!" : "", ifdef2);
+                       fprintf(stdout, "#else /* %s%s */\n", oneflag && oldfile==1 ? "!" : "", ifdef2);
                else {
                        if (oneflag) {
                                /* There was only one ifdef given */
                else {
                        if (oneflag) {
                                /* There was only one ifdef given */
@@ -854,7 +854,7 @@ char *s;
        }
 
        if (inifdef && !wantelses) {
        }
 
        if (inifdef && !wantelses) {
-               fprintf(stdout, "#endif %s\n", endifname);
+               fprintf(stdout, "#endif /* %s */\n", endifname);
                inifdef = 0;
        }
 }
                inifdef = 0;
        }
 }