aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2021-02-18Merge remote-tracking branch 'upstream/master'HEADmasterPetter Rodhelind105-3537/+412
2021-01-319pfuse: support MacFUSE >=4Connor Taffe1-1/+30
MacFUSE 4 removes support for passing device fd to the mount command. Adds support for the receiving the fd over a socket instead, and updates command paths and filesystem name.
2021-01-319p: parse lines in rdwr commandDavid Arroyo1-5/+9
Use bio(3) to read at most one line of input per iteration, even if there is more than one line available in the input buffer. This makes it easier to interact with line-oriented ctl files like that of factotum(4) from shell scripts, without the need to control when and how much data is flushed to a pipe.
2021-01-29htmlroff: fix array boundsXiao-Yong Jin1-2/+2
2021-01-29eqn: enlarge errbuf to account for large tokensXiao-Yong Jin2-2/+2
2021-01-29xd: fix swizz8 loop countingXiao-Yong Jin1-1/+1
2021-01-29libhtml: fix array bounds in lexXiao-Yong Jin1-1/+1
2021-01-14libthread: call setpgrp in programs that will backgroundRuss Cox1-0/+7
This fixes the 'run stats from rc; exit rc; stats dies' problem. It's unclear whether this is the right fix or whether rc should be starting all its interactive commands in their own process groups. But at least it does fix stats dying.
2021-01-14sam: avoid out-of-bounds read in rtermRuss Cox1-2/+2
Usually r->nused < r->nalloc and the read is in bounds. But it could in theory be right on the line and reading past the end of the allocation. Make it safe but preserve as much of the old semantics as possible. This use of rterm appears to be only for optimization purposes so the result does not matter for correctness.
2021-01-14sam: remove backward ?:Russ Cox1-1/+1
The exit code here is ignored anyway.
2021-01-14rc: do not exit on EINTR from readRuss Cox1-1/+10
This happens if lldb attaches to rc.
2021-01-14lib9: reject postnote with special pidsRuss Cox1-0/+5
2021-01-14auxstats: do not postnote 0Russ Cox1-1/+2
2021-01-05acme, sam, samterm: remove weird switch usageRuss Cox4-6/+10
For whatever reason all three of these programs contain switches like: switch(x) { case 1: if(cond) case 2: f(); } Like Duff's device, this is legal C but more obscure than it really needs to be. This commit assumes those are intended as written and simply writes them more clearly. I did consider that maybe they are mistakes, but in the case of sam/regexp.c, my rewrite in this commit matches the acme/regx.c that has been in plan9port since I added acme in 2003. (I didn't bother to dig up the old Plan 9 releases.) Assuming acme/regx.c has been correct for the past two decades, this commit should be correct too.
2021-01-05sam: rm dregsRuss Cox4-293/+0
2021-01-05stats: add threadmaybackgroundRuss Cox5-40/+49
2020-12-30acme: allow @ in file namesRuss Cox1-1/+1
For upspin and other tools that put email addresses in names.
2020-12-309term: add threadmaybackgroundRuss Cox1-0/+6
2020-12-30libthread: drop schedlockRuss Cox2-2/+1
Having two locks in the proc was causing deadlocks.
2020-12-30tcolors: add threadmaybackgroundRuss Cox1-0/+6
2020-12-309a: remove a few mentionsRuss Cox1-1/+1
2020-12-30all: remove $OBJTYPE from buildRuss Cox36-1201/+25
Now that we assume pthreads, the only assembly left is in libmp and libsec. We only ever added assembly for 386. The portable C code is fine for plan9port.
2020-12-309term: use openpty on NetBSDNicola Girardi1-0/+16
Fixes #376.
2020-12-30devdraw: add /usr/X11R7 for NetBSDRuss Cox1-0/+2
Fixes #362.
2020-12-30libthread: simplifyRuss Cox21-1469/+11
Now that everything uses pthreads and pthreadperthread, can delete various conditionals, all the custom context code, and so on. Also update documents. Fixes #355.
2020-12-30libthread: make pthreadperthread the defaultRuss Cox1-1/+1
2020-12-30libthread: fix pthreadperthread bugsRuss Cox2-107/+187
2020-12-30libthread: add threadmaybackgroundRuss Cox17-7/+93
Programs that want to background themselves now need to define threadmaybackground returning 1. This avoids a confusing (to people and debuggers) extra parent process for all the threaded programs that will never want to background themselves.
2020-12-30libthread: delete NetBSD special caseRuss Cox4-465/+4
I added a direct call from thread.c to pthread.c's _threadpthreadstart in May, and no one has complained about NetBSD being broken. So probably no one is using this on NetBSD at all. Make pthread the only option.
2020-12-18Merge remote-tracking branch 'upstream/master'Petter Rodhelind10-122/+95
2020-12-15libthread: fix use after free of first thread in each procRuss Cox1-1/+9
This was causing sporadic but frequent crashes at startup in 9pserve on the new M1 Macs, correctly diagnosing a use-after-free.
2020-12-15time: print 1s of millisecondsRuss Cox1-3/+3
2020-08-15all: a few more #define tricks for AIXRuss Cox2-0/+36
This should make the AIX build finally work. Fixes #400.
2020-08-15fontsrv: fix handling of colored glyphs (emoji)Russ Cox1-5/+17
Drawing as white on black to produce a mask only works if the white on black is the inversion of black on white. Emoji that force use of specific colors don't respect that. Draw black on white and invert to mask separately.
2020-08-08touch: fix for OpenBSD.James Cook1-1/+1
This fixes https://github.com/9fans/plan9port/issues/436 This doesn't necessarily address the underlying issue: calling p9create with mode = OREAD should probably be allowed, but currently doesn't work on OpenBSD.
2020-07-22devdraw, libdraw: fix memory leaks by freeing getns() malloced string (#431)Igor Böhm2-4/+11
2020-07-18acme: add font control messageRuss Cox1-0/+18
2020-06-22src/cmd: rm dformatRuss Cox1-108/+0
Unclear why it is here (wkj added it long ago). It has never been installed into $PLAN9/bin, so it's doubtful that anyone has ever used it. Arnold Robbins has an alternate version at https://github.com/arnoldrobbins/dformat. Fixes #421.
2020-06-18Merge remote-tracking branch 'upstream/master'Petter Rodhelind48-524/+804
2020-06-15libthread: use libc functions in ucontext for macOS (#417)Xiao-Yong3-81/+3
2020-06-04fontsrv: fix compilation on X11 (#420)Gregor Best1-0/+1
2020-05-29ed: handle Unicode beyond the BMP correctly in list mode.sean1-9/+32
List mode was constrained to the BMP. This change introduces the following new list mode convention, using Go string literal syntax: Non-printing ASCII characters display as \xhh. Non-ASCII characters in the BMP display as \uhhhh. Characters beyond the BMP display as \Uhhhhhhhh.
2020-05-29devdraw: accept 5- and 6-byte Unicode hex valuesRuss Cox1-8/+31
Alt X 1234 for U+1234 Alt X X 12345 for U+12345 Alt X X X 103456 for U+103456.
2020-05-29fontsrv: scale f->originy to match f->height on x11dzklaim1-1/+1
Co-authored-by: dzklaim <smmoth.rp@gmail.com>
2020-05-29fontsrv: handle non-BMP runes on X11Russ Cox4-43/+44
Have to adjust algorithms to deal with much larger number of subfont files as well.
2020-05-29libdraw: handle larger number of subfontsRuss Cox1-1/+1
2020-05-18devdraw, libdraw: handle keyboard runes > U+FFFFRuss Cox5-5/+25
Runes in Plan 9 were limited to the 16-bit BMP when I drew up the RPC protocol between graphical programs and devdraw a long time ago. Now that they can be 32-bit, use a 32-bit wire encoding too. A new message number to avoid problems with other clients (like 9fans.net/go). Add keyboard shortcut alt : , for U+1F602, face with tears of joy, to test that it all works.
2020-05-18build: use installbsd instead of install on AIXRuss Cox5-7/+4
Even in mkmk.sh.
2020-05-18rc: avoid problematic internal names "var", "thread"Russ Cox1-0/+6
For AIX.
2020-05-18acme: avoid global named "class"Russ Cox1-0/+3
For AIX.