diff options
author | Xavier Santolaria <xsa@cvs.openbsd.org> | 2005-11-23 16:01:48 +0000 |
---|---|---|
committer | Xavier Santolaria <xsa@cvs.openbsd.org> | 2005-11-23 16:01:48 +0000 |
commit | 958d671d569f337064147fa8a98d44fef3a91e24 (patch) | |
tree | 1eef4ac2da0981549a83d7f471fb989a0215d4e8 | |
parent | a4b385cdb1c686c8567d483c07c85dfb87a740cb (diff) |
output consistency;
-rw-r--r-- | usr.bin/rcs/ident.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/usr.bin/rcs/ident.c b/usr.bin/rcs/ident.c index 78b1b6196af..e78c2a82155 100644 --- a/usr.bin/rcs/ident.c +++ b/usr.bin/rcs/ident.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ident.c,v 1.6 2005/11/16 15:25:29 xsa Exp $ */ +/* $OpenBSD: ident.c,v 1.7 2005/11/23 16:01:47 xsa Exp $ */ /* * Copyright (c) 2005 Xavier Santolaria <xsa@openbsd.org> * All rights reserved. @@ -78,12 +78,6 @@ ident_main(int argc, char **argv) ident_file(argv[i], fp); fclose(fp); - - if ((found == 0) && (verbose == 1)) - fprintf(stderr, - "ident warning: no id keywords in %s\n", - argv[i]); - found = 0; } } @@ -96,8 +90,10 @@ ident_file(const char *filename, FILE *fp) { int c; - if (fp != stdin) + if (filename != NULL) printf("%s:\n", filename); + else + filename = "standard output"; for (c = 0; c != EOF; (c = getc(fp))) { if ((feof(fp)) || (ferror(fp))) @@ -106,6 +102,12 @@ ident_file(const char *filename, FILE *fp) ident_line(fp); } + if ((found == 0) && (verbose == 1)) + fprintf(stderr, "ident warning: no id keywords in %s\n", + filename); + + found = 0; + return (0); } |