Commit Graph

10592 Commits

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