Commits


libregexp: include stddef.h in lib9.std.h 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.


acme: Apply each -/+ only once (#156) 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.


fontsrv: omit box-drawing characters from line struts on macOS 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.


libdraw: fix error in the previous commit


mc: fix crash in acme with hidpi display


samterm: free some getenv results


sam: freetmpstr instead of free


libdraw: fix some memory leaks in font handling


fontsrv: fix some memory leaks


devdraw: fix some memory leaks in x11


acme: fix some memory leaks


fontsrv: enlarge drawing buffer for subfonts on macOS 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.


mount, 9pfuse: detect macports installed osxfuse MacPorts installs osxfuse under /opt/local.


fontsrv: skip only the surrogate pairs fontsrv wasn't rendering fontawesome icons, which uses the private use area around 0xf000.


mount: check current osxfuse kext location 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