Commit Graph

5630 Commits

Author SHA1 Message Date
Johan Karlsson
894429f29b Add DIAGNOSTICS section to describe exit values.
Approved by:    sheldonh (mentor)
MFC after:      1 week
2002-07-09 02:13:26 +00:00
Tim J. Robbins
dfb072f405 Make cspace()'s second argument const. Make `escapes' in lputs() const. 2002-07-08 06:00:55 +00:00
Tim J. Robbins
05018c64fd Silence WARNS=4 by passing a non-const buffer to regerror(). Since it
doesn't actually use the buffer when errbuf_size == 0, pass NULL.
2002-07-08 05:36:24 +00:00
Robert Drehmel
3b1320f9de Remove a debug output statement. 2002-07-07 15:29:00 +00:00
Robert Drehmel
e1e9c75605 - Fix the code in sbuf_need() to double the allocation size until
the new content size fits into the sbuf, instead of assuming
   that allocating twice the old size is enough.
 - Use memmove(3) rather than strcpy(3) to copy overlapping
   strings.

PR:		bin/39930
2002-07-07 15:24:36 +00:00
Mike Barcroft
0ad736e62b Don't depend on pollution in <limits.h> for the definition of
<stdint.h> macros.
2002-07-05 15:58:27 +00:00
Tim J. Robbins
fa745288a7 Correct the History section; uniq(1) appeared at least as early as V3.
Move the section to after Standards.
2002-07-05 09:44:47 +00:00
Tim J. Robbins
898e5fd3f3 Remove redundant description of input_file and output_file arguments. 2002-07-05 09:37:34 +00:00
Tim J. Robbins
7dd4ac68f1 Use err instead of errx when malloc fails. "malloc" is not a helpful
error message.
2002-07-05 09:28:13 +00:00
Johan Karlsson
b68725e33f Restore copyright and RCSID.
Remove duplicate $FreeBSD$, $NetBSD$.

Submitted by:   mike
Approved by:    sheldonh (mentor)
2002-07-04 12:29:39 +00:00
Tim J. Robbins
54411faf6f Update another mention of <CR><CR> I missed the first time around (rev 1.2) 2002-07-04 05:16:19 +00:00
Johan Karlsson
e9a5542330 Reconnect whereis
Approved by:    sheldonh (mentor)
2002-07-03 19:23:50 +00:00
Johan Karlsson
b81a9775c7 Switch to c version
Approved by:    sheldonh (mentor)
2002-07-03 19:22:52 +00:00
Johan Karlsson
8d430958db compact synopsis
s/program [program ...]/program .../
        s/program [...]/program .../

Approved by:    sheldonh (mentor)
2002-07-03 19:20:59 +00:00
Johan Karlsson
058e185122 Remove -p flag.
OpenBSD's implementation lacks -p, and we don't want to
support the option now, only to lose it if/when we later
switch to OpenBSD's implementation.
This functionality is provided by which(1).

Approved by:    sheldonh (mentor)
2002-07-03 19:19:54 +00:00
Johan Karlsson
9d1b456e66 Add __FBSDID.
Remove __COPYRIGHT, __RCSID which caused an assembler warning.

Approved by:    sheldonh (mentor)
2002-07-03 19:17:59 +00:00
Johan Karlsson
b78dcb87c0 Change to NetBSDs version of whereis.
Approved by:    sheldonh (mentor)
Obtained from:  NetBSD
2002-07-03 19:16:31 +00:00
Johan Karlsson
5e3fde98fc Disconnect whereis while importing version from NetBSD
Approved by:  sheldonh (mentor)
2002-07-03 19:05:15 +00:00
Tim J. Robbins
bfed7b6485 Note that two carriage returns aren't required after entering the
initial setup anymore (since process.c rev. 1.25). Add $FreeBSD$.

MFC after:	2 weeks
2002-07-03 14:42:53 +00:00
Tim J. Robbins
8523e9a677 Avoid checking whether each line is the last line of the file when we don't
need to know. Instead, check when we are trying to match a "$" address.
This does not change the way sed processes regular files, but makes it behave
more sensibly when used interactively.

PR:		40101
MFC after:	2 weeks
2002-07-03 14:38:27 +00:00
Tim J. Robbins
5a3232258e Don't let the pattern space become null if the `x' command is used when the
hold space is null; some functions assume it's never null.

MFC after:	3 days
2002-07-03 14:32:43 +00:00
Ruslan Ermilov
ff9a78c08e mdoc(7) police: added missing markup bits, lowercased argument names. 2002-07-03 12:24:11 +00:00
SUZUKI Shinsuke
80317922b5 fixed typo.
obtained from: KAME
MFC after: 3 days
2002-07-03 06:48:12 +00:00
Tom Rhodes
126aa65832 Fix grammar in 1 sentence
Reword 'Usually faster in most cases' to 'and is faster in most cases'

PR:	40024 (partly)
2002-07-02 21:13:15 +00:00
Ruslan Ermilov
8479adc1d3 Reimplemented bsd.nls.mk using bsd.files.mk and bsd.links.mk.
Provided the (previously missing) dependency on source files
for intermediate .msg files.

Provided the default for NLSSRCDIR (defaults to .CURDIR).

Slightly changed the API: NLS should now list plain locale
names, without the .msg suffix.

When included from bsd.prog.mk, NLSNAME defaults to PROG.
2002-07-02 12:37:09 +00:00
Jonathan Mini
0830bd135e Add -g option, which restricts printing of the gecos fields to just the user's
real name.

PR:		bin/39462
Submitted by:	Mike Makonnen <makonnen@pacbell.net>
Obtained from:	NetBSD
MFC after:	1 week
2002-07-02 08:00:20 +00:00
Juli Mallett
f201bc9c84 Back out my minorly disputed and possibly not well thought out changes to how
arguments are processed, at least temporarily.
2002-07-01 18:03:30 +00:00
Mark Murray
301777f2d2 Modernise; ISOify, use __FBSDID(), use headers instead of hand-declaring.
Fix easy warnings.
2002-07-01 16:40:33 +00:00
Johan Karlsson
16429f2c6c Add my DoB
Approved by:    sheldonh (mentor)
2002-07-01 16:02:05 +00:00
Tim J. Robbins
99a84ce108 Declare environ as char **environ like in environ(7), not char *environ[].
This corrects a problem whereby xargs could not walk the environment table
to count the amount of space it used, and treated it as if it were empty.
This problem was introduced in rev 1.15.

MFC after:	2 days
2002-07-01 03:21:05 +00:00
Juli Mallett
2ea0fdfb65 Nuke src/usr.bin/help in favor of projects/sccs/help (repo copied). 2002-06-30 23:31:21 +00:00
Juli Mallett
c948c0582c Minor cleanup: ANSI C function declarations, use argc after getopt(3) to check
for remaining arguments, rather than checking for *argv being a boolean truth.
Instead of using an empty case to check for -f- to mean "read stdin", and have
stdin reopned otherwise, use a FILE* for the mbox, and assign it to stdin when
we mean to use stdin, otherwise fopen(3).  Kill `register' qualifier.
2002-06-30 17:36:54 +00:00
Juli Mallett
549e1e057c Make it possible to have this (basename(1)) perform basename(3) on multiple
files.  The traditional behaviour, 'basename string .suffix', is preserved,
however a suffix may now also be specified via a getopt(3) option, -s, such
that if it is specified in that way, all string arguments follow.  There is
also a new flag, -a, which allows a user to say "yes, please basename(3) on
all arguments".  Update manual to reflect this unobtrusively.

Reviewed by:	obrien
2002-06-30 13:40:35 +00:00
David E. O'Brien
64567a4162 Consistently wrap CSRG SCM ID.
Requested by:	bde
2002-06-30 09:24:25 +00:00
Tim J. Robbins
721da592c4 Handle relative and absolute pathnames (anything with a `/' in it) in the same
way as execve(2), and the old perl which(1).

PR:		35718
2002-06-30 06:02:39 +00:00
Tim J. Robbins
8c821782f8 Treat empty PATH elements as "." for tradition and consistency with the
old Perl which(1) script.

PR:		35719
2002-06-30 05:48:50 +00:00
David E. O'Brien
77c8bf7cae Consistently use FBSDID 2002-06-30 05:34:21 +00:00
David E. O'Brien
e026a48c34 Consistently use FBSDID 2002-06-30 05:25:07 +00:00
Juli Mallett
5cdd3a031f Untie help and sccs from the build. sccs has been repo copied into
projects/sccs/sccs/, to accompany projects/sccs/sccscmds, and help will
be dying shortly.

These programs will not be a part of 5.0-RELEASE, at least not in their
current form.  They'll either end up in src/contrib or ports.

Submitted by:	obrien
2002-06-29 22:45:44 +00:00
Tim J. Robbins
e12c2e18a5 Avoid truncating filenames with snprintf(). 2002-06-29 05:31:26 +00:00
Andrey A. Chernov
55f0377c44 Simplify TERM handling since now libutil not overwrites existen TERM for "term" 2002-06-28 22:56:31 +00:00
Tim J. Robbins
4633a1ab99 Refer to utilities, not commands, for consistency with env(1), nice(1), etc. 2002-06-28 09:34:46 +00:00
Tim J. Robbins
8b4f995acc Document the fairly obvious effects of the PATH environment variable. 2002-06-28 09:31:03 +00:00
Tim J. Robbins
6ec9d03768 Discourage use of env(1)'s "-" flag by moving its description to the
Compatibility section of the manual page.
2002-06-28 09:23:39 +00:00
Andrey A. Chernov
79a20d3b58 Overwrite "term" from login.conf(5) for any known TERM 2002-06-28 04:59:39 +00:00
Matthew Dillon
df151480c8 Add my entry to the mojo file. 2002-06-28 04:26:07 +00:00
CHOI Junho
d3900e1fed add my entry. 2002-06-28 01:42:45 +00:00
Juli Mallett
21e21aad32 Increment morefiles, balance braces. This should really be using getopt(3). 2002-06-27 21:11:19 +00:00
Juli Mallett
f63eec78e4 Instead of not using argc and doing other great evil, check for no arguments
in main() and print usage, or if there are too many arguments, handle that
there, too.
2002-06-27 21:01:32 +00:00
Juli Mallett
10b9342105 Update my name here, pointed out by grep(1). 2002-06-27 19:05:47 +00:00
Tim J. Robbins
126b0a6341 Indicate that the semicolon that terminates argument lists should be in
its own argument for -ok and -okdir.
2002-06-26 08:03:54 +00:00
Tim J. Robbins
cc81b6b0fb Make it more obvious that the semicolon that terminates -exec and -execdir
argument lists must be in an argument by itself, not on the end of the
previous one.
2002-06-26 07:55:18 +00:00
Matthew Dillon
552116c927 Make limits(1) aware of the new vmemoryuse resource limit.
Submitted by:	sheldonh
2002-06-26 03:43:25 +00:00
Sheldon Hearn
4ece3f34aa Fix mdoc nits in preparation for RLIMIT_VMEM support:
* add missing Ar macro for one instance of limitflags

* fix indentation problem (not perfect, but then this is one _very_
  awkward manpage mark up properly)
2002-06-26 01:40:15 +00:00
Matthew Dillon
b22ac97b33 This is Alexander Kabaev's patch to solve the signal problem with su
(see 'zsh exits upon ^C' thread).  This may be temporary be he's been
running it for a year without incident so we should be golden with it.

Approved by:	des
2002-06-26 00:42:40 +00:00
Matthew Dillon
6592cfde7a Backout 1.51 on DES's request.
Approved by:	des
2002-06-26 00:38:39 +00:00
Tim J. Robbins
42676968c6 Sort sections, and refer to sed as a utility, not a function. 2002-06-25 08:36:19 +00:00
Hye-Shik Chang
2a5454cd3d Add ICBM coordinates and birthday reminder
Reviewed by: cjh (mentor)
Approved by: cjh (mentor)
2002-06-25 08:15:35 +00:00
Mike Heffner
0077673e56 Add support for the 'flipr' option per IEEE 1003.1-2001. 2002-06-25 05:34:27 +00:00
Mike Heffner
7d409b3221 Use strcasestr() instead of reimplementing it. 2002-06-25 05:28:32 +00:00
Mike Heffner
27c7d5ffd1 Make the 'searchheaders' option behave how it was supposed to. If
enabled, the string '/to:y' will match strings in the To, Cc, and Bcc
header fields. Whereas, '/To:y' will match only the To field. Edit the
manpage and a code comment to indicate the correct behavior.
2002-06-25 05:24:30 +00:00
Mike Heffner
d1821d3da2 Rearrange a little, specifically:
- removed "Option string values" section and divided up amongst mail
  options and environment section
- expanded environment section
- rearranged mail options
- added default values to the mail options for clarification

Reviewed by:	ru
2002-06-25 05:16:11 +00:00
Juli Mallett
90af6a724e Remove deprecated register qualifier. 2002-06-24 17:40:27 +00:00
Mark Murray
a5a01740a0 Better warnings fixes. Use more sane argument types instead of bogus casts
Submitted by:	bde
2002-06-24 16:35:19 +00:00
Christian Weisgerber
401717b20d Fix unaligned access error.
Reviewed by:	ticso
2002-06-24 12:40:11 +00:00
Tim J. Robbins
d1a1392d8f Fix off by one in `y' (transliterate) command which caused the last character
of the pattern space not to be examined.

Noticed by:	Motoyuki Konno <motoyuki@bsdclub.org>
2002-06-24 11:24:02 +00:00
Philippe Charnier
a228302fca Make egetopt() return -1 not EOF, as getopt(3) do.
Reviewed by:markm
2002-06-23 20:42:30 +00:00
Tim J. Robbins
525b0bc8df Document the fairly obvious effect of the PATH environment variable. 2002-06-23 11:49:08 +00:00
Tim J. Robbins
c8c46b4307 Make the Examples section consistent with the rest of the system manual
pages: description of command first, then command as typed (no shell prompt)
using Dl macro.
2002-06-23 11:21:20 +00:00
Philippe Charnier
dfe2d6470a add DIAGNOSTICS section 2002-06-23 09:48:25 +00:00
David E. O'Brien
5386688cf3 Only got one of the Perl usages. 2002-06-23 00:57:17 +00:00
David E. O'Brien
2c4d8a870f Replace a perl usage with an AWK one.
Submitted by:	Bob Willcox <bob@immure.com>
2002-06-23 00:55:03 +00:00
Juli Mallett
1926d4aaad Stylistic nit:
main()'s argv argument is char*[], and functions that may inherit that arg
should use char*[] as well.
2002-06-22 12:59:40 +00:00
Juli Mallett
5058dcb497 Check for results of repeated calls to strnsubst(), as well as for the
behaviour with NULL match string, as that has changed over time.
2002-06-22 12:58:42 +00:00
Juli Mallett
893305fe5e When giving an example that relies on shell expansion/globbing, don't use a
replstr for -J that will be interpereted by the shell.

MFC after:	1 day
2002-06-22 12:47:56 +00:00
Tim J. Robbins
5953156dca Now that the pattern space contains no trailing newline, modify the `l'
command's output so it's the same as what SUSv3 specifies.
2002-06-22 03:00:52 +00:00
Tim J. Robbins
ed92199d30 Don't store newlines at the end of each line in the hold/pattern spaces,
instead add the newline when the pattern space is printed. Make the `G' and
`H' commands add a newline to the space before the data, remove bogus
addition of newline from `x' command.

PR:		29790, 38195
2002-06-22 01:42:26 +00:00
Mark Murray
4c2fb88368 Better fix for style.
Suggested by:	ru (but modified a bit by markm)
2002-06-21 11:06:11 +00:00
Mark Murray
796851bb71 Fix warnings generated elsewhere. 2002-06-21 10:22:39 +00:00
Mark Murray
09b904c8e5 Style tidy-up. 2002-06-21 10:21:21 +00:00
Mark Murray
e0761ab1e6 Modernise this code by rounding up the usual suspects: register keyword,
consts, ANSIfication of functions, proper use of __FBSDID() and so on.
This commit is non-functional from a code-execution perspective, but
pr(1) now compiles WARNS=6 clean.
2002-06-21 10:14:57 +00:00
Poul-Henning Kamp
0c33afd77a #include <sys/time.h> before <sys/stat.h> to get timespec. 2002-06-21 09:23:12 +00:00
Tim J. Robbins
382ac430cd Skip fields in the manner required by POSIX, and the way V7 did it.
MFC after:	1 week
2002-06-21 07:59:31 +00:00
Tim J. Robbins
4e774f7fbe Newline characters should not participate in line comparisons. Only apparent
when -s is used or the last line of the file is missing a newline.
Noticed by the textutils test suite.

MFC after:	1 week
2002-06-21 07:08:34 +00:00
Ruslan Ermilov
ea2a88d9fb Give a C rewriter the necessary credit.
Requested by:	Daniel Papasian <dpapasia@andrew.cmu.edu>
2002-06-21 06:43:48 +00:00
Kirk McKusick
1c85e6a35d This commit adds basic support for the UFS2 filesystem. The UFS2
filesystem expands the inode to 256 bytes to make space for 64-bit
block pointers. It also adds a file-creation time field, an ability
to use jumbo blocks per inode to allow extent like pointer density,
and space for extended attributes (up to twice the filesystem block
size worth of attributes, e.g., on a 16K filesystem, there is space
for 32K of attributes). UFS2 fully supports and runs existing UFS1
filesystems. New filesystems built using newfs can be built in either
UFS1 or UFS2 format using the -O option. In this commit UFS1 is
the default format, so if you want to build UFS2 format filesystems,
you must specify -O 2. This default will be changed to UFS2 when
UFS2 proves itself to be stable. In this commit the boot code for
reading UFS2 filesystems is not compiled (see /sys/boot/common/ufsread.c)
as there is insufficient space in the boot block. Once the size of the
boot block is increased, this code can be defined.

Things to note: the definition of SBSIZE has changed to SBLOCKSIZE.
The header file <ufs/ufs/dinode.h> must be included before
<ufs/ffs/fs.h> so as to get the definitions of ufs2_daddr_t and
ufs_lbn_t.

Still TODO:
Verify that the first level bootstraps work for all the architectures.
Convert the utility ffsinfo to understand UFS2 and test growfs.
Add support for the extended attribute storage. Update soft updates
to ensure integrity of extended attribute storage. Switch the
current extended attribute interfaces to use the extended attribute
storage. Add the extent like functionality (framework is there,
but is currently never used).

Sponsored by: DARPA & NAI Labs.
Reviewed by:	Poul-Henning Kamp <phk@freebsd.org>
2002-06-21 06:18:05 +00:00
Juli Mallett
9f3d7bf758 Fix a bug fixed by NetBSD in revision 1.42 of parse.c by christos which caused
an example Makefile I was showing someone just last night to report a variable
as being recursive.

Obtained from:	NetBSD
2002-06-20 19:51:13 +00:00
Juli Mallett
7fc2a9f90c More unsigned char casts to isupper(3).
Obtained from:	NetBSD
2002-06-20 19:45:44 +00:00
Juli Mallett
536dddacf1 Provide a heuristic for RCS conflicts.
Obtained from:	NetBSD
2002-06-20 19:44:34 +00:00
Juli Mallett
2431da5c7e Look for wildcards, and balanced meta-characters such as { and } like NetBSD
does.

Obtained from:	NetBSD
2002-06-20 19:41:21 +00:00
Juli Mallett
a63d92ee89 Expand a buffer to reduce diffs to NetBSD.
Obtained from:	NetBSD
2002-06-20 19:31:55 +00:00
Juli Mallett
83739a1077 Diff reduction for great justice against NetBSD, cast to unsigned char when
passing an argument to isspace(3).
2002-06-20 19:28:00 +00:00
Juli Mallett
701e9a0054 Whitespace fixes to line-up EOL escapes whose right-most extraints changed in
the previous revision due to the biggest line changing.
2002-06-20 11:17:46 +00:00
Juli Mallett
d40d348ceb Cast sp to uintptr_t when doing a compare of it to STACKMAX which is a size_t.
This messes up some indentation in mdef.h for some macros.
2002-06-20 11:14:54 +00:00
Tim J. Robbins
d2979f5673 Style: put static qualifier on definition of static functions. 2002-06-20 07:36:22 +00:00
Tim J. Robbins
51ddbf586b time(1) does not use the shell to execute the specified utility, remove
sentence stating it did.
2002-06-20 07:12:34 +00:00
Tim J. Robbins
3f6c6c912f Make it obvious that command line arguments may be specified for the utility
that is to be invoked on the command line. Use "utility" instead of "command"
in manual page and usage message for consistency with POSIX.
2002-06-20 07:07:00 +00:00
Juli Mallett
d7b8563d55 A function which takes no arguments has an argument list spelled (void) in the
world of ANSI C.
2002-06-20 05:35:40 +00:00
Eivind Eklund
0f798c48ed Make locate.updatedb tell about the security risk when it is run as root. 2002-06-19 19:22:18 +00:00
Juli Mallett
fe36b03b4c Fix a memory leak from previous commit by freeing the possibly expanded
string at the first opportunity, being sure to now always allocate the
new string from VarPossiblyExpand.  Oops.
2002-06-19 17:39:36 +00:00
Juli Mallett
0a9c401f9a Possibly expand the variable name's embedded variables before using it, as
seen (somewhat) in NetBSD.  This catches a few extra recursion cases that
could be hidden by expanding a NIL variable causing an existing variable to
be returned (which caused infinite looping and climbing memory usage in at
least one case).

Obtained from:	NetBSD (in principle)
2002-06-19 17:23:08 +00:00
Tim J. Robbins
12e8db4067 Fix duplicate % in %b format introduced in rev 1.22. 2002-06-19 09:42:20 +00:00
Tim J. Robbins
98dd638658 Let printf(1) tell the difference between zero width/precision and
unspecified width/precision.

PR:		39116
Submitted by:	Egil Brendsdal <egilb@ife.no>
MFC after:	1 week
2002-06-19 09:24:30 +00:00
Tim J. Robbins
5f19035b04 Allow format strings containing "%%" to be reused.
PR:		39116
Submitted by:	Egil Brendsdal <egilb@ife.no>
MFC after:	1 week
2002-06-19 08:18:37 +00:00
Tim J. Robbins
37fd459046 Allow `%' to be written out with an octal escape (\45 or \045).
PR:		39116
Submitted by:	Egil Brendsdal <egilb@ife.no>
MFC after:	1 week
2002-06-19 08:16:14 +00:00
Tim J. Robbins
7e949b63e4 Indicate that env(1) allows you to supply arguments to the utility it
executes in the usage() message and manual page. Use "utility" instead of
"command" in both places to emphasise that shell builtins etc. will not work,
and to be consistent with the terminology used by POSIX.

PR:		39210
Submitted by:	Danny J. Zerkel <dzerkel@columbus.rr.com>
MFC after:	1 week
2002-06-19 07:09:44 +00:00
Tim J. Robbins
06b959916f Don't convert a single space before a tab stop into a tab when the
-i option is used.
2002-06-19 01:45:03 +00:00
Juli Mallett
be2694ca0e make(I) appeared in PWB UNIX. 2002-06-17 13:43:15 +00:00
Tim J. Robbins
7d09396dfa Add Standards section. 2002-06-17 13:37:31 +00:00
Tim J. Robbins
1d600474b1 Sort sections, use Dl for the example so it stands out more. 2002-06-17 13:36:25 +00:00
Tim J. Robbins
b887806d7b Only advance the column position for printable characters, update manual
page to emphasise that we count column positions, not characters.
2002-06-17 12:11:05 +00:00
Maxim Sobolev
33bad4f17d Kill superfluous blank line. 2002-06-17 08:21:53 +00:00
Greg Lehey
5b40046150 Remove 17 June as German national holiday. 2002-06-16 22:59:21 +00:00
Tim J. Robbins
254fac850d Correct the handling of (for example) the N command by only zeroing the
input space in mf_fgets() if we reach the end of all input files.
2002-06-16 08:44:39 +00:00
Tim J. Robbins
abd0c85dcd When counting words, check the correct character variable to see whether it's
a space or not.

Noticed by: bde
2002-06-16 06:04:43 +00:00
Juli Mallett
9ed3737fca Remove local prototype for main(). 2002-06-15 11:28:09 +00:00
Juli Mallett
cf0def9349 Protoize. Remove un-needed cast to char in switch of getopt(3)'s return value.
FBSDID.
2002-06-15 11:26:25 +00:00
Juli Mallett
2c69ee9b45 Remove <sys/types> where we use <sys/param> already.
protoize.
2002-06-15 11:03:28 +00:00
Tim J. Robbins
e4bbbf073b Remove obsolescent -tabstop option from Synopsis (it was already removed
from the usage() message). Document what the -t option does in a more
standard place. Add a standard Diagnostics section.
2002-06-15 10:52:20 +00:00
Tim J. Robbins
ec85e6a06c Allow <blank>s to be used to separate tab stop positions with the -t
argument, not just ASCII space characters and commas. Don't count
non-printing characters when determining column position.
2002-06-15 10:16:39 +00:00
Mike Heffner
3ba0209ecf Update for lukemftp-1.6-beta2. 2002-06-15 09:42:17 +00:00
Tim J. Robbins
fc3b416102 Sort sections. 2002-06-15 08:41:12 +00:00
Tim J. Robbins
a1a27143bd fstat() returns information about the target of any symbolic link that
was opened, not the link itself. Remove dead code.
2002-06-15 08:31:19 +00:00
Tim J. Robbins
232a0ff51d Improve parsing of character and equivalence classes:
[:*] and [=*] are parsed as `infinitely many repetitions of :' (or *)
instead of literal characters (SUSv3)
2002-06-15 07:38:27 +00:00
Tim J. Robbins
dc20d4b9d4 Move the #include and #define's to the top of the file. 2002-06-14 15:56:52 +00:00
Tim J. Robbins
4efc23dabf Bump the size of the equivalence set to NCHARS; this file was left out
of a previous commit implementing equivalence classes.
2002-06-14 15:53:38 +00:00
Tim J. Robbins
2533f1e42a Use the Cm macro for the clear, init, reset and longname operands. 2002-06-14 15:16:03 +00:00
Tim J. Robbins
e6da78f41d Adjust the exit status to conform to SUSv3 and document the fact it takes
multiple `argument' operands.
2002-06-14 15:08:05 +00:00
Tim J. Robbins
6eb0710e98 Sort sections. Avoid using "The -? option" at the start of option descriptions. 2002-06-14 10:11:41 +00:00
Tim J. Robbins
e73c3d279c Don't treat the trailing ']' of an equivalence class expression as a
character in the set. tr -d '[=a=]' was deleting ]'s as well as a's.
Noticed by the textutils test suite.
2002-06-14 09:53:11 +00:00
Tim J. Robbins
dfac4f3695 Add the P1003.1-2001 -C option which complements the set of characters
(not byte values) specified by the first string argument.
2002-06-14 08:58:30 +00:00
Tim J. Robbins
85f6c317ea Implement support for equivalence classes ([=e=]) when the mapping is
one-to-one (SUSv3)
2002-06-14 07:37:08 +00:00
Tim J. Robbins
6689fb2bbc Exit with non-zero status if an input file can not be opened. This was
broken by rev. 1.22.
2002-06-14 02:20:05 +00:00
Maxim Sobolev
8701af62ee Fix one serious bug and one potential problem with in-place editing code:
- original version of code worked incorrectly when more than one
  input files were specified - it was moving the last line from the 1st file
  to be the first line of the 2nd, last line of the 2nd to be the first
  line of the 3rd and so on;

- use mmap()->write() to create temporary file instead of
  malloc()->read()->write(), which was not only slower, but also did not
  bother to free allocated memory once backup file was created, potentially
  leading to memory exhausting when regex is applied to a big file or a large
  number of small ones.
2002-06-14 01:28:52 +00:00
Greg Lehey
9b838be73b beforeinstall target:
- Remove superfluous ;
- create destination directories if they don't exist.
2002-06-13 21:21:59 +00:00
Greg Lehey
b20a21a6c1 Add two new options:
-W is like -A (number of days in the future to consider, but also
   specifies that we don't want special treatment at weekends.
-F changes our notion of "Friday" (the day before the weekend).

Arguably, calendar(1) is broken to have special treatment of weekends
by default, but this method maintains POLA.
2002-06-13 21:20:56 +00:00
Tim J. Robbins
e785a241f2 Correct the Standards section: wc is a utility, not a function. 2002-06-13 13:18:57 +00:00
Tim J. Robbins
561a45cac3 Bump document date for previous commit. 2002-06-13 13:17:00 +00:00
Tim J. Robbins
ebb42aee31 Add the -m option, which counts characters (as opposed to -c, which
counts bytes). In locales that don't have multibyte characters, -m
is effectively an alias for -c.

This brings wc(1) up to P1003.1-2001 conformance.
2002-06-13 12:48:50 +00:00
Juli Mallett
a446b510a4 Avoid classy use of a variable one time with a constant value. 2002-06-13 08:57:53 +00:00
Juli Mallett
536ceed1fc Use %p to print a pointer, not %lx and a cast to (unsigned long). Yuck. 2002-06-13 08:55:29 +00:00
Juli Mallett
bea86ac44d Don't do stupid things to avoid unused parameters, mark them __unused. 2002-06-13 08:54:16 +00:00
Dag-Erling Smørgrav
6414f0b970 Reorder LDADD to fix static linking. 2002-06-12 12:46:50 +00:00
Juli Mallett
d2c462cec8 String lengths and sizeof()s are size_t not int. Mark an unused parameter
of ReadMakefile as __unused, it's there because this function is used by
the abstracted list interface which normally deals with item handlers which
take two arguments.  Add a missing static prototype.
2002-06-12 04:18:31 +00:00
Juli Mallett
22c26d85e3 The error functions take constant pointers to strings for their format. 2002-06-12 04:11:01 +00:00
Robert Drehmel
ddd16e87d0 Use the constants from <limits.h> for the sizes of integral C types
rather than defining them ourselves.
2002-06-11 11:27:20 +00:00
Tim J. Robbins
30f8b6c182 paste(1) appeared at least as early as 32v. 2002-06-11 08:13:03 +00:00
Tim J. Robbins
84fb5a42d2 cut(1) appeared at least as early as System III. 2002-06-11 08:11:12 +00:00
Juli Mallett
6fc8ba94c6 Note that this appeared at least as early as PWB UNIX.
Use the literal string 'PWB UNIX', as we still have no .At macro for it.
2002-06-10 22:59:59 +00:00
Tim J. Robbins
3ebf2779b3 Remove -j from synopsis. The form given in the synopsis was incorrect,
and it should not have been there at all since it is a deprecated option.
2002-06-10 10:39:33 +00:00