summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* eqn: enlarge errbuf to account for large tokensXiao-Yong Jin2021-01-292-2/+2
|
* xd: fix swizz8 loop countingXiao-Yong Jin2021-01-291-1/+1
|
* libhtml: fix array bounds in lexXiao-Yong Jin2021-01-291-1/+1
|
* libthread: call setpgrp in programs that will backgroundRuss Cox2021-01-141-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.
* sam: avoid out-of-bounds read in rtermRuss Cox2021-01-141-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.
* sam: remove backward ?:Russ Cox2021-01-141-1/+1
| | | | The exit code here is ignored anyway.
* rc: do not exit on EINTR from readRuss Cox2021-01-141-1/+10
| | | | This happens if lldb attaches to rc.
* lib9: reject postnote with special pidsRuss Cox2021-01-141-0/+5
|
* auxstats: do not postnote 0Russ Cox2021-01-141-1/+2
|
* acme, sam, samterm: remove weird switch usageRuss Cox2021-01-054-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.
* sam: rm dregsRuss Cox2021-01-054-293/+0
|
* stats: add threadmaybackgroundRuss Cox2021-01-055-40/+49
|
* acme: allow @ in file namesRuss Cox2020-12-301-1/+1
| | | | For upspin and other tools that put email addresses in names.
* 9term: add threadmaybackgroundRuss Cox2020-12-301-0/+6
|
* libthread: drop schedlockRuss Cox2020-12-302-2/+1
| | | | Having two locks in the proc was causing deadlocks.
* tcolors: add threadmaybackgroundRuss Cox2020-12-301-0/+6
|
* 9a: remove a few mentionsRuss Cox2020-12-301-1/+1
|
* all: remove $OBJTYPE from buildRuss Cox2020-12-3036-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.
* 9term: use openpty on NetBSDNicola Girardi2020-12-301-0/+16
| | | | Fixes #376.
* devdraw: add /usr/X11R7 for NetBSDRuss Cox2020-12-301-0/+2
| | | | Fixes #362.
* libthread: simplifyRuss Cox2020-12-3021-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.
* libthread: make pthreadperthread the defaultRuss Cox2020-12-301-1/+1
|
* libthread: fix pthreadperthread bugsRuss Cox2020-12-302-107/+187
|
* libthread: add threadmaybackgroundRuss Cox2020-12-3017-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.
* libthread: delete NetBSD special caseRuss Cox2020-12-304-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.
* libthread: fix use after free of first thread in each procRuss Cox2020-12-151-1/+9
| | | | | | This was causing sporadic but frequent crashes at startup in 9pserve on the new M1 Macs, correctly diagnosing a use-after-free.
* time: print 1s of millisecondsRuss Cox2020-12-151-3/+3
|
* all: a few more #define tricks for AIXRuss Cox2020-08-152-0/+36
| | | | | | This should make the AIX build finally work. Fixes #400.
* fontsrv: fix handling of colored glyphs (emoji)Russ Cox2020-08-151-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.
* touch: fix for OpenBSD.James Cook2020-08-081-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.
* devdraw, libdraw: fix memory leaks by freeing getns() malloced string (#431)Igor Böhm2020-07-222-4/+11
|
* acme: add font control messageRuss Cox2020-07-181-0/+18
|
* src/cmd: rm dformatRuss Cox2020-06-221-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.
* libthread: use libc functions in ucontext for macOS (#417)Xiao-Yong2020-06-153-81/+3
|
* fontsrv: fix compilation on X11 (#420)Gregor Best2020-06-041-0/+1
|
* ed: handle Unicode beyond the BMP correctly in list mode.sean2020-05-291-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.
* devdraw: accept 5- and 6-byte Unicode hex valuesRuss Cox2020-05-291-8/+31
| | | | | | Alt X 1234 for U+1234 Alt X X 12345 for U+12345 Alt X X X 103456 for U+103456.
* fontsrv: scale f->originy to match f->height on x11dzklaim2020-05-291-1/+1
| | | Co-authored-by: dzklaim <smmoth.rp@gmail.com>
* fontsrv: handle non-BMP runes on X11Russ Cox2020-05-294-43/+44
| | | | | Have to adjust algorithms to deal with much larger number of subfont files as well.
* libdraw: handle larger number of subfontsRuss Cox2020-05-291-1/+1
|
* devdraw, libdraw: handle keyboard runes > U+FFFFRuss Cox2020-05-185-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.
* build: use installbsd instead of install on AIXRuss Cox2020-05-185-7/+4
| | | | Even in mkmk.sh.
* rc: avoid problematic internal names "var", "thread"Russ Cox2020-05-181-0/+6
| | | | For AIX.
* acme: avoid global named "class"Russ Cox2020-05-181-0/+3
| | | | For AIX.
* libdiskfs: avoid problematic internal constant namesRuss Cox2020-05-182-0/+66
| | | | AIX defines some of these constants in its C header files.
* diff: rename class to fix AIXRuss Cox2020-05-181-0/+3
| | | | math.h defines a function named class on AIX.
* devdraw: use indirect impl interface in x11Gabriel Diaz2020-05-181-0/+21
|
* lib9: avoid unportable use of d_namlen in dirreadRuss Cox2020-05-181-2/+1
| | | | Fixes #395.
* devdraw: use global drawlk instead of per-clientRuss Cox2020-05-173-18/+20
| | | | Setting up for a real window system.
* devdraw: use indirect impl interfaceRuss Cox2020-05-174-30/+61
| | | | Setting up for a real window system.