summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* acme: fix buffer overflow introduced in parsetag refactorRuss Cox2020-01-133-8/+8
|
* acme: fix movetodel for spaces in file namesRuss Cox2020-01-131-11/+8
|
* acme: allow spaces in window namesRuss Cox2020-01-132-5/+20
| | | | | | | | | | | | | | | | | | There are many things we could do to make this work. an environment variable to control the character. Another option would be to use U+00A0 (non-breaking space), which renders the same as space. This change avoids changing the separator character and instead assumes that if the left side of the tag already ends in " Del Snarf |" then what comes before that is the file name. Acme already aggressively preserves the "Del Snarf |", so this should work decently well as a stop-gap. We can always try something else later. Fixes #26. Fixes #104. Fixes #329.
* mk: fix hash function (#315)Neven Sajko2020-01-131-7/+3
| | | | Avoid signed integer overflow using ulong instead of long h.
* acme: one more place to use parsetagRuss Cox2020-01-131-5/+1
|
* acme: factor out tag parsing codeRuss Cox2020-01-133-21/+28
|
* lib9: do not fetch disk size for character devicesRuss Cox2020-01-131-1/+1
| | | | | | | | | Real disk devices should be block devices anyway. One user reported the disksize check causing a system reboot during vac of a tree with an "interesting" device. Fixes #103.
* mk: treat X= as empty list in rc shellRuss Cox2020-01-131-6/+12
| | | | | | | | | | | | | This brings mk's behavior when using rc in line with Plan 9's. The existing code is for Unix environment data structures but also was assuming Unix shell semantics where empty and missing variables are mostly equivalent. The Plan 9 code (/sys/src/cmd/mk/plan9.c in the distribution) explicitly removes /env/name (creating an empty list) when the value is missing or an empty string. Fixes #255.
* acme: fix crash in X |cat with multiple windowsRuss Cox2020-01-131-5/+24
| | | | | | | Fixes #9. Fixes #219. Fixes #222. Fixes #330.
* vac, unvac: allow 128MB cache size, up from 4MBRuss Cox2020-01-132-2/+2
| | | | | | When a directory has lots of children, vac crashes because it runs out of cache. Fixes #266.
* 9pfuse: do not fswalk("..")Russ Cox2020-01-131-12/+5
| | | | | | | f is open, so walk will fail. The comments say we only need one directory anyway. Fixes #277.
* libthread: fix nbrecvul, recvul to match man page, Plan 9Russ Cox2020-01-131-2/+2
| | | | | | | They return 0 on failure, not -1. Bug introduced in my original libthread-for-Unix code. Fixes #230.
* cmd/9pfuse: ignore FMODE_EXEC open flagNicola Girardi2020-01-131-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.
* clock: import from plan 9Russ Cox2020-01-131-0/+104
| | | | Fixes #250.
* lib9: rm unused _p9translate.cRuss Cox2020-01-131-46/+0
| | | | Fixes #238.
* devdraw: AUTOFRAMEWORK CoreFoundation on macOSRuss Cox2020-01-131-0/+1
| | | | Fixes #273.
* devdraw: x11 working againRuss Cox2020-01-1314-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.
* devdraw: multiclient modeRuss Cox2020-01-133-42/+115
|
* cmapcube: don't crash on initdraw failureRuss Cox2020-01-131-1/+2
|
* libdraw: connect to devdraw via $wsysid when setRuss Cox2020-01-132-1/+79
|
* devdraw: more cleanup, clearer lockingRuss Cox2020-01-138-313/+329
|
* devdraw: refactor, clean up mac screenRuss Cox2020-01-137-505/+492
| | | | | Also turn mac-srv.c into a generic srv.c, so we can remove the duplication with x11-srv.c.
* devdraw: move per-window globals in mac-screen.m into ClientRuss Cox2020-01-133-62/+81
|
* devdraw: move Client into devdraw.h and move global state inRuss Cox2020-01-1310-464/+470
|
* devdraw: use consistent mac-* prefix on macOS filesRuss Cox2020-01-1312-200/+6
| | | | We were using osx- and cocoa- but it's not even OS X anymore.
* devdraw: can use libthread directly now on macOSRuss Cox2020-01-135-79/+13
|
* devdraw: simplify mac file namesRuss Cox2020-01-134-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.
* devdraw: drop pre-metal macOS supportRuss Cox2020-01-133-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.
* devdraw: update drawclient test program to run againRuss Cox2020-01-132-9/+8
|
* cmd/yacc: correctly detect end of file in gettokNeven Sajko2020-01-131-0/+2
| | | | | | This prevents an infinite loop. Change-Id: I7eda6b9d032ca0daeb24b555954330d07f35c78b
* cmd/yacc: check that arg is safe to pass to <ctype.h> isX functionsNeven Sajko2020-01-131-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
* cmd/yacc: check for EOF in string constant in cpyactNeven Sajko2020-01-131-1/+1
| | | | Change-Id: I3b41ab3f181080bcff89201d30f0bdf8aa20d55c
* cmd/yacc: do not create an out of bounds pointerNeven Sajko2020-01-131-1/+2
| | | | | | | | | An out of bounds pointer/array index being created is an error in standard C. Updates #313 Change-Id: I7108fcde1a8e03017e9ab852adb737940489c827
* lib9/fmt: avoid racy access to installed fmt formatsRuss Cox2020-01-134-22/+55
|
* lib9: fix memory leak in dial of regular file (#284)jvd232020-01-131-1/+3
|
* fontsrv: allow x11 hinting and disable autohint only (#254)Xiao-Yong2020-01-131-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.
* Make venti's doc more accurateEdouard Klein2020-01-131-1/+1
|
* cmd/venti/srv: split memory allocation callNeven Sajko2020-01-131-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
* libdraw: fix "mk"Russ Cox2020-01-121-2/+1
| | | | Should default to building the library, not getsubfont.o.
* libthread: run first thread in proc on system stackRuss Cox2020-01-123-17/+47
| | | | | | | 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.
* lib9: make a p9frexp function wrapping system frexpRuss Cox2020-01-122-0/+10
| | | | | | 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.
* all: fix or silence various gcc warningsRuss Cox2020-01-1216-22/+23
| | | | | As usual, gcc finds some real problems but also reports a ton of noise. Fix the problems and quiet the noise.
* Trivial changes: whitespace and modes.Dan Cross2020-01-101021-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>
* src: mv ../buildEnvironmentVariables mkhdrRuss Cox2020-01-092-1/+23
| | | | | Also note that the file must be valid shell and mk input. For #321.
* mkfile, mkmk.sh: update for new asm-free getcallerpcRuss Cox2020-01-092-3/+3
|
* lib9: add getcallerpc.c (fixes build)Russ Cox2020-01-081-0/+13
|
* libhtml: plug a memory leak in addtextNeven Sajko2020-01-081-0/+3
| | | | Change-Id: I9b8a4430e7d26008ba9508095f8eb4b124a93b9b
* libhtml: plug quite a few memory leaksNeven Sajko2020-01-082-4/+13
| | | | Change-Id: I45bd62a590373669e90183cc2b2ee56570c007f5
* mk: plan9 style.Dan Cross2020-01-081-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>
* mk: fix out of bounds accessNeven Sajko2020-01-071-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