| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
If we bump 'lines' from an int to an unsigned long long we can
trivially support files with more than INT_MAX lines.
ok millert@
|
| |
|
|
|
|
|
| |
- Use getprogname(3) instead of __progname.
- Sprinkle in some missing braces.
- Prefer err(..., NULL) when malloc(3) fails.
- Remove an unnecessary cast to from ssize_t to size_t.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
cook_args() and raw_args() do some peculiar things in order to avoid
calling cook_buf() and raw_cat(), respectively, in more than one
place. The result is a convoluted. If we isolate the special cases
from the normal case and just call these functions in multiple places
the loops will be easier to read.
Three things:
1. Pull the no-args case out of the loop. If *argv is NULL when we
get into the argv processing function we just want to operate on
the standard input and return early. It makes no sense to handle
this case *in* the loop.
2. Isolate the "-" case from the filename case. If *argv is "-" we want
to operate on the standard input. We can then do any stdin-specific
cleanup within the same branch, which makes it easier to understand
both the "-" case and the normal filename case. This also allows us
to remove the 'filename' intermediate variable from both argv processing
functions.
3. While we're here, use a for-loop and iterate argv in the loop header.
Now argv is incremented in one place.
ok martijn@
|
| |
|
|
|
|
|
|
| |
There is no need for the global filename variable. Both cook_buf()
and raw_cat() can accept a filename variable from the caller to use
for printing warnings.
ok martijn@
|
| |
|
|
|
|
| |
value < 0. errno is only updated in this case. Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.
|
| |
|
|
| |
ok ajacoutot@
|
| |
|
|
|
|
| |
Minor cleanup while here: return from main, static void __dead usage, etc.
Based on a patch from Jan Stary <hans at stare dot cz>.
Feedback and OK tb@, OK millert@.
|
| |
|
|
| |
directly documenting each option's effect.
|
| |
|
|
|
|
|
| |
Patch from Giles Lean (NetBSD PR bin/4841), tweaked by kleink at
NetBSD (rev. 1.17 1998-01-27), version for OpenBSD sent in by Sevan
Janiyan <venture37 at geeklan dot co dot uk>.
OK deraadt@
|
| | |
|
| | |
|
| |
|
|
| |
ok semarie
|
| |
|
|
|
|
|
|
|
| |
possible. Annotate <sys/param.h> lines with their current reasons. Switch
to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change
MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where
sensible to avoid pulling in the pollution. These are the files confirmed
through binary verification.
ok guenther, millert, doug (helped with the verification protocol)
|
| | |
|
| |
|
|
| |
from Jan Stary
|
| | |
|
| |
|
|
|
|
|
|
| |
is neither a bug nor a property of cat(1), so rename BUGS to CAVEATS.
When showing a bad example, also tell the reader what to do instead.
While here, use .Dl to display complete shell command lines, and -
as suggested by jmc@ - avoid displays in the middle of sentences.
feedback and ok jmc@
|
| | |
|
| |
|
|
|
|
|
| |
unmaintainable). these days, people use source. these id's do not provide
any benefit, and do hurt the small install media
(the 33,000 line diff is essentially mechanical)
ok with the idea millert, ok dms
|
| |
|
|
| |
updates to follow;
|
| |
|
|
| |
ok jmc@
|
| | |
|
| | |
|
| |
|
|
|
|
| |
- note which options are extensions to POSIX
discussed w/ deraadt otto millert
|
| |
|
|
| |
From Johan Veenhuizen
|
| |
|
|
|
|
| |
from Cedric Berger <cedric@berger.to>
ok otto
|
| |
|
|
|
|
|
|
|
|
|
|
| |
from lkadosh at math dot ucr dot edu, via nick@
- put options in standard order
- put explanations of examples before the examples, and indent examples
- one i.e. -> e.g. as required
additions/corrections/oks otto@ tom@ millert@
|
| | |
|
| |
|
|
| |
rescinded 22 July 1999. Proofed by myself and Theo.
|
| |
|
|
|
| |
copyrights say "acknowledgement", not "acknowledgment". You cannot
just go changing the text of a license willy-nilly.
|
| | |
|
| | |
|
| |
|
|
| |
Based on a patch from Denis Afonin.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
When you give command examples in a manual page prefix them with
$ command
or
# command
deraadt@ ok
|
| |
|
|
| |
millert@ ok
|
| |
|
|
| |
millert@ ok.
|
| |
|
|
| |
existing EXAMPLES sections.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
is used instead; kwesterback@home.com
|