Commit Graph

43 Commits

Author SHA1 Message Date
Ed Schouten
eccad22277 More -Wmissing-variable-declarations fixes.
In addition to adding missing `static' keywords:
- bin/dd: Pull in `extern.h' to guarantee consistency with source file.
- libexec/rpc.rusersd: Move shared globals into an extern.h.
- libexec/talkd: Move `debug' and `hostname' into extern.h.
- usr.bin/cksum: Put counters in extern.h, as they are used by ckdist/mtree.
- usr.bin/m4: Move `end_result' into extern.h.
- usr.sbin/services_mkdb: Move shared globals into an extern.h.
2012-10-20 10:33:15 +00:00
Ed Schouten
b3608ae18f Replace index() and rindex() calls with strchr() and strrchr().
The index() and rindex() functions were marked LEGACY in the 2001
revision of POSIX and were subsequently removed from the 2008 revision.
The strchr() and strrchr() functions are part of the C standard.

This makes the source code a lot more consistent, as most of these C
files also call into other str*() routines. In fact, about a dozen
already perform strchr() calls.
2012-01-03 18:51:58 +00:00
Joel Dahl
da52b4caaf Remove the advertising clause from UCB copyrighted files in usr.bin. This
is in accordance with the information provided at
ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change

Also add $FreeBSD$ to a few files to keep svn happy.

Discussed with:	imp, rwatson
2010-12-11 08:32:16 +00:00
Ulrich Spörlein
0d9deed52c mdoc: drop redundant .Pp and .LP calls
They have no effect when coming in pairs, or before .Bl/.Bd
2010-10-08 12:40:16 +00:00
Xin LI
821df508e8 Revert most part of 200420 as requested, as more review and polish is
needed.
2009-12-13 03:14:06 +00:00
Xin LI
6f2d322192 Remove unneeded header includes from usr.bin/ except contributed code.
Tested with:	make universe
2009-12-11 23:35:38 +00:00
Brooks Davis
6a9d52f375 Change a use of u_int32_t to uint32_t.
PR:		bin/93172
Submitted by:	Robert Millan <rmh at aybabtu dot com>
MFC after:	1 week
2008-05-15 20:04:36 +00:00
Ruslan Ermilov
a866e17077 Added the EXIT STATUS section where appropriate. 2005-01-17 07:44:44 +00:00
Robert Drehmel
60b588eb94 - For variables holding offset values, use off_t rather than
int, long int or u_int32_t.  This changes the interface of
   all the CRC calculation and output functions from cksum.
 - Print variables of type off_t as intmax_t using a cast and %jd.
 - Use the standardized uint32_t type instead of u_int32_t.
   To have uint32_t defined, include <stdint.h> where necessary.
Style(9):
 - Move #include directives where they belong (esp. crc32.c).
 - Add empty lines between #include directives of system headers,
   standard library headers and local headers.
 - Test a pointer value against NULL.
 - Put a space after the return keyword.

PR:		bin/48424
2003-03-13 23:32:28 +00:00
David Malone
f2e8e0dad7 ANSIify function definitions to avoid a warning. 2002-07-28 15:13:17 +00:00
David E. O'Brien
e026a48c34 Consistently use FBSDID 2002-06-30 05:25:07 +00:00
Warner Losh
f1bb2cd2aa remove __P 2002-03-22 01:22:50 +00:00
Mark Murray
91bd71d206 Remove leaf node WARNS?=2 (that mainly I added). This should
help the GCC3 transition and CURRENT in general.
2002-02-08 22:31:43 +00:00
Mark Murray
3fa15ce5d8 WARNS=2 fixup.
kill 'register' keyword.
2001-12-02 12:54:40 +00:00
Ruslan Ermilov
d628d776c4 mdoc(7) police: utilize the new .Ex macro. 2001-08-15 09:09:47 +00:00
Dima Dorfman
f247324df7 Remove whitespace at EOL. 2001-07-15 08:06:20 +00:00
Ruslan Ermilov
625003720a mdoc(7) police: removed HISTORY info from the .Os call. 2001-07-10 14:16:33 +00:00
Dima Dorfman
7a19d1bbb9 Include missing header files which define functions for which gcc has
builtins (e.g., exit, strcmp).
2001-06-24 19:50:42 +00:00
Ruslan Ermilov
46eea498da mdoc(7) police: Change -filled displays (which just happen
to be the same as -ragged in the current implementation) to
-ragged.  With mdocNG, -filled displays produce the correct
output, formatted and justified to both margins.
2001-02-07 13:45:30 +00:00
Ruslan Ermilov
9884911506 mdoc(7) police: fixed broken references. 2001-01-16 11:52:00 +00:00
Ruslan Ermilov
f4ddfb3865 Prepare for mdoc(7)NG. 2000-12-27 16:52:31 +00:00
Ruslan Ermilov
9b88faecd3 Prepare for mdoc(7)NG. 2000-12-19 16:00:12 +00:00
Ruslan Ermilov
8fe908ef0c mdoc(7) police: use the new features of the Nm macro. 2000-11-20 19:21:22 +00:00
Philippe Charnier
f74fd6ec7a Minimal use of .Ar and .Nm.
Add section number to .Xr reference.
Add DIAGNOSTICS section name.
Remove unused #includes.
Be consistant in the parsing of flags and add missing option in usage string.
Add rcsid.
1999-12-05 20:03:22 +00:00
Peter Wemm
c3aac50f28 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
Mike Pritchard
a684cccdd6 Some man page cleanup. Make the NAME and SYNOPSIS sections agree so
that whatis(1) will produce the expected results.

Pointed-out-by: Jesus Monroy <jesus.monroy@usa.net> in freebsd-doc
1999-06-24 06:22:24 +00:00
Archie Cobbs
fa146c5335 Tweaks to allow compiling -Wall (mostly adding "const" to char rcsid[]). 1998-12-06 22:58:23 +00:00
Dag-Erling Smørgrav
d26060f2e6 Avoid infinite loop if read() fails consistently.
PR:		misc/7926
Submitted by:	Sergey Potapov <sp@alkor.ru>
1998-09-16 15:53:25 +00:00
John Birrell
4933ffaed9 cksum does a 32-bit checksum, so it needs to use u_int32_t variables,
not u_long. With this change, cksum stops core dumping on alpha (not
a good sign!) and actually computes the same values as it does on i386.
1998-03-10 05:03:49 +00:00
Alexander Langer
d7d1005304 -Wall cleanup. 1997-12-29 00:09:06 +00:00
David E. O'Brien
c3855cb0e3 Document the ``-o 3'' option.
The Man award to:	Jo"rg
1997-11-09 16:08:11 +00:00
David E. O'Brien
8f31d7ef70 Need to skip argv[0] when we are named "sum". 1997-11-09 05:47:55 +00:00
David E. O'Brien
d40fea8c06 When called "sum", it is not documented as accepting any arguments. 1997-11-09 05:35:26 +00:00
Poul-Henning Kamp
68d8bb3893 Add canonical 32bit crc as alorithm 3.
PR:		4615
Reviewed by:	phk
Submitted by:	Mike Meyer <mwm@shiva.the-park.com>
1997-09-26 08:02:18 +00:00
Bruce Evans
f3aad83afd Default to cksum' instead of to sum' for unusual program names.
Mention `sum' in the usage message.
1997-07-06 03:18:13 +00:00
Bruce Evans
2cbd69330d Merge from Lite2 (make the command sum' an alias for cksum -o 1', and
reject -o args other than "1" or "2").
1997-07-06 03:03:10 +00:00
Bruce Evans
ee589d62ba This commit was generated by cvs2svn to compensate for changes in r27219,
which included commits to RCS files with non-trunk default branches.
1997-07-06 02:22:28 +00:00
Bruce Evans
2cad40fdac Import Lite2's src/usr.bin/cksum. The Makefile is still on the vendor
branch and will temporarily give bogus hard links cksum[.1] -> sum[.1].
1997-07-06 02:22:28 +00:00
Philippe Charnier
f8a42d82e9 Update manpage to newer version. Use err(3). 1997-06-25 07:02:03 +00:00
John-Mark Gurney
2c0d39ad75 add md5(1) to SEE ALSO section.
Closes PR#3409
Submitted-by: Josh Gilliam
1997-04-29 08:41:26 +00:00
John-Mark Gurney
93e0d62d1c `appears'' -> `appeared'' (closes PR#3393, Submitted-by: Josh Gilliam)
add missing Id's
other minor clean ups
1997-04-27 08:45:46 +00:00
Warner Losh
1c8af87873 compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.
1997-03-29 04:34:07 +00:00
Rodney W. Grimes
9b50d90275 BSD 4.4 Lite Usr.bin Sources 1994-05-27 12:33:43 +00:00