Update cmp(1) manpage to new style and do not allow both -l and -s to be set

This commit is contained in:
sin
2014-11-21 12:03:27 +00:00
parent 2b39f20675
commit 2d685482af
2 changed files with 37 additions and 26 deletions

4
cmp.c
View File

@@ -10,7 +10,7 @@ enum { Same = 0, Diff = 1, Error = 2 };
static void
usage(void)
{
enprintf(Error, "usage: %s [-ls] file1 file2\n", argv0);
enprintf(Error, "usage: %s [-l | -s] file1 file2\n", argv0);
}
int
@@ -34,7 +34,7 @@ main(int argc, char *argv[])
usage();
} ARGEND;
if (argc != 2)
if (argc != 2 || (lflag && sflag))
usage();
if (argv[0][0] == '-' && !argv[0][1])