aboutsummaryrefslogtreecommitdiff
path: root/src/cmd
AgeCommit message (Collapse)AuthorFilesLines
2020-01-15winwatch: Plan 9-ify.Dan Cross1-426/+412
This is new code, and custom to plan9port. Make it conform more closely to plan9 style. Signed-off-by: Dan Cross <cross@gajendra.net>
2020-01-15clock: Remove unused static variable in clock.cDan Cross1-2/+0
`struct Tm tms` was set but never referenced; noticed in a compiler warning. Remove it. Signed-off-by: Dan Cross <cross@gajendra.net>
2020-01-15winwatch: port based Plan 9 winwatchmarkvanatten2-1/+539
Port of Plan 9's winwatch(1).
2020-01-159pfuse: update errortabOleg Nemanov1-0/+2
2020-01-14venti/buildindex: fix hang on large indexesRuss Cox1-1/+1
Fixes #93.
2020-01-14devdraw: notify window resize promptly on x11Russ Cox5-13/+28
Fixes #339.
2020-01-14acme: save/restore multiline tags in Dump/LoadRuss Cox1-4/+16
The dump substitutes each \n in a multiline tag with a 0xff byte. Since it is not valid UTF it cannot occur in an ordinary dump file. Old acmes will just read it in as an error rune. Fixes #135. Fixes #153.
2020-01-14tar: remove /bin/ when invoking compressorsphonologus1-6/+1
2020-01-14devdraw: do not force-hide menu and dock during full screen on macRuss Cox1-3/+15
This hides the menu on dock on all screens which is more than we want. The code was added to fix a problem with Catalina that I can no longer reproduce, so I guess it works now. Fixes #336.
2020-01-13devdraw: hide dock in full screen modeRuss Cox1-0/+13
Unfortunately this hides the dock even if it is on a different screen. We need to figure out how to tell. But this is more usable than not. Probably.
2020-01-13devdraw: correctly hide Mac menu bar (#335)Xiao-Yong1-9/+9
`window:willUseFullScreenPresentationOptions:` is an instance method of the protocol `NSWindowDelegate`.
2020-01-13acme: fix buffer overflow introduced in parsetag refactorRuss Cox3-8/+8
2020-01-13acme: fix movetodel for spaces in file namesRuss Cox1-11/+8
2020-01-13acme: allow spaces in window namesRuss Cox2-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.
2020-01-13mk: fix hash function (#315)Neven Sajko1-7/+3
Avoid signed integer overflow using ulong instead of long h.
2020-01-13acme: one more place to use parsetagRuss Cox1-5/+1
2020-01-13acme: factor out tag parsing codeRuss Cox3-21/+28
2020-01-13mk: treat X= as empty list in rc shellRuss Cox1-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.
2020-01-13acme: fix crash in X |cat with multiple windowsRuss Cox1-5/+24
Fixes #9. Fixes #219. Fixes #222. Fixes #330.
2020-01-13vac, unvac: allow 128MB cache size, up from 4MBRuss Cox2-2/+2
When a directory has lots of children, vac crashes because it runs out of cache. Fixes #266.
2020-01-139pfuse: do not fswalk("..")Russ Cox1-12/+5
f is open, so walk will fail. The comments say we only need one directory anyway. Fixes #277.
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 Cox1-0/+104
Fixes #250.
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-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 Cox10-464/+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-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 Klein1-1/+1
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-12all: fix or silence various gcc warningsRuss Cox14-14/+17
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 Cross700-4966/+4647
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-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-079term: add a "look" menu item (#299)Fazlul Shahriar3-0/+32
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-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