Jeremie Courreges-Anglas wrote:
> >> @@ -66,13 +66,18 @@ main(int argc, char *argv[])
> >> argv++;
> >> }
> >>
> >> - while ((ch = getopt(argc, argv, "n:")) != -1) {
> >> + while ((ch = getopt(argc, argv, "c:n:")) != -1) {
> >> switch (ch) {
> >> + case 'c':
> >> + dobytes = 1;
> >> + p = optarg;
> >> + break;
> >> case 'n':
> >> + dobytes = 0;
> >
> > It's already initialized to 0, which is necessary for the head -count
> > style syntax.
>
> I followed the behavior of GNU head here: the last specified option
> wins. IIRC FreeBSD head(1) makes -c and -n incompatible.
I feel like erroring on multiple options would be an improvement. I
guess I can propose that as a separate diff when you're done.