Commit Graph

9314 Commits

Author SHA1 Message Date
christos
f1830357a3 new files from Anon Ymous. 2006-10-31 22:36:37 +00:00
wiz
c00bfebf76 Various fixes. Bump date for previous. 2006-10-31 22:10:41 +00:00
christos
798fbc606d More fixes from Anon Ymous:
1) Removed the -B flag (it was stupid on my part) and added a short
   description indicating how to accomplish the same thing under the
   "Sending Mail" section of man mail(1).

2) Added a -H flag to dump the headers and exit.  It takes optional
   flags to restrict to old, new, read, unread, and deleted messages
   (the later being kind of useless - it shares code with something
   that already had it).

3) Restored the 'Save' command which somehow got mistakenly removed in
   the last commit and add documentation for it!  (My apologies to
   its author.)

4) Added a 'mkread' command to mark messages as read (the inverse of
   'unread').  Should we also have a 'mknew' command?

5) Added a 'smopts' command to keep a database of addresses and
   sendmail options to be used when sending messages to those
   addresses.  See man mail(1) for a fuller description.

6) Added 'indentpreamble' and 'indentpostscript' variables whose
   values are inserted before and after a quoted message (~m or ~M
   escapes).
=20
7) Added string formatting abilities for the 'prompt', 'insertpreamble',
   'insertpostscript', and header display strings.  These strings
   support all the strftime() format parameters as well as many more
   specific to mail (see man mail(1)).

8) Fix the -a flag so that it only takes a single filename, unless
   "mime-attach-list" is defined.  This is more conventional and avoids
   unexpected whitespace issues.
2006-10-31 20:07:32 +00:00
elad
9e399b549b Some mdoc fixes. 2006-10-31 01:27:53 +00:00
christos
11c53ad61c kill crypto/rmd160.h and crypto/sha2.h, and instead make symlinks to
/usr/include from /usr/include/sys. This makes all the one way hash
header handling identical.
2006-10-30 20:22:53 +00:00
uwe
4e4935bba0 Include <sys/cdefs.h> and use __used on config[] instead of the ifdef dance.
Prevents gcc4 from g/c'ing embedded config from VAX kernels.
2006-10-29 23:00:44 +00:00
dsl
72c6703a09 Rename 'struct Lst' to 'struct List' and 'struct LstNode' to 'struct 'ListNode'
in lst.d remove a small barrowload of casts from the lst.lib bloatset.
2006-10-27 21:37:25 +00:00
dsl
16c8499ed2 Since 'ClientData' is 'void *', nuke almost all the (ClientData) casts. 2006-10-27 21:00:18 +00:00
lukem
5b87c223c9 Use "see" instead of "c.f.".
Per feedback from Valeriy E. Ushakov.
2006-10-27 01:29:17 +00:00
wiz
7b2e399484 Some cleanups from the person without a name. 2006-10-26 15:26:37 +00:00
wiz
09e63f3f79 Sync usage with manpage. 2006-10-26 11:12:41 +00:00
wiz
2a68b10b7d Bump date. 2006-10-26 11:12:13 +00:00
wiz
5d62300779 Pull single letter options together.
-r and -w need at least one argument, so document as such. Mark up GET_REPORT.
2006-10-26 11:12:00 +00:00
wiz
04f37109b9 New sentence, new line.
Use .Pp instead of .sp. Whitespace cleanup. Bump date for previous.
2006-10-26 11:05:29 +00:00
wiz
a45316f7a5 Bump date for previous. 2006-10-26 10:49:35 +00:00
mrg
272d745880 #if 0 some unused variables. 2006-10-26 01:38:11 +00:00
mrg
fd95deac95 merge less-394. 2006-10-26 01:33:08 +00:00
mrg
cea4831cdf import less 394. this includes these changes:
* Add history file to save search and shell command history between
  invocations of less.

* Improve behavior of history list for search and shell commands.

* Add -K (or --quit-on-intr) option to make less exit immediately on ctrl-C.

* Improve handling of UTF-8 files and commands, including better
  line wrapping and handling double-width chars.

* Added LESSUTFBINFMT environment variable to control display of
  non-printable characters in a UTF-8 file.

* Add --with-secure option to configure, to make it easier to
  build a secure version of less.

* Show search matches in the status column even if search highlights
  are disabled via the -G option or the ESC-u command.

* Improve performance when the file contains very long lines.

* Add "windows" charset.

* Add man page for lessecho.

* Add support for erase2 character, treated same as erase.

* Use ASCII lowercase/uppercase logic when operating on the command line.

* Update makefile for Borland C++ 5.5.1.

* Fix bug in calculating number of pages for %D prompt.

* Fix bug in handling tag file error.

* Fix obscure bug if input file is deleted while viewing help.

* Fix bug handling filenames which include square brackets.

* Fix possible buffer overflow in "global" tag search.

* Fix possible buffer overflow in usage of LESSOPEN and LESSCLOSE.

* Fix buffer overflow in reverse search.

* Removed some old copyrighted code.
  This probably breaks OS/9 support.
2006-10-26 01:31:48 +00:00
mrg
ad5d44bc09 also need charset.h now. 2006-10-26 01:30:33 +00:00
mrg
556af87115 import less 394. this includes these changes:
* Add history file to save search and shell command history between
  invocations of less.

* Improve behavior of history list for search and shell commands.

* Add -K (or --quit-on-intr) option to make less exit immediately on ctrl-C.

* Improve handling of UTF-8 files and commands, including better
  line wrapping and handling double-width chars.

* Added LESSUTFBINFMT environment variable to control display of
  non-printable characters in a UTF-8 file.

* Add --with-secure option to configure, to make it easier to
  build a secure version of less.

* Show search matches in the status column even if search highlights
  are disabled via the -G option or the ESC-u command.

* Improve performance when the file contains very long lines.

* Add "windows" charset.

* Add man page for lessecho.

* Add support for erase2 character, treated same as erase.

* Use ASCII lowercase/uppercase logic when operating on the command line.

* Update makefile for Borland C++ 5.5.1.

* Fix bug in calculating number of pages for %D prompt.

* Fix bug in handling tag file error.

* Fix obscure bug if input file is deleted while viewing help.

* Fix bug handling filenames which include square brackets.

* Fix possible buffer overflow in "global" tag search.

* Fix possible buffer overflow in usage of LESSOPEN and LESSCLOSE.

* Fix buffer overflow in reverse search.

* Removed some old copyrighted code.
  This probably breaks OS/9 support.
2006-10-26 01:05:30 +00:00
dsl
adb344c8f2 Rename Lst_Append() to Lst_InsertAfter() and Lst_Insert() to Lst_InsertBefore()
to better explain their actions.
2006-10-25 20:17:40 +00:00
dsl
7ef877a8c0 Fix previous - need to add a lstPrev() 2006-10-25 20:05:59 +00:00
dsl
95938658de Replace 'a == b ? FALSE : TRUE' with 'a != b'
Add missing () in expansion.
2006-10-25 19:45:22 +00:00
dsl
0ce4eb1f8a Only do dynamic dependecy expansion once, and follow by a single filename
globbing.
The old behaviour was the perform variable expansion and globbing on the
output of both the variable expansion and globbing.  Which allows some very
strange behaviour if, for example, globbed filenames contain $ symbols.
Unconditionally add new nodes from these expansions even if the names are
already children.  The .WAIT code needs the order of children preserved.
2006-10-25 19:44:10 +00:00
mrg
712a3f3aae wrap a long line 2006-10-25 04:44:39 +00:00
christos
933195ac45 more meaningful variable name. 2006-10-24 19:57:05 +00:00
gson
fb72156a3c Added volatile keyword to variable that might be clobbered by longjmp 2006-10-24 08:29:47 +00:00
jdolecek
d1de60425b fix check for field order to allow .0 form in "-k 1.2,1.0"
fix provided in PR bin/25572 by Ross Patterson
2006-10-23 20:36:17 +00:00
jdolecek
a2e8970e19 when using -o into file which already exists, copy the permissions
of the original file to the new (sorted) file

adresses PR bin/26860 by Michael van Elst
2006-10-23 19:53:25 +00:00
christos
f2640eb139 simplify 421 printing code (jani at xeebioneurope dot de) 2006-10-23 19:53:24 +00:00
jdolecek
bfa086e40a replace access(2) + /dev/ prefix check with lstat(2) and S_ISCHR()/S_ISBLK()
part of PR bin/26860 by Michael van Elst

while here, put output file fopen() inside the code block of the
only code path where it's actually needed, to make the logic more obvious;
and in the "stdout" case, initialize toutpath to empty string rather
then /dev/stdout, to make it clear /dev/stdout is not actually used
2006-10-23 19:39:54 +00:00
he
d59cb8e7b8 Fully initialize the last element of menu_def[]. 2006-10-23 19:29:48 +00:00
jdolecek
165c6691e1 use F_OK instead of 0 for second parameter of access(2)
part of PR bin/26860 by Michael van Elst
2006-10-23 19:11:46 +00:00
christos
f1aa39b33c deal with machines where char is unsigned and with chars > 127 2006-10-23 18:22:00 +00:00
mrg
dbdbfa2c22 since register_t is sometimes unsigned, cast to (long) to check >= 0. 2006-10-23 04:13:51 +00:00
christos
39a6c2fdf2 allow 0 sized structs in c9x 2006-10-23 00:15:58 +00:00
christos
5ffa3fb1be add zero sized array handling. It is a little too chatty now. 2006-10-23 00:10:29 +00:00
pooka
9d92bd9b4c "teach" about VT_PUFFS 2006-10-22 22:56:26 +00:00
christos
f0762ecc01 Include bsd.sys.mk so that HOST_SH is defined. (Hi apb) 2006-10-22 22:22:39 +00:00
christos
97e81e479c sprinkle volatile. 2006-10-22 16:48:34 +00:00
christos
c3c65c3c0c use c99 initializer. 2006-10-22 16:47:50 +00:00
christos
528614c11b sprinkle volatile. 2006-10-22 16:45:35 +00:00
christos
88bb03c92e use c99 initializer. 2006-10-22 16:44:46 +00:00
christos
8a3920f2c8 use c99 initializers
consistently terminate nlist arrays with NULL not ""
2006-10-22 16:43:24 +00:00
christos
7284ae463f use c99 initializers. 2006-10-22 16:36:44 +00:00
christos
b9cc3c0e19 - add volatile
- fix an missing initializer.
2006-10-22 16:25:19 +00:00
christos
088aec4701 sprinkle volatile. 2006-10-22 16:23:20 +00:00
christos
e71453a117 don't check the wrong variable for being negative! 2006-10-22 16:20:39 +00:00
christos
92706ef61d make nlist struct static and use c99 initializers 2006-10-22 16:17:44 +00:00
christos
2541a5f2fe use c99 initializer. 2006-10-22 16:14:07 +00:00
christos
ccf5505f5c remove bogus assertion. 2006-10-22 16:13:23 +00:00
christos
afb23e8f50 use c99 initializer. 2006-10-22 16:12:20 +00:00
christos
f3d3c4b618 missing initializers. 2006-10-22 16:11:34 +00:00
scw
321742a838 Stick with unsigned long for _BSD_SIZE_T_ regardless of LP64/ILP32. 2006-10-22 11:20:44 +00:00
mrg
478347642c avoid assigning a void * to an int just to see if it is non-zero or not.
use %zu to print a size_t.
2006-10-22 08:29:36 +00:00
mrg
1aa136c1a1 mail/head.c: make the previous delta only apply if FMT_PROG is not defined
fmt/Makefile: define FMT_PROG.
2006-10-22 08:22:34 +00:00
dsainty
f903859f35 Implement an option to reset all values (rather than attempting to read
them) to allow setting item values on certain pesky devices that otherwise
error out on the GET_REPORT command.

Indicated via the new -z flag.
2006-10-22 06:16:37 +00:00
dsainty
3d56b3bab3 Add support for addressing multiple items with the same name (for buggy
devices).

The syntax and patch were discussed with Lennart about 1.5 years ago :)

Knock the BUG entry out of the man page.
2006-10-22 05:09:14 +00:00
christos
1df0b9ba30 add ~@ 2006-10-22 00:35:29 +00:00
christos
5221554c1a Fix yes/no handling. 2006-10-21 21:51:47 +00:00
christos
8207b28a5c From our anonymous user:
- mime and character set handling
- command line editor and completion
- many code improvements
2006-10-21 21:37:20 +00:00
itohy
3c46d522e6 Remove unneeded \ from awk script.
Fix PR port-sparc64/34863.

This also caused warning on old NetBSD environments (with GNU awk) like
awk: cmd. line:80: warning: escape sequence `\#' treated as plain `#'
2006-10-21 04:48:29 +00:00
he
f0947b3081 The symbol to define to 1 if a pointer to an int fits in a long is
INTPTR_IS_LONG, not INTPTR_IS_ULONG -- the latter is unused in
other parts of lint's code.  This stops vax's lint from complaining
about conversion of integer constants to 'unsigned long' in function
argument lists, via a proper define of INT_RSIZE in common/inittyp.c.
sh3 defined this to 0, so was actually not affected, but better to
eradicate the typo there as well.
2006-10-20 12:51:12 +00:00
he
e02c317333 Simplify the previous change. There's actually no need to treat constants
specially in ptconv(), the constants will be checked in convert() anyway.
2006-10-18 21:34:39 +00:00
freza
57dc9ea382 Treat multiple
SPECIAL prog {objs,objpaths,keepsymbols} itemX

lines (where "prog" is fixed) in crunchgen configuration the same as

  SPECIAL prog {objs,objpaths,keepsymbols} item1 ... itemN

OK by David Laight
2006-10-18 21:20:44 +00:00
he
4228dd3afb Partly redo when to emit warnings for argument type conversions.
Remove the apparently always true "styp(nt) != SHORT" part of the
innermost test.  Allow atomatic conversion of literals as long as
they fit into the target type.

This should fix some of the lint issues in proplib on some of our
platforms.

Approved by christos.
2006-10-18 00:01:19 +00:00
he
081971a032 Use __inline instead of inline, to allow linting of ourselves... 2006-10-17 23:53:30 +00:00
christos
3ceb6c1c20 warns=4, pass lint. 2006-10-17 15:13:08 +00:00
christos
c384594e4f use howmany(), instead of open-coding the calculation. 2006-10-16 16:44:20 +00:00
he
62e8b0f3fa Make a minimal attempt at distinguishing between the hosts and the
targets integer data type value ranges.   For now we just use the
hosts uint64_t for parsing & storing integers constants, and test
against the targets limits and assign appropriately, instead of
sometimes (inappropriately) going via the hosts u_long type.  As
long as none of our architectures have target long or quad data
types strictly larger than 64 bits, we should be fine with this
fix.

Furthermore, as they stand at the moment, we can't use the current
TARG_INT_MAX and TARG_LONG_MAX constants in C preprocessor expressions,
so remove the conditional on them being equal.  Yes, this will
produce dead code for some targets.

This allows an ilp32 host to lint for an lp64 target which uses
e.g. the targets ULONG_MAX constant without triggering an "integer
constant out of range" warning.

OK'ed by christos.
2006-10-16 13:33:57 +00:00
dsl
c183c301dc Add some more explanitory comments.
Rename 'allsrc' to 'curSrcs' so that the variable passed to ParseDoSrc (etc)
has the same name as the local in the calling routine, rather than a name
that seems to imply a more global and persistent list.
2006-10-15 21:17:27 +00:00
christos
6cbdf318bf - make a variable volatile, that gcc warns vfork will clobber.
- don't blindly walk before the beginning of the buffer because of a
  corrupt dependency file. In this case the first character of the
  dependency file was a :
2006-10-15 18:50:47 +00:00
christos
2bd08fcc54 in the same way that we need an extra level for arrays, do the same for struct. 2006-10-15 18:18:54 +00:00
dsl
fb889ecbbd Change a 'while' loop to a 'for' loop so we can add 'free(line)' into the
loop continue part.  Remove the 'free(line)' from teh end of the loop body,
change the gotos into continues and collapse out some 'else if's.
All in the name of code transparency.  No functional changes.
2006-10-15 18:08:14 +00:00
christos
3e006796cf previous fix broke array initializers. 2006-10-15 15:08:20 +00:00
dsl
0195907f3d Output all debug trace output through 'debug_file' defaulting to 'stdout'.
(Almost all the debug output went there, but some went to stderr.)
Split the parsing of -d (debug flags) out into its own routine.
Allow the output filename to be changed by specifying -dF<file> to create
a log file, or -dF+<file> to append to it. <file> may be stdout or stderr.
Also change so that -d-<flags> acts on <flags> locally but doesn't copy
them to MAKEFLAGS so they aren't inherited by child makes.
I'm not 100% happy with the command line syntax for the above, so they are
currently undocumented.
2006-10-15 08:38:21 +00:00
dogcow
37bb4f935a do the #ifndef lint dance for __RCSID; also, include the appropriate
headers if cross-building the program in tools/.
2006-10-15 01:16:31 +00:00
christos
e578e35910 Fix c99 initialization issues. Now the regression tests work. 2006-10-14 21:08:50 +00:00
wiz
994a49a16c Comma in enumeration. No dot at end of SEE ALSO. 2006-10-13 21:22:44 +00:00
wiz
4cfcd239a1 Various fixes. 2006-10-13 21:06:01 +00:00
wiz
66402a89e3 Macro improvements. 2006-10-13 20:33:31 +00:00
mlelstv
0ce7ae1e3c End a decompression when trailing garbage is found. It emits a warning
message and causes a non-zero exit status (similar to GNU gzip).
Fixes PR bin/33045.
2006-10-13 20:17:46 +00:00
mlelstv
a3ee681f33 Abort decompression with an error when EOF is reached on input. The
test output will then be 'NOT OK'. Fixes PR bin/32933.
2006-10-13 20:16:32 +00:00
elad
c136b6cd0d Refactor code a bit so we only use kmem when we really need it. 2006-10-13 16:33:57 +00:00
tacha
7a76839cea All members of PLAN should be initialized. 2006-10-12 08:46:18 +00:00
apb
2eed134b40 De-__P(), remove trailing spaces, sprinkle a few const, WARNS=4. 2006-10-11 19:51:10 +00:00
dsl
505a3bb2b7 There is no need to resize the pollfd array, it can only ever have 2+maxJobs
entries, so allocate at startup.
Use an 'int jobPipe[2]' within the job structure, and create pipes directly
into it.  Common up the code that creates all the pipes - making them all
non-block on the read side in the process.
Call Job_CatchChildren() directly from Job_CatchOutput() so that it only
gets called when a child actually exits.
NB: Something causes a 'pregnant pause' if (for example) you call 'nbmake obj'
in src/tools.  Introduced between netbsd 3 and 4.
2006-10-11 07:01:44 +00:00
reed
f9a8db2401 Remove parenthesis from around a sentence.
Refer to vi manpage for option -r.

Mention rc.d start up script for this.

Add rc.conf to SEE ALSO.

Remove sentence about it originally done at boot time.

Fix date - it was added in 1996. And mention that the
script was renamed in 2001.
2006-10-10 03:30:42 +00:00
reed
0b966788bb Also point to new virecover manual page. 2006-10-10 03:27:05 +00:00
apb
4e86f6ddf0 In a non-native build, always use a shell to execute commands. This may
be necessary in a weird cross-build environment.  Previously, if the
command looked simple enough, we would try to exec it directly.

OK sjg, christos
2006-10-09 20:46:33 +00:00
apb
cd195008c6 Allow make(1) to be built with something other than "sh" as the
shell.  To use this, build with -D_PATH_DEFSHELLDIR=\"/path/to/dir\"
-D_BASENAME_DEFSHELL=\"shell\".

* Change the order of entries in shells[].  Now DEFSHELL defaults to 0,
  and shells[0] describes the default shell.  This will be "sh" in the
  usual case.

* If _BASENAME_DEFSHELL is defined, insert an additional entry above
  "sh" in the shells[] array, making this new entry shells[0].  The
  new entry is assumed to refer to an sh-compatible shell with a
  non-standard name.  (Tested using _PATH_DEFSHELLDIR="/usr/pkg/bin" and
  _BASENAME_DEFSHELL="bash".)

* In the shells[] entry for "sh", test defined(MAKE_NATIVE) &&
  defined(__NetBSD__) to decide whether we can use the "q" flag.

OK sjg, christos
2006-10-09 20:44:35 +00:00
apb
5e0e754292 Change the order of several items to ensure that
top can work without a termcap "li" capability.
Fixes PR 34717 by der Mouse.
2006-10-09 19:49:51 +00:00
dsl
01a426f62c Rip out the code for the undocumented -P (don't use pipes for command
output) option.  I'm sure it is baggage from the past.
2006-10-09 14:36:41 +00:00
christos
be4d21eeca use ecalloc in previous 2006-10-09 14:27:06 +00:00
dsl
4a7a153be0 Rip out the code for not 'USE_PGRP', I can't imagine it being useful!
My guess is that it is compat code for before the pgrp stuff was added.
2006-10-09 13:49:59 +00:00
dsl
9f624ea07b Instead of trying to report all the 'job suspended' and 'job resumed'
messages whan make itself is suspended (ie by ^Z) before make actually
suspends, supress the messages during this sequence.
This means we don't care that they would be output after the suspend
and we can stop attempting to reap child status from withing the signal
handler (which doesn't work for recursive parallel makes).
The code simplification means that we can remove much of the code that
blocked signals - since the signal handlers (expect that for ^C and friends)
now do almost no work.
2006-10-09 13:40:11 +00:00
dsl
861fc6431d Fix core dump caused by non-zerod memory.
From Auster in current_users.
2006-10-09 11:37:31 +00:00
dogcow
f6a57672cd Build virecover.0 2006-10-08 21:47:21 +00:00
peter
e263dfd62f WFORMAT is no more... 2006-10-08 17:52:28 +00:00
elad
805c3d6901 PR/22228: Jeremy C. Reed: a man page for virecover(8)
Man page added, thanks!
2006-10-08 14:19:17 +00:00
elad
854038392c PR/30819: Peter Postma: src/usr.bin/shlock has no license
Thanks to Matt Fleming for contacting Erik E. Fair and getting his
agreement to put a TNF license on this.
2006-10-07 21:13:00 +00:00
elad
925c6f17f2 PR/29722: Andreas Kling: chpass temporary files in /etc not always unlinked
We had a (long) discussion about this in #NetBSD-code and the consensus was
that /tmp should always be sticky (+t), and as such it is safe to create
the temporary files for chpass(1) in there. We added a check to guarantee
this (and bail out otherwise) and now temporary files are created in /tmp,
not filling up /etc.

Thanks to rivo nurges et al.
2006-10-07 20:09:09 +00:00
elad
1232ea27c4 PR/18906: roskens at elfin dot net: misc. select() to poll() updates.
Adapted to -current by myself, thanks for the patch!
2006-10-07 17:27:57 +00:00
apb
bfb3f336ef Document "find ... -exec ... {} +". Also make some other minor updates.
Changes initially supplied by John Hawkinson in PR 20470, but edited by me.

/msg wizd: search for ".sp"
2006-10-07 17:06:28 +00:00
apb
b90dcb5d01 Add support for "find ... -exec ... {} +".
The code is from John Hawkinson in PR 20470.  I adapted it to current,
and made some KNF and comment changes.
2006-10-07 17:04:02 +00:00
apb
dbe2acacef Add some missing entries in lists, and some serial commas.
Inspired by PR 20470 from John Hawkinson.
2006-10-07 16:34:06 +00:00
elad
e3f885bca5 PR/31053: Roland Illig: Enhancement: getconf -a to list all applicable
variables

Thanks for the patch!
2006-10-07 15:20:44 +00:00
tron
1b5edf0b17 Fix broken line continuation, probably caused by editor word wrap. 2006-10-07 13:04:43 +00:00
elad
3bd9466e80 PR/32855: der Mouse: [dM] ftp -q is broken (or misdocumented)
Patch applied, thanks!
2006-10-07 10:49:14 +00:00
elad
2a7d09e7cd PR/34662: martijnb at atlas dot ipv6 dot stack dot nl: readlink doesn't
grok -f, and there's no alternative (+fix)

Patch applied with minor tweak (%y -> %R, as it was already taken) plus
some nits from myself. Thanks!
2006-10-07 10:41:50 +00:00
elad
d730e7f066 Add standard TNF license, requested by cube@. 2006-10-07 09:40:03 +00:00
elad
fd79a15577 PR/18126: jnilsson at ludd dot luth dot se: add the revoke program
I have commited a different version than in the PR, it lacks a license
but if it warrants one we can stick the TNF standard on it. It's just
a main() routine that calls revoke(2).
2006-10-07 08:48:03 +00:00
elad
89f8748c35 PR/20319: Jeremy C. Reed: calendar reports other months that have matching
days

Patch applied, thanks!
2006-10-07 07:12:01 +00:00
rillig
e723f89fb8 When trying to copy many files into another file, provide a useful and
more specific error message instead of the usage().
2006-10-06 20:22:59 +00:00
dsl
342d35797b Instead of trying to check the return value of every fprintf() and fputs()
call - which makes the code completely impossibly to follow, call fflush()
and ferror() just prior to calling fclose().
This has the advantage of actually detecting the any write errors, since
the output is block bufferred and will typically not happen during fprintf()
but only during the fclose() - where it is difficult to report.
I also singlilarly refuse to add (void) casts to every printf call in the
system - since it almost never makes any sense to look at the return value
(unless you want to know how many bytes were actually writtem).
2006-10-04 20:34:48 +00:00
mlelstv
05f80f69b3 avoid signed/unsigned error when computing mask lengths for empty
masks with sa_len == 0 (happens for inet6 default route).
2006-10-03 08:30:12 +00:00
simonb
bca6df8e18 Add standard TNF copyright boilerplate. 2006-10-03 08:20:03 +00:00
christos
5c86a088e8 Completion on a line like "." at the command prompt gives you a rather
rude response! (from our anonymous user)
2006-10-02 16:43:31 +00:00
apb
9eda896a8f Use ${HOST_SH}, not just sh, in the shell command to set MAGDIRF. 2006-09-29 20:20:47 +00:00
dsl
a178085551 Reap any dead children that we have at startup.
If there are any undead ones set a flag so we don't report the 'Child (pid)
not in table' message when they die - it is impossible to (portably) find
the childrens pids.
This happens when make is run as 'make -f- ... <<EOF' and the shell uses
a child of (what will be) make to write the data into a pipe.
2006-09-29 19:38:48 +00:00
christos
f0f6b1cde9 Using (void)&foo; shuts up gcc-4 but does not stop the compiler from clobbering
the variables in the setjmp/longjmp cases. Use volatile instead as we are
supposed to (from our anonymous user).
2006-09-29 14:59:31 +00:00
christos
3f7563e969 Coverity CID 4119: Check negative returns (from Arnaud Lacombe) 2006-09-29 14:42:59 +00:00
christos
f6e58c8bec Add -DHEIMDAL 2006-09-28 21:24:58 +00:00
christos
a86c4b2a6a better format for run level entries. 2006-09-28 15:24:31 +00:00
mrg
33c0ea44b6 redo the previous, based on a comment from and reviewed by christos. 2006-09-27 22:20:31 +00:00
mrg
b1906bf12d redo previous: move the EOF check back into non-dead code so that it
will be used again.
2006-09-27 21:02:38 +00:00
christos
49334834f0 Coverity CID 793 uncovered a bunch of issues:
1. needfree = 0, should have been *needfree = 0
2. this function will not work with sp == NULL, since KEY_NAME dereferences it.
3. the if (0) {
  label:
  }
  code is disgusting.

Remove all the nasty and impossible code and fix 1.
2006-09-27 21:01:18 +00:00
christos
5d1b788b2a Coverity CID 4166: If GET_SPACE_RET can return a NULL pointer if len == 0.
Check for it.
2006-09-27 20:04:25 +00:00
elad
9a206be80a Print a message if there are no PaX flags, to be less confusing.
Requested by and okay rpaulo@.
2006-09-27 20:01:50 +00:00
christos
d25337ac41 Coverity CID 4171: bp can be null if len == 0. So check for it anyway and
don't call memcpy unconditionally.
2006-09-27 19:58:00 +00:00
christos
0bcef42677 Coverity CID 4073: Delete impossible code. 2006-09-27 19:09:14 +00:00
christos
c0156a4952 Coverity CID 175: Avoid memory leak; add new function to destroy a hash table. 2006-09-27 19:05:46 +00:00
wiz
b849663960 mdoc improvements. 2006-09-27 17:41:30 +00:00
christos
8d396aad54 Coverity CID 4194: Wow, isn't char *foo = bar() ? : "0"; a syntax error?!?! 2006-09-27 15:23:34 +00:00
christos
364b94acf5 Coverity CID 4195: Off by one buffer overflow. 2006-09-27 15:21:26 +00:00
christos
1a5929d3f3 Coverity CID 4196: Off by one buffer overflow. 2006-09-27 15:20:06 +00:00
christos
10c7dc6280 Avoid longjmp clobberring (from our anonymous user) 2006-09-27 12:58:33 +00:00
elad
65305bdc98 Good intentions are still intentions. If we can't open kvm, but we still
have sysctl, it's still not enough for -P. A groveler is a groveler is
a groveler.

On a different note, this code needs a rewrite.
2006-09-27 12:51:43 +00:00
yamt
243b5d4a07 increase a chance to fit within 80 char width consoles.
- use PRWORD for dovmstat as well.
- reduce number of drives shown by default from 3 to 2.
2006-09-27 12:35:08 +00:00
daniel
6177293347 PR/17410: lam(1) contains numerous overflows (Juli Mallett)
Fix some overflows and bugs (patch from FreeBSD).
2006-09-27 08:29:31 +00:00
christos
b10771897b handle signals for the second editline struct. (from our anonymous user) 2006-09-26 23:33:56 +00:00
christos
0dea4d56e9 add a continue message. 2006-09-26 23:33:23 +00:00
plunky
0b73a6ec91 expose the bthcid API details so that external PIN clients do not
need the NetBSD source in order to compile
2006-09-26 19:18:19 +00:00
christos
1e1f0dd3ab PR/34627: Lubomir Kundrak: patch(1) segfaults, when fed from stdin in batch
or force mode
2006-09-26 16:36:07 +00:00
daniel
ce560c1e4f PR/9742: whatis doesn't deal with '.' in manpage names (John Hawkinson)
Use name matching code from OpenBSD (ack christos@).
2006-09-26 04:16:24 +00:00
christos
1a6e50f273 PR/34599: Mindaugas: csplit(1) utility port 2006-09-25 19:21:42 +00:00
daniel
c43e654c14 PR/30698: install(1) stripping flags in METALOG [patch] (Jukka Salmi)
Apply patch, thanks!
2006-09-25 16:05:44 +00:00
daniel
3b6bc88204 PR/32589: install -d ignores existing non-directories (joerg@netbsd.org)
Raise an error if an argument to 'install -d' exists as a non-directory,
as suggested by joerg@ (and acked by some developers on #netbsd-code).
With this change behavior is equal in this respect to FreeBSD and
DragonFly.
2006-09-25 13:21:19 +00:00
dbj
f3b496ec9b implement HOST_CPPFLAGS+= -DNO_BASE64
this fixes cross compiling
2006-09-24 21:43:14 +00:00
wiz
f98885cd92 Add -m to SYNOPSIS. 2006-09-24 15:56:42 +00:00
elad
3b4778f8b2 PR/33319: Seebs: base64 is annoying
Thanks to Matt Fleming for implementing a -m switch (base64 mode) for
both uuencode(1) and uudecode(1)! Man-pages updated as well.
2006-09-24 15:32:48 +00:00
christos
fbdddce8c7 1) Disable completion and history when grabbing header strings (e.g.,
with '~h' in the mail editor).
2) Eliminate a core dump when hitting '^D' with a zero length line.
From our anonymous user
2006-09-24 14:01:48 +00:00
xtraeme
f375107517 PR bin/27066 by Sergey Svishchev: "eject(1) does not DTRT for floppy drives
(such as one in SPARCstation 5)".

Patch applied, thanks.
2006-09-24 08:42:55 +00:00
wiz
9db182ac71 Fix typo in usage. 2006-09-24 07:19:57 +00:00
wiz
467caa772b Remove trailing whitespace. 2006-09-24 07:19:16 +00:00
wiz
6ff90ba3e6 Bump date for previous. 2006-09-24 07:18:40 +00:00
elad
9cd65b7c28 PR/34220: Tyler Spivey: feature request: --max-depth for du
Thanks to Matt Fleming for porting the -d feature from FreeBSD!
2006-09-23 23:20:20 +00:00
elad
e42f031453 PR/30107: Bob Kemp: calendar reports non-matching days.
Applied patch, and also apply patch from Johan Veenhuizen to fix bug
introduced later on -- thanks for the patches!
2006-09-23 22:25:19 +00:00
manu
8a1037a46b Add a -t+S flag to ktrace for tracing activity related to sysctl. MIB
names will be displayed, with data readen and written as well.
2006-09-23 22:01:04 +00:00
elad
a01c1f4782 PR/28157: KAMADA Ken'ichi: escape sequence of hexdump(1) is broken
(SIGSEGV at worst)
Applied patch, thanks for the report!
2006-09-23 21:19:34 +00:00
dsl
56564e27f6 Complete revamp of the way make handles job control signals.
- Send each type of signal to its own handler.
- Only call JobFinish when a process exits, in particular don't 'fake up'
  'exitstatus' for jobs being continued, nor call it for suspends.
- When a job is stopped, use an entire variable to remember the fact, so
  we know we need to send a SIGCONT.  Don't change any other state.
- In order to report '*** [job3] Suspended' before we suspend ourselves we
  have to call waitpid() from the signal handler - where we don't want to
  process job termination events. Save the exit status and process later.
The code now handles:
- jobs that suspend themselves
- jobs exiting while suspended
- jobs that don't actually suspend at all
Hoewever it still does printfs() from the signal handler, and I haven't yet
stopped it thrashing the signal mask.
2006-09-23 20:51:28 +00:00
elad
d42da91b60 PR/33712: Nicolas Joly: top(1) print uptime twice on dump terminal
(-current)
Applied patch, thanks!
2006-09-23 19:46:57 +00:00
daniel
c819b9b057 PR/30820: Peter Postma: shlock(1) manpage incorrect
shlock uses link(2) rather than rename(2) to make the final target,
fix the manual page to reflect this.
2006-09-23 12:55:22 +00:00
elad
ac3134b0c7 PR/21741: Christian Biere: Buffer overrun and wrong usage of islower() in
less 381
Over three years ago the less maintainer said he'll add these fixes.
Nothing happened, so we do it ourselves.
Thanks for the report and the patch!
2006-09-23 12:51:18 +00:00
wiz
8f4dd609aa English improvements. New sentence, new line. 2006-09-23 11:21:35 +00:00
wiz
1fe50328b8 Drop trailing whitespace. New sentence, new line.
Use .Dq.
2006-09-23 11:16:21 +00:00
wiz
7158992a0e Mark up flags in -a description. Start sentences with upper-case letters. 2006-09-23 10:06:57 +00:00
uebayasi
c9ce60a1ed PR32022 - Clarify find(1) syntax documentation about parenthesized expressions
and the -f option (explicit hierarchy specifier).  From "Sander Bos, with
credits to Peter Bex".

Bump date.
2006-09-23 05:03:33 +00:00
elad
a81bf90a94 PR/31347: Geoff C. Wing: netstat err message is ambiguous about cause
Applied patch, thanks!
2006-09-22 23:21:52 +00:00
elad
d4d70cef20 PR/34584: Geoff C. Wing: cksum not closing filescriptors after finishing
processing files.
Applied patch, thanks!
2006-09-22 22:35:57 +00:00
elad
fb85339a04 PR/34540: b1ff at fr33 dot b33r dot net: bogus free() in ftp(1)
Applied patch, thanks!
2006-09-22 22:29:25 +00:00
dsl
7adfa633e3 Fix build on 64 bit systems.
Remove now-unecessary temporary local.
2006-09-22 21:55:52 +00:00
christos
c044a535e1 add definition for down time. 2006-09-22 21:40:12 +00:00
dsl
11d35f72b2 Replace the two lists 'job_list' (previously 'jobs') and 'stoppedJobs'
with a table that is malloced with 'maxJobs' entries.
Add a 'job_state' field to the Job type that exactly follows which of
the old lists the job was on (or not).
Change all the code that scanned the lists to scan the array.
No logic changes in this commit.
(Soon we'll no longer need to lock out signals for the changes to job
statuses that are done from signal handlers now that there is no linked list.)
2006-09-22 19:07:09 +00:00
xtraeme
49627385cb Apply patch from PR bin/34545 sent by Sergey Svishchev to add support
for digital transfer mode, not enabled by default.

To use it: $ cdplay -a /dev/audio (otherwise /dev/sound will be used)
and type "digital" on the interactive mode.

Thank you very much Sergey, it's very useful.

Reviewed and ok by christos@.
2006-09-22 18:20:53 +00:00
dsl
edb0aa98de Rename the variable 'jobs' to 'job_list' in preparation for making it an array. 2006-09-21 19:56:05 +00:00
christos
411ddc6a74 set utmp entry types to user process. 2006-09-20 19:43:33 +00:00
christos
14e0a0ccc6 unbreak the build by including the appropriate header files here. 2006-09-20 19:39:23 +00:00
he
c364d22b20 The recently added -ledit needs -ltermcap added as well. 2006-09-20 09:29:42 +00:00
christos
fccf00319f document the new options; from out anonymous user. 2006-09-20 01:25:16 +00:00
christos
cbf3acdacb Add support for the majority of the rest of the system V options, although
we don't support some of them. We might add boottime, system clock change
time, in the future, so add the code to do it.
2006-09-19 21:01:29 +00:00
christos
e7d816a1da s/ReplyFrom/ReplyAsRecipient/ from our anonymous user. 2006-09-19 20:31:49 +00:00
wiz
d16e662529 Document /var/log/wtmpx.[0-9] too. 2006-09-19 19:04:52 +00:00
wiz
1e4a7c15a0 Sync usage with man page. 2006-09-19 19:01:56 +00:00
wiz
72335cc2bc Lowercase argument (no reason for uppercase). 2006-09-19 19:01:44 +00:00
wiz
071cbdf1e3 New sentence, new line. Miscellaneous minor improvements. 2006-09-19 19:00:17 +00:00
christos
630fdba88e add an el_ prefix to the libedit variables. From our anonymous user. 2006-09-19 18:52:04 +00:00
wiz
4357668fad Sort options. Remove duplicate word. Use more markup macros. 2006-09-19 18:52:02 +00:00
christos
3cd99db90e restore "sh" to mean "shell" not "show". From our anonymous user. 2006-09-19 18:01:00 +00:00
hubertf
d7f002b78d Change -u behaviour to also print PID of process on terminal, and
add -d to print more information from utmpx.

OK'd by christos@
2006-09-19 14:35:25 +00:00
hubertf
47ac97884a Clarify usage: either -t or a template can be given (or both),
but at least one is mandatory.

Patch contributed by Tilman Kranz <tilman.kranz@tk-sls.de>,
OK'd by wiz@
2006-09-19 14:22:51 +00:00
christos
43c9741202 Jumbo mail patch from our anonymous user:
1) Use editline [optional]:
   Most of this code was borrowed from src/usr.bin/ftp.  It does the
   appropriate editing, history, and completion for all mail commands
   (from cmdtab[]) and also does editing on header strings ('~h' inside
   the mail editor).
2006-09-18 19:48:44 +00:00
christos
85c81c58a5 Jumbo mail patch from our anonymous user:
1) Use editline [optional]:
   Most of this code was borrowed from src/usr.bin/ftp.  It does the
   appropriate editing, history, and completion for all mail commands
   (from cmdtab[]) and also does editing on header strings ('~h' inside
   the mail editor).

2) '-B' flag:
   This will suppress the "To:" line passed to sendmail.  In most
   configurations it will lead to sendmail adding "To: undisclosed
   recipients;".  Currently, AFAIK mail requires at least one exposed
   recipient address.

3) Comments in rcfile:
   Currently, comments in .mailrc are only supported if the first
   (non-white) character on a line is '#' followed by white space,
   i.e., '#' is a 'nop' command.  This (trivial) patch allows the more
   normal/expected use of '#' as a comment character.  It does not
   respect quoting, so that might be an objection which I should fix.

4) Sendmail option editing:
   This adds the sendmail option string to the strings editable by the
   '~h' command within the mail editor.  Currently, you can only set
   this string from the command-line, which is particularly annoying
   when replying to mail.

5) Reply from:
   When replying to a message, grab the "To:" address from the message
   and, if there is only one such address and it does not match a list of
   allowed addresses (set in the "ReplyFrom" variable), pass it to
   sendmail as the "From:" address for the reply (with the '-f' option).
   I often make aliases for myself so that my primary address is not
   given out; if the alias gets out, I know who to blame.  Unfortunately,
   a reply to such a message would normally use the primary address
   without this patch.  A warning is displayed when this is going to
   happen so that it can be modified with '~h'.

6) CC and BCC lists:
   Allow '-c' and '-b' to accept white-space or ',' delimited lists.
   Currently, a white-space delimited list of addresses work, but a
   list of aliases will not get expanded.  For example, currently:

	mail -c "foo bar" christos

   will fail to send mail to 'foo' and 'bar' if these are mail aliases
   (in ~/.mailrc); sendmail aliases (in /etc/aliases) do work.

7) pipe command:
   This pipes the current message into a shell command.  I use this for
   quick decoding of uuencoded mail, but I can imagine it might be
   useful for decrypting encrypted mail, too.

8) show command:
   This command takes a list of variables and shows their values.  It
   is probably stupid as the 'set' command without any argument
   displays all variable values.  Of course, if there are a lot of
   variables you have to sift through the list for the one(s) you want.
2006-09-18 19:46:21 +00:00
wiz
bcbefab5bf "is be" -> "is" 2006-09-17 12:15:20 +00:00
elad
b77c058061 We now have CARP, so don't skip IFT_CARP in link_print(). 2006-09-16 12:25:11 +00:00
yamt
08c96f5c24 sync with kernel after yamt-pdpolicy merge. 2006-09-15 15:53:42 +00:00
christos
32f8a691e7 - Back to using kvm if we have access to it, since the sysctl stats do not
yet support all the fields we need.
- Don't core-dump if we could not open the kvm file.
2006-09-14 20:43:50 +00:00
christos
13a976b45e print "-"'s for the statistics that we don't support in the sysctl interface
and make columns aligned again.
2006-09-14 20:42:34 +00:00
dbj
b41feff50f fixes for installing into a case insensitive $DESTDIR
when files may have hard links to a a name that only differs by case
  - change install to unconditionally remove its temporary file
    when installing hard links with -r.  This avoids problems when
    built with posix rename(2) semantics and reinstalling an existing
    hard link.
  - rework hard link targets in bsd.man.mk and bsd.links.mk
    to use makefile constructs instead of shell constructs
  - always reinstall hard links that may have case conflicts, even
    when MKUPDATE=yes, this ensures that they get added to METALOG
  - remove man pages which were hard linked to themselves in libform
  - remove improper hard link command for existing man page in libkrb5
  - fix libl's makefile to include bsd.lib.mk at end
  - remove shell quoting in link target for test's [.1 man page
2006-09-11 22:24:09 +00:00
tnozaki
48d386f61a mapper_std iconv module and mkcsmapper(1) now can treat
plain-row-col charset and 4byte code(like GB18030) as SRC_ZONE.
2006-09-09 14:35:17 +00:00