aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-01-13cmd/9pfuse: ignore FMODE_EXEC open flagNicola Girardi1-2/+11
Improved error message in case of unexpected open flags. The message unexpected open flags requested=0100040 unhandled=040 prompted me to clear the FMODE_EXEC flag, although I wonder if I shouldn't have set OEXEC (0x3) instead.
2020-01-13clock: import from plan 9Russ Cox2-5/+112
Fixes #250.
2020-01-13lib9: rm unused _p9translate.cRuss Cox1-46/+0
Fixes #238.
2020-01-13devdraw: AUTOFRAMEWORK CoreFoundation on macOSRuss Cox1-0/+1
Fixes #273.
2020-01-13devdraw: x11 working againRuss Cox14-2340/+1844
Need to think a bit more about locking, but overall it's a working devdraw. Multiclient mode may not be working but nothing is using it yet.
2020-01-13devdraw: multiclient modeRuss Cox3-42/+115
2020-01-13cmapcube: don't crash on initdraw failureRuss Cox1-1/+2
2020-01-13libdraw: connect to devdraw via $wsysid when setRuss Cox3-1/+85
2020-01-13devdraw: more cleanup, clearer lockingRuss Cox8-313/+329
2020-01-13devdraw: refactor, clean up mac screenRuss Cox7-505/+492
Also turn mac-srv.c into a generic srv.c, so we can remove the duplication with x11-srv.c.
2020-01-13devdraw: move per-window globals in mac-screen.m into ClientRuss Cox3-62/+81
2020-01-13devdraw: move Client into devdraw.h and move global state inRuss Cox11-465/+470
2020-01-13devdraw: use consistent mac-* prefix on macOS filesRuss Cox12-200/+6
We were using osx- and cocoa- but it's not even OS X anymore.
2020-01-13devdraw: can use libthread directly now on macOSRuss Cox5-79/+13
2020-01-13devdraw: simplify mac file namesRuss Cox4-98/+5
Now that we only have Metal, we can drop the -metal. Also now that Carbon is gone we can drop the macargv.c, and then the -objc from object file names.
2020-01-13devdraw: drop pre-metal macOS supportRuss Cox3-1688/+5
We didn't start using Metal until macOS 10.14, but it was available on 10.13, which is currently the oldest Apple-supported version of macOS. Simplify by deleting the old code.
2020-01-13devdraw: update drawclient test program to run againRuss Cox2-9/+8
2020-01-13cmd/yacc: correctly detect end of file in gettokNeven Sajko1-0/+2
This prevents an infinite loop. Change-Id: I7eda6b9d032ca0daeb24b555954330d07f35c78b
2020-01-13cmd/yacc: check that arg is safe to pass to <ctype.h> isX functionsNeven Sajko1-5/+14
The functions from <ctype.h> require that their argument be representable as an unsigned char, anything else is an error. Change-Id: I9dafc49c431b7a2550b041603f27bac3c0010eea
2020-01-13cmd/yacc: check for EOF in string constant in cpyactNeven Sajko1-1/+1
Change-Id: I3b41ab3f181080bcff89201d30f0bdf8aa20d55c
2020-01-13cmd/yacc: do not create an out of bounds pointerNeven Sajko1-1/+2
An out of bounds pointer/array index being created is an error in standard C. Updates #313 Change-Id: I7108fcde1a8e03017e9ab852adb737940489c827
2020-01-13lib9/fmt: avoid racy access to installed fmt formatsRuss Cox4-22/+55
2020-01-13lib9: fix memory leak in dial of regular file (#284)jvd231-1/+3
2020-01-13wintext: add tmux support, use in ", ""Russ Cox4-20/+19
Fixes #223.
2020-01-13fontsrv: allow x11 hinting and disable autohint only (#254)Xiao-Yong1-1/+1
Some truetype fonts have good manual hinting. Ignoring hinting makes the font render badly on low resolution screens. This commit only disables the freetype autohinter, and allows hinting.
2020-01-13Make venti's doc more accurateEdouard Klein3-9/+26
2020-01-13cmd/venti/srv: split memory allocation callNeven Sajko1-2/+2
This splits a certain vtmallocz call in mkihash into two vtmallocz calls. The first issue this fixes is that the C aliasing rules were not respected in the code before this commit. The other thing is that this enables better memory alignment guarantees. Updates #313 Change-Id: Ia4f3e0fc85facc778193f5e977d4f99a1a9abd23
2020-01-12libdraw: fix "mk"Russ Cox1-2/+1
Should default to building the library, not getsubfont.o.
2020-01-12libthread: run first thread in proc on system stackRuss Cox4-17/+55
For pthread systems that are fussy about which stack is used, this makes sure that threadmain runs on a system stack. If you only use proccreate (never threadcreate), all threads run on system stacks.
2020-01-12lib9: make a p9frexp function wrapping system frexpRuss Cox3-1/+13
Under certain conditions it looks like frexp gets #defined to something else on macOS during system headers, which then breaks the declaration in libc.h.
2020-01-12all: fix or silence various gcc warningsRuss Cox17-22/+27
As usual, gcc finds some real problems but also reports a ton of noise. Fix the problems and quiet the noise.
2020-01-10Trivial changes: whitespace and modes.Dan Cross1021-6193/+5688
Remote whitespace at the ends of lines. Remove blank lines from the ends of files. Change modes on source files so that they are not executable. Signed-off-by: Dan Cross <cross@gajendra.net>
2020-01-09src: mv ../buildEnvironmentVariables mkhdrRuss Cox3-2/+5
Also note that the file must be valid shell and mk input. For #321.
2020-01-09mkfile, mkmk.sh: update for new asm-free getcallerpcRuss Cox2-3/+3
2020-01-08lib9: add getcallerpc.c (fixes build)Russ Cox1-0/+13
2020-01-08libhtml: plug a memory leak in addtextNeven Sajko1-0/+3
Change-Id: I9b8a4430e7d26008ba9508095f8eb4b124a93b9b
2020-01-08libhtml: plug quite a few memory leaksNeven Sajko2-4/+13
Change-Id: I45bd62a590373669e90183cc2b2ee56570c007f5
2020-01-08mk: plan9 style.Dan Cross1-7/+8
In general, no space after `if` etc, and no braces for a single statement inside of a loop or conditional. Signed-off-by: Dan Cross <cross@gajendra.net>
2020-01-07mk: fix out of bounds accessNeven Sajko1-7/+21
A loop is added for each structure field instead of accessing the other fields through the first one in one loop. Updates #313 Change-Id: I0e27e15feacb77391bc1decee7cf720d64d14586
2020-01-079c: Fix case patterns for DragonFly and other BSDsMartin Kühl1-2/+2
POSIX does not support grouping in case item patterns. Installing with a strict POSIX shell fails with: /usr/local/plan9/bin/9c: line 82: syntax error near unexpected token `(' /usr/local/plan9/bin/9c: line 82: `*(DragonFly|BSD)*gcc*) usegcc ;;' This change expands the patterns to work around the limitation. See https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_10 (and search for case_clause)
2020-01-07lib9, libndb: exclude terminating null from strncpy boundNeven Sajko2-2/+2
GCC pointed this out with some "warning: ‘strncpy’ specified bound NUM equals destination size [-Wstringop-truncation]" warnings. Change-Id: Id8408b165f6e4ae82c96a77599d89f658d979b32
2020-01-07lib9: remove getcallerpc implementationsRuss Cox9-66/+15
These make no sense and are not really needed at all. Add a best-effort attempt to get at the gcc/clang macro in lib9.h, but if it fails, no big deal. Fixes #324.
2020-01-07libmach: plug another memory leakNeven Sajko1-0/+2
Change-Id: Ia5c888db1f0ded2aa92238d994239e46bf52667a
2020-01-07libmach: plug memory leakNeven Sajko1-1/+4
Change-Id: I08cb7227c071c7fc2e30f43e07bcf599fc1d174a
2020-01-079term: add a "look" menu item (#299)Fazlul Shahriar4-0/+39
Add a menu item which functions similar to acme's `Look` command. This is copied from 9front. See: https://code.9front.org/hg/plan9front/rev/1f1596dbca51 https://code.9front.org/hg/plan9front/rev/d2de1d2f7b48
2020-01-07INSTALL, 9c, 9l: improve handling of *BSD (#302)Leonid Bobrov3-39/+27
2020-01-07all: sync and dedup the creation of the SYSNAME and OBJTYPE env vars (#321)Neven Sajko3-36/+22
This should prevent the issues of dist/buildmk and src/mkhdr getting out of synchronization yet again. I also add a rule for arm64 to the OBJTYPE sed command. Fixes #243 Fixes #320 Change-Id: I60f69a1f32b5ed5ae5ac8a1659c38e29debed005
2020-01-06acme(1): update man page to note -a trimming trailing spaces on PutRuss Cox1-6/+11
2020-01-02cmd/htmlroff: fix buffer overflow in t2.c getqargNeven Sajko1-1/+1
This is actually from 2016: https://plan9port-review.googlesource.com/c/plan9/+/1590 Change-Id: I6f2a3d71a9dd589eff7ab15b3c1d3997254b3c35
2020-01-02ls: check that pointer is not nil before calling qsortNeven Sajko1-1/+1
Passing a null pointer to qsort is an error in C (GCC and Clang agree with the standards there, so this is no joke). Change-Id: Ia2b015793a75ea4e85ae8f47da6beead9c4290e6