aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2018-11-149term: make 9term -l invoke $SHELL with -lRuss Cox1-1/+6
2018-11-14web: allow any $BROWSERRuss Cox1-1/+1
Fixes #118.
2018-11-14fontsrv: increase x11 font height scale (#111)iru-1-1/+1
2018-11-139term.app: add $PLAN9/bin to $PATH if not already in $PATH (#144)KADOTA, Kyohei1-0/+4
9term set $PLAN9 if PLAN9 is not set. But $PATH is not set. As a result, 9term exits with "exec devdraw: No such file or directory"
2018-11-13plumb/basic: avoid wrap around in file:1:2 (#158)Martin Kühl1-2/+2
Fixes #122, #140. As reported in #122, `file:1:1` moves to the end of the file, and `file:1:2` fails with “address out of range”. I’ll use file:2:3 as an example so we can tell the line and column number apart. What’s happening is this: plumb/basic matches `2:3` using twocolonaddr (from plumb/fileaddr), then sets addr to `2-#1+#3` (the 1 is constant and was introduced because column numbers are 1-based). Acme interprets this in three steps: 1. find the range (q0, q1) that contains line 2 2. create the range (q2, q2) where q2 = q0 - 1 3. create the range (q3, q3) where q3 = q2 + 3 The second step has a branch where if q0 == 0 and 1 > 0 (remember that 1 is constant and comes form plumb/basic), q0 is set to the end of the file. This makes addressing things at the end of the file easier. The problem then is that if we select line 1, which starts at the beginning of the file, q0 is always 0 and the branch in step 2) will always be used. `1:1` is interpreted as `1-#1+#1` which starts at 0, wraps around to the end of the file, then moves 1 character backwards and then forwards again, ending at the end of the file. `1:2` is interpretes as `1-#1+#2` which starts at 0, wraps around to the end od the file, then moves 1 character backwards and tries moving 2 characters forwards beyond the end of the file, resulting in the out of range error. In #140 @rsc proposed transforming `:X:Y` into `:X-#0+#Y-#1` instead since that avoids wrapping around by not moving backwards at first. This change modifies `plumb/basic` to do that.
2018-11-13devdraw: make ctrl generate 1-click while mouse down (#119)Xiao-Yong1-0/+2
This makes 2-1 chords possible with touchpad on a mac laptop.
2018-11-13keyboard: add compose sequences lc and rc for ceiling brackets (#126)thisrod1-0/+2
Change-Id: Ice1c8c9d15cc6febf32dc2b7c449d457acc319b6
2018-11-13keyboard: add tab/untab symbols (#160)Martin Kühl1-0/+2
2018-11-13fontsrv: x11 uses FC_POSTSCRIPT_NAME (#174)Xiao-Yong1-1/+1
This makes fontsrv use the PostScript font names on X11. The PostScript font names contains only alphanumeric and hyphens. This allows us to use the Font command in acme. It also matches the font names used by fontsrv on macOS, which has been using PostScript font names.
2018-11-13acme: avoid division by zero when resizing col (#189)Fazlul Shahriar1-2/+6
To reproduce, create a column with at least two windows and resize acme to have almost zero height.
2018-11-13fontsrv: disable font smoothing on osx (#196)Xiao-Yong2-0/+4
macOS Mojave version 10.14 starts to disable font smoothing. We disable font smoothing for OSX_VERSION >= 101400 to match the system default font rendering. It also makes the font rendering on macOS similar to that on X11.
2018-11-139term: fix getpts on FreeBSD 11.2 (#199)Xiao-Yong1-0/+16
Opening /dev/ptyXX files fails on recent FreeBSD versions. Following the same fix being applied to Linux, OpenBSD, and Darwin, we use openpty to open a pseudoterminal in openpts.
2018-11-129l: drop xcode text-based stub warningRuss Cox1-1/+1
2018-11-12plumb: allow @ in file namesRuss Cox1-9/+9
Helps Go module download cache, Upspin, maybe others.
2018-10-05fontsrv: copy some fixes from OS X to X11Fazlul Shahriar1-38/+43
* Avoid allocating empty images by adding 1 to width/height. This was crashing fontsrv. The total width of the subfont image can be zero even if the characters are present in the font. For example, all the characters in x0300.bit (part of "Combining Diacritical Marks" Unicode block) have zero width. * Make sure U+0000 is always present in the font, otherwise libdraw complains with: "stringwidth: bad character set for rune 0x0000 in ..." * Use the same fallback glyph (pjw face) as OS X. This also fixes a bug where advance was set to the total width of subfont instead of the character. Update #125 (most likely fixes the crash if in X11) Change-Id: Icdc2b641b8b0c08644569006e91cf613b4d5477f
2018-10-05upas/nfs: correctly quote IMAP LOGIN argumentsCharles Collicutt1-1/+1
According to RFC 3501 the arguments to the LOGIN command should be quoted strings (or length prefixed string literals). Without quoting, authentication to some IMAP servers (e.g. Dovecot) will fail.
2018-10-01grep: update from Plan 9David du Colombier1-3/+3
This change fixes a segfault in grep -e when no argument has been provided. Thanks to Sean Hinchee for reporting this issue. Fixes #186.
2018-09-29libregexp: include stddef.h in lib9.std.hDavid du Colombier1-0/+1
Commit 2d82ef9d98 added ptrdiff_t in regcomp.c. However, this change broke the build of the Unix package because ptrdiff_t is defined in stddef.h.
2018-09-19acme: Apply each -/+ only once (#156)Martin Kühl1-3/+3
When plumbing an address like `3-`, Acme selects line 1, and similarly `3+` selects line 5. The same problem can be observed for character addresses (`#123+`) but _not_ for ones like `+`, `.+` or `/foo/+`: The problem only occurs when a number is followed by a direction (`-`/`+`). Following along with the example `3-` through `address` (in addr.c): We read `3` into `c` and match the `case` on line 239. The `while` loop on line 242ff reads additional digits into `c` and puts the first non-digit back by decrementing the index `q`. Then we find the range for line 3 on line 251 and continue. On the next iteration, we set `prevc` to the last `c`, but since that part read ahead _into `c`_, `c` is currently the _next_ character we will read, `-`, and now `prevc` is too. Then in the case block (line 210) the condition on line 211 holds and Acme believes that it has read two `-` in sequence and modifies the range to account for the “first” `-`. The “second” `-` gets applied after the loop is done, on line 292. So the general problem is: While reading numbers, Acme reads the next character after the number into `c`. It decrements the counter to ensure it will read it again on the next iteration, but it still uses it to update `prevc`. This change solves the problem by reading digits into `nc` instead. This variable is used to similar effect in the block for directions (line 212) and fills the role of “local `c` that we can safely use to read ahead” nicely.
2018-06-26fontsrv: omit box-drawing characters from line struts on macOSIgor Burago1-1/+1
For some fonts, using box-drawing characters in the representative text for computing the line height results in it being uncomfortably high. Replace them with accented capitals and tall lower-case letters which lead to a more conservative increase in the line height. Fixes #162.
2018-03-27libdraw: fix error in the previous commitXiao-Yong Jin1-1/+1
2018-03-27mc: fix crash in acme with hidpi displayXiao-Yong Jin1-5/+9
2018-03-27samterm: free some getenv resultsXiao-Yong Jin1-2/+7
2018-03-27sam: freetmpstr instead of freeXiao-Yong Jin1-1/+1
2018-03-27libdraw: fix some memory leaks in font handlingXiao-Yong Jin5-6/+18
2018-03-27fontsrv: fix some memory leaksXiao-Yong Jin2-1/+4
2018-03-27devdraw: fix some memory leaks in x11Xiao-Yong Jin2-1/+5
2018-03-27acme: fix some memory leaksXiao-Yong Jin3-2/+8
2018-03-27fontsrv: enlarge drawing buffer for subfonts on macOSXiao-Yong Jin1-1/+3
Double the width returned by CTFontGetBoundingBox when drawing. Add box drawing characters for determining the line height. Call freememimage(1) for the character memimage. Fixes #18. Fixes #120. Fixes #146.
2018-03-27mount, 9pfuse: detect macports installed osxfuseXiao-Yong Jin2-0/+9
MacPorts installs osxfuse under /opt/local.
2018-03-23fontsrv: skip only the surrogate pairsMechiel Lukkien1-1/+1
fontsrv wasn't rendering fontawesome icons, which uses the private use area around 0xf000.
2018-03-23mount: check current osxfuse kext locationMartin Kühl1-0/+2
Current versions of osxfuse ship with multiple versions of its kernel extension (kext) for differend versions of macOS. Running mount(1) on macOS with a current version of osxfuse fails with `don't know how to mount (no fuse)' since it fails to find the kext. Running 9pfuse(4) directly works fine. This change adds a check to mount(1) that determines: 1) which version of macOS we're running on 2) if there is an osxfuse kext available for this version of macOS
2018-03-239pserve: fix memory leak in warningRay Lai1-0/+2
2018-03-23.gitignore: ignore files created for astro(1) and scat(1)Martin Kühl1-0/+2
To use astro(1) and scat(1) one has to create sky/here and download various catalogue files as detailed in sky/README. This change marks those files as ignored by git so they don't clutter its status messages.
2018-03-239term: Set TERM_PROGRAM to termprogMartin Kühl1-0/+1
TERM_PROGRAM is the customary way to identify which kind of terminal emulator program one uses on macOS. This change sets TERM_PROGRAM to termprog since both variables are used for the same purpose.
2018-03-239pfuse: retries read(3) upon EINTRXiao-Yong Jin1-2/+5
read(3) sometimes errors with EINTR on macOS over slow connections. 9pfuse(1) now retries read(3) instead of sysfatal(3)ing.
2018-02-059pfuse: fix handling of access mode (thanks Kenji Arisawa)David du Colombier1-1/+3
Fixes #81.
2018-01-23auxstats: get network stats in a portable manner on FreeBSDBakul Shah1-33/+14
as the old grody way doesn't work any more on FreeBSD-10 and later.
2018-01-17rc: use proper type for storing ulimit valuesRay Lai1-6/+7
rc on amd64 stores ulimit values as 32-bit int, but the limits on OpenBSD amd64 can exceed 2^31, so "ulimit -a" shows some values as negative. This is a problem when I want to increase my ulimit but the hard ulimit values are printed as negative.
2018-01-03gview: fix int vs ulong confusion causing silent exit 1 at startupRuss Cox1-4/+4
2017-11-279term: re-enable sys: child note for child processesRuss Cox1-0/+1
Fixes #6. Change-Id: Id9950f59c7970575866a7c22a69bfbf3a271f2bb
2017-11-02acme: preserve window position and selection during GetRuss Cox5-18/+103
Before, executing Get in a file rewound the window offset and selection to the start of the file. After this CL, Get preserves the window offset and selection, where preserve is defined as "the same line number and rune offset within the line". So if the window started at line 10 before and the selection was line 13 chars 5-7, then that will still be true after Get, provided the new content is large enough. This should help the common situation of plumbing a compiler error, realizing the window is out of date, clicking Get, and then losing the positioning from the plumb operation.
2017-10-17moveplan9: add missing filesSteven Stallion1-0/+35
This PR adds additional files to update /usr/local/plan9 references for packaging.
2017-10-16web: *chrome* matches google-chromeGleydson Soares1-1/+1
2017-10-14acme: free buf in checksha1Russ Cox1-0/+1
Thanks to Lorenzo Beretta for noticing.
2017-10-139l: accept Linux kernel version 4.xkeks1-1/+1
Fixes #114.
2017-10-139term: fix getpts on macOS 10.13David du Colombier1-0/+16
Since macOS 10.13, opening the /dev/ptyXX files always return ENOENT. Consequently, we changed getpts to use openpty to open a pseudoterminal, like on Linux and OpenBSD. Fixes #90. Fixes #110.
2017-10-13upas/nfs: fix warningsDavid du Colombier3-10/+2
decode.c:146:8: warning: variable ‘argv’ set but not used fs.c:953:47: warning: variable ‘reset’ set but not used imap.c:348:6: warning: variable ‘prefix’ set but not used Updates #114.
2017-10-10acme: check file content before declaring file "modified since last read"Russ Cox23-13/+79
Bad remote file systems can change mtime unexpectedly, and then there is the problem that git rebase and similar operations like to change the files and then change them back, modifying the mtimes but not the content. Avoid spurious Put errors on both of those by checking file content. (False positive "modified since last read" make the real ones difficult to notice.)
2017-10-09devdraw: fix build on macOS < 10.12Rudá Moura1-0/+2
After making the build on macOS silent on commit 310ae03, the build was broken on macOS lesser than 10.12 (Sierra). This commit conditionally checks the version the of the SDK before using the defined values for silent build. Fixes #66.