Jan Stary <h...@stare.cz> writes:

> The diff below makes head(1) recognize `-'
> as a name for the standard input,
> as many other utilities do.

Makes sense to me.  The following points could be improved IMO:
- using strcmp sounds cleaner than those char comparisons
- I don't think the man page bits are needed.  Utilities that read from
  stdin are supposed to support `-'.  I'm not sure whether the extra
  example is really helpful.
- should we avoid closing stdin (multiple times)?  Even though our
  fclose(3) seems to cope with this, it seems that neither the
  C standard nor POSIX offer such a guarantee.

-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply via email to