Commit Graph

5291 Commits

Author SHA1 Message Date
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