Commit Graph

5434 Commits

Author SHA1 Message Date
ru
4334e7515f mdoc(7) police: lint. 2002-05-30 05:59:25 +00:00
ru
aa9fde6b91 mdoc(7) police: removed unnecessary .Ns. 2002-05-30 05:52:19 +00:00
ru
297515d525 mdoc(7) police: removed unnecessary .Ns's. 2002-05-30 05:47:50 +00:00
tjr
f0cf811c24 Move exit status info into Diagnostics section. 2002-05-30 00:46:00 +00:00
tjr
60d1ab01d7 Accept an input file name of "-" to mean standard input, as required by
P1003.2.
2002-05-30 00:07:14 +00:00
tjr
2d9a2285ef Fields should be separated by <blank>s, not <space>s according to P1003.2. 2002-05-29 23:55:44 +00:00
tjr
31d09977d0 Don't bother trying to handle "-" arguments ourselves, getopt(3) already
does this for us.
2002-05-29 23:52:55 +00:00
ru
80e7ad7353 mdoc(7) police: lint. 2002-05-29 18:53:22 +00:00
ru
7ff3239b45 mdoc(7) police: punctuation. 2002-05-29 18:52:02 +00:00
ru
3e4fa1a599 mdoc(7) police: tidy up the markup. 2002-05-29 18:49:22 +00:00
ru
4a16a3c518 mdoc(7) police: markup nits. 2002-05-29 18:26:16 +00:00
ru
1ed142f293 mdoc(7) police: use .Fl to represent stdin. 2002-05-29 18:21:42 +00:00
ru
08c4a1f3cc mdoc(7) police: lint. 2002-05-29 18:12:21 +00:00
ru
d70d6a2c6b mdoc(7) police: lint. 2002-05-29 18:00:23 +00:00
jmallett
4a675d0d9d A space between switch and open-paren. Don't explicitly cast the value
returned by getopt(3) to 'char' in a switch.
2002-05-29 17:12:30 +00:00
jmallett
41ef234489 ANSI, __FBSDID() 2002-05-29 17:08:09 +00:00
tjr
17b5f40eed Use mkstemp(3) to avoid /tmp race. 2002-05-29 14:23:10 +00:00
tjr
4dce1a540c Document standards conformance. 2002-05-29 13:45:16 +00:00
tjr
83600f5b2c style(9): Sort sections correctly, exit status info into DIAGNOSTICS section. 2002-05-29 13:39:34 +00:00
tjr
eac28cf68c Sync synopsis with reality: file arguments are optional. 2002-05-29 13:33:48 +00:00
tjr
3539ebd46f Use getopt() to reject any options and skip "--" arguments. 2002-05-29 13:14:51 +00:00
des
4ba107a215 Make our child the leader of its own process group to avoid receiving
signals in its stead.  This fixes the dread "zsh exits upon ^C" bug.
2002-05-29 03:32:17 +00:00
alfred
197cf7d2ba Assume __STDC__, remove non-__STDC__ code. 2002-05-28 19:23:47 +00:00
tjr
0372ab2f7b Add a History section. comm(1) appeared in V4. 2002-05-28 09:35:30 +00:00
tjr
14396afdcd No need to handle '-' explicitly in getopt() loop.
Obtained from:	NetBSD
2002-05-28 09:26:08 +00:00
des
0b10af209d Drive-by whitespace cleanup & add NAI copyright 2002-05-28 06:47:32 +00:00
des
5de2aebb49 Drive-by whitespace cleanup. 2002-05-28 06:46:37 +00:00
tjr
8daf14c02a Write "FROM" heading above the hostname column, like NetBSD and GNU do. 2002-05-28 06:36:46 +00:00
marcel
58435e6cb7 Add uuidgen(2) and uuidgen(1).
The uuidgen command, by means of the uuidgen syscall, generates one
or more Universally Unique Identifiers compatible with OSF/DCE 1.1
version 1 UUIDs.

From the Perforce logs (change 11995):

Round of cleanups:
o  Give uuidgen() the correct prototype in syscalls.master
o  Define struct uuid according to DCE 1.1 in sys/uuid.h
o  Use struct uuid instead of uuid_t. The latter is defined
   in sys/uuid.h but should not be used in kernel land.
o  Add snprintf_uuid(), printf_uuid() and sbuf_printf_uuid()
   to kern_uuid.c for use in the kernel (currently geom_gpt.c).
o  Rename the non-standard struct uuid in kern/kern_uuid.c
   to struct uuid_private and give it a slightly better definition
   for better byte-order handling. See below.
o  In sys/gpt.h, fix the broken uuid definitions to match the now
   compliant struct uuid definition. See below.
o  In usr.bin/uuidgen/uuidgen.c catch up with struct uuid change.

A note about byte-order:
        The standard failed to provide a non-conflicting and
unambiguous definition for the binary representation. My initial
implementation always wrote the timestamp as a 64-bit little-endian
(2s-complement) integral. The clock sequence was always written
as a 16-bit big-endian (2s-complement) integral. After a good
nights sleep and couple of Pan Galactic Gargle Blasters (not
necessarily in that order :-) I reread the spec and came to the
conclusion that the time fields are always written in the native
by order, provided the the low, mid and hi chopping still occurs.
The spec mentions that you "might need to swap bytes if you talk
to a machine that has a different byte-order". The clock sequence
is always written in big-endian order (as is the IEEE 802 address)
because its division is resulting in bytes, making the ordering
unambiguous.
2002-05-28 06:16:08 +00:00
tjr
c749049ff8 Hook newgrp(1) up to the build.
PR:		36190
2002-05-28 05:07:42 +00:00
tjr
16f4712bc4 Add the newgrp(1) utility, which changes groups. This is required by
the POSIX.2 UPE.

PR:		36190
Reviewed by:	-standards, silence on -audit
2002-05-28 05:05:28 +00:00
tjr
857b1f2ee6 The XCU issue 5 requirement of accepting the file operand intermingled
with options has been withdrawn in issue 6, to which nl(1) now conforms.
2002-05-27 06:53:54 +00:00
tjr
b50c5edd06 style(9): use errx() where appropriate instead of fprintf() + exit(). 2002-05-27 06:46:29 +00:00
tjr
dab00ca877 style(9): use err() instead of perror() + exit(). 2002-05-27 06:37:34 +00:00
tjr
c73112a6c7 Claim conformance to IEEE Std 1003.1-2001.
See also csplit(1).
2002-05-27 06:08:14 +00:00
tjr
fd517aac90 Allow "-" to be specified as an operand as well as an option.
SUSV3 requires something like "split -- -" to work. Document the "-" operand.
2002-05-27 05:27:10 +00:00
tjr
89c62e14bd Avoid overflowing `fname' if the file name prefix given on the command
line is too long.

Obtained from:	OpenBSD
2002-05-27 04:59:46 +00:00
tjr
3a59030266 Exit non-zero if the tags file cannot be opened. 2002-05-27 03:54:45 +00:00
tjr
ec252a0e8b From NetBSD:
Revision 1.10 Sat Oct 14 17:41:55 2000 UTC by bjh21
    Don't core dump with an empty format string.  Fixes PR#11218.
    Patch supplied by Launey Thomas.

Obtained from:	NetBSD
2002-05-27 03:17:28 +00:00
tjr
fb067c8f63 Initialise the `positions' array correctly before use. 2002-05-27 02:01:25 +00:00
tjr
ec9860cfd0 Add Standards, Diagnostics and History sections. 2002-05-26 07:07:14 +00:00
tjr
dc6576dc1f If a file operand cannot be processed, go on to process any remaining files
but exit non-zero.
2002-05-26 06:15:15 +00:00
ru
d98e09267b Make it work for a different endianness binary.
(This version is still limited to ELF64.)

Reviewed by:	jake
2002-05-25 13:43:16 +00:00
ru
6e02fb8404 Move elf2aout to usr.sbin/.
Approved by:	jake
2002-05-25 13:29:47 +00:00
tjr
8f932f078d Sync usage message with manual page synopsis. 2002-05-25 11:37:10 +00:00
tjr
8ad547bb95 Bad numeric arguments or usernames should cause non-zero exit status. 2002-05-25 10:37:24 +00:00
tjr
cb22bdeaa9 Determine exit status to use before writing diagnostic message; warn()
may change errno.
2002-05-25 03:32:23 +00:00
tjr
bfb5f8c97e Typo: use plural now that we have more than one option. 2002-05-25 03:08:21 +00:00
tjr
8007b11dcd If a file cannot be processed, try to process any remaining files
then exit non-zero.
2002-05-25 03:04:28 +00:00
trhodes
2cd0ea3f3a Add the word ``fields'' to the description, and change an instance from
fields to num in the SYNOPSIS

Noticed by:	keramida
2002-05-24 19:12:02 +00:00
ru
b4b6d4dfb9 Back out the ``run shell from $PATH'' change; this was an overkill
and is insecure.

Requested by:	bde
2002-05-24 15:51:27 +00:00
tjr
74ff5f42c5 If a file argument cannot be processed, process the remaining ones
and exit non-zero (SUSv3)
2002-05-24 10:58:21 +00:00
tjr
2292a0fbef When a file name of "-" is given, read from standard input (SUSv3) 2002-05-24 09:56:18 +00:00
tjr
425cb2e9e1 Allow byte/character positions >_POSIX2_LINE_MAX to be specified by
dynamically growing the `positions' array.
2002-05-24 09:11:18 +00:00
tjr
4b1ea82b13 Use fgetln(3) to handle lines of unlimited length instead of a
getc/putc loop.

Suggested by: dd
2002-05-24 08:56:49 +00:00
tjr
c2f2a6104f P1003.2 forbids imposing any limit on line lengths; read character by
character instead of manually buffering each line.
2002-05-24 07:05:10 +00:00
tjr
e1f16de894 Exit with non-zero status if any files specified could not be opened
when -s option is given (SUSv3).
2002-05-24 06:17:29 +00:00
tjr
631d66bee1 If processing of one file fails, try to process the remaining files and
exit non-zero instead of immediately exiting. The traditional BSD
behaviour is explicitly forbidden by P1003.2.
2002-05-24 06:03:12 +00:00
tjr
fcdda3c7ed If processing of one file fails, try to process the remaining files and
exit non-zero instead of immediately exiting (SUSv3).
2002-05-24 06:00:47 +00:00
fanf
977ef0bf3c Sync with upstream version:
* Ensure we work within the array bounds when parsing command-line options;
  * Replace h0h0getopt with getopt(3);
  * Use consistent whitespace style in the function declarations.

Revieweded by:	dwmalone (mentor)
2002-05-23 16:50:41 +00:00
jmallett
408260d79e Handle numeric keys by checking a "default" file. Handle number-less keys
by failing, since comparing up to the length of the key (0) against the
begin line for a key in the help file will always succeed, and print what
is wholly bogus output.
2002-05-23 14:58:22 +00:00
jmallett
64477eb2ea Set the MAKEFILE variable to the value passed to ReadMakefile(), not the full
path to it.  Use the full path only for parsing it.
2002-05-23 12:01:54 +00:00
jmallett
28296cf1d3 Make my style consistent.
Remove two includes.

Fix a typo (semicolon instead of period at EOL).
2002-05-23 03:03:44 +00:00
jmallett
981165838b Taking a leap of faith, tie the help command in to the build. 2002-05-22 23:15:58 +00:00
jmallett
df0fe27516 Add my PD implementation of the SCCS help command, which prints help from
files in the format used by SCCS, given a key.  It behaves exactly like the
``proper'' SCCS help command, from what testing I can do.
2002-05-22 23:14:17 +00:00
jmallett
050fe17638 Tie sccs(1) in to the build, as it now does one thing right: sccs what 2002-05-22 16:19:31 +00:00
jmallett
51cd687bb8 Remove mention of the GNU version of ptx, it is dead. 2002-05-22 16:18:14 +00:00
jmallett
618595e7c7 Add a usage().
Print usage() if right before executing the specified command, it comes to be
that *argv is NULL (i.e. a flag was specified without a command being given).
2002-05-22 16:09:52 +00:00
jmallett
a00707167b Remove #ifndef's on V6. 2002-05-22 16:01:50 +00:00
jmallett
844f8bb282 Put braces around the command table properly. 2002-05-22 15:59:27 +00:00
jmallett
26ab0525a8 Use what(1) here, in /usr/bin/what. It doesn't print error 26 correctly, but
neither does the pd sccs(1) implementation I have around, so there's no loss
for now.
2002-05-22 15:44:29 +00:00
jmallett
a743481874 str_concat() doesn't really take const arguments.
Submitted by:	bde
Pointy hat to:	jmallett
2002-05-22 15:34:00 +00:00
ru
7d529109a8 Do not run shell from /bin, run it from $PATH.
Bump MAKE_VERSION to 5200205221.
2002-05-22 14:53:18 +00:00
ru
367d0965de Added the MAKE_VERSION global that could be useful in determining
if a given make(1) is feature-compatible with a set of makefiles.

When merged, this will be used to replace the ugly upgrade_checks
hacks in src/Makefile.

Version has the RYYYYMMDDX format, where R is from RELENG_<R> and
X allows for 10 distinguishable changes per day.

Discussed with:	bde
2002-05-22 14:35:47 +00:00
jmallett
a9a1aecd79 Format internal commands properly.
Kill a bit of trailing whitespace.

Fix a path format.

Submitted by:	mdoc(7) police (ru)
2002-05-22 14:17:16 +00:00
jmallett
68ea1628ef Clean up the manual page by leaps and bounds in terms of formatting.
Ruslan's version took away the '.Nm' for some commands, but not others, so
I chose to go with leaving '.Nm'.

Submitted by:	ru
2002-05-22 13:59:52 +00:00
jmallett
199da7245a Make the guarded string functions take a const "from" addr, and make the
function that prints when a botched guarded string operation occurs take
two const arguments.

XXX Should we use strlcat/strlcpy instead and hope for the best?
2002-05-22 13:41:08 +00:00
jmallett
1ce96038da Remove register qualifier. 2002-05-22 12:32:54 +00:00
jmallett
56fd2c2ae6 Use function prototypes. 2002-05-22 12:31:40 +00:00
jmallett
b9b88260ff Clean up formatting. 2002-05-22 11:29:21 +00:00
jmallett
59fd383a6e Replace the evil that is __DECONST() with (void *). This is one of the least
evil things we can do involving the const qualifier and a pointer.

Submitted by:	bde, ru
2002-05-22 11:16:48 +00:00
jmallett
aef64f84a3 Make sccs(1) compile cleanly by fixing syntax errors such as #endif followed
by a token, and by including headers to get prototypes for many things, and
also by spelling the type of structure readdir(3) returns as "dirent".
2002-05-22 11:10:03 +00:00
ru
db664693ee Unroff all forms of \f and \*, and the simplest form of \s.
Submitted by:	fenner, ru
Reviewed by:	ru, fenner
2002-05-22 11:08:41 +00:00
jmallett
b8afb8db22 Revive the SCCS front-end, sccs(1), back from the Attic, since it's something
SUS wants (they want the entire suite of SCCS commands, we don't have them,
but we *had* the frontend, so we can have it again, and now).

Add $FreeBSD$ where appropriate, don't revive PSD.doc/spell.ok.
2002-05-22 10:43:50 +00:00
tjr
f37a06e269 Build pathchk(1). 2002-05-22 10:32:24 +00:00
tjr
6d08f800fd Add the pathchk utility, which checks pathnames for validity or
portability between POSIX systems.

Submitted by:	Chuck Rouillard (manpage, initial implementation)
2002-05-22 10:30:16 +00:00
jmallett
4c8f46cf75 Make ReadMakefile() operate using the realpath(3) name for the file handed to
it, which means that relative paths will be expanded to absolute paths, and
filenames without a path will end up with their absolute path included as
well.  This aids tremendously in debugging a build using our make(1) with
multiple Makefile's, such as when there is a syntax error in a file in a
sub-directory as per <bsd.subdir.mk>.  Normally we'd end up with just
"Makefile" known about the Makefile in question, which means that an error
would be useless for someone trying to debug their build system, now we
end up with a complete real pathname for the Makefile.

So mostly this is useful in a debugging context, but possibly others too
(I haven't thought of them yet, but they probably are more useful if you
make Dir_FindFile use realpath(3), but that's another story).

Reviewed by:	-current
MFC after:	2 weeks
2002-05-21 20:24:46 +00:00
trhodes
a1b38ab0e2 Reword a small part of the uniq(1) manual page to help reduce word
duplication (ie: fields fields).

PR:		38161
Reviewed by:	keramida
MFC after:	3 days
2002-05-21 16:54:58 +00:00
tjr
330e4e0592 Mark argc as __unused to silence GCC. 2002-05-21 02:48:55 +00:00
tjr
4d3e3e5eba Build the tabs(1) utility.
PR:		36126
2002-05-21 02:36:12 +00:00
tjr
cf778678c6 Add an implementation of the tabs(1) utility, as required by SUSv3.
PR:		36126
2002-05-21 02:33:25 +00:00
ru
de6b1a9d89 Style. 2002-05-20 16:42:15 +00:00
ru
531943a766 Bootstrap elf2aout(1) for sparc64; used to build sys/boot/sparc64/boot1. 2002-05-20 14:42:48 +00:00
ru
da85e76b35 Kill the stray #include line. 2002-05-20 08:05:58 +00:00
ru
628fe540c2 s/u_int/u_int32_t/ 2002-05-20 07:56:40 +00:00
dd
e5bc175e13 Mark a warning as such. Without this, it isn't obvious whether
killall stopped after failing to kill one process or whether it kept
going.
2002-05-20 07:17:22 +00:00
jmallett
07a99bdf83 Fix a late-night buglet in MLINKS ordering.
Submitted by:	Szilveszter Adam <sziszi@bsd.hu>
2002-05-19 20:39:42 +00:00
jmallett
073610e016 Synch usage() and manpage for b64encode/b64decode.
Make uudecode's usage more like that of other programs.
2002-05-19 11:22:54 +00:00
jmallett
1fb080cae2 Add b64decode & b64encode as synonyms for uudecode and uuencode -m,
respectively, for convenience when encoding or decoding base64 files.

As requested by various users.
2002-05-19 11:17:17 +00:00
obrien
7ec8b4c3b8 elf2aout can be useful to have on all platforms 2002-05-18 18:25:58 +00:00
obrien
0cececad59 Don't build getconf if you don't have a full C++ installation. 2002-05-18 18:24:55 +00:00
ru
1373edbd9d Fix markup.
Give Wolfram a credit for writing the original version in Perl
like in killall(1).
2002-05-18 15:39:56 +00:00
ru
b42b3c60fc More whitespace fixes. 2002-05-18 15:15:30 +00:00
markm
83845db29a Remove Perl and TCL/TK bits, neither of which are in the base system
(anymore).
2002-05-18 14:27:17 +00:00
ru
5d41a24187 Fixed spacing. 2002-05-18 14:17:53 +00:00
ru
7fbefe2fef Look into machine specific subdirs. 2002-05-18 13:56:53 +00:00
markm
7528001bd0 Add C rewrites of catman and makewhatis. These aren't quite as
the submitter supplied them, as I did some WARNS=n fixups (mostly
const-ification).

Submitted by:	John Rochester <john@jrochester.org>
2002-05-18 09:19:08 +00:00
obrien
7632a210b0 WARNS 6 this. 2002-05-18 05:33:28 +00:00
obrien
5cf8a1d115 Add a perl wrapper. mergmaster(8) is broken with out it.
Submitted by:	DES
2002-05-18 05:31:48 +00:00
gordon
0f322ee87c Add my birthday to the list. Apparently, I share a birthday with dwhite.
Reviewed by:	jake
Approved by:	jake
2002-05-17 17:49:32 +00:00
knu
66c935d52f Fix a tiny bug in shlib support of ldd(1); if dlopen(lib, RTLD_TRACE)
returns, exit gracefully with 0.

This fixes the behavior you see when you specify libc.so.  It occurs
because ldd(1) itself is linked with libc.so.

	$ ldd /usr/lib/libc.so
	/usr/lib/libc.so:
	ldd: /usr/lib/libc.so: (null)
	/usr/lib/libc.so: exit status 1

Reviewed by:	silence of audit@
2002-05-17 17:06:56 +00:00
jake
954f6fa7b9 Get byte swapping primitives from sys/endian.h now that they are exported
to userland.  This makes elf2aout work as a cross tool.
2002-05-17 15:46:08 +00:00
jmallett
86d7b4e026 Group the output chunks differently, to try to match BSD/OS output. Switch
to using arithmatic to determine buffer sizes to encode into.

Diane Bruce pointed out to me that BSD/OS did MIME too, so I want to match
their output, too, since my decision of 8 output groups was wholly arbitrary.
2002-05-17 12:27:02 +00:00
jmallett
cf82d76919 Revert part of the previous revision. Changing exit() to return() in main()
is wrong, even though our C compiler doesn't understand that exit() eats
control of the program, and as such can sometimes complain that main() reaches
the bottom of its body without an explicit return().

Aside from that, the functional usefulness of changing it is effectively nil,
so back it out.

Submitted by:	mike
2002-05-17 11:16:49 +00:00
tjr
5a5d149d29 Make the output tidier when multiple integer formats are requested by
attempting to line up values into columns.

Obtained from:	NetBSD (idea)
2002-05-17 08:54:32 +00:00
jmallett
7c4cad2323 Simplify prerun() in the case where there are no arguments. Can't do -I or -J
substitution if `utility' is not specified and we're using the buildin echo;
It has no arguments for us to abuse.
2002-05-17 07:55:24 +00:00
tjr
98e1f63634 Overhaul hexdump's od syntax code to handle the -s -A -j -N -t options that
SUSv3 requires and give od a proper manual page.

PR:		36783
2002-05-17 07:14:55 +00:00
tjr
4769e48d99 Declare variables that were extern'd in multiple places in hexdump.h.
PR:		36783
2002-05-17 06:32:00 +00:00
tjr
b0a96363c8 Add support for printing long doubles.
PR:		36783
2002-05-17 06:12:25 +00:00
tjr
3e9f4fc172 Print signed single-byte decimal integers correctly instead of implicitly
converting them to unsigned bytes.

PR:		36783
2002-05-17 05:43:00 +00:00
tjr
ed1adbad3e Un-deprecate od(1): rename the deprecated' variable to odmode', remove the
deprecation warning from the utility and manual page. Since this utility
is required by POSIX, it's not likely to be removed any time soon.

This is leading up to the addition of the P1003.1-2001 -s -A -j -N -t options.

PR:		36783
2002-05-17 05:20:30 +00:00
jmallett
0109c30545 Clean up malloc(3)'s argument. Remove casts which do nothing when we're
using sizeof() anyway.  Use slightly more consistent (per-file) error
reporting for malloc(3) returning NULL.  If "malloc failed" was being printed,
don't use err(3).  If a NULL format is being used, use err(3).  In one case
errx(3) was being used with strerror(3), so just use err(3).
2002-05-17 05:11:07 +00:00
jmallett
35c92f131c Remove spurious casts in malloc(3)'s argument.
Use `return' instead of `exit' at the bottom of main().
2002-05-17 02:28:46 +00:00
tjr
bcb6745c5f Add a Standards section, and note that compress(1) and uncompress(1) now
conform to P1003.1-2001.
2002-05-17 01:54:17 +00:00
tjr
dc84546441 As required by SUSv3, a file argument of "-" causes standard input
to be compressed/decompressed to standard output.
2002-05-17 01:42:43 +00:00
tjr
ddd093f802 Compression ratio statistics should be written to stderr instead of stdout. 2002-05-17 01:25:51 +00:00
tjr
37d5dd60af Use exit status 2 to indicate that the file was not compressed because
its size would not be reduced (SUSv3).
2002-05-17 00:58:07 +00:00
tjr
58d4fae22c Process and user ID arguments must be treated as decimal integers,
not octal or hex. This is the way it was before revision 1.10.

PR:		36950
Submitted by:	Peter Avalos <pavalos@theshell.com>
2002-05-16 23:55:35 +00:00
tjr
86e991cd98 Accept decimal user IDs with -u option as well as usernames.
PR:		36950
2002-05-16 23:44:11 +00:00
tjr
67bb0d1cc5 Diagnostic messages belong on stderr, not stdout. SUSv3 specifies that
renice may not use stdout at all.
2002-05-16 23:30:38 +00:00
peter
7fc284ffb7 OOPS! rev 1.16 accidently changed the default outfile from stderr to
stdout.  Unfortunately, DES mfc'ed this change in 1.15.2.1 (this
part probably should not have been) so it is broken there too.
truss is documented to use stderr, and other implementations use stderr.

Submitted by:	Arne Dag Fidjestøl <adf@idi.ntnu.no>
2002-05-16 21:58:57 +00:00
tjr
054f70b470 Handle the case where a negative offset in a regular expression match
is larger than the number of lines in the overflow file.
2002-05-16 05:04:26 +00:00
tjr
f3cfd9a3f6 Correct synopsis and usage(): pattern arguments are not optional. 2002-05-16 04:39:19 +00:00
trhodes
fa6c7efe3f More consistancy. file system > filesystem 2002-05-16 02:19:14 +00:00
tjr
24cc1f8e45 Add the SUSv3 -l option to at. This is an alias for atq. Allow job ids
to be specified on the command line for which information should be reported.

Submitted by:	Joe Halpin <joe.halpin@attbi.com>
Reviewed by:	mike
2002-05-16 00:47:14 +00:00
fanf
3609bfaab7 Report errors properly if wait() fails.
PR:		30543
Approved by:	dwmalone (mentor)
MFC after:	3 weeks
2002-05-15 16:50:09 +00:00
fanf
94a883658e Upgrade unifdef:
* It now knows about the existence of #elif which would have
    caused it to produce incorrect results in some situations.

  * It can now process #if and #elif lines according to the
    values of symbols that are specified on the command line.
    The expression parser is only a simple subset of what C
    allows but it should be sufficient for most real-world
    code (it can cope with everything it finds in xterm).

  * It has an option for printing all of the symbols that might
    control #if processing. The unifdefall script uses this
    option along with cpp -dM to strip all #ifs from a file.

  * It has much larger static limits.

  * It handles nested #ifs much more completely.

There have also been many style improvements: KNF; ANSI function
definitions; all global stuff moved to the top of the file; use
stdbool instead of h0h0bool; const-correctness; err(3) instead
of fprintf(stderr, ...); enum instead of #define; commentary.

I used NetBSD's unifdef as the basis of this since it has received
the most attention over the years.

PR:		37454
Reviewed by:	markm, dwmalone
Approved by:	dwmalone (mentor)
MFC after:	3 weeks
2002-05-15 16:30:28 +00:00
tjr
d2e458094c Build the asa(1) utility.
PR:		36130
Reviewed by:	mike
2002-05-15 03:37:55 +00:00
tjr
13b1096a78 #include <unistd.h> for getopt() and friends.
PR:		36130
Approved by:	mike
2002-05-15 03:31:40 +00:00
tjr
c0844f47a4 Use getopt() to reject options (asa has none), and to the "--" end of options
marker. Exit non-zero if we cannot open one of the input files. Update
standards conformance and exit status statements in manual page.

PR:		36130
Approved by:	mike
2002-05-15 03:17:01 +00:00
tjr
5fce6fe1a7 Remove __P,
Don't prototype main(),
C89-style function declarations,
char **argv -> char *argv[] for main()

PR:		36130
Approved by:	mike
2002-05-15 03:10:17 +00:00
tjr
fb7dc2e983 style(9): remove space between function name and opening parentheses,
sort variables, NULL is the null-pointer constant, remove unnecessary
braces.

PR:		36130
Approved by:	mike
2002-05-15 03:02:17 +00:00
tjr
03ace5aac1 Add the POSIX.2 asa utility, which interprets FORTRAN carriage-control
characters.

PR:		36130
Approved by:	mike
Obtained from:	NetBSD
2002-05-15 02:40:57 +00:00
green
957e7d4f00 o Clean up tmp file usage a little by using mkstemp(3) instead of
mktemp(3).  It would be amazingly unlikely, but the former method
  could result in a symlink attack.  A better solution would use
  ${TMPDIR}, though.
o Make sed not overwrite old backup files with no warning.
2002-05-14 23:15:42 +00:00
jmallett
4e7e0a7753 Fix a "tiny and squeeby and little" markup mistake.
Submitted by:	fenner
2002-05-14 22:55:31 +00:00
dwmalone
741f22f7bb Make a link from fr_FR.ISO8859-1 to fr_FR.ISO8859-15.
Submitted by:	wollman
2002-05-13 21:30:23 +00:00
tjr
e54018774d If we can't change the scheduling priority, warn but still execute
the requested utility. This is how nice(1) traditionall behaved,
and the behaviour required by SUSv3 and POSIX.2 UPE.

Submitted by:	Peter Avalos <pavalos@theshell.com> (partially)
Reviewed by:	mike
2002-05-13 08:03:20 +00:00
tjr
6e482061cd Support the SUSv3 -n option and the "--" end of options marker.
Replace "command" with "utility" in the manual page & source to be more
consistent with the terminology used in the standard, and to hint that
shell builtin commands won't work.

Submitted by:	Peter Avalos <pavalos@theshell.com> (partially)
Approved by:	mike
2002-05-12 22:49:48 +00:00
ru
59049318b6 Added new bsd.incs.mk which handles installing of header files
via INCS.  Implemented INCSLINKS (equivalent to SYMLINKS) to
handle symlinking include files.  Allow for multiple groups of
include files to be installed, with the powerful INCSGROUPS knob.
Documentation to follow.

Added standard `includes' and `incsinstall' targets, use them
in Makefile.inc1.  Headers from the following makefiles were
not installed before (during `includes' in Makefile.inc1):

	kerberos5/lib/libtelnet/Makefile
	lib/libbz2/Makefile
	lib/libdevinfo/Makefile
	lib/libform/Makefile
	lib/libisc/Makefile
	lib/libmenu/Makefile
	lib/libmilter/Makefile
	lib/libpanel/Makefile

Replaced all `beforeinstall' targets for installing includes
with the INCS stuff.

Renamed INCDIR to INCSDIR, for consistency with FILES and SCRIPTS,
and for compatibility with NetBSD.  Similarly for INCOWN, INCGRP,
and INCMODE.

Consistently use INCLUDEDIR instead of /usr/include.

gnu/lib/libstdc++/Makefile and gnu/lib/libsupc++/Makefile changes
were only lightly tested due to the missing contrib/libstdc++-v3.
I fully tested the pre-WIP_GCC31 version of this patch with the
contrib/libstdc++.295 stuff.

These changes have been tested on i386 with the -DNO_WERROR "make
world" and "make release".
2002-05-12 16:01:00 +00:00
bde
66189f380b Fixed 5 style bugs in VCS ids. 2002-05-12 04:02:57 +00:00