]> git.lizzy.rs Git - plan9front.git/log
plan9front.git
3 years agoMail: correct rendering of nested multipart messages
Ori Bernstein [Mon, 8 Feb 2021 04:30:04 +0000 (20:30 -0800)]
Mail: correct rendering of nested multipart messages

Reading nested subparts of messages into the root
message array allows deeply nested multipart trees
of messages to show correctly in the message view.

3 years ago[9front] upas/vf: remove debugging print statements
Michael Forney [Mon, 8 Feb 2021 04:17:06 +0000 (20:17 -0800)]
[9front] upas/vf: remove debugging print statements
These messages aren't useful and were presumably left over from
someone debugging this code.

3 years agogames/gb: fix reversed audio channels
Michael Forney [Mon, 8 Feb 2021 03:58:49 +0000 (04:58 +0100)]
games/gb: fix reversed audio channels
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.

3 years agogames/gb: various HDMA fixes
Michael Forney [Mon, 8 Feb 2021 03:58:41 +0000 (04:58 +0100)]
games/gb: various HDMA fixes
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.

3 years agogames/gb: fix timer divider for input clock 0
Michael Forney [Mon, 8 Feb 2021 03:58:02 +0000 (04:58 +0100)]
games/gb: fix timer divider for input clock 0
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
---

3 years ago[9front] upas/vf: install %τ format specifier
Michael Forney [Sun, 7 Feb 2021 16:02:36 +0000 (08:02 -0800)]
[9front] upas/vf: install %τ format specifier
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.

3 years agomerge
cinap_lenrek [Sat, 6 Feb 2021 12:50:06 +0000 (13:50 +0100)]
merge

3 years agobcm64: get inbound and outbound pci window base address from device tree
cinap_lenrek [Sat, 6 Feb 2021 12:47:45 +0000 (13:47 +0100)]
bcm64: get inbound and outbound pci window base address from device tree

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).

3 years agopc: increase number of Conf.mem[] entries from 4 to 16
cinap_lenrek [Sat, 6 Feb 2021 12:33:58 +0000 (13:33 +0100)]
pc: increase number of Conf.mem[] entries from 4 to 16

3 years agopc, pc64: warn when running out of conf.mem[] entries in meminit()
cinap_lenrek [Sat, 6 Feb 2021 12:33:27 +0000 (13:33 +0100)]
pc, pc64: warn when running out of conf.mem[] entries in meminit()

3 years agotest: fix expression parser
Alex Musolino [Sat, 6 Feb 2021 05:21:09 +0000 (15:51 +1030)]
test: fix expression parser

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.

3 years agolibdraw: enter/eenter: fix ^W removing the text on the right side of the tick
Sigrid [Thu, 4 Feb 2021 09:57:37 +0000 (10:57 +0100)]
libdraw: enter/eenter: fix ^W removing the text on the right side of the tick

3 years agolibdraw: enter/eenter: fix Kleft for non-ascii text
Sigrid [Thu, 4 Feb 2021 09:45:52 +0000 (10:45 +0100)]
libdraw: enter/eenter: fix Kleft for non-ascii text

3 years ago[9front] [PATCH] audiohda: add PCI ID for Intel C610/X99
Michael Forney [Thu, 4 Feb 2021 00:19:57 +0000 (16:19 -0800)]
[9front] [PATCH] audiohda: add PCI ID for Intel C610/X99
---
Tested and seems to work fine.

3 years agoacmemail(1): Nail => Mail
Ori Bernstein [Wed, 3 Feb 2021 19:09:43 +0000 (11:09 -0800)]
acmemail(1): Nail => Mail

Forgot to change the program name when importing
the rewrite.

3 years agomklib, upas/common: clean up libcommon properly (thanks mikan)
Ori Bernstein [Wed, 3 Feb 2021 16:10:11 +0000 (08:10 -0800)]
mklib, upas/common: clean up libcommon properly (thanks mikan)

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.

3 years agoacme: fix use after free in warning() call (thanks igor)
cinap_lenrek [Wed, 3 Feb 2021 00:19:19 +0000 (01:19 +0100)]
acme: fix use after free in warning() call (thanks igor)

3 years agomerge
Ori Bernstein [Tue, 2 Feb 2021 15:21:47 +0000 (07:21 -0800)]
merge

3 years agorunq: clean up code, fix error handling.
Ori Bernstein [Tue, 2 Feb 2021 14:52:00 +0000 (06:52 -0800)]
runq: clean up code, fix error handling.

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.

3 years agofortunes: SATAN
Sigrid [Tue, 2 Feb 2021 11:51:22 +0000 (12:51 +0100)]
fortunes: SATAN

3 years agowinwatch: always reflow when possible (thanks telephil9)
Sigrid [Tue, 2 Feb 2021 10:56:45 +0000 (11:56 +0100)]
winwatch: always reflow when possible (thanks telephil9)

3 years agoMail: only clear upas-maintained flags on change (thanks deuteron)
Ori Bernstein [Tue, 2 Feb 2021 04:38:40 +0000 (20:38 -0800)]
Mail: only clear upas-maintained flags on change (thanks deuteron)

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.

3 years agomothra: don't insert newline after div (thanks phil9)
Ori Bernstein [Sun, 31 Jan 2021 20:25:03 +0000 (12:25 -0800)]
mothra: don't insert newline after div (thanks phil9)

3 years agoape/libm: implement log2 in libc
Ori Bernstein [Sat, 30 Jan 2021 17:19:57 +0000 (09:19 -0800)]
ape/libm: implement log2 in libc

3 years agoMail: fix inverted reply-all condition
Ori Bernstein [Sat, 30 Jan 2021 02:29:01 +0000 (18:29 -0800)]
Mail: fix inverted reply-all condition

3 years agoMail: rewrite.
Ori Bernstein [Sat, 30 Jan 2021 01:34:47 +0000 (17:34 -0800)]
Mail: rewrite.

Acme mail made it hard to do threading, so I wrote a new one.

3 years agoscreenlock: use initdisplay(2), top the window (thanks stuart morrow)
Ori Bernstein [Fri, 29 Jan 2021 02:07:48 +0000 (18:07 -0800)]
screenlock: use initdisplay(2), top the window (thanks stuart morrow)

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.

3 years agonews: make -a and -n get along (thanks lyndon)
Ori Bernstein [Wed, 27 Jan 2021 02:07:04 +0000 (18:07 -0800)]
news: make -a and -n get along (thanks lyndon)

currently, -a and -n are mutually exclusive.
this change allows them to be used together.

3 years agocc: mk clean should delete cc.a$O
Ori Bernstein [Sun, 24 Jan 2021 17:58:39 +0000 (09:58 -0800)]
cc: mk clean should delete cc.a$O

It's surprising when 'mk clean' doesn't actually
do a clean build in cc -- fix this.

3 years ago5l: fix shifts by zero
Ori Bernstein [Sun, 24 Jan 2021 04:36:09 +0000 (20:36 -0800)]
5l: fix shifts by zero

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.

3 years agoape/libm: add back fmod, remove modf
Ori Bernstein [Sun, 24 Jan 2021 04:03:07 +0000 (20:03 -0800)]
ape/libm: add back fmod, remove modf

We removed the wrong file. Put it back.

3 years ago[9front] ape: remove _SUSV2_SOURCE guard from inttypes.h
Michael Forney [Sun, 24 Jan 2021 03:47:12 +0000 (19:47 -0800)]
[9front] ape: remove _SUSV2_SOURCE guard from inttypes.h
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.

3 years ago[9front] nusb(4): fix typo
Michael Forney [Sun, 24 Jan 2021 03:46:57 +0000 (19:46 -0800)]
[9front] nusb(4): fix typo

3 years ago[9front] cc: fix comparison warning with constant LHS
Michael Forney [Sun, 24 Jan 2021 02:28:08 +0000 (18:28 -0800)]
[9front] cc: fix comparison warning with constant LHS
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.

3 years ago[9front] cc: remove unnecessary 128-bit add function
Michael Forney [Sun, 24 Jan 2021 02:26:34 +0000 (18:26 -0800)]
[9front] cc: remove unnecessary 128-bit add function
Instead, just change the comparisons from <=/>= to </>.

3 years agoupas/fs: fix swapped argument, dead code
Ori Bernstein [Sun, 24 Jan 2021 02:02:46 +0000 (18:02 -0800)]
upas/fs: fix swapped argument, dead code

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.

3 years agoupas/runq: fix typo
Ori Bernstein [Sun, 24 Jan 2021 00:38:32 +0000 (16:38 -0800)]
upas/runq: fix typo

one slipped in to the last commit.

3 years agoupas/runq: bring back -a
Ori Bernstein [Sun, 24 Jan 2021 00:05:21 +0000 (16:05 -0800)]
upas/runq: bring back -a

Turns out -a is useful in crontab, so bring
back a simplified version of it. This only
iterates through directories one at a time.

3 years agoape: update mkfile for removed fmod.c
qwx [Sat, 23 Jan 2021 23:58:47 +0000 (00:58 +0100)]
ape: update mkfile for removed fmod.c

3 years agovnc: I don't like your face.
Ori Bernstein [Sat, 23 Jan 2021 21:20:09 +0000 (13:20 -0800)]
vnc: I don't like your face.

Cosmetic improvements to vnc auth code.
Should not have user-visible changes.

3 years agoupas/runq: support parallel queue processing, drop -a
Ori Bernstein [Sat, 23 Jan 2021 19:03:05 +0000 (11:03 -0800)]
upas/runq: support parallel queue processing, drop -a

When running a mail queue, it's useful to run it with limited
parallelism. This helps mailing lists process messages in a
reasonable time.

At the same time, we can remove the load balancing from runq,
since the kinds of systems that this matters on no longer
exist, and running multiple queues at once can be better
done through xargs.

3 years agovt(1): document optional command argument (thanks sl)
cinap_lenrek [Sat, 23 Jan 2021 17:42:46 +0000 (18:42 +0100)]
vt(1): document optional command argument (thanks sl)

3 years agoape: apply infinite recursion in fmod() fix (thanks jxy and ality)
cinap_lenrek [Sat, 23 Jan 2021 14:53:56 +0000 (15:53 +0100)]
ape: apply infinite recursion in fmod() fix (thanks jxy and ality)

Apply changeset 2880:cab2b9d13a73 to ape's fmod() implementation.

Remove the unused math/fmod.c copy.

3 years agosyscall: don't rely on . being in $path (thanks Silas)
cinap_lenrek [Sat, 23 Jan 2021 14:06:30 +0000 (15:06 +0100)]
syscall: don't rely on . being in $path (thanks Silas)

3 years agonusb/kb: correct Mod4 scancode (125 → 91, to match what kbdfs has)
Sigrid [Fri, 22 Jan 2021 16:48:41 +0000 (17:48 +0100)]
nusb/kb: correct Mod4 scancode (125 → 91, to match what kbdfs has)

3 years agoaux/acpi: do not expose empty files
Sigrid [Fri, 22 Jan 2021 09:57:43 +0000 (10:57 +0100)]
aux/acpi: do not expose empty files

3 years agostats: don't query battery and temp as often when using acpi
Sigrid [Fri, 22 Jan 2021 09:15:36 +0000 (10:15 +0100)]
stats: don't query battery and temp as often when using acpi

Querying battery (or temperature) using ACPI takes quite some
resources, which makes the battery discharge faster.  It doesn't make
much sense to have it queried as often either.  So, when using ACPI:

1) set battery query period to 10s minimum
2) set temperature query period to 5s minimum

3 years agoape/libap: fix _startbuf, check rfork return (thanks pixelherodev)
Ori Bernstein [Wed, 20 Jan 2021 03:56:38 +0000 (19:56 -0800)]
ape/libap: fix _startbuf, check rfork return (thanks pixelherodev)

When _startbuf is invoked, it would crash on the second invocation
if creating a mux segment failed. This is because the first attempt
would assign the return value -1 to the global mux variable, and
the second attempt would notice that the global mux was not nil,
and would attempt to use it.

This change only assigns to the global variable if the allocation
of the segment was a success.

While we're here, we should also check the return of the rfork call.

3 years agowebcookies: remove straggling custom date parser
Ori Bernstein [Wed, 20 Jan 2021 02:14:53 +0000 (18:14 -0800)]
webcookies: remove straggling custom date parser

One place missed in the tmdate purge.

3 years agoupas/ml: touch the artwork
Ori Bernstein [Wed, 20 Jan 2021 02:12:30 +0000 (18:12 -0800)]
upas/ml: touch the artwork

Global variables deserve more greppable names,
since I'm likely to know where they're used.

3 years agodd(1): update manpage to match program
Ori Bernstein [Tue, 19 Jan 2021 23:18:57 +0000 (15:18 -0800)]
dd(1): update manpage to match program

Document the dd changes

3 years agodd: error with invalid size suffixes, add 'm'
Ori Bernstein [Tue, 19 Jan 2021 23:15:12 +0000 (15:15 -0800)]
dd: error with invalid size suffixes, add 'm'

When invoking with dd with an invalid size suffix, we
silently accept the suffix. This can lead to confusion,
because lines like:

dd -bs 1K
dd -bs 1m

will silently copy in 1-byte increments. This has caught
people by surprise. While we're at it, megabytes are
convenient, so let's have them too.

3 years agomothra: linkify text starting with gemini:// and ftp://
Sigrid [Tue, 19 Jan 2021 14:04:40 +0000 (15:04 +0100)]
mothra: linkify text starting with gemini:// and ftp://

3 years agomothra: resolve urls on middle click. helps with snarfing of relative urls
Sigrid [Tue, 19 Jan 2021 13:14:28 +0000 (14:14 +0100)]
mothra: resolve urls on middle click. helps with snarfing of relative urls

3 years agoacme(1): add references to appropriate manpages
Ori Bernstein [Tue, 19 Jan 2021 01:55:01 +0000 (17:55 -0800)]
acme(1): add references to appropriate manpages

3 years agopasswd: make legacy mode explicit
Ori Bernstein [Mon, 18 Jan 2021 02:01:53 +0000 (18:01 -0800)]
passwd: make legacy mode explicit

Passwd used to produce a very confusing error
about DES not being enabled whenever the password
was mistyped. This happened because we attempted
to guess what authentication method to use, and
preseneted the error from the wrong one on failure.

This puts the legacy mode behind a flag, so that
we don't even try the old method unless it's
explicitly requested.

3 years agoaudiohda: Add AMD Starship/Matisse HD Audio Controller (thanks uramekus)
cinap_lenrek [Sun, 17 Jan 2021 23:51:20 +0000 (00:51 +0100)]
audiohda: Add  AMD Starship/Matisse HD Audio Controller (thanks uramekus)

3 years agoplan9.ini(8): document *nohpet= option
cinap_lenrek [Sun, 17 Jan 2021 20:28:45 +0000 (21:28 +0100)]
plan9.ini(8): document *nohpet= option

3 years agomerge
cinap_lenrek [Sun, 17 Jan 2021 20:22:23 +0000 (21:22 +0100)]
merge

3 years agopc, pc64: add minimal HPET driver to measure LAPIC and TSC frequencies
cinap_lenrek [Sun, 17 Jan 2021 20:21:12 +0000 (21:21 +0100)]
pc, pc64: add minimal HPET driver to measure LAPIC and TSC frequencies

This adds the new function pointer PCArch.clockinit(),
which is a timer dependent initialization routine.
It also takes over the job of guesscpuhz(). This way, the
architecture ident code can switch between different
timers (i8253, HPET and XEN timer).

3 years agoseconds: remove junk from usage
Ori Bernstein [Sun, 17 Jan 2021 19:12:18 +0000 (11:12 -0800)]
seconds: remove junk from usage

3 years agodpost prologue: update /radicalex to fix square displacement (thanks umbraticus and...
Sigrid [Sun, 17 Jan 2021 13:02:17 +0000 (14:02 +0100)]
dpost prologue: update /radicalex to fix square displacement (thanks umbraticus and Ethan)

3 years agousbehci: use 64-bit base address, remove resetlck, simplify scanpci()
cinap_lenrek [Sun, 17 Jan 2021 10:55:39 +0000 (11:55 +0100)]
usbehci: use 64-bit base address, remove resetlck, simplify scanpci()

3 years agousbuhci: remove resetlk, simplify scanpci()
cinap_lenrek [Sun, 17 Jan 2021 10:53:50 +0000 (11:53 +0100)]
usbuhci: remove resetlk, simplify scanpci()

3 years agousbohci: use 64-bit io base address, disable interrupts before reset, remove resetlck
cinap_lenrek [Sun, 17 Jan 2021 10:51:59 +0000 (11:51 +0100)]
usbohci: use 64-bit io base address, disable interrupts before reset, remove resetlck

3 years agozerotrunc(8): add manpage
Ori Bernstein [Sun, 17 Jan 2021 00:17:27 +0000 (16:17 -0800)]
zerotrunc(8): add manpage

3 years agotroff2png(1): add manpage
Ori Bernstein [Sun, 17 Jan 2021 00:17:10 +0000 (16:17 -0800)]
troff2png(1): add manpage

3 years agotmdate(2): correct example in manpage
Ori Bernstein [Sat, 16 Jan 2021 22:24:32 +0000 (14:24 -0800)]
tmdate(2): correct example in manpage

add missing tmdate() call around %τ format.

3 years agotweak: support showdata plumb action (thanks sirjofri)
Sigrid [Sat, 16 Jan 2021 17:30:50 +0000 (18:30 +0100)]
tweak: support showdata plumb action (thanks sirjofri)

3 years ago9fs: bell labs is very dead
Sigrid [Fri, 15 Jan 2021 18:32:02 +0000 (19:32 +0100)]
9fs: bell labs is very dead

3 years agocal: use Sa/Su in all cases, also simplify the code
Sigrid [Tue, 12 Jan 2021 20:08:12 +0000 (21:08 +0100)]
cal: use Sa/Su in all cases, also simplify the code

3 years agocal: fix -s 7
Sigrid [Tue, 12 Jan 2021 12:32:38 +0000 (13:32 +0100)]
cal: fix -s 7

3 years agocal: add -s option to specify the starting day of the week
Sigrid [Tue, 12 Jan 2021 12:23:37 +0000 (13:23 +0100)]
cal: add -s option to specify the starting day of the week

3 years agoaudio/flacenc: missed an argument in fprintf()
Sigrid [Tue, 12 Jan 2021 10:15:18 +0000 (11:15 +0100)]
audio/flacenc: missed an argument in fprintf()

3 years agoplumb/basic: handle tga, wav, au, mid and mus
Sigrid [Tue, 12 Jan 2021 09:13:00 +0000 (10:13 +0100)]
plumb/basic: handle tga, wav, au, mid and mus

3 years agoaudio(1): it is 2021 now
Sigrid [Tue, 12 Jan 2021 08:24:10 +0000 (09:24 +0100)]
audio(1): it is 2021 now

3 years agolibFLAC/mkfile: update version and build with -DNDEBUG
Sigrid [Mon, 11 Jan 2021 15:58:04 +0000 (16:58 +0100)]
libFLAC/mkfile: update version and build with -DNDEBUG

3 years agolibvorbis: fix free() called on a wrong pointer
Sigrid [Mon, 11 Jan 2021 15:17:48 +0000 (16:17 +0100)]
libvorbis: fix free() called on a wrong pointer

3 years agoaudio/flacenc
Sigrid [Mon, 11 Jan 2021 14:45:12 +0000 (15:45 +0100)]
audio/flacenc

3 years agomerge
cinap_lenrek [Sun, 10 Jan 2021 19:46:07 +0000 (20:46 +0100)]
merge

3 years agopc, pc64: revert addition of pcireset() call to pcicfginit()
cinap_lenrek [Sun, 10 Jan 2021 19:44:58 +0000 (20:44 +0100)]
pc, pc64: revert addition of pcireset() call to pcicfginit()

Revert the change, as it causes system lockups on bootup
on some systems with USB OHCI controllers, suspected to be
caused by BIOS/SMM accessing the device as BIOS handover
has not been executed yet.

We might bring that back when the problem has is better
understood.

3 years agolibdraw: add bezierpts
Ori Bernstein [Sat, 9 Jan 2021 20:20:49 +0000 (12:20 -0800)]
libdraw: add bezierpts

This patch exposes the bezierpts function,
providing a way to get the points on a path,
similar how bezsplinepts gives them for b
splines.

3 years ago9pfid(2): document struct Qid (thanks sirjofri)
Ori Bernstein [Wed, 6 Jan 2021 18:07:10 +0000 (10:07 -0800)]
9pfid(2): document struct Qid (thanks sirjofri)

The Qid struct is pervasive when writing 9p servers,
but is not described in the manpages. This adds a
definition to the 9pfid manpage.

3 years agomerge
Ori Bernstein [Wed, 6 Jan 2021 03:48:26 +0000 (19:48 -0800)]
merge

3 years agoacid: increase hash size (thanks jonas.amoson)
Ori Bernstein [Wed, 6 Jan 2021 03:37:26 +0000 (19:37 -0800)]
acid: increase hash size (thanks jonas.amoson)

when loading large binaries such as netsurf, with many
symbols, our hash table fills up with collisions and
loading the symbol table gets very slow. Bumping it up
drops the time to lstk() in acid on netsurf from 4 minutes
to 8 seconds.

3 years agoqr: fix exit status
Alex Musolino [Tue, 5 Jan 2021 12:06:03 +0000 (22:36 +1030)]
qr: fix exit status

Call exits(0) instead of returning from main.  Also call sysfatal if
writing of image data fails.  Previously, qr(1) would exit with
default non-nil status "main" unconditionally as a result of returning
from main.

3 years agomarshal(1): fix example: upas/mail -> mail (thanks fulton)
cinap_lenrek [Sun, 3 Jan 2021 23:24:39 +0000 (00:24 +0100)]
marshal(1): fix example: upas/mail -> mail (thanks fulton)

3 years agoape: unify math.h copies
Ori Bernstein [Sat, 2 Jan 2021 05:40:00 +0000 (21:40 -0800)]
ape: unify math.h copies

/$objtype/include/ape/math.h contained an almost
identical copy of math.h for each architecture.

The only difference between them architectures
was that some had an incorrect version of isinf
defined.

This change picks one of the versions of math.h
with a correct definition, moves it to /sys/include,
and removes the redundant versions.

3 years agoape: add missing isnan() and isinf() macros for 386 (thanks Jonas)
cinap_lenrek [Sat, 2 Jan 2021 04:47:31 +0000 (05:47 +0100)]
ape: add missing isnan() and isinf() macros for 386 (thanks Jonas)

3 years agofile: ftyp mp4* is video/mp4 as well
Sigrid [Fri, 1 Jan 2021 21:58:05 +0000 (22:58 +0100)]
file: ftyp mp4* is video/mp4 as well

3 years agosort: fix memory leak (thanks Igor Boehm)
Ori Bernstein [Fri, 1 Jan 2021 19:48:39 +0000 (11:48 -0800)]
sort: fix memory leak (thanks Igor Boehm)

Free the last line that we examine when looping
through the lines in a file.

3 years agocc: add a couple notes to the comments regarding flags
BurnZeZ [Tue, 29 Dec 2020 19:38:59 +0000 (19:38 +0000)]
cc: add a couple notes to the comments regarding flags

3 years agolibc/arm: open #c/sysstat file with OCEXEC (internal file descriptor)
cinap_lenrek [Tue, 29 Dec 2020 18:08:08 +0000 (19:08 +0100)]
libc/arm: open #c/sysstat file with OCEXEC (internal file descriptor)

3 years agoplumber: open rule files as OCEXEC, to avoid leaking them to sub commands
cinap_lenrek [Tue, 29 Dec 2020 17:45:42 +0000 (18:45 +0100)]
plumber: open rule files as OCEXEC, to avoid leaking them to sub commands

3 years agotext2post: check font index for out of range
Sigrid [Mon, 28 Dec 2020 20:21:22 +0000 (21:21 +0100)]
text2post: check font index for out of range

3 years agoplumber: don't leak srvfd file descriptor into sub processes
cinap_lenrek [Mon, 28 Dec 2020 20:00:15 +0000 (21:00 +0100)]
plumber: don't leak srvfd file descriptor into sub processes

Put OCEXEC flag on the srvfd so it wont be leaked
on sub-processes we spawn from plumb rules.

3 years agoplumb: fix wrong click attribute offset (thanks umbraticus)
Sigrid [Mon, 28 Dec 2020 11:24:47 +0000 (12:24 +0100)]
plumb: fix wrong click attribute offset (thanks umbraticus)

3 years agokbmap: avoid division by zero when window becomes too small
cinap_lenrek [Sun, 27 Dec 2020 22:39:28 +0000 (23:39 +0100)]
kbmap: avoid division by zero when window becomes too small

3 years agoaux/vga: remove panning, add screen tilting support
cinap_lenrek [Sun, 27 Dec 2020 22:10:39 +0000 (23:10 +0100)]
aux/vga: remove panning, add screen tilting support

3 years agodevvga: implement screen tilting, remove panning and overlays
cinap_lenrek [Sun, 27 Dec 2020 22:08:59 +0000 (23:08 +0100)]
devvga: implement screen tilting, remove panning and overlays

Tilting allows using left/right rotated or invetrted display orientation.
This can be changed at runtime such as: echo tilt right > /dev/vgactl
This removes the old panning and vga overlays as they are only implemented
with some ancient vga controllers.