The index number was too confusing such as
0: [ ] audio1 @ wss0
1: [*] audio0 @ yds0
in my PC for example. Here is new format:
[*] audio0 @ yds0
[ ] audio1 @ wss0
In this style, devices are always listed in order of unit number
and 0 always means audio0, 1 always means audio1.
worlds, as when the first arg (which should be the format) contains
no % conversions, and there are more args, the results are unspecified
(according to POSIX).
We can use this so the previous usage
printf -- format arg...
(which is stupid, and pointless, but used to work) continues to
simply ignore the -- (unspecified results mean we can do whatever
feels good...)
This brings back the #if 0'd block from the previous modification
(so there is no longer anything that needs cleaning up later) but runs
the getopt() loop it contained only when there are at least 2 args
(so any 1 arg printf always uses that arg as the format string,
whatever it contains, including just "--") and also only when the
first (format) arg contains no '%' characters (which guarantees no %
conversions without needing to actually parse the arg). This is the
(or a) "unspecified results" case from POSIX, so we are free to do
anything we like - including assuming that we might have options
(we don't) and pretending to process them.
(it doesn't - that is, shouldn't) which includes processing -- as an
"end of options". The first arg is (always) the format string.
Remove call to getopt() (but still do associated changes to argc/argv)
Note: for now this is #if 0's out instead of being deleted, the old
code should be fully removed sometime soon.
Problem pointed out on tech-userlevel by Thierry Laronde.
KERN_PROC_CWD in sysctl(3)
That is kern.proc.$$.KERN_PROC_CWD (I think - not that it matters here)
The effect is that -lrump now requires -lrumpvfs
This set of changes fixes (I believe) regular dynamic builds,
more might be required for static builds (will be verified soon).
reference), improve punctuation, etc.
XXX lines 177-191 have been commented out since they were imported in
r. 1.2 back in 1993, they should probably be re-examined, and revised
or removed.
- Extend list command to display supported hardware formats.
- Add set command to set hardware format.
- Use correct /dev/audioctl instead of /dev/audio.
produces a symbol table that is readable (by 4.4BSD nm(1) at least)
- Change from OMAGIC to ZMAGIC
- Resize the a.out string table if we run out of space.
- output symbol table size as int32_t (the code already assumes no 64bit
a.out.
didn't handle "--" terminator, so this code was working around it and
not quite correctly at that.
Fixes weird output from
$ uniq --long-option
uniq: uniq: No such file or directory
(for more fun, run that command from /usr/bin as root).
Pointed out by Andreas Krey.
Merge all the changes from the recent FreeBSD HEAD snapshot
into our local copy.
FreeBSD actively maintains this program in their sources and their
repository contains over 100 commits with changes.
Keep the delta between the FreeBSD and NetBSD versions to absolute
minimum, mostly RCS Id and compatiblity fixes.
Major chages in this import:
- Added an option -ldi<N> to control indentation of local variable names.
- Added option -P for loading user-provided files as profiles
- Added -tsn for setting tabsize
- Rename -nsac/-sac ("space after cast") to -ncs/-cs
- Added option -fbs Enables (disables) splitting the function declaration and opening brace across two lines.
- Respect SIMPLE_BACKUP_SUFFIX environment variable in indent(1)
- Group global option variables into an options structure
- Use bsearch() for looking up type keywords.
- Don't produce unneeded space character in function declarators
- Don't unnecessarily add a blank before a comment ends.
- Don't ignore newlines after comments that follow braces.
Merge the FreeBSD intend(1) tests with our ATF framework.
All tests pass.
Upgrade prepared by Manikishan Ghantasala.
Final polishing by myself.
Part II, checkin new files.
Merge all the changes from the recent FreeBSD HEAD snapshot
into our local copy.
FreeBSD actively maintains this program in their sources and their
repository contains over 100 commits with changes.
Keep the delta between the FreeBSD and NetBSD versions to absolute
minimum, mostly RCS Id and compatiblity fixes.
Major chages in this import:
- Added an option -ldi<N> to control indentation of local variable names.
- Added option -P for loading user-provided files as profiles
- Added -tsn for setting tabsize
- Rename -nsac/-sac ("space after cast") to -ncs/-cs
- Added option -fbs Enables (disables) splitting the function declaration and opening brace across two lines.
- Respect SIMPLE_BACKUP_SUFFIX environment variable in indent(1)
- Group global option variables into an options structure
- Use bsearch() for looking up type keywords.
- Don't produce unneeded space character in function declarators
- Don't unnecessarily add a blank before a comment ends.
- Don't ignore newlines after comments that follow braces.
Merge the FreeBSD intend(1) tests with our ATF framework.
All tests pass.
Upgrade prepared by Manikishan Ghantasala.
Final polishing by myself.
have one backing implementation that returns different values and
types than the other. Handle error setting properly; i.e. bail
out if the internal read returned an error. Now we get a proper
error message when the the server resets our connection instead of
a warning that the right failed with an invalid argument.
The server used for testing was:
http://capeweather.dyndns.org:8080/graphs/3474.png
Which seems to be unreliable :-)
characters instead of garbage. This makes output reproducible.
Taken from FreeBSD:
https://svnweb.freebsd.org/base?view=revision&revision=84715
Even though this is not demanded by POSIX, uuencode(1) in
FreeBSD, OpenBSD, macOS, and GNU, behaves that way.
Call cleanup(SIGHUP) if we get local EOF, as if we've got SIGHUP.
While here, use EOF constant instead of literal -1 in an existing
check.
PR bin/53996
new variant: -1 when functions have fundamentally changed the menu
definition on the fly and the processing functions needs to restart
without looking at the old state (or stale cached pointers).
on sparc and sparc64, don't remove .eh_frame section. it leads
to failure as something is referenced, and objcopy ends up
emitting a broken binary that can't be run -- it attempts to
load at va=0, beyond having missing referenced data.
also, on sparc64 also don't remove .note.netbsd.mcmodel.
the former should be revised when we can avoid it.
possible to find a paper titled as such with sections starting with
"Interpreting system activity".
There is a "Monitoring System Performance" section present from the 4.1BSD
Installing and Operating paper up to and including the 4.4BSD paper. The advice
in this section has not aged very well.
From "Installing and Operating 4.3BSD-tahoe UNIX on the VAX":
"Cumulatively on one of our large machines we average about 60-100
context switches and interrupts per second and about 70-120 system calls
per second"
the application programmer defines as expansion, e.g. to implement
parameter substitution.
While here add rudimentary documentation of the dynamic messages
feature (so at least the parser and the syntax documented here
are in sync).
The man page could use some typesetting help...
Update to match.... We're slow but we get there eventually!
NFC for any of these programs, struct timeval and struct timespec
are the same size, and only the tv_sec field of boottime is used,
and that's unchanged.
- This conversion significantly simplifies the code and moves NPF to
a binary serialisation format (replacing the XML-like format).
- Fix some memory/reference leaks and possibly use-after-free bugs.
- Bump NPF_VERSION as this change makes libnpf incompatible with the
previous versions. Also, different serialisation format means NPF
connection/config saving and loading is not compatible with the
previous versions either.
Thanks to christos@ for extra testing.
When printf is running builtin in a sh, global vars aren't reset to
0 between invocations. This affects "rval" which remembers state
from a previous %b \c and thereafter always exits after the first
format conversion, until we get a conversion that generates an
error (which resets the flag almost by accident)
printf %b abc\\c
abc (no \n)
printf %s%s hello world
hello (no \n, of course, no world ...)
printf %s%s hello world
hello
printf %s%s hello world
hello
printf %d hello
printf: hello: expected numeric value
0 (no \n)
printf %s%s hello world
helloworld (no \n, and we are back!)
This affects both /bin/sh and /bin/csh (and has for a very long time).
XXX pullup -8
When calculating the length of the args that can be
appended in a "find .... -exec something {} +"
usage, remember to allow for the arg pointers, which
form part of what is allowed in ARG_MAX.
From a fairly empty installation of HEAD on amd64
and with a "/tmp/args" command that simply prints
its arg count, and the length of the arg strings,
with this mod I see ..
netbsd# find / -exec /tmp/args {} +
Argc 5000 Arglen 107645
Argc 5000 Arglen 151324
Argc 5000 Arglen 187725
Argc 5000 Arglen 206591
Argc 5000 Arglen 172909
Argc 5000 Arglen 186264
Argc 5000 Arglen 167906
Argc 2881 Arglen 98260
The upper limit of 5000 args is in the code.
Using the biggest of those, 5000
args, plus 206591 bytes of strings
uses 246591 bytes total (this excludes
the command name, so add a few more).
That's fairly close to the ARG_MAX
of 262144.
On another system (with longer paths) I see:
(this is just a small part of the output, using a
different version of the dummy command, and a
slightly different invocation)
Args: 4546 Len 218030
Args: 4878 Len 217991
Args: 4813 Len 218028
Args: 4803 Len 218029
There, 4878*8 + 217991 == 257015 which is about
as close as we'd want to come to the arg limit.
XXX pullup -8
POSIX requires that signed numbers (strings preceded by '+' or '-')
be allowed as inputs to all of the integer format conversions, including
those which treat the data as unsigned.
Hence we do not need a variant function whose only difference from its
companion is to reject strings starting with '-' - instead we use
the primary function (getintmax()) for everything and remove getuintmax().
Minor update to the man page to indicate that the arg to all of the
integer conversions (diouxX) must be an integer constant (with an
optional sign) and to make it blatantly clear that %o is octal and
%u is unsigned decimal (for some reason those weren't explicitly stated
unlike d i x and X). Delete "respectively", it is not needed (and does
not really apply).
XXX pullup -8
Avoid running off into oblivion when a format string,
or arg to a %b conversion ends in an unescaped backslash.
Patch from Leo slightly modified by me.