]> git.lizzy.rs Git - plan9front.git/log
plan9front.git
4 years agomerge
cinap_lenrek [Sun, 31 May 2020 22:07:01 +0000 (00:07 +0200)]
merge

4 years agoacme: implement 'scratch' ctl command (thanks Drew DeVault)
kvik [Sun, 31 May 2020 20:39:46 +0000 (22:39 +0200)]
acme: implement 'scratch' ctl command (thanks Drew DeVault)

The new command marks the target window as a scratch window -- a window
whose state cannot be "dirtied" by changes made to its body, therefore
avoiding warnings about unsaved changes when deleting the window or
exiting acme.

Existing examples of scratch windows are error, directory, and guide
windows, whose scratchness is set internally.

With the new command users and programs alike can create their own
scratch windows.  This is put to use in acme's own win(1).

4 years agokernel: remove unused segment argument in freepte()
cinap_lenrek [Sun, 31 May 2020 15:25:16 +0000 (17:25 +0200)]
kernel: remove unused segment argument in freepte()

4 years agopc, xen: make PAT support optional (for xen)
cinap_lenrek [Sun, 31 May 2020 12:32:19 +0000 (14:32 +0200)]
pc, xen: make PAT support optional (for xen)

4 years agoape/libdraw: add missing eenter (thanks phil9)
Ori Bernstein [Sat, 30 May 2020 17:06:21 +0000 (10:06 -0700)]
ape/libdraw: add missing eenter (thanks phil9)

4 years agoimap4d: reject invalid month in date2tm()
cinap_lenrek [Sat, 30 May 2020 11:03:05 +0000 (13:03 +0200)]
imap4d: reject invalid month in date2tm()

4 years agorc: avoid forking for final command that has variable assignments (to get $apid right)
cinap_lenrek [Sat, 30 May 2020 00:03:18 +0000 (02:03 +0200)]
rc: avoid forking for final command that has variable assignments (to get $apid right)

basically, we want the following commands to print
the same pid twice:

rc -c 'cat /dev/pid &;echo $apid'

vs:

rc -c 'a=1 cat /dev/pid &;echo $apid'

basically, Xsimple() calls exitnext() to determine if
a simple command should be promoted to exec, by peeking
ahead into the code and searching for Xexit instruction.

Xexit might not follow immediately after the Xsimple
instruction because of redirections, which exitnext()
would skip.

but it would not skip the Xunlocal instructions that
where added by the variable assignment.

4 years agoip/cifsd: add FIND_FIRST2 SMB_FIND_FILE_FULL_DIRECTORY_INFO info level
cinap_lenrek [Tue, 26 May 2020 22:09:46 +0000 (00:09 +0200)]
ip/cifsd: add FIND_FIRST2 SMB_FIND_FILE_FULL_DIRECTORY_INFO info level

4 years agosshnet: prevent ssh process from keeping the mount alive
cinap_lenrek [Tue, 26 May 2020 19:37:25 +0000 (21:37 +0200)]
sshnet: prevent ssh process from keeping the mount alive

4 years agopc, pc64: fix wrong mtrr physmask() for machines without extended address size msr
cinap_lenrek [Sun, 24 May 2020 15:50:37 +0000 (17:50 +0200)]
pc, pc64: fix wrong mtrr physmask() for machines without extended address size msr

4 years agoawk: fix race condition with sub-mk in mkfile
cinap_lenrek [Sun, 24 May 2020 14:00:45 +0000 (16:00 +0200)]
awk: fix race condition with sub-mk in mkfile

the maketab helper program was generated in parallel, which
had a dependency to y.tab.h which lead to yacc running
twice in parallel.

this removes the dependency to y.tab.h in the virtual
maketab.$objtype target to prevent this race condition.

the dependency to y.tab.h is resolved in the main mk at the
$cputype.maketab target which serializes with the other
targets.

4 years agousbehci: release ctlr ilock before calling pollcheck()
cinap_lenrek [Sun, 24 May 2020 00:43:21 +0000 (02:43 +0200)]
usbehci: release ctlr ilock before calling pollcheck()

4 years agomerge
cinap_lenrek [Sun, 24 May 2020 00:12:47 +0000 (02:12 +0200)]
merge

4 years agousbehci: avoid kproc() while holding poll lock
cinap_lenrek [Sun, 24 May 2020 00:11:37 +0000 (02:11 +0200)]
usbehci: avoid kproc() while holding poll lock

4 years agoman(9): remove accidentally commited indices
cinap_lenrek [Sat, 23 May 2020 22:26:11 +0000 (00:26 +0200)]
man(9): remove accidentally commited indices

4 years agomerge
cinap_lenrek [Sat, 23 May 2020 21:32:24 +0000 (23:32 +0200)]
merge

4 years agoip/tinc: accept udp connection from any udp source port
cinap_lenrek [Sat, 23 May 2020 21:31:11 +0000 (23:31 +0200)]
ip/tinc: accept udp connection from any udp source port

the remote host might be behind a NAT which translates the
source port, so if no host could be found, lookup the ip
address only.

4 years agopaint: change colors in the palette with button 3
Sigrid [Sat, 23 May 2020 18:41:20 +0000 (20:41 +0200)]
paint: change colors in the palette with button 3

4 years agolibaml: implement ToDecimalString and ToHexString operations
cinap_lenrek [Sat, 23 May 2020 15:44:30 +0000 (17:44 +0200)]
libaml: implement ToDecimalString and ToHexString operations

4 years agopc, pc64: do page attribute table (PAT) init early in cpuidentify()
cinap_lenrek [Fri, 22 May 2020 21:58:24 +0000 (23:58 +0200)]
pc, pc64: do page attribute table (PAT) init early in cpuidentify()

the page attribute table was initialized in mmuinit(), which is
too late for bootscreen(). So now we check for PAT support and
insert the write-combine entry early in cpuidentify().

this might have been the cause of some slow EFI framebuffers on
machines with overlapping or insufficient MTRR entries.

4 years agolibc/arm64: work arround linker bug for cas()
cinap_lenrek [Sun, 17 May 2020 21:46:09 +0000 (23:46 +0200)]
libc/arm64: work arround linker bug for cas()

at the _cas0 label, the linker would generate spurious stack
adjustment before the return:

atexitdont+0x84 0x000000000003614c CLREX $0xf
atexitdont+0x88 0x0000000000036150 MOVW R31,R0
atexitdont+0x8c 0x0000000000036154 MOV (SP)16!,R30 <- ????????????
atexitdont+0x90 0x0000000000036158 RETURN

the work arround is to move the code into its own cas0
text symbol.

this fixes impossible cwfs crashes in srvi().

4 years ago7l: handle dupok flag in TEXT/GLOBL data
cinap_lenrek [Sun, 17 May 2020 17:08:10 +0000 (19:08 +0200)]
7l: handle dupok flag in TEXT/GLOBL data

4 years agoAdd stdbool.h to ape
Ori Bernstein [Sun, 17 May 2020 15:18:49 +0000 (08:18 -0700)]
Add stdbool.h to ape

in accordance with c99:7.16. Used by perl, trivial enough
that I feel ok with adding it before the port is fully done.

4 years ago7l: fix mistake
cinap_lenrek [Sat, 16 May 2020 14:26:09 +0000 (16:26 +0200)]
7l: fix mistake

4 years ago#pragma ref no longer exists
Ori Bernstein [Fri, 15 May 2020 23:56:59 +0000 (16:56 -0700)]
#pragma ref no longer exists

It appears to be an antiquated form of 'USED(x)'

4 years agoFix scans of more than one character in %[]
Ori Bernstein [Fri, 15 May 2020 23:46:20 +0000 (16:46 -0700)]
Fix scans of more than one character in %[]

This got broken in d8e877a89dae, where we returned 0 on the
first mismatch; we want to return 0 only when we consumed no
characters.

4 years agostop fiddling with path construction.
Ori Bernstein [Thu, 14 May 2020 01:50:01 +0000 (18:50 -0700)]
stop fiddling with path construction.

There's fd2path, which gives back the full path directly.
This makes the code even simpler.

4 years agofix yacc crash with absolute paths
Ori Bernstein [Wed, 13 May 2020 15:42:00 +0000 (08:42 -0700)]
fix yacc crash with absolute paths

When passing an absolute file path to yacc, we would skip
initializing inpath, leaving it null. This would cause Bopen
to die. We would similarly fail to report an error if we tried
to get the current working directory, and then die when
constructing inpath.

This fixes both cases.

4 years agoape: fix name clash, have to use _SLEEP syscall instead of ape sleep in plan9 code...
cinap_lenrek [Tue, 12 May 2020 22:17:07 +0000 (00:17 +0200)]
ape: fix name clash, have to use _SLEEP syscall instead of ape sleep in plan9 code (thanks jamos)

this fixes etimer() from ape built libdraw as posix sleep() uses
seconds while plan9 uses miliseconds.

4 years agocc: dont export gethunk(), hunk, nhunk and thunk
cinap_lenrek [Tue, 12 May 2020 21:18:48 +0000 (23:18 +0200)]
cc: dont export gethunk(), hunk, nhunk and thunk

4 years agocc: get rid of hunk pointer fiddling and just use alloc()
cinap_lenrek [Tue, 12 May 2020 20:45:05 +0000 (22:45 +0200)]
cc: get rid of hunk pointer fiddling and just use alloc()

4 years ago?l: remove direct hunk manipulation from linkers, just call malloc()
cinap_lenrek [Tue, 12 May 2020 20:04:30 +0000 (22:04 +0200)]
?l: remove direct hunk manipulation from linkers, just call malloc()

as with recent changes, cc's malloc() could make the hunk pointer
misaligned. in the the compilers, the hunk pointer is used directly
by the lexer with no effort to to keep the hunk pointer aligned.

alloc/malloc still return aligned pointers, but hunk itself can
be on a odd address after allocation of a odd sized amount of bytes.

however, in the linkers, this assumption appears to be differnet. as
most allocations mostly allocate padded structures. however, symbol
lookup allocates strings on byte-size ganularity and the cc's malloc
would misalign the hunk pointer after the malloc() call. while the
rest of the code assumed hunk pointer was always aligned.

this change removes all the hunk pointer fiddling from the linker,
and we just call malloc() (which will use the fast implmenentation
of cc, and should not really make much of a performance difference).

4 years ago[ape] add missing conversion flags for scanf
Ori Bernstein [Tue, 12 May 2020 17:48:33 +0000 (10:48 -0700)]
[ape] add missing conversion flags for scanf

We're missing type flags for:

hh: char
ll: vlong
z:  size_t
t:  ptrdiff_t
j:  intmax_t

The lack of '%lld' was causing us to fail when parsing
timezone files. This brings us in line with the specifiers
in the C99 standard, section 7.19.6.2p11

4 years agodevip: fix ifc recursive rlock() deadlock
cinap_lenrek [Sun, 10 May 2020 20:51:40 +0000 (22:51 +0200)]
devip: fix ifc recursive rlock() deadlock

ipiput4() and ipiput6() are called with the incoming interface rlocked
while ipoput4() and ipoput6() also rlock() the outgoing interface once
a route has been found. it is common that the incoming and outgoing
interfaces are the same recusive rlocking().

the deadlock happens when a reader holds the rlock for the incoming interface,
then ip/ipconfig tries to add a new address, trying to wlock the interface.
as there are still active readers on the ifc, ip/ipconfig process gets queued
on the inteface RWlock.

now the reader finds the outgoing route which has the same interface as the
incoming packet and tries to rlock the ifc again. but now theres a writer
queued, so we also go to sleep waiting four outselfs to release the lock.

the solution is to never wait for the outgoing interface rlock, but instead
use non-queueing canrlock() and if it cannot be acquired, discard the packet.

4 years agokernel: fix checkpages() and segflush() on SG_PHYSICAL type segments
cinap_lenrek [Sun, 10 May 2020 14:54:42 +0000 (16:54 +0200)]
kernel: fix checkpages() and segflush() on SG_PHYSICAL type segments

do not touch s->map on SG_PHYSICAL type segments as they do
not have a pte map (s->mapsize == 0 && s->map == nil).

also remove the SG_PHYSICAL switch in freepte(), this is never
reached.

4 years agomerge
kvik [Sun, 10 May 2020 01:24:19 +0000 (03:24 +0200)]
merge

4 years agoacme: add missed error checks
kvik [Sun, 10 May 2020 01:18:57 +0000 (03:18 +0200)]
acme: add missed error checks

4 years agomerge
cinap_lenrek [Sun, 10 May 2020 00:44:37 +0000 (02:44 +0200)]
merge

4 years agousbxhci: fix wrong control endpoint 0 output device context address
cinap_lenrek [Sun, 10 May 2020 00:43:39 +0000 (02:43 +0200)]
usbxhci: fix wrong control endpoint 0 output device context address

the calculation for the control endpoint0 output device context
missed the context size scaling shift, resulting in botched
stall handling as we would not read the correct endpoint status
value.

note, this calculation only affected control endpoint 0, which
was handled separately from all other endpoints.

4 years agofix '%[]' specifiers and '%n' (thanks phil9)
Ori Bernstein [Sat, 9 May 2020 22:10:39 +0000 (15:10 -0700)]
fix '%[]' specifiers and '%n' (thanks phil9)

When a match() fails, we need to unget the character we
tried to match against, rather than leaving it consumed.

Also, we can't break out of a conversion before we reach
the end of a format string, because things like the '%n'
conversion do not consume anything, and should still be
handled.

4 years agonusb/kb: add quirks for Elecom HUGE trackball
kvik [Fri, 8 May 2020 18:49:11 +0000 (20:49 +0200)]
nusb/kb: add quirks for Elecom HUGE trackball

As said in the code comment:

Elecom trackball report descriptor lies by
omission, failing to mention all its buttons.
We patch the descriptor with a correct count
which lets us parse full reports. Tested with:
Elecom HUGE (M-HT1DRBK, M-HT1URBK)

The descriptor fixup is adapted from Linux kernel:
drivers/hid/hid-elecom.c
in which a more detailed account of why and how this
works may be found.

A followup change to nusb/kb will be needed to expose
these additional events for potential remapping.

4 years agomerge
cinap_lenrek [Thu, 7 May 2020 21:28:55 +0000 (23:28 +0200)]
merge

4 years agobcm64: fix kernels cmpswap() function
cinap_lenrek [Thu, 7 May 2020 21:27:27 +0000 (23:27 +0200)]
bcm64: fix kernels cmpswap() function

spectacular bug. cmpswap() had a sign extension bug
using sign extending MOV to load the old compare
value and LDXRW using zero extension while the CMP
instruction compared 64 bit registers.

this caused cmpswap with negative old value always
to fail.

interestingly, libc's version of this function was
fine.

4 years agofix typo: mouse->xy, not w->mc.xy
Ori Bernstein [Thu, 7 May 2020 20:23:15 +0000 (13:23 -0700)]
fix typo: mouse->xy, not w->mc.xy

4 years agoaux/getflags: remove rogue debug print
kvik [Thu, 7 May 2020 16:37:08 +0000 (18:37 +0200)]
aux/getflags: remove rogue debug print

4 years agobring stdint.h closer to spec
Ori Bernstein [Wed, 6 May 2020 22:39:12 +0000 (15:39 -0700)]
bring stdint.h closer to spec

C99 requires that if intXX_t types are defined, int_fastxx_t and
int_leastxx_t types are defined as well. We define all three to
be identical (intXX_t == int_fastXX_t == int_leastXX_t).

4 years agoaux/getflags: improve flagfmt parser
kvik [Wed, 6 May 2020 22:10:09 +0000 (00:10 +0200)]
aux/getflags: improve flagfmt parser

This makes the flagfmt parser more robust and accepting
a looser input language — namely by allowing whitespace
around specifier fields and ignoring any empty fields.

Long flagfmts can thus be pleasingly displayed:

flagfmt='
a, b, c, C:cache,
m:mtpt mountpoint,
s:srvn srvname'

4 years agoReset click count on mouse motion.
Ori Bernstein [Wed, 6 May 2020 20:38:39 +0000 (13:38 -0700)]
Reset click count on mouse motion.

4 years agotmac.eai: wrapper around -me: auto indexing sections, .TC macro (thanks sirjofri)
Sigrid [Mon, 4 May 2020 09:57:24 +0000 (11:57 +0200)]
tmac.eai: wrapper around -me: auto indexing sections, .TC macro (thanks sirjofri)

4 years agoadd missing /sys/lib/tmac/me files (thanks sirjofri)
Sigrid [Mon, 4 May 2020 09:55:29 +0000 (11:55 +0200)]
add missing /sys/lib/tmac/me files (thanks sirjofri)

4 years agomake bind(2) error handling consistent
cinap_lenrek [Sat, 2 May 2020 15:32:01 +0000 (17:32 +0200)]
make bind(2) error handling consistent

The mount() and bind() syscalls return -1 on error,
and the mountid sequence number on success.

The manpage states that the mountid sequence number
is a positive integer, but the kernels implementation
currently uses a unsigned 32-bit integer and does not
guarantee that the mountid will not become negative.

Most code just cares about the error, so test for
the -1 error value only.

4 years agolibdraw: fix mount() error handling in newwindow()
cinap_lenrek [Sat, 2 May 2020 15:05:17 +0000 (17:05 +0200)]
libdraw: fix mount() error handling in newwindow()

4 years agosed: accept and ignore -E and -r flags for unix compatibility
cinap_lenrek [Sat, 2 May 2020 14:56:52 +0000 (16:56 +0200)]
sed: accept and ignore -E and -r flags for unix compatibility

4 years agoip/cifsd: implement primitive per-share unix id mapping for wstat()
cinap_lenrek [Sat, 2 May 2020 14:53:52 +0000 (16:53 +0200)]
ip/cifsd: implement primitive per-share unix id mapping for wstat()

4 years agomerge
cinap_lenrek [Sat, 2 May 2020 13:34:00 +0000 (15:34 +0200)]
merge

4 years agoether82543gc, ether82557, ethervirtio: do kproc() call ouside of spinlock
cinap_lenrek [Sat, 2 May 2020 13:32:19 +0000 (15:32 +0200)]
ether82543gc, ether82557, ethervirtio: do kproc() call ouside of spinlock

4 years agouse #error when missing define
Ori Bernstein [Fri, 1 May 2020 20:29:08 +0000 (13:29 -0700)]
use #error when missing define

This makes it easier to figure out what's going wrong when
we forget to define _POSIX_SOURCE.

4 years agomerge
Ori Bernstein [Wed, 29 Apr 2020 03:51:19 +0000 (20:51 -0700)]
merge

4 years agofacelift for mothra: flat ui is in.
Ori Bernstein [Wed, 29 Apr 2020 03:50:10 +0000 (20:50 -0700)]
facelift for mothra: flat ui is in.

Remove false 3d, add borders for visual separation between
content area and navigation area.

4 years agolibsec/base58enc: null-terminate the result
Sigrid [Tue, 28 Apr 2020 10:49:05 +0000 (12:49 +0200)]
libsec/base58enc: null-terminate the result

4 years agomissing headers rate a FATAL.
Ori Bernstein [Tue, 28 Apr 2020 03:13:16 +0000 (20:13 -0700)]
missing headers rate a FATAL.

4 years agolib9p: reject reads on closed fids and writes on directories
cinap_lenrek [Mon, 27 Apr 2020 17:55:42 +0000 (19:55 +0200)]
lib9p: reject reads on closed fids and writes on directories

mischief provided the following test that shows the issue:

ramfs -S crash

aux/9pcon /srv/crash <<EOF
Tversion 8192 9P2000
Tattach 0 -1 $user ''
Tcreate 0 dir 020000000777 0
Tattach 5 -1 $user ''
Twalk 5 6 dir
Tread 6 0 512
EOF

the problem is that lib9p wrongly allowed reads on closed fids,
due to the permission check only considering the lower 2 bits.
a closed fid has fid->omode == -1 and it would pass on read for:

(-1 & 3) == 3 == OEXEC

the following change explicitely checks for for the closed case
and also rejects writes on directories (they are rejected on
open/create, but a broken 9p client could still issue the request).

4 years agomerge
cinap_lenrek [Sun, 26 Apr 2020 17:55:53 +0000 (19:55 +0200)]
merge

4 years agokernel: improve page reclaimation strategy and locking
cinap_lenrek [Sun, 26 Apr 2020 17:54:46 +0000 (19:54 +0200)]
kernel: improve page reclaimation strategy and locking

when reclaiming pages from an image, always reclaim all
the hash chains equally. that way, we avoid being biased
towards the chains at the start of the Image.pghash[] array.

images can be in two states: active or inactive. inactive
images are the ones which are not used by program while
active ones aare.

when reclaiming pages, we should try to reclaim pages
from inactive images first and only if that set becomes
exhausted attempt to release text pages and attempt to
reclaim pages from active images.

when we run out of Image structures, it makes only sense
to reclaim pages from inactive images, as reclaiming pages
from active ones will never free any Image structures.

change putimage() to require a image already locked and
make it unlock the image. this avoids many pointless
unlock()/lock() sequences as all callers of putimage()
already had the image locked.

4 years agomothra: fix a few errors in previous patch
qwx [Sun, 26 Apr 2020 17:43:10 +0000 (19:43 +0200)]
mothra: fix a few errors in previous patch

- nil check pl_blue allocation, and don't do it every time pl_rtdraw is called
- fix re-adding previously removed flushimage calls
- correct format for pointer
- sysfatal in pl_drawinit on error

4 years agocopy all the tokens from the tokenrows with a paste.
Ori Bernstein [Sun, 26 Apr 2020 16:32:42 +0000 (09:32 -0700)]
copy all the tokens from the tokenrows with a paste.

if we do 'CAT(foo bar, baz quux)', the resulting token row
should have 3 tokens: 'foo', 'barbaz', 'quux'.

tested by jonasa, rebuilding /sys/src, perl, netsurf, and nuklear.

4 years agoadd missing header change (thanks qwx)
Ori Bernstein [Sun, 26 Apr 2020 16:03:42 +0000 (09:03 -0700)]
add missing header change (thanks qwx)

4 years agoSupport for neo2 keyboard layout
Ori Bernstein [Sun, 26 Apr 2020 03:46:45 +0000 (20:46 -0700)]
Support for neo2 keyboard layout

Modify aux/kbdfs to work with neo2 layout.
- add new modifier, increase limit on layers.
- Add Kaltgr for mod3
- Add mod4

This change only implements the alphanumeric
block of the keyboard in the kbmap, as neo2
is mainly used for blind typing and is not
needed that much anywhere else, this leaves
the numpad like it is.

(Thanks, jstsmthrgk@jstsmthrgk.eu)

4 years agomothra: make user interface monochrome
stanley lieber [Sun, 26 Apr 2020 01:55:43 +0000 (21:55 -0400)]
mothra: make user interface monochrome

4 years agomothra: remove extraneous lines and decoration (fake 3d). patch extracted from my...
stanley lieber [Sun, 26 Apr 2020 01:53:54 +0000 (21:53 -0400)]
mothra: remove extraneous lines and decoration (fake 3d). patch extracted from my forked mess by Ori_B.

4 years agotweak selection criteria
Ori Bernstein [Sat, 25 Apr 2020 22:18:04 +0000 (15:18 -0700)]
tweak selection criteria

grow selection from point of click, not start of selection region.
starting at the beginning of the selection region causes the match
logic to kick in, which is confusing.

4 years agocc: simplify macexpand() and off-by-one error
cinap_lenrek [Sat, 25 Apr 2020 20:16:44 +0000 (22:16 +0200)]
cc: simplify macexpand() and off-by-one error

the caller of macexpand() needs one more byte in
the buffer to append peekc.

make macexpand() actually check for buffer overflow.

just use strdup() to duplicate include file name
instead of the hunk dance.

move GETC() macro in cc.h

4 years agofix typos in time calculation
Ori Bernstein [Sat, 25 Apr 2020 18:00:27 +0000 (11:00 -0700)]
fix typos in time calculation

the results of the time calculation were garbled -- and
apparently negative on my system when testing, so the
test passed when it shouldn't have.

4 years agoBacked out changeset 2737b9af622b
Ori Bernstein [Sat, 25 Apr 2020 17:57:17 +0000 (10:57 -0700)]
Backed out changeset 2737b9af622b

not what I wanted to commit.

4 years agofix typos in time calculation
Ori Bernstein [Sat, 25 Apr 2020 17:43:39 +0000 (10:43 -0700)]
fix typos in time calculation

the results of the time calculation were garbled -- and
apparently negative on my system when testing, so the
test passed when it shouldn't have.

4 years agoBump protocol version for Ttclick
Ori Bernstein [Sat, 25 Apr 2020 16:38:02 +0000 (09:38 -0700)]
Bump protocol version for Ttclick

4 years agotriple click selection in acme
Ori Bernstein [Sat, 25 Apr 2020 15:59:14 +0000 (08:59 -0700)]
triple click selection in acme

see the last 2 commits.

4 years agotriple click selection in rio
Ori Bernstein [Sat, 25 Apr 2020 15:58:24 +0000 (08:58 -0700)]
triple click selection in rio

same as sam and vt, three clicks selects a
whitespace-delimited line.

4 years agotriple click selection in sam
Ori Bernstein [Sat, 25 Apr 2020 15:57:26 +0000 (08:57 -0700)]
triple click selection in sam

three clicks selects a whitespace-delimited line.

4 years agoacme/win: exit winfs once acme shuts down the window
cinap_lenrek [Fri, 24 Apr 2020 19:15:59 +0000 (21:15 +0200)]
acme/win: exit winfs once acme shuts down the window

4 years agopc, pc64: use softscreen double buffering for *bootscreen= framebuffer
cinap_lenrek [Fri, 24 Apr 2020 18:26:38 +0000 (20:26 +0200)]
pc, pc64: use softscreen double buffering for *bootscreen= framebuffer

it is probably almost always a good idea to use
double buffering with a unaccelerated framebuffer.

4 years agobcm, bcm64: dancing to the drum of the linux clowns for device tree memory size detec...
cinap_lenrek [Wed, 22 Apr 2020 17:57:25 +0000 (19:57 +0200)]
bcm, bcm64: dancing to the drum of the linux clowns for device tree memory size detection (thanks kenji)

looks like linux changed the device tree names for
the memory node:

https://github.com/raspberrypi/linux/commit/4b17654f51fd87c42cda3217b0863e6aa1df49b9#diff-ac03c9402b807c11d42edc9e8d03dfc7

this fixes the memory size detection with latest firmware
on raspberry pi4-b (4GB) for kenji.

4 years ago/sys/man/1/mothra: add description of Plumb menu item.
stanley lieber [Wed, 22 Apr 2020 01:14:26 +0000 (21:14 -0400)]
/sys/man/1/mothra: add description of Plumb menu item.

4 years agomothra.c: add Plumb menu item, and update man page. my original changes sanity-checke...
stanley lieber [Wed, 22 Apr 2020 01:12:32 +0000 (21:12 -0400)]
mothra.c: add Plumb menu item, and update man page. my original changes sanity-checked by Ori_B.

4 years agordhtml.c: restore original fonts. dejavusans was my change, my fault. it never looked...
stanley lieber [Wed, 22 Apr 2020 01:09:12 +0000 (21:09 -0400)]
rdhtml.c: restore original fonts. dejavusans was my change, my fault. it never looked right outside of drawterm on osx (mea culpa). this is easy to change for anyone who prefers something else, but it's difficult to imagine native users preferring our very fuzzy dejavusans to anything else.

4 years agoremove unused macro from chan.c
Ori Bernstein [Wed, 22 Apr 2020 00:32:02 +0000 (17:32 -0700)]
remove unused macro from chan.c

4 years agosamterm: don't scroll invisible (command) window (thanks umbraticus)
cinap_lenrek [Tue, 21 Apr 2020 22:55:58 +0000 (00:55 +0200)]
samterm: don't scroll invisible (command) window (thanks umbraticus)

with scroll-wheel scrolling, this case can happen with the
command window:

umbraticus → cinap: create fullscreen file buffer by right-clicking in cmd window

4 years agomerge
cinap_lenrek [Sun, 19 Apr 2020 22:08:35 +0000 (00:08 +0200)]
merge

4 years ago?a, ?c: fix macro debug prints
cinap_lenrek [Sun, 19 Apr 2020 21:57:33 +0000 (23:57 +0200)]
?a, ?c: fix macro debug prints

4 years ago?c: get rid of sprint(), strcpy() and strcat()/strncat(), cleanup
cinap_lenrek [Sun, 19 Apr 2020 21:51:18 +0000 (23:51 +0200)]
?c: get rid of sprint(), strcpy() and strcat()/strncat(), cleanup

4 years ago[257]l: cleanup fmt routines, replace sprint()
cinap_lenrek [Sun, 19 Apr 2020 21:47:23 +0000 (23:47 +0200)]
[257]l: cleanup fmt routines, replace sprint()

4 years agocc: cc.h changes needed by previous commit
cinap_lenrek [Sun, 19 Apr 2020 21:42:02 +0000 (23:42 +0200)]
cc: cc.h changes needed by previous commit

4 years ago?a, cc: fix buffer overflows in built-in preprocessor (macbody)
cinap_lenrek [Sun, 19 Apr 2020 21:37:05 +0000 (23:37 +0200)]
?a, cc: fix buffer overflows in built-in preprocessor (macbody)

add a buffer size argument to macexpand() and check for
overflow.

check for overflow when parsing #include directives.

4 years ago?a: catch symb[NSYMB] buffer overflow in lexer, cleanup, assume thechar is a rune
cinap_lenrek [Sun, 19 Apr 2020 20:59:21 +0000 (22:59 +0200)]
?a: catch symb[NSYMB] buffer overflow in lexer, cleanup, assume thechar is a rune

4 years agocc: get rid of sprint() and temporary buffer for type conversion fuction
cinap_lenrek [Sun, 19 Apr 2020 18:44:19 +0000 (20:44 +0200)]
cc: get rid of sprint() and temporary buffer for type conversion fuction

slookup() copies to symb, so use the symb[NSYMB] buffer directly
to declare type conversion functions and get rid of the arbitrary
sized local buffer. replace sprint() with snprint().

4 years agoMake priority array max size explicit.
Ori Bernstein [Sun, 19 Apr 2020 18:26:31 +0000 (11:26 -0700)]
Make priority array max size explicit.

we were implicitly depending on UMINUS being the last entry
in the operator table -- that's fragile.

4 years agofix cpp operator associativity
Ori Bernstein [Sun, 19 Apr 2020 18:15:13 +0000 (11:15 -0700)]
fix cpp operator associativity

We used to treat all operators as right associative,
which means that we would evaluate them incorrecty.
For example, '2 - 1 + 1' would evaluate as '2 - (1 + 2)',
instead of '(2 - 1) + 1'.

This adds an assoc parameter to struct pri, and then uses
it to decide how to evaluate operators.

4 years agomerge
Ori Bernstein [Sun, 19 Apr 2020 16:03:35 +0000 (09:03 -0700)]
merge

4 years agodont overflow the stack
Ori Bernstein [Sun, 19 Apr 2020 16:02:21 +0000 (09:02 -0700)]
dont overflow the stack

when pushing expressions in cpp, particularly complex ones could
overflow the stack and silently corrupt our data structures. add
checks when we push, and bump the stack size up.

4 years agolibmemdraw: remove inexistent build targets
rgl [Sun, 19 Apr 2020 13:30:58 +0000 (15:30 +0200)]
libmemdraw: remove inexistent build targets