lukem
171d653219
Overhaul how `build.sh tools' are used:
...
* Rename "config.h" to "nbtool_config.h" and
HAVE_CONFIG_H to HAVE_NBTOOL_CONFIG_H.
This makes in more obvious in the source when we're using
tools/compat/config.h versus "standard autoconf" config.h
* Consistently move the inclusion of nbtool_config.h to before
<sys/cdefs.h> so that the former can provide __RCSID() (et al),
and there's no need to protect those macros any more.
These changes should make it easier to "tool-ify" a program by adding:
#if HAVE_NBTOOL_CONFIG_H
#include "nbtool_config.h"
#endif
to the top of the source files (for the general case).
2003-10-27 00:12:41 +00:00
jschauma
6a75fbb636
Following private discussion with kleink@ and hubertf@ and public discussion
...
on tech-userlevel@, back out printescaped() functionality.
kleink: ``We sell rope.''
2003-09-14 19:20:16 +00:00
uwe
9267b09572
Include "config.h" if building as a host program.
...
Need this to get SIZE_MAX defintion from compat_defs.h on FreeBSD.
2003-08-27 18:36:19 +00:00
junyoung
523866566b
Add missing "."
2003-08-27 16:27:35 +00:00
kleink
aeaabe9fa8
This is a host tool, so for the time being change SIZE_T_MAX to the
...
more portable SIZE_MAX; partially addresses PR toolchain/22504 from
Christian Limpach.
2003-08-25 16:38:55 +00:00
itojun
e1e0321817
use bounded string op
2003-08-13 02:51:20 +00:00
agc
b5b2954259
Move UCB-licensed code from 4-clause to 3-clause licence.
...
Patches provided by Joel Baker in PR 22249, verified by myself.
2003-08-07 09:05:01 +00:00
jschauma
458ed23412
As discusses a little while back on tech-userlevel:
...
If stdout is a tty, use vis(3) to print any filenames to prevent garbage
from being printed if the filename contains control- or other non-printable
characters.
While here, sprinkle some EXIT_FAILURE and NOTREACHED where appropriate.
2003-08-04 22:31:21 +00:00
lukem
826a14607a
Now that <bsd.prog.mk> DTRT if HOSTPROG is defined (i.e, it is a no-op),
...
there's no need to special-case .include-ing it.
2003-05-18 07:57:31 +00:00
wiz
14dfaa4b03
New policy: New sentences start on a new line.
...
Patches by Robert Elz <kre at munnari oz au>, with minimal changes by me.
2002-09-25 15:18:36 +00:00
thorpej
42321e369a
Don't use MAX(); not all systems have it, and this is a host tool.
2002-09-13 18:07:52 +00:00
enami
fa2d3031e1
The el option is an extention.
2002-07-03 01:27:23 +00:00
bjh21
4a9e799f0d
Rather than (ab)using the standard error message for EFTYPE, print our own
...
message when "cat -f" is used on a non-regular file. This is necessary to
make cat(1) portable to systems that don't have EFTYPE (like Linux).
2002-06-11 22:05:07 +00:00
bjh21
06cc08da90
Only use __RCSID() and __COPYRIGHT() if they're defined.
2002-06-11 22:01:30 +00:00
mason
aa8bdf5f50
Add wrapper around bsd.prog.mk include in preparation for this becoming a
...
host tool.
2002-06-10 18:31:12 +00:00
mason
ec4fb122bd
Add -l option to cat(1), as discussed on tech-userlevel. This option
...
causes cat(1) to use fcntl(2) to set an exclusive advisory lock on stdout.
While being useful in its own right, this will shortly be used to
guarantee orderly writing to METALOG in the case of unprivileged builds
with NBUILDJOBS > 1.
2002-06-10 07:43:33 +00:00
kleink
31f7fb4902
Consistent wording: regular' files, not
plain' ones; from Giorgos
...
Keramidas in PR bin/16824.
2002-05-15 06:52:54 +00:00
simonb
f1a6122c11
Simplify previous - sbuf.st_blksize is a uint32_t, so just use
...
bsize = MAX(sbuf.st_blksize, BUFSIZ);
and skip playing with SSIZE_MAX altogether.
2002-05-09 02:19:42 +00:00
thorpej
f8b11571bb
Fix oversight in last.
2002-05-09 02:13:10 +00:00
thorpej
2ee7baad55
Skip a check that is always true if _LP64 is defined.
2002-05-09 02:07:38 +00:00
ross
dc5571b22e
Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
2002-02-08 01:21:55 +00:00
wiz
94eea247e1
Sort sections, drop unnecessary .Pps.
2001-12-20 20:01:15 +00:00
wiz
3ebcdc5e43
Whitespace nits.
2001-12-20 19:31:48 +00:00
lukem
678a800f83
change from WARNS?=1 to WARNS?=2 for bin/
2001-11-03 13:40:30 +00:00
wiz
bb2c669165
Some KNF, via patch by Petri Koistinen in private mail.
2001-09-16 12:12:13 +00:00
wiz
aaec222d9c
Some style improvements. [Nearly] #13592 by Petri Koistinen.
2001-07-29 22:40:57 +00:00
mjl
73ef471d4f
Un-__P and ANSIfy
2001-01-03 14:32:40 +00:00
mjl
0c55b7011c
Sync usage w/ options, remove bogus cast.
2001-01-03 14:29:24 +00:00
kleink
2caf6aacdd
For commands and utilities, use EXIT STATUS rather than RETURN VALUES as
...
appropriate (and documented in mdoc(7)).
2000-09-04 07:30:07 +00:00
hubertf
1cb54f68ac
Add 'RETURN VALUE' section header.
2000-08-28 02:11:04 +00:00
jwise
643a9478fa
Use .At v1 macro instead of spelling out AT&T Unix version 1.
2000-08-02 15:42:24 +00:00
christos
a32679938b
don't use the "f" flag to fopen when -f is not specified (from Chuck Cranor)
2000-07-31 02:49:28 +00:00
simonb
51ee9dc68d
Don't declare 'extern opt*' getopt variables.
2000-04-14 05:52:56 +00:00
christos
8b1a601327
Add a -f fflag that makes sure that we only try to read from plain files
...
so that there is no chance to block.
2000-01-15 01:13:15 +00:00
abs
b1b361cb53
Slightly modified small fixes from Richard Rauch in PR bin/9150
2000-01-09 15:56:37 +00:00
christos
121565d194
Make this compile with WARNS = 2
1999-07-08 01:56:09 +00:00
hannken
c2e396b2c7
Fix buffer allocation in function `raw_cat'. It was possible to get a
...
buffer size of zero if stdout has a block size of 0.
The command `rsh <host> cat <files>' gives no output and no error.
- Allocate a minimum of BUFSIZ bytes for buffer.
- Use a static buffer if either `fstat' or `malloc' fails.
- Do the allocation once since stdout will not change block size.
1999-04-26 09:15:59 +00:00
garbled
f124765044
More and more .Os cleanups. .Os is defined in the tmac.doc-common file,
...
so we shouldn't override it with versions in the manpages. Many more to
come.
1999-03-22 18:25:43 +00:00
fair
570e759de9
Patch from PR#5156 to adjust buffer size to match filesystem block size
...
when "-u" option used, plus some additional documentation.
1999-03-11 12:04:18 +00:00
mycroft
9dc385beb1
Delint.
1998-07-28 05:31:22 +00:00
fair
dc026e0515
Change occurrences of "UNIX" to .Ux or .At as appropriate.
1998-04-28 06:00:51 +00:00
kleink
bea84c455b
Fix the EOL-indicators ('$') toggled by the `-e' option to be lined up
...
correctly when used in conjunction with the `-b' option; from Giles Lean
in PR bin/4841, modified by me to retain the line-counting semantics of `-b'.
1998-01-27 16:37:31 +00:00
cgd
bad15fd37f
lint
1997-11-05 21:17:14 +00:00
enami
c3872193cf
Fix .Nm usage.
1997-10-20 08:50:59 +00:00
christos
23edbe3557
Remove WARNS=1 from all the subdirectory Makefiles, and add it to Makefile.inc
...
now that all /bin has been cleaned.
1997-07-20 22:36:20 +00:00
thorpej
91816b39da
Add WARNS.
1997-07-20 04:35:17 +00:00
thorpej
7d87f9c404
__COPYRIGHT()/__RCSID()/prototype police.
1997-07-20 04:34:33 +00:00
kleink
b4780b53b4
When allocating a buffer failed, don't fail silently.
1997-06-26 23:07:19 +00:00
kleink
dd33340fea
Indicate file handling failures by exit codes >0; fixes PR/3538 from
...
David Eckhardt <davide@piper.nectar.cs.cmu.edu>.
1997-04-27 18:34:33 +00:00
tls
4c7b22f594
kill use of register
1997-01-09 16:07:09 +00:00