Age | Commit message (Collapse) | Author |
|
There may be two iso endpoints with the same ID if it is asynchronous
or adaptive (one for data, one for feedback), and rw iso endpoints are
unusable (error out with "iso i/o is half-duplex").
|
|
There may be two iso endpoints with the same ID if it is asynchronous
or adaptive (one for data, one for feedback), and rw iso endpoints are
unusable (error out with "iso i/o is half-duplex").
|
|
|
|
|
|
|
|
The value of `k` in dtoa() is an estimate of
floor(log10(d)), where `d` is the number being
converted. The code was asserting that 'k' was
less than 100, but the full range of a double
goes to 10^308 or so.
This means that the majority of the range of
a double would trigger that assert.
|
|
This way, upas/vf won't flag .patch files as suspicious by default.
|
|
validateattachment has no business with the mime boundary; it is not
part of the attachment itself.
Also, it causes the boundary to be dropped in the message output from
upas/vf, effectively dropping the following attachment (though the
content is still present after the last boundary of the wrapped first
attachment part).
Consider the following sequence of events:
1. upas/vf is run on a message containing two attachments.
2. The first attachment does not have a known extension, so is saved
to a temporary file *including* the following mime boundary.
3. This file is opened as p->tmpbuf, which is used for subsequent
reads until switching back to stdin.
4. The attachment fails validateattachment, so upas/vf wraps it in a
multipart with a warning message.
5. problemchild() calls passbody(p, 0), which copies from p->tmpbuf
until it hits the outer boundary line, which it excludes, seeks
back one line, then returns the outer multipart.
6. problemchild() then writes its own boundary, and then copies one
line from *stdin* to stdout, expecting the outer boundary.
However, this boundary was already read from stdin in 2, so it ends
up reading the first line of the subsequent part instead.
To fix this, pass 0 to passbody() in save() to exclude it from the
attachment file and make it available in stdin when expected.
|
|
The arm assembler supports movw to handle
getfcr and setfcr now, no need to hack it
with macros; sync from plan9 libc.
|
|
The float.h macros got out of sync with u.h,
some of them missing and some of them being
incorrect. This change brings them back in
line.
|
|
Reading nested subparts of messages into the root
message array allows deeply nested multipart trees
of messages to show correctly in the message view.
|
|
These messages aren't useful and were presumably left over from
someone debugging this code.
|
|
The high bits correspond to the left channel, and the low bits to the
right channel.
Reference: https://gbdev.io/pandocs/#sound-control-registers
Tested with pokemon crystal.
|
|
H-blank DMA should only transfer 16 bytes per h-blank, rather than
waiting for the first h-blank and then transferring the whole size.
HDMAC should read 0xff when the transfer is finished, and 0 in the
high bit when the transfer is ongoing. Also, if 0 is written in the
high bit, the current transfer should be aborted.
Introduce two flags, DMAREADY and DMAHBLANK rather than special
constants 1 and -1. If dma is non-zero, there is an ongoing DMA. If
DMAREADY is set, the next chunk is ready to transfer.
Reference: https://gbdev.io/pandocs/#ff55-hdma5-cgb-mode-only-new-dma-length-mode-start
Tested with pokemon crystal.
What was happening is that when the game was loading N background tiles
into vram (each 16 bytes, so one per h-blank), it did something like
this:
- start an hdma transfer for N+1 tiles
- after the Nth tile is transferred, it would read HDMA5, clear the
high bit, then write it back to abort the transfer.
games/gb would instead transfer all N+1 tiles at once, overwriting one
extra tile with whatever was 1 past the end of the source array, and
then would interpret the cancel request as the start of a new transfer
of 16 bytes, which would copy an additional tile past the end. The end
result is that every transfer would end up copying N+2 tiles instead
of just N, overwriting certain tiles with whatever was after the end
of the source data.
|
|
According to [0], input clock 0 should divide by 1024=2¹⁰, not 2¹².
This caused audio to run at quarter-speed in one game I tried.
[0] https://gbdev.io/pandocs/#ff07-tac-timer-control-r-w
Tested with zelda: oracle of seasons, and dr. mario
---
|
|
upas/vf was converted to use tmdate, but the formatter was never
installed. This caused it to send attachments to validateattachment
with header `From virusfilter %τ%`, which always failed since upas/fs
would just skip over the message.
|
|
|
|
On the pi400, the xhci reset firmware mailbox request
assumes that the pci windows match the ones specified
in the device tree. The inbound window (pcidmawin)
also varies now depending on the amount of memory
installed.
It is all pretty ridiculous, as the firmware could as
well just read the pci controllers hardware register
to determine the window configuration and the os could
keep a nice simple 1:1 mapping (with pci dma addresses
== physical addresses).
|
|
|
|
|
|
The old parser code was rubbish and only worked for trivial
expressions. The new code properly handles complex expressions,
including short circuit evaluation.
As such, the BUGS section has been removed from the test(1) man page.
The description of an unimplemented feature has also been removed.
|
|
|
|
|
|
---
Tested and seems to work fine.
|
|
Forgot to change the program name when importing
the rewrite.
|
|
Despite pervious efforts, mk clean still doesn't remove libcommon.a*
files from cmd/upas/common/. To fix this, let's tell cmd/mklib to do
the job instead.
|
|
|
|
|
|
Runq spawns a number of processes, and wait()s for them
in 2 different places. Because of the way that the exit
handling is done, the wait can get the wrong message.
It turns out that only one place in the code needs to
wait for the child, and in all other cases, it's just
muddling the problem.
This change adds the RFNOWAIT call to all the processes
we don't need to wait for, so that the places that do
need wait will always get the correct child.
|
|
|
|
|
|
When message flags change, Mail would clear all the flags and
recompute them. This would clobber internal flags like Ftodel.
So, don't do that.
|
|
|
|
|
|
|
|
Acme mail made it hard to do threading, so I wrote a new one.
|
|
Screenlock should use libdraw(2) to init the display
and create the window, instead of looking at the screen
file directly. Also, to prevent new windows from popping
up over screenlock, bring it to the top periodically.
|
|
currently, -a and -n are mutually exclusive.
this change allows them to be used together.
|
|
It's surprising when 'mk clean' doesn't actually
do a clean build in cc -- fix this.
|
|
on arm32, we can do one of 4 shifts
by a constant:
reg<<(0..31)
reg>>(1..32)
((u32int)reg)>>(1..32)
reg ROT (0..31)
There's no way to encode a 0 bit right
shift, so when encoding reg>>0, flip
it to the equivalent nop reg<<0, which
can be encoded.
|
|
We removed the wrong file. Put it back.
|
|
inttypes.h was added to C99, and this is the only header that used
_SUSV2_SOURCE.
Also, remove now unneeded _SUSV2_SOURCE from python mkfile.
|
|
|
|
This prevents an incorrect warning for a comparison such as `0 < x`,
where x is an unsigned type. Previously, this would get normalized as
`x >= 0` rather than `x > 0` when checking the comparison.
|
|
Instead, just change the comparisons from <=/>= to </>.
|
|
With ntlm auth, we were trying to set 0 bytes of
the auth struct to its size. The args were clearly
swapped. Fix it.
While we're here, remove some dead code.
|
|
one slipped in to the last commit.
|
|
Turns out -a is useful in crontab, so bring
back a simplified version of it. This only
iterates through directories one at a time.
|
|
|
|
Cosmetic improvements to vnc auth code.
Should not have user-visible changes.
|