Commit Graph

10918 Commits

Author SHA1 Message Date
plunky e16149e27c add alias for Plug'n'Play Information service UUID.
(This is sometimes used in HID devices to provide manufacturer information)
2009-12-05 16:54:13 +00:00
mrg 59c18d14fe apply a change from Xin LI <delphij@delphij.net> to avoid problems when
reading from pipes.  introduced with the multi-part bz2 fixes.
2009-12-05 03:23:37 +00:00
dsl 7828c3fe21 Add a note telling people to use the shell getopts builtin. 2009-11-28 20:36:45 +00:00
dsl e2fd1f1d18 Use shell builtin getopts instead of getopt(1).
Fixes PR/30425
2009-11-28 20:30:01 +00:00
darcy fc5c0ee967 Don't include newlines when comparing to prevent errors when lines have
characters that sort lower such as tabs.

This is a temporary fix to allow pullups to existing, supported versions
of NetBSD.  I will follow up with a version for current using the new
getline function.
2009-11-28 03:56:38 +00:00
plunky 60e7a7b128 add translation for "802.1Q" ethertype 2009-11-22 18:53:44 +00:00
wiz af753b56d3 New sentence, new line; remove trailing whitespace. 2009-11-19 06:48:37 +00:00
sjg 9772f81de8 Add .unexport - the exact opposite of .export
and .unexport-env which unexport's all previously .export'd globals
as well as clearing environ[].
Allow's sys.mk near total controll.

Reviewed by: apb
2009-11-19 00:30:25 +00:00
sjg b87966b319 PR: make.unexport
Reviewed by:
2009-11-19 00:30:24 +00:00
sjg f3c8b50aa4 Add .unexport - the exact opposite of .export
and .unexport-env which unexport's all previously .export'd globals
as well as clearing environ[].
Allow's sys.mk near total controll.

Reviewed by: apb
2009-11-19 00:30:24 +00:00
skrll 77fd7698f3 Make _rtld_pagesz of type size_t.
Fixes round_down for alpha which made ldd(1) break.
2009-11-17 18:44:33 +00:00
drochner 884c70cd50 ANSIfy, sprinkle "const" in some obvious cases 2009-11-17 18:31:12 +00:00
drochner 51f9e504fe kill a stray semicolon which made that the "-p <cmd>" option in
POSIX mode didn't work as expected
2009-11-16 19:40:17 +00:00
lukem 7f19467717 Crank version to 20090915:
* rename internal getline() to get_line() to avoid conflict with libc
* avoid NULL deref in verbose output in an error path
* improve man page markup
2009-11-15 10:03:16 +00:00
tron 87a288ba6f Don't assume that "id_t", "gid_t" and "uid_t" use the same underlying type
and use the appropriate types instead. Tested under NetBSD 5.99.22
and Darwin 10.2.0.

This should fix one of the cross-builds under FreeBSD as reported by
Rhialto on the "current-users" mailing list.
2009-11-12 10:10:49 +00:00
joerg 2ec9715635 Do not use \." for comments, always use .\". Discussed with uwe@. 2009-11-12 00:43:52 +00:00
dsl fe39abeba9 Clarify (hopefully) the description of -remove.
Fixes PR/38987
2009-11-06 21:03:12 +00:00
dsl c85c5e109a Report lines that ought to contain a ':' operator but start with a '.'
as "Unknown directive" sinze they are more likely to be .elseif (etc).
Lets me close PR/37222!
2009-11-06 20:20:56 +00:00
dsl 9e7c371385 Change enum values so that TOK_FALSE is 0 and TOK_TRUE is 1.
Use this fact to remove loads of ? : clauses.
2009-11-06 19:44:06 +00:00
joerg 2b8a053617 Retire __SCCSID. It has only archeological value now. Also retire lint
conditional around __RCSID, lint can handle that fine.
2009-11-06 18:34:22 +00:00
joerg 98712b66ed Fix __progname mess. 2009-11-06 15:13:27 +00:00
dsl ff86378d52 Allow display intervals > 25 seconds.
Fixes PR/36999
I did contemplate chaging curses - but the code is replicated and warped.
2009-11-04 21:46:24 +00:00
dsl 57843c1579 Correctly count number of chars output so that help isn't blank if the
terminal is too narrow.
Not ideal since the last command isn't shown on 80 column terminals.
2009-11-01 22:08:14 +00:00
joerg c2ab44f7a7 Always define _PATH_DIVNAME to the Unix version. Drop UNIQUE.
Fixes build on Mac OS X.
2009-10-31 23:25:04 +00:00
joerg 17c3d35d69 Only trust STRIP from environment if it is non-empty. Some packages set
STRIP in Makefiles and that makes install -s fail badly. OK apb@
2009-10-30 20:57:30 +00:00
uebayasi 4effe2d8e0 Now that YYSTYPE yyval is not global, use yylval from within yylex(). 2009-10-30 15:09:24 +00:00
joerg 0a4531336b Fix markup. 2009-10-30 01:40:45 +00:00
christos 2853bbf4b7 use %option instead of #define YY_NO_... 2009-10-29 14:49:02 +00:00
christos e2f4586574 option noinput 2009-10-29 14:37:56 +00:00
christos be9443776f option noinput nounput 2009-10-29 14:37:16 +00:00
christos 926a7cc331 option noinput 2009-10-29 14:35:25 +00:00
christos 3cd2e75890 unhook yacc 2009-10-29 01:01:17 +00:00
christos ba79df8804 put all the YY_NO in one place. 2009-10-28 22:22:44 +00:00
christos 6ed80d5bb1 no unput 2009-10-28 22:09:02 +00:00
christos cbf0b9da9a more no unput 2009-10-28 21:42:47 +00:00
christos 350212331d Handle nbtools build better. 2009-10-28 12:59:24 +00:00
christos c2261f6766 don't '#define yywrap() 1', use '%option noyywrap'. This is because the
#define is doomed to failure if --prefix is used.
2009-10-28 02:42:20 +00:00
christos a1b53986b9 unhook lex 2009-10-26 21:37:10 +00:00
christos c6ea3d2acf fix the tools build 2009-10-26 21:16:49 +00:00
christos 315c7490d2 fix compilation. 2009-10-26 21:14:18 +00:00
christos 7b2c561b05 fix prototype 2009-10-26 21:12:47 +00:00
christos f3efdb75c5 resolve conflicts. 2009-10-26 21:11:28 +00:00
christos 71dafaa1f2 Import new m4 from OpenBSD. 2009-10-26 21:08:59 +00:00
christos d79895b899 put back lex 2009-10-26 04:09:45 +00:00
christos 6beb933941 unhook old flex. 2009-10-26 01:18:19 +00:00
wiz 50a251ce93 Match directory extraction output with Infozip. 2009-10-25 20:14:50 +00:00
wiz 467a0fa1ae Bump date for uarea swap-out removal. 2009-10-21 22:18:37 +00:00
rmind 40cf6f3659 Remove uarea swap-out functionality:
- Addresses the issue described in PR/38828.
- Some simplification in threading and sleepq subsystems.
- Eliminates pmap_collect() and, as a side note, allows pmap optimisations.
- Eliminates XS_CTL_DATA_ONSTACK in scsipi code.
- Avoids few scans on LWP list and thus potentially long holds of proc_lock.
- Cuts ~1.5k lines of code.  Reduces amd64 kernel size by ~4k.
- Removes __SWAP_BROKEN cases.

Tested on x86, mips, acorn32 (thanks <mpumford>) and partly tested on
acorn26 (thanks to <bjh21>).

Discussed on <tech-kern>, reviewed by <ad>.
2009-10-21 21:11:57 +00:00
joerg 6e3add81a1 Do not try to mmap a zero length file. 2009-10-21 17:16:11 +00:00
wiz d5ecf43f6a Fix problems with SIGWINCH. From Paul Ripke in PR 42161. 2009-10-21 13:56:36 +00:00
snj 550147bd6a Remove 3rd and 4th clauses in christos' license. OK christos. 2009-10-21 01:07:44 +00:00
snj 4968c04d96 Move Eduardo Horvath's license to 2 clause. OK eeh@. 2009-10-19 18:12:37 +00:00
snj 065c5ae0d0 Move Matthias Pfaller's files to 2-clause license. OK matthias@. 2009-10-18 18:13:59 +00:00
christos 949a1d1b55 use system to parse args 2009-10-17 22:36:23 +00:00
wiz da3d98a56d New sentence, new line. Remove trailing whitespace. 2009-10-17 22:28:33 +00:00
christos ab107e386c add more features found in other unices 2009-10-17 19:05:54 +00:00
wiz a193d72dee Reflow to < 80 chars. 2009-10-16 08:09:12 +00:00
hubertf f7456856c8 Make the format for -k clearer 2009-10-15 23:12:53 +00:00
joerg 568625a8d1 Do not work around ancient groff limits with .Xo/.Xc. 2009-10-15 02:27:44 +00:00
joerg 63ec927bcc Use -compact + explicit .Pp instead of .sp with negative line length. 2009-10-15 02:26:38 +00:00
joerg 98ae2d6073 Do not use .Xo/.Xc to workaround ancient groff limits. 2009-10-14 17:44:25 +00:00
christos a49ff4deac Avoid segv on "printf '%*********s' 666", from Maksymilian Arciemowicz 2009-10-13 19:28:31 +00:00
mrg 5e3404f76c update version to today. 2009-10-11 09:17:21 +00:00
mrg 205ea56f45 avoid an overflow in suffix handling, from Xin LI <delphij@delphij.net>. 2009-10-11 07:09:39 +00:00
mrg 569ceba59d add "pack" uncompression support, from Xin LI <delphij@delphij.net> 2009-10-11 07:07:54 +00:00
mrg 628b55bb8d fix support for multi-section bzip2 files, as created by pbzip2. 2009-10-11 05:17:20 +00:00
dsl 43682b02ee If anyone is stupid enough to feed records longer than 8MB into sort, don't
sit in an infinite loop, instead eat memory until we have read 8 records.
2009-10-09 20:32:57 +00:00
dsl 41b3ada21c When we need to merge more than 16 files, do them in a hierarchy.
Reduces the amount of data written to temporary files.
The 3-level stack has to do a simple reduce after 4352 input files, for
a normal file sort this is 35GB of data or about 500 million records.
This needs about 50 open fd's - which should be ok.
Clearly the merge sort could process more input files in one go - speeding
up the sort, but at some point the number of input files would exceed
whatever limit was applied.
2009-10-09 20:29:43 +00:00
dsl 768e6fa973 Don't give merge an empty file when we detect EOF with nothing in our
buffer.
2009-10-09 20:23:19 +00:00
dsl 8b6ec7b129 long align records written to temporary files. 2009-10-07 21:03:29 +00:00
dsl 5aa782f502 When encoding numbers, we can use all 8 bits for exponent values. 2009-10-07 21:02:57 +00:00
sjg baca35f4e0 The parser used to break dependency lines at ';' without regard
for substitution patterns.  This (perhaps coupled with the
new handling of .for variables in ${:U<value>...) caused interesting
results for lines like:

.for file in ${LIST}
for-subst:       ${file:S;^;${here}/;g}

add a unit-test to keep an eye on this.
2009-10-07 16:40:30 +00:00
cegger 656e85b2f1 Mimic OSX behaviour:
On OS X it is possible to specify the manpage filename
with a full or relative path like this:

   man ./foo.5

or

   man /cd/foo/bar.1.gz

This is really helpful to view the manpage quickly while editing it.

patch presented on current-users@ and tech-userlevel@:
http://mail-index.netbsd.org/current-users/2009/10/06/msg010767.html
http://mail-index.netbsd.org/tech-userlevel/2009/10/06/msg002675.html

No objections
2009-10-07 08:30:31 +00:00
wiz ddecca9be6 Fix Dd argument (use full month names). 2009-10-06 21:39:58 +00:00
plunky 0fbc382d6d allow to specify 32-bit bluetooth short alias or full UUID strings
on the commandline.
2009-10-06 19:21:17 +00:00
cegger 58b5db465d - use EXIT_FAILURE/EXIT_SUCCESS
- whitespace nits
- ansify cleanup()/usage()
- remove pointless parenthesis on return
2009-10-06 06:43:15 +00:00
christos 7770393bf8 add type attributes in a few more places. 2009-10-03 17:09:18 +00:00
christos 3da8ec1b81 accept struct { ... } __packed name; 2009-10-03 01:35:20 +00:00
christos 17b31cc3a2 handle bit fields in packed structures. 2009-10-02 21:49:30 +00:00
christos 876a5b04b7 compute sizes by the new tsize() function. 2009-10-02 21:04:03 +00:00
christos 19f30f4ea2 fix typedef struct __packed 2009-10-02 20:45:06 +00:00
christos 2144a69bda remove debugging 2009-10-02 19:02:16 +00:00
christos 872e317461 recognize struct __packed x { }; in addition to struct x { } __packed; 2009-10-02 19:01:13 +00:00
christos f07e30ff20 change initialization from non const of regular variables to c99 instead of
gnu since c99 now has it.
2009-10-02 18:17:16 +00:00
christos bb531790dc understand __attribute__((__packed__)) and __packed. 2009-10-02 15:03:45 +00:00
wiz 3c9c8e60ab Remove trailing whitespace. 2009-10-02 07:43:15 +00:00
dsl b7ab3bd781 Add example of how to use the ?: modifier properly. 2009-10-01 21:40:31 +00:00
wiz 5746a940f5 Don't print "Archive:" line if quiet flag is set. 2009-09-30 10:04:54 +00:00
dsl eab2f96cf5 Fix borked fix for sort relying on realloc() changing the buffer end.
Sorts of more than 8MB data now probably work again.
2009-09-28 20:30:01 +00:00
plunky 98f75b5b42 protecting sockaddr_in6 with -DINET6 2009-09-27 18:19:18 +00:00
dsl 6458ae9cdf Move all the fopen() calls out of the record read routines into the callers.
Split the merge sort so that fsort() can pass the 'FILE *' of the temporary
files to be merged into the merge code.
Don't rely on realloc() not moving the end address of a buffer!
Rework merge sort so that it sorts pointers to 'struct mfile' and only
copies about sort record descriptors.
No functional change intended.
2009-09-26 21:16:55 +00:00
plunky 48b6f8e46b Add a new feature, allow to specify an alternative PSM value for the
RFCOMM protocol to use in client or server mode. Also, handle the case
where service search of the remote device returns non-standard PSM.
2009-09-24 18:30:37 +00:00
dsl 800732bfdc Fix sort -u, PR/42094 2009-09-19 16:18:00 +00:00
joerg 1d5ec6dab9 Implement rename query. 2009-09-18 13:05:19 +00:00
dsl fe52672374 Minor tweaks to the key generation for numeric fields.
Use 1's compliment for -ve numbers to avoid confitionals.
2009-09-16 20:56:38 +00:00
degroote 2d48ac808c Import pfsync support from OpenBSD 4.2
Pfsync interface exposes change in the pf(4) over a pseudo-interface, and can
be used to synchronise different pf.

This work was part of my 2009 GSoC

No objection on tech-net@
2009-09-14 10:36:48 +00:00
pgoyette ca6d65ecdd Use PRIu64 for printf'ing stuff. Fixes build breakage on part-amd64
introduced in rev 1.64 (and reverts a partial fix provided in rev 1.65)
2009-09-13 21:46:23 +00:00
elad dc553b0f9c Put some unsigned long long casts (as was in the original printing code).
Should fix build breakage noticed by pgoyette@ on current-users@:

    http://mail-index.netbsd.org/current-users/2009/09/13/msg010554.html

(sorry, don't have an amd64 anymore!)
2009-09-13 19:04:29 +00:00
wiz 76e34094ac Fix section for sysctl xref (it is 3, not 2). 2009-09-13 09:17:26 +00:00
elad a363352277 Checkin work in progress to make netstat use sysctl rather than kvm(3).
This commit mostly adds code written by Claudio Jeker for OpenBSD to
support sysctl in the interface printing parts (-i, -I, -w). The port has
been ported to NetBSD with tiny adjustments -- of course all bugs etc.
are mine.

Also add and document a -X flag to force sysctl usage. The documentation
notes this flag may be removed at any time and its presence should not be
relied on.

Some misc. comments/#ifdef changes/code snippet moves as well.

Please note that no functionality should change as the routing and
interface printing code is still not fully supported.

Mailing list reference:

    http://mail-index.netbsd.org/tech-userlevel/2009/09/09/msg002604.html
2009-09-13 02:53:17 +00:00
dsl 1310aa04b4 Save length of key instead of relying of the weight of the record sep.
This frees a byte value to use for 'end of key' (to correctly sort
short keys) while still having a weight assigned to the field sep.
(Unless -t is given, the field sep is in the field data.)
Do reverse sorts by writing the output file in reverse order (rather
than reversing the sort - apart from merges).
All key compares are now unweighted.
For 'sort -u' mark duplicates keys during the sort and don't write
to the output.
Use -S to mean a posix sort - where equal keys are sorted using the
raw record (rather than being kept in the original order).
For 'sort -f' (no keys) generate a key of the folded data (as for -n
-i and -d), simplifies the code and allows a 'posix' sort.
2009-09-10 22:02:40 +00:00
sjg d86fd0848e We must delay setting .CURDIR and .OBJDIR until after MainParseArgs()
in case -C is used - in which case we should also ignore $PWD.
2009-09-09 17:09:49 +00:00
sjg 44c6580dd0 Reviewed by: apb
Use .MAKE.LEVEL to track recursion.
The first instance of make will have .MAKE.LEVEL 0, which
can be handy for excluding rules which should not apply
in a sub-make.
gmake and freebsd's make have a similar mechanism, but each
uses a different variable to track it.  Since we cannot be
compatible with both, we allow the makefiles to cope if they want
by handling the export of .MAKE.LEVEL+1 in Var_Set().
2009-09-08 17:29:20 +00:00
wiz 82271cde5a New sentence, new line. 2009-09-07 20:06:21 +00:00
dholland 15a88044ca Add an -o option that behaves like nm -o. Implementation from a suggestion
by jmcneill (thanks!); ok mrg. Closes PR 41994.
2009-09-07 17:56:52 +00:00
sjg cd5a3748ef PR: 41998
:Ufu\:goo

should expand to fu:goo even when it appears in :M${:Ufu\:goo}
When scanning for :M do not compress \: if we know we have
to call Var_Subst.
2009-09-07 17:56:23 +00:00
dholland 1657935cd2 Sprinkle a little const. no object diffs 2009-09-07 04:49:03 +00:00
wiz 5705f52697 Add -C support. Document it.
Ok joerg

Improve -t output a bit (still different from Infozip unzip, but better).
2009-09-06 20:19:59 +00:00
dsl 2abdfb3907 Now we have our own radix_sort() change the interface so that we pass
an array of 'RECHEADER *' and remove all the crappy stuff that backed up
by REC_DATA_OFFSET (etc).
Also change radix_sort() to return the number of elements, soon to be used
to drop duplicate keys (for sort -u).
2009-09-05 12:00:25 +00:00
dsl 4611f32c1c Include a local copy of the sradixsort() code from libc.
Currently unchanged apart from the deletion of the 'unstable' version and
other unneeded code.
Use fldtab[0]. not fldtab-> when we are referring to the global info
in the 0th entry to emphasise that this entry is different.
fldtab[0].weights is only needed in the SINGL_FLD case - so set it there.
Re-indent a big 'if' is setfield() so that the line breaks match the
logic - which looks dubious now!
2009-09-05 09:16:18 +00:00
dholland aaa57659d5 ANSIfy and sort includes 2009-09-05 06:15:24 +00:00
dholland 4698bc3527 Tidy up error messages. Prompted by PR 41993 from Bug Hunting, but more
comprehensive.
2009-09-05 06:13:34 +00:00
wiz a3879acf53 Make output for -v/-l match Infozip unzip more closely.
Mention archive name, like Infozip unzip.
Add missing options to usage.
Ok joerg@
2009-09-04 14:23:24 +00:00
joerg b82a2b6d21 Fix output spacing for summary in -v. 2009-09-04 13:02:52 +00:00
dholland 01f8dc7731 Use the W* macros to test wait results.
(Mentioned by Joerg in chat a few days ago.)
2009-09-03 06:45:23 +00:00
joerg 0add6502d8 Enable libarchive-based unzip frontend. 2009-09-03 01:17:29 +00:00
wiz a7c1bdeb22 New sentence, new line. 2009-08-31 07:45:24 +00:00
cube 9a23b0e1a5 .Sx to refer to a section, and add one ref to the lint stuff for clarity. 2009-08-31 03:39:00 +00:00
cube 323b339462 For {pseudo-,}devices, check if an instance of the pseudo or the considered
attachment of the device has already been done by the template config file.
If so, don't emit a line.  Reported by John Nemeth.
2009-08-30 21:07:41 +00:00
christos 1ed23800b4 Don't barf on malformed mime messages (missing mime version). From Anon Ymous 2009-08-28 14:26:50 +00:00
dholland 92142a498e Make documentation of -f flag match the implementation. Bump date. 2009-08-27 04:18:29 +00:00
sjg b69bd507ef Bump date 2009-08-26 23:18:57 +00:00
sjg 3745b729fb Add -C directory, same as gmake and freebsd make. 2009-08-26 23:17:11 +00:00
joerg 042b29cdb1 Use a more compact presentation for g if the size is small enough. 2009-08-24 17:12:46 +00:00
joerg 84bc34c228 Fix synopsis 2009-08-24 08:38:39 +00:00
wiz f3d0c4e780 Fix typos. 2009-08-23 15:50:35 +00:00
wiz ea72fa6ee9 Fix pasto. 2009-08-23 15:45:08 +00:00
wiz 87e1425a46 Add missing word and bump date for previous. 2009-08-23 15:37:39 +00:00
dsl 5166e91c70 Bring nearer to reality.
Note that -H is now ignored.
Move -S and -s (and -H) to the first list of options since they are
global ones, not ones that override the ordering rules.
2009-08-22 21:55:08 +00:00
dsl 5c6e557c4b <space> and <tab> at the start of key fields are supposed to be sorted
as if part of the data.
This is a bit fubar since we need a value than sorts before any byte value
as a key field separator - so need 257 byte values (since radixsort() doesn't
take a length for each record).
For now map '\t' to 0x01 and hope no one will notice!
2009-08-22 21:50:32 +00:00
dsl e0846c3698 Put radixsort() and sradixsort() the correct way around. 2009-08-22 21:43:53 +00:00
dsl f58fe5e68a Fix generation of unmasked alpha keys. 2009-08-22 21:28:55 +00:00
dsl b36440a064 Only process each number digit once. 2009-08-22 21:19:40 +00:00
joerg 976b948d1c GCC's propolice complains about dynamic stack arrays to bite the bullet
and introduce a compile constant that limits the number of hash results.
Verify that the choosen hash function is not beyond that limit and just
the upper limit as static size in the graph tree functions.
2009-08-22 17:52:17 +00:00
joerg 44b11f39e8 Add support for -c, make the output of -l/-v more similar to infozip. 2009-08-22 17:19:11 +00:00
dsl 609b8532b4 Add some comments and clarifications to this inpeneterable code.
When merging ensure we accurable sort records with identical keys by
file-number, otherwise a 'stable' sort won't be!
2009-08-22 15:16:50 +00:00
dsl 7b4a02befd Rework the way sort generates sort keys:
- If we generate a key, it is always sortable using memcmp()
- If we are sorting the whole record, then a weight-table must be used
  during compares.
- Major surgery to encoding of numbers to ensure unique keys for equal
  numeric values.  Reverse numerics are handled by inverting the sign.
- Case folding (-f) is handled when the sort keys are generated. No other
  code has to care at all.
- Key uniqueness (-u) is done during merge for large datasets. It only
  has to be done when writing the output file for small files.
  Since the file is in key order this is simple!
Probably fixes all of: PR/27257 PR/25551 PR/22182 PR/31095 PR/30504
PR/36816 PR/37860 PR/39308
Also PR/18614 should no longer die, but a little more work needs to be
done on the merging for very large files.
2009-08-22 10:53:28 +00:00
mrg a9208fb155 kill ldd_aout. it didn't work anyway...not since i don't know when. 2009-08-22 06:52:15 +00:00
joerg 5e2ef53f3e Add -p and -q support. 2009-08-22 02:19:42 +00:00
joerg de2e5c0dbd Fix markup. 2009-08-22 00:23:02 +00:00
manu 3beea69ccd Reset ziptype on each line. Failure to do this caused any log file to
be compressed if it was listed after a line using Z or J flag. For
instance, we compressed log2 with the config file below:
/var/log/log1                        600  5    100  *    Z
/var/log/log2                        600  7    100  *    -
2009-08-21 08:20:19 +00:00
he 3b9a95def3 Um, the test for mips should use MACHINE_CPU, not MACHINE_ARCH. 2009-08-20 21:07:47 +00:00
he c93d22967f Don't try to call the (no longer defined) aout_ldd() function
if we're building for mips.
2009-08-20 21:06:17 +00:00
he b233b36efa Don't include <a.out.h> unless it's needed, and don't build
the aout subdir if on mips.  Fixes build for mips ports.
2009-08-20 19:17:19 +00:00
he d1c69ed983 Move the include of <a.out.h> and <sys/exec_aout.h> until after
we have determined that the current machine actually supports a.out.
2009-08-20 17:40:26 +00:00
he cff5554191 Remove the include of <a.out.h>, since these files do not appear
to need it.  Fixes build for mips ports.
Also fix a comment: crunchide walks "the symbol table", not
just "the a.out symbol table".
2009-08-20 17:39:51 +00:00
plunky 46834460fc add SupportedRepositories attribute for Phonebook Access profile
providing PhonebookAccessServer service
2009-08-20 11:07:42 +00:00
dsl bf80c84843 Delete more unwanted/unused cruft.
Simplify logic for reading input records.
Do a merge sort whenever we have 16 partial sorted blocks.
The patient is breathing, but still carrying a lot of extra weight.
2009-08-20 06:36:25 +00:00
joerg d1a45441e8 Fix-up syntax after wizd. 2009-08-19 15:26:59 +00:00
joerg dd0c11eb26 Don't use .Xo/.Xc. Fix markup of alias command. 2009-08-19 15:17:05 +00:00
joerg d965d85297 Nesting displays is not valid groff syntax. 2009-08-19 14:54:35 +00:00
dsl f155f3b8b9 The code that attempted to sort large files by sorting each chunk by the
first key byte and writing to a temp file, then sorting the records from
each temp file that had the same first key byte (and repeating for upto
4 key bytes) was a nice idea, but completely doomed to failure.
Eg PR/9308 where a 70MB file has all but one record the same and short keys.
Not only does the code not work, it is rather guaranteed to be slow.
Instead always use a merge sort for fully sorted chunk of records (each
temporary file contains one lot of sorted records).
The -H option already did this, so just rip out all the code and variables
that can't be used when -H was specified.
Further cleanup to come ...
2009-08-18 18:00:28 +00:00
joerg 81e49626c4 GCC doesn't trace switch (foo & 7) completely, so add a default: abort()
to avoid warnings about unused variables.
Consistently use \t for the output function.
2009-08-17 14:15:07 +00:00
christos 3104786862 back out previous; luke says:
'@' is a reserved URI char per RFC 3986, use %40
2009-08-17 09:08:16 +00:00
dsl fa81e78b3d 'depth' is used for the number of bytes into the key that the pointers
reference, when we want to find the record header put the larger value
into 'hdr_off' to avoid any confusion that the code might be changing
'depth'!
There is now no need to save the original value as 'odepth' in append.c.
All an a vague attempt to make this code slightly readable.
2009-08-16 20:02:04 +00:00
dsl 9ab8b68075 Replace all uses of sizeof(TRECHEADER) with REC_DATA_OFFSET - which
is defined as offsetof(RECHEADER, data).  Delete TRECHEADER.
2009-08-16 19:53:43 +00:00
martin f842f249ac More missing <sys/exec_aout.h> 2009-08-16 18:43:08 +00:00
martin 73946a9cc9 More missing <sys/exec_aout.h> includes 2009-08-16 18:15:28 +00:00
christos 3ac3892a2a use strrchr to find the last @ because we might want the username to contain
user@domain.
2009-08-16 02:49:23 +00:00
dsl 59ede5ae24 Always add an REC_D char (usually \n) as the last sort key char - we
almost always need one.
But do ADD it, instead of overwriting the last byte of the last key since
that may be requesting the other end of the sort order.
There is no need to check for space for the line after adding the key,
but we might as well check before - just to optimise that case.
This might fix some of the sort bugs - but not the one I'm looking at!
2009-08-15 21:26:32 +00:00
wiz e671c9cf08 Fix typo. 2009-08-15 20:44:56 +00:00
christos bcbc23bd8f add -p <tmpdir> option to override $TMPDIR from the command line like linux
has.
2009-08-15 20:02:28 +00:00
dsl 9987745061 Remove reference to db.h by using separate ptr+len fields for the only
structure that used it.
Pass end of keybuf area, not size to enterkey() - largely to remove a
variable who'se use isn't obvious from the name!
The structute of this code sucks.
2009-08-15 18:40:01 +00:00
dsl 477a33f936 linebuf and linebuf_size are only used inside seq() - which also not
only has its own static variable, but will also extend the buffer.
Remove linebuf/size and change seq() to use a private, locally managed
buffer.
2009-08-15 16:50:29 +00:00
joerg 03c8ba1c27 Add nbperf(1), a minimal perfect hash function generator.
Implemented are the 3-graph BDZ algorithm as well as the
2-graph and 3-graph CHM algorithms. All algorithms have expected
linear run time and the smallest functions need around 2.85 bit/key.
2009-08-15 16:21:04 +00:00
dsl 5e8c7b5dbd Remove the unused 'DBT *key' parameter from seq(). 2009-08-15 16:10:40 +00:00
dsl a3b5c4400f In makeline() change 'pos' from 'char *' to 'u_char *' and remove all
the casts associated with its use.
None of the uses can possibly care about the signedness of the pointer.
2009-08-15 14:31:48 +00:00
dsl 2a0ab276a2 Ansify.
I'm looking at fixing the 'sort -n' fubars, but this code is an
inpeneterable mess - which needs some fixing first!
2009-08-15 09:48:46 +00:00
drochner c2819fbfcf avoid NULL dereference in log output if the command line parser
failed to extract a port number from the URL
2009-08-13 17:55:18 +00:00
dholland 69c3e9d213 Pass WARNS=4, not without some gross preprocessor hackery.
XXX: does this program actually do anything useful these days?
2009-08-13 06:59:37 +00:00
dholland e63a3e7105 Assorted minor cleanup:
- use stdbool.h (partly)
  - move extern declarations of data to header files
  - use right types for calloc() wrapper
  - remove bogus casts on return values
  - remove excessive Pascal-style parentheses in conditionals
  - a couple const fixes
  - fix some typos in comments
2009-08-13 05:53:58 +00:00
dholland 7d59a3fee1 pass -Wshadow 2009-08-13 04:09:53 +00:00
dholland 72efe4fb6f Sprinkle const. 2009-08-13 03:50:02 +00:00
dholland 6c23c8ddec woops (doh!) 2009-08-13 03:10:03 +00:00
dholland f42113e362 Whitespace. 2009-08-13 03:07:49 +00:00
dholland b74af21b24 sprinkle static 2009-08-13 02:10:50 +00:00
matt 5f89c92891 Don't build for MIPS anymore 2009-08-12 23:39:13 +00:00
wiz 67bd9cb78f Remove superfluous parenthesis in #ifdef DEBUG.
From Henning Petersen in PR 41844.
2009-08-07 14:05:58 +00:00
wiz ba544bf010 Add missing parenthesis in commented out code.
From Henning Petersen in PR 41838.
2009-08-07 13:53:54 +00:00
wiz 8356afb2c1 Fix typos in comment. 2009-08-05 19:08:28 +00:00
plunky 018ad52aa7 add new Service Class ID and Protocol UUIDs from the Service Discovery
assigned numbers document at www.bluetooth.com

add detail printing for Message Access Profile v1.0
2009-07-25 17:32:47 +00:00
gson 5861f6c435 When installing via a temporary file, base the name of the temporary
file on the name of the target file, not just the target directory, to
ensure uniqueness when multiple concurrent invocations of install(1)
simultaneously install files in the same directory.  Fixes bin/41512.
2009-07-25 11:45:58 +00:00
dholland 6d977e7b2a de-__P() and ANSIfy; no functional change 2009-07-25 08:20:24 +00:00
dholland 6263c6ea9c (1) reject instead of ignore extra arguments;
(2) reject requests for environment variables containing '='
    (PR 41774, but with different patch)
(3) fix capitalization of usage message
2009-07-25 08:18:33 +00:00
christos f7c0a24801 the movers came. 2009-07-24 14:28:36 +00:00
njoly 420fe75a02 Delay emulation record output, to be processed after the current
syscall; to avoid picking syscall name from the wrong emulation table.
2009-07-24 11:34:03 +00:00
ahoka b05ff95e20 Modify to support multibyte characters. 2009-07-21 01:35:02 +00:00
ahoka d5fb12b51d Apply some ANSI and KNF. 2009-07-21 01:25:14 +00:00
ahoka e48fb46a99 Change to support multibyte characters. 2009-07-21 01:12:55 +00:00
christos 00bd3af563 ansi prototypes for yyinput. 2009-07-20 21:13:28 +00:00
christos 6a7d49166f ssh has moved 2009-07-20 17:35:05 +00:00
christos 34af4cdada openssl has moved 2009-07-20 17:34:41 +00:00
apb 3ac228d1b2 Declare "com" as volatile in execute(), to make it safe to use
across setjmp/longjmp.

Inspired by PR 41255 from Kurt Lidl, but this change makes "com" a
volatile pointer to const non-volatile data, whereas the PR made it a
non-volatile pointer to const volatile data.
2009-07-14 21:15:48 +00:00
apb 3e4a7fe1fe Don't assume that two identical-looking string literals will have the
same address and will therefore be comparable with the == operator.
Instead, use a const variable.
Inspired by PR 41255 from Kurt Lidl.
2009-07-14 21:08:31 +00:00
apb 4259cd2ab8 Delete unused static smatch() function.
Inspired by PR 41255 from Kurt Lidl (which used #if 0 instead of
deleting the function).
2009-07-14 21:05:34 +00:00
apb d47a5ef0ce Compare strings with strcmp(), not ==.
Part of PR 41255 from Kurt Lidl.
2009-07-14 21:02:24 +00:00
christos 585ce9eda6 move _KMEMUSER higher! 2009-07-13 21:44:32 +00:00
christos d96e875904 need _KMEMUSER too. 2009-07-13 21:43:24 +00:00
roy 7027866a09 Rename internal getline() function to get_line() so it does
conflict with the soon to be added getline(3) libc function.
2009-07-13 19:05:39 +00:00
christos f73facbc14 sys/mqueue.h needs sys/types.h now 2009-07-13 17:57:35 +00:00
joerg 5f6627fa61 mandoc(1): -width is redundant for a item list 2009-07-11 18:38:30 +00:00
joerg ea92254557 Fix markup. 2009-07-11 18:35:48 +00:00
plunky 447afe8d7e add interpretation of "PNP Information" service class (Device ID profile) 2009-07-04 16:01:15 +00:00
mrg 983926d7bf note that -t can take [.dddddd]. sort -q.
from dhgutteridge@sympatico.ca in PR#36928.
2009-07-02 04:45:27 +00:00
dholland 63eb8c3760 Add some markup to improve clarity. 2009-06-29 03:49:41 +00:00
dholland 69388abb04 Fix typo 2009-06-28 19:02:46 +00:00
wiz 0f05513297 Remove superfluous Pp. Grammar improvement, typo fix, sort sections, fix Xr. 2009-06-26 09:31:04 +00:00
sjg dd8e1ba252 JobExec: child of vfork must not empty the sigset_t that parent will
restore.  Use a separate mask.
2009-06-26 01:26:32 +00:00
wiz c16d893d82 Remove trailing whitespace. 2009-06-25 23:20:55 +00:00
hubertf c8c572c3bf Add an example .windowrc 2009-06-25 21:48:49 +00:00
joerg a0922fbd98 Add work-in-progress unzip(1) frontend for libarchive.
Derived from FreeBSD's unzip.
2009-06-25 20:27:05 +00:00
wiz d9d40568a0 Remove superfluous quotes. 2009-06-21 15:05:59 +00:00
wiz eff7f14d80 Sync usage with man page. 2009-06-21 15:04:56 +00:00
wiz 205b6ccb09 Fix error in previous. 2009-06-21 15:04:07 +00:00
wiz bd7419a011 Sort options and option descriptions. Use EXIT STATUS header for exit status
description. Use Pa for paths.
2009-06-21 15:02:54 +00:00
wiz 37d95f331f Sync usage with man page. 2009-06-21 14:59:53 +00:00
wiz 65c247649d Use Pa for paths. 2009-06-21 14:58:58 +00:00
wiz 7bba45dc18 Sync usage with man page. 2009-06-21 14:58:16 +00:00
wiz f29f41d64b Use Pa for paths. 2009-06-21 14:57:33 +00:00
wiz 43ec52d73e Fix Dd argument. New sentence, new line. Remove superfluous .Pp. 2009-06-21 14:56:49 +00:00
christos 75a86bdab6 PR/40274: Takahiro Kambe: "P" flag stops rotating files. 2009-06-20 19:34:19 +00:00
christos e5962c583f PR/22627: Greywolf: Support for yp nicknames map. 2009-06-20 19:27:26 +00:00
mrg 95c070cab9 - add extended WAVE header support
- attempt to play a bunch more WAV files
2009-06-18 02:37:27 +00:00
sjg 39bb2e98a1 Child of vfork() must not alter the state of parent.
There is no need to touch the state of vars in child anyway.
Change 2nd arg to Var_Export1() to indicate if we are the parent or child,
and only set flags in the parent.
2009-06-16 05:44:06 +00:00
christos d3f46c621c PR/41581: Der mouse: window SEGV with certain terminals. does strcmp first
and then checks for null pointer for underline and bold.
2009-06-12 15:19:52 +00:00
ginsbach 2248a77687 Add -o output option, which can be used to specify an output file. The
file can even be the same as the input file.  Idea from IRIX unifdef(1).
2009-06-11 03:16:34 +00:00
yamt 6539ec6cea tabify and wrap long lines. 2009-06-08 21:58:44 +00:00
gson 57a8678315 Fix race condition causing "install -d" to randomly fail when multiple
concurrent install processes try to create the same directory.
Modelled after the code handling the "mkdir -p" case in mkdir(1).
2009-06-08 14:22:01 +00:00
christos e3dfcc9dfe remove file 2009-06-07 23:16:50 +00:00
christos 0587e0bf24 unhook ssh 2009-06-07 22:46:43 +00:00
tron cef801c39d Chuck Berry was born in St. Louis, Missouri, and not in St. Jose,
California. Patch submitted by Marc Balmer in private e-mail.
2009-06-07 10:25:39 +00:00
joerg 57b5269dad Explicitly include fcntl.h for O_CREAT to not depend on namespace
pollution.
2009-06-05 19:55:43 +00:00
sjg 2428caab9f Missing ':' in .ORDER example 2009-06-01 23:28:39 +00:00
christos 3b9e5891ba fix typo (Silas Silva) 2009-05-28 14:57:42 +00:00
snj a1602d4a22 Fix some longstanding typos and remove an entry that is both redundant
and wrong at the same time.
2009-05-27 17:17:03 +00:00
ad d991fcb3b6 More changes to improve kern_descrip.c.
- Avoid atomics in more places.
- Remove the per-descriptor mutex, and just use filedesc_t::fd_lock.
  It was only being used to synchronize close, and in any case we needed
  to take fd_lock to free the descriptor slot.
- Optimize certain paths for the <NDFDFILE case.
- Sprinkle more comments and assertions.
- Cache more stuff in filedesc_t.
- Fix numerous minor bugs spotted along the way.
- Restructure how the open files array is maintained, for clarity and so
  that we can eliminate the membar_consumer() call in fd_getfile().  This is
  mostly syntactic sugar; the main functional change is that fd_nfiles now
  lives alongside the open file array.

Some measurements with libmicro:

- simple file syscalls are like close() are between 1 to 10% faster.
- some nice improvements, e.g. poll(1000) which is ~50% faster.
2009-05-24 21:41:25 +00:00
plunky 9b85369a0a use system provided MAX(a, b) macro instead of defining our own 2009-05-21 14:44:01 +00:00
christos ebd7e1e10a catch up with rtld changes 2009-05-20 16:20:01 +00:00
wiz 8ab6f9e454 Sort options. Sort sections. Remove superfluous .Pp. 2009-05-18 12:03:06 +00:00
wiz ea548d35a5 Sort options. 2009-05-18 09:37:44 +00:00
christos 434ce22684 fix dependencies. 2009-05-16 21:37:48 +00:00
plunky bbb0e93abb add a -P flag to attempt immediate pairing 2009-05-16 07:18:42 +00:00
wiz 7560090357 Whitespace fix. 2009-05-13 22:56:42 +00:00
cube d502f7a8c0 Dependency on config_time.src was removed today from Makefile.kern.inc, so
starting from that date it's not necessary to create it.  (Of course that
won't happen until config version is bumped for some other reason.)
2009-05-13 18:54:34 +00:00
wiz b0f5ac9634 Add missing apostrophe. 2009-05-12 18:54:31 +00:00
plunky a092292999 update rfcomm_sppd to use the new Service Discovery API 2009-05-12 18:43:35 +00:00
plunky 1b7404b7aa update to use the new service discovery API 2009-05-12 18:39:55 +00:00
plunky 384153c15a update sdpquery with a newer version that fetches the whole service
record and displays it in a human readable fashion.
2009-05-12 18:37:50 +00:00
plunky b2f181453f this needs libsdp no more 2009-05-12 13:15:10 +00:00
plunky 8cea406d3c does no longer need libsdp 2009-05-12 13:13:34 +00:00
plunky cf71b1e8c5 no longer needs libsdp 2009-05-12 13:11:18 +00:00
christos 108470e3b9 unhook file 2009-05-08 17:47:00 +00:00
wiz 0407c1b885 Add support for -S and -s option, which limit the results to a specific
architecture or section, respectively.
Based on a patch for OpenBSD from Ingo Schwarze, modified for NetBSD by me.

Add some constification.

Ok lukem@ (to the non-constified version of the patch).
2009-05-08 12:48:43 +00:00
plunky 8650959ae7 ensure that sdpquery continues to build while I am in progress of
updating Service Discovery Protocol API
2009-05-07 18:12:08 +00:00
plunky 539b5ab318 Ensure that these programs continue to build while I am in the
process of updating the Service Discovery Protocol API.
2009-05-07 18:08:55 +00:00
ginsbach 3cad8d1d2c Add support for hyper and quad keywords. (See Sun ONC+ Developer's Guide
and RFC-4506 for additional details.)  [From FreeBSD and OpenSolaris]
2009-05-06 14:30:51 +00:00
wiz b6359ce897 Punctuation. 2009-05-04 21:13:58 +00:00
wiz a44b9acd01 Use Sx. Remove superfluous .Pp. 2009-05-04 21:11:53 +00:00
wiz d8c85176f3 New sentence, new line. 2009-05-04 19:45:51 +00:00
mlelstv 0a0ecc0e52 make flushpendq drop only entries for the current thread. 2009-05-02 21:01:01 +00:00
christos 24132af2b3 PR/41338: Michael van Elst: ktruss mixes filename arguments
Restore call to dumppendq.
2009-05-02 18:26:53 +00:00
christos 1a90c89fed Add __alignof__. 2009-05-02 16:10:49 +00:00
christos 6892362adf add variable declarations in for loops for c99 2009-05-01 22:03:36 +00:00
wiz 52d9a489d1 Bump date for previous. 2009-05-01 21:38:19 +00:00
apb be7721cd8f Add support for writing sha256, sha384, and sha512 digests to
a metalog.  mtree(8) has supported these for a long time.
2009-05-01 20:16:23 +00:00
christos ba99a2b3a4 PR/41313: Chris Spiegel: getutentries() in src/usr.bin/who/utmpentry.c thinks
there are no entries if only one of utmp/utmpx support is selected
mangled && -> ||
2009-05-01 14:26:10 +00:00
snj eced0c510c Bah, fix typo in last: 2006, not 2005. 2009-04-30 16:23:58 +00:00
snj 78ee216a46 Add NetBSD 3.1. 2009-04-30 16:20:50 +00:00
wiz 749e1a3b98 void tabs, for consistency. 2009-04-29 22:34:31 +00:00
snj 215e6d35e2 NetBSD 5.0. 2009-04-29 22:25:03 +00:00
yamt a26c5cc0c2 remove read-write code because it's dangerous.
there's no point to try this hard anyway.
2009-04-28 02:47:12 +00:00
ginsbach 5fabed93f9 Print left and right type and not left type twice. (Hi Christos!) 2009-04-27 15:08:10 +00:00
christos c37383f14b fix broken overflow test. 2009-04-26 15:55:50 +00:00
lukem a60f776aae Revert incorrect change made as part of the WARNS=4.
Fixes "ftp host [port]" on the CLI.
Noted by Geoff Wing.
2009-04-24 08:57:26 +00:00
tsutsui c37f283f47 Fix -Wcast-qual and -Wsign-compare issues. 2009-04-23 14:49:32 +00:00
drochner 0fa7059102 define YY_NO_INPUT where appropriate, from Kurt J. Lidl per PR misc/41160 2009-04-20 16:05:29 +00:00
drochner 3f2cf355d3 if YY_NO_INPUT is defined, disable not only the declaration but also
the definition of yyinput(), avoids compiler warnings with newer gcc.
from Kurt J. Lidl per PR misc/41160, with a minor change to make it
generate paired #directives in the "-+", ie c++, case
2009-04-20 16:01:17 +00:00
tsutsui e7f34be0d2 Fix another -Wsign-compare issue.
XXX: is it really worth to keep non native aout/coff/ecoff support here?
2009-04-18 11:30:30 +00:00
dogcow 7aaa51f5d6 Fix sign/unsigned and discards qualifiers. Based on patch by mlelstv. 2009-04-18 10:12:42 +00:00
mlelstv 333d9d13b5 avoid compiler warnings about shadowed declarations. 2009-04-18 09:04:34 +00:00
lukem efa035ed26 Compare size_t vs off_t by casting both to uintmax_t 2009-04-18 06:24:05 +00:00
lukem d96ab870e3 Attempt to fix previous to address a coredump. 2009-04-18 03:25:34 +00:00
dyoung f853fb7538 Rename variables to fix GCC warnings: local variables optopt and optarg
shadow globals.
2009-04-17 20:25:08 +00:00
apb 7097476cb5 Re-calculate size and digestresult after stripping, to ensure that
correct values appear in the metalog.
2009-04-17 06:09:08 +00:00
tron 80ab5902d9 Fix build problem on big endian ports where ntohl() doesn't convert the
argument to "uint32_t" automatically.
2009-04-16 13:52:52 +00:00
jld d61104a0f0 Another empty-body warning/error, another set of curly braces. This, and
the last one, appear to affect only the NO_DEBUG (e.g., SMALLPROG) build.
2009-04-15 04:19:39 +00:00
jld 882877eb33 Unbreak the build by adding curly braces to placate the empty-body warning. 2009-04-15 03:42:33 +00:00
dogcow 85e7c15ca3 more signed/unsigned comparison fixes 2009-04-15 02:07:20 +00:00
christos 7f812cd511 Lukemify (WARNS=4) 2009-04-15 01:20:57 +00:00
lukem c1ceae17f0 Enable WARNS=4 by default for usr.bin, except for:
awk  bdes  checknr  compile_et  error  gss  hxtool  kgetcred  kinit
	klist  ldd  less  lex  locale  login  m4  man  menuc  mk_cmds
	mklocale  msgc  openssl  rpcgen  rpcinfo  sdiff  spell  ssh
	string2key  telnet  tn3270  verify_krb5_conf  xlint
2009-04-14 22:15:16 +00:00
lukem 9a472d38d4 Fix WARNS=4 issues (-Wshadow -Wcast-qual) 2009-04-14 22:03:07 +00:00
lukem 238e973f29 Fix sign-compare issues 2009-04-14 10:11:28 +00:00
lukem 38a78fe6fc Fix WARNS=4 issues (-Wcast-qual -Wsign-compare) 2009-04-14 09:55:07 +00:00
lukem ee76095327 Fix -Wsign-compare issue 2009-04-14 09:53:08 +00:00
lukem 3abdd2c250 Fix WARNS=4 issues (-Wshadow -Wcast-qual) 2009-04-14 09:41:30 +00:00
lukem 17d35bfb59 Fix WARNS=4 (-Wcast-qual).
Fix creation of tempfile
2009-04-14 09:18:41 +00:00
lukem ae780f8105 Compile lint with WARNS=3.
Currently there are too many -Wsign-compare issues for WARNS=4.
2009-04-14 09:09:59 +00:00
lukem e54a1dbe60 fix -Wcast-qual issues 2009-04-14 09:08:39 +00:00
lukem 4bfb0e2161 Fix -Wshadow and -Wcast-qual issues 2009-04-14 09:06:25 +00:00
lukem 4c61b31086 Fix -Wshadow issues 2009-04-14 09:03:45 +00:00