diff options
author | Joris Vink <joris@cvs.openbsd.org> | 2005-10-06 19:13:44 +0000 |
---|---|---|
committer | Joris Vink <joris@cvs.openbsd.org> | 2005-10-06 19:13:44 +0000 |
commit | 73bf7b3674f69d1c6a902425fc0f9ca9377aee18 (patch) | |
tree | 59dec4948da8b2aa66662404714620ee24c26662 /usr.bin | |
parent | 08c1bb3dd57bd3e48f4d8f1747e570ea72e30c1f (diff) |
warn when no keywords were found;
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/rcs/ident.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/usr.bin/rcs/ident.c b/usr.bin/rcs/ident.c index b5884cd8867..c82fae628e6 100644 --- a/usr.bin/rcs/ident.c +++ b/usr.bin/rcs/ident.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ident.c,v 1.2 2005/10/06 16:02:42 xsa Exp $ */ +/* $OpenBSD: ident.c,v 1.3 2005/10/06 19:13:43 joris Exp $ */ /* * Copyright (c) 2005 Xavier Santolaria <xsa@openbsd.org> * All rights reserved. @@ -40,6 +40,7 @@ #define VALDELIM ':' /* values delimitor */ extern char *__progname; +static int found = 0; static int ident_file(const char *, FILE *); static int ident_line(FILE *); @@ -78,6 +79,10 @@ ident_main(int argc, char **argv) ident_file(argv[i], fp); fclose(fp); + + if (found == 0) + cvs_log(LP_WARN, "no id keywords in %s", argv[i]); + found = 0; } } @@ -140,6 +145,7 @@ ident_line(FILE *fp) *(p++) = c; *p = '\0'; + found++; printf(" %c%s\n", KEYDELIM, linebuf); return (0); |