Commit Graph

5034 Commits

Author SHA1 Message Date
Hajimu UMEMOTO
a2df389f20 Backout copyright notice I broke by my previous commit. 2002-04-26 12:16:34 +00:00
Tim J. Robbins
4596ce3d47 Some minor nits exposed by the Open Group's VSC Lite verification suite:
- When an error occurs processing one file, we must continue to process
  the remaining files.
- Convert trailing whitespace to tabs as appropriate.
- Align backspace handling with what the verification suite expects.

Reviewed by:	mike
2002-04-25 23:04:52 +00:00
Tim J. Robbins
bacab7d655 Handle numbers larger than QUAD_MAX for unsigned conversions correctly.
Exit with nonzero status if a conversion failed.
Play nice if used as a shell builtin (currently disabled).

Submitted by:	bde (partially)
Approved by:	mike
2002-04-25 01:10:11 +00:00
David E. O'Brien
788fcec086 Back out the NO_RCMNDS knob.
1. The committer refused to respond to questions over the commit.
2. The servers rlogind, rshd, rexecd were not wrapped.
3. "rcmnds" as an abbreviation gets an order of magnitude less hits on
    Google than the much more well known "rcmds".
2002-04-23 23:59:51 +00:00
David E. O'Brien
046eb0421e Restore some of the original variable names, but fix the warnings their
renaming addressed by removing the global variants instead.
2002-04-23 20:30:30 +00:00
Tim J. Robbins
aca29625a8 Add the -t option, which allows tab stop positions to be specified similarly
to the way expand(1) allows. This brings unexpand(1) up to SUSv3 conformance,
and it now passes all relevant parts of the GNU textutils test suite.

PR:		35621
Reviewed by:	mike
2002-04-23 07:15:09 +00:00
Juli Mallett
ab5a295bdc - printf shouldn't bail out if a conversion fails, it should just keep
processing them.
 - \c escape to immediately stop output (similar to echo's \c)
 - \0NNN should be allowed for octal character escapes (instead of just \NNN)
 - %b conversion, which is like %s but interprets \n \t etc. inside the
   string is missing.

And I may not be any poet, but in lieu of an in-tree regression test:
ref5% ./printf '%s%b%b%c%s%d\n' 'PR' '\0072' '\t' '3' '56' 0x10
PR:     35616

Submitted by:	tjr
MFC after:	1 week
2002-04-23 02:56:16 +00:00
Eric Anholt
90acf12621 Add myself
Approved by:	des
2002-04-22 19:39:10 +00:00
Dag-Erling Smørgrav
d397408818 Usage style sweep: spell "usage" with a small 'u'.
Also change one case of blatant __progname abuse (several more remain)
This commit does not touch anything in src/{contrib,crypto,gnu}/.
2002-04-22 13:44:47 +00:00
Dag-Erling Smørgrav
05da55ee50 Don't use PAM_SILENT unless hushlogin is set (perforce change 10123)
Sponsored by:	DARPA, NAI Labs
2002-04-22 06:27:16 +00:00
Jake Burkholder
e114d8ce12 Add a Makefile for this. 2002-04-22 04:08:01 +00:00
David Malone
7c8225cab8 Use fseeko and uintptr_t to make sure that we get a sensible offset
when trying to read from the stack.

PR:		37104
Submitted by:	Thomas Quinot <thomas@cuivre.fr.eu.org>
MFC after:	3 weeks
2002-04-21 19:04:26 +00:00
Giorgos Keramidas
2642bed24b Remove duplicated text.
PR:		docs/37287
Submitted by:	Tony Finch <dot@dotat.at>
MFC after:	3 days
2002-04-21 14:48:47 +00:00
Philippe Charnier
6f9af3e6ec Dot terminate a sentence. Rearrange to not use .Nm at the beginning
of a sentence.
2002-04-21 13:02:20 +00:00
Bruce Evans
85549fe96b Fixed some style bugs ("From:" in vendor id line, disordered MAN line, and
blank lines).

Not unapproved of by:	markm
2002-04-21 12:43:14 +00:00
Juli Mallett
82130df48c Use %zu to print a size_t, not %u and definitely not %d.
Remove WARNS?=2, as GCC will usually throw a fit right now, and I'm not going
to mix WARNS and NO_WERROR.

Submitted by:	fenner
2002-04-20 21:37:26 +00:00
Philippe Charnier
8cd319f71a .Nm is not required at the begining of this sentence. 2002-04-20 21:33:10 +00:00
Philippe Charnier
6f84b6813b Use `The .Nm utility'. Add section number to .Xr. 2002-04-20 21:28:47 +00:00
Juli Mallett
815bee2f7b Print a size_t as %u not %d.
Pointed out by:	mike, des's tinderbox
2002-04-20 21:13:00 +00:00
Mike Barcroft
a2cfdda8d7 Include <arpa/inet.h> for prototype of ntohl() used in the N_BADMAG()
macro.
2002-04-20 20:09:29 +00:00
Philippe Charnier
e8937ba009 Use `The .Nm utility' 2002-04-20 12:18:28 +00:00
Juli Mallett
30d7e7ef7d In the BUGS section, mention that the ballooning of size mentioned here is
with regard to the traditional algorithm.

Suggested by:	obrien
MFC after:	1 week
2002-04-20 03:56:12 +00:00
Juli Mallett
6fa4125491 Use fwrite(3) to write out the decoded information, as the b64 decoding stuff
won't NUL terminate the string for us, and so we're liable to pick up trailing
garbage, possibly tons of it.

Pointed out by:	obrien
MFC after:	3 days
2002-04-20 03:33:40 +00:00
Juli Mallett
c8268a9fbc base64_decode() was feeding \r and \n to the decoding function, and that
was causing output to be corrupted.

Pointed out by:	obrien
MFC after:	3 days
2002-04-20 02:33:30 +00:00
Andrey A. Chernov
d969f833ed Remove <ctype.h> - not needed 2002-04-20 02:18:54 +00:00
Andrey A. Chernov
a2f7d5dc07 Prevent sign extension (again) 2002-04-20 02:04:58 +00:00
Tim J. Robbins
fcb113145c Allow space between -a and its argument. Honour locale collating order
by using strcoll() instead of strcmp().

PR:		36270
Reviewed by:	mike
2002-04-20 01:55:19 +00:00
Juli Mallett
ccc5b4e6f4 Crank WARNS.
Cast sizeof() to (int), as it's being compared against an int, not a size_t.
If i is changed to a size_t, it means the logic must be slightly changed later
in the flow, where --i is checked to be >= 0.  I am not sure I want to make a
logic change to account for clearing up a warning, when an aesthetic one will
keep from modifying the logic.

Other harmless casts, that I think I've made in the right directions.

Make gpbc() an inline function, rather than an obfuscated macro, make its
scratch space local, rather than global.  The previous macro used a dirty
hack (logical AND in place of a conditional) which would lead GCC to throw
a fit (rightly so) as the logical check, as well as the incrementation of
a variable, were not used for anything.

const'ify a few places where gcc3 yells. xstrdup() some global consts in
places where we xstrdup() when not using consts, but tried to assign them
to non-consts before.

Don't use execv(2) if we don't have the kind of arguments it wants.

Reviewed by:    asmodai obrien tjr
Submitted by:   tjr (a gcc3 build log)
2002-04-20 01:49:10 +00:00
Juli Mallett
3cd5f68282 Bump WARNS to 4. 2002-04-20 00:20:54 +00:00
Juli Mallett
91ae52cb17 In the case where we can't open /dev/tty, fall back to -t behaviour.
Submitted by:	fenner
2002-04-19 23:58:00 +00:00
Juli Mallett
5e61dfa3ca Bump WARNS to 4. 2002-04-19 23:46:45 +00:00
Philippe Charnier
3898680cf7 Use `The .Nm utility' 2002-04-19 23:44:58 +00:00
Juli Mallett
0c7c579ba6 Compound two fprintf(3)s into 1 using string concatenation. 2002-04-19 23:41:56 +00:00
Juli Mallett
fc17b349c8 After 3 months...
Merge xargs(1) with that of xMach.

Bring in xargs(1) changes to add -L and -I as per the Single Unix Specification
version 3.  Proper exit status numbers are implemented, and the manual page has
been updated to reflect reality.

The code has been ANSIfied, and a new file has been added to xargs(1) to do the
substring substitution as SUSv3 requires.

Traditional behaviour should not be affected, use of -J should be deprecated
in favor of the more portable -I (though -J has been left, for now).

Submitted by:	me, tjr (the exit status stuff)
Obtained from:	xMach
2002-04-19 23:28:54 +00:00
Philippe Charnier
4326e8b1d3 Use `The .Nm utility'. Introduce options with well known sentence. 2002-04-19 23:23:28 +00:00
Philippe Charnier
3332fe3427 Add .Pp before enumerating options 2002-04-19 23:18:18 +00:00
Andrey A. Chernov
81153b6b63 Prevent sign extension on characters with 8bit set 2002-04-19 19:43:46 +00:00
Juli Mallett
56ca2b35a4 Add __FBSDID, this file was unmodified so it was missed in the initial sweep. 2002-04-19 17:33:12 +00:00
Juli Mallett
acc9d40838 Bring OpenBSD m4(1) off of the OPENBSD vendor branch, and add the -s option,
$FreeBSD$ identifiers, and fix initialisation to stderr to happen in a function
as stderr is not the same in CURRENT as in OpenBSD.

Reviewed by:	obrien
2002-04-19 17:26:21 +00:00
Juli Mallett
29fc00b3fb Merge differences and correct the manual page. 2002-04-19 17:16:23 +00:00
Andrey A. Chernov
a243305fbe Localize it, LC_CTYPE 2002-04-19 09:02:16 +00:00
Andrey A. Chernov
b285e2683f Use LC_ALL to pick collate
Noticed by:	tjr
2002-04-19 08:16:01 +00:00
David E. O'Brien
ccf3ce3e97 Move the sysV variable substitution up with the BSD feature that replaced it. 2002-04-19 04:08:35 +00:00
Maxime Henrion
7eab3d347b Add a reference to the kenv(2) manpage. 2002-04-18 18:49:41 +00:00
Bruce Evans
fe3736d468 Fixed some style bugs:
- ifdefs around vendor sccsid were left reversed after switching to
  __FBSDID().
- vertical whitespace after some of the non-FALLTHROUGH cases was lost.
- too much vertical whitespace before prototypes.
2002-04-18 13:02:17 +00:00
Bruce Evans
7be9c056ce Backed out the style bugs in rev.1.17:
- don't use unusual indentation for 39 lines of declarations when only 2
  of the lines benefit from it.
- don't use __DECONST().  This was the one use of it in the tree, and it
  was just wrong.  It was used to hide the warning about tgetnum() having
  the wrong prototype (missing a `const') due to libncurses being
  misconfigured.  libncurses has been fixed, so the original code now
  compiles cleanly with WARNS=4.
2002-04-18 12:53:39 +00:00
Ruslan Ermilov
78257b6288 Do not reset MAKEFILE when reading ".depend" as this rather
eliminates the usefulness of ${MAKEFILE}.

Obtained from:	NetBSD
MFC after:	1 week
2002-04-18 12:04:34 +00:00
Ruslan Ermilov
71b3ac84e1 Replaced exists() tests with two equivalent defined().
LIBDIR is defined in bsd.own.mk but sys.mk no longer
includes bsd.own.mk as of revision 1.60.
2002-04-18 07:01:35 +00:00
Tim J. Robbins
13e06695bf Add the -b option (break at byte position, not column number) and the -s
option (try to break at word bounaries) for SUSv3 conformance.

Partially based on the NetBSD version, with the following changes:
 - style(9)
 - break on <blank>s, not spaces, per POSIX (and GNU)
 - when looking for last space on line, search backwards instead of
   forwards; less comparisons needed this way.
 - use LINE_MAX macro instead of a magic number and a comment saying it is
   LINE_MAX.

PR:		36245
Reviewed by:	mike
Obtained from:	NetBSD (partially)
2002-04-18 03:33:51 +00:00
Bill Fenner
69b1a0d9c0 mdoc police: use .El to end the list in the ENVIRONMENT section. 2002-04-17 21:34:47 +00:00