Switch branches/tags
Nothing to show
Commits on Sep 19, 2018
  1. acme: Apply each -/+ only once (#156)

    mkhl authored and robpike committed Sep 19, 2018
    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.
Commits on Jun 26, 2018
  1. fontsrv: omit box-drawing characters from line struts on macOS

    iburago authored and 0intro committed May 17, 2018
    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.
Commits on Mar 27, 2018
  1. libdraw: fix error in the previous commit

    jxy authored and 0intro committed Mar 27, 2018
  2. mc: fix crash in acme with hidpi display

    jxy authored and 0intro committed Mar 23, 2018
  3. samterm: free some getenv results

    jxy authored and 0intro committed Mar 22, 2018
  4. sam: freetmpstr instead of free

    jxy authored and 0intro committed Mar 22, 2018
  5. fontsrv: fix some memory leaks

    jxy authored and 0intro committed Mar 21, 2018
  6. devdraw: fix some memory leaks in x11

    jxy authored and 0intro committed Mar 21, 2018
  7. acme: fix some memory leaks

    jxy authored and 0intro committed Mar 21, 2018
  8. fontsrv: enlarge drawing buffer for subfonts on macOS

    jxy authored and 0intro committed Mar 15, 2018
    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.
  9. mount, 9pfuse: detect macports installed osxfuse

    jxy authored and 0intro committed Mar 15, 2018
    MacPorts installs osxfuse under /opt/local.
Commits on Mar 23, 2018
  1. fontsrv: skip only the surrogate pairs

    mjl- authored and 0intro committed Jan 6, 2018
    fontsrv wasn't rendering fontawesome icons,
    which uses the private use area around 0xf000.
  2. mount: check current osxfuse kext location

    mkhl authored and 0intro committed Jan 31, 2018
    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
  3. 9pserve: fix memory leak in warning

    raylai authored and 0intro committed Jan 18, 2018
  4. .gitignore: ignore files created for astro(1) and scat(1)

    mkhl authored and 0intro committed Feb 1, 2018
    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.
  5. 9term: Set TERM_PROGRAM to termprog

    mkhl authored and 0intro committed Feb 28, 2018
    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.
  6. 9pfuse: retries read(3) upon EINTR

    jxy authored and 0intro committed Mar 15, 2018
    read(3) sometimes errors with EINTR on macOS over slow connections.
    9pfuse(1) now retries read(3) instead of sysfatal(3)ing.
Commits on Feb 5, 2018
Commits on Jan 23, 2018
  1. auxstats: get network stats in a portable manner on FreeBSD

    bakul authored and 0intro committed Jan 20, 2018
    as the old grody way doesn't work any more on FreeBSD-10 and later.
Commits on Jan 17, 2018
  1. rc: use proper type for storing ulimit values

    raylai authored and 0intro committed Jan 16, 2018
    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.
Commits on Jan 3, 2018
Commits on Nov 27, 2017
  1. 9term: re-enable sys: child note for child processes

    rsc authored and 0intro committed Dec 2, 2014
    Fixes #6.
    Change-Id: Id9950f59c7970575866a7c22a69bfbf3a271f2bb
Commits on Nov 2, 2017
  1. acme: preserve window position and selection during Get

    rsc committed Nov 2, 2017
    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
    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.
Commits on Oct 17, 2017
  1. moveplan9: add missing files

    sstallion authored and 0intro committed Oct 15, 2017
    This PR adds additional files to update /usr/local/plan9 references for
Commits on Oct 16, 2017
  1. web: *chrome* matches google-chrome

    Gleydson Soares authored and 0intro committed Oct 15, 2017
Commits on Oct 14, 2017
  1. acme: free buf in checksha1

    rsc committed Oct 14, 2017
    Thanks to Lorenzo Beretta for noticing.
Commits on Oct 13, 2017
  1. 9l: accept Linux kernel version 4.x

    keks authored and 0intro committed Oct 12, 2017
    Fixes #114.
  2. 9term: fix getpts on macOS 10.13

    0intro committed Oct 13, 2017
    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.
  3. upas/nfs: fix warnings

    0intro committed Oct 13, 2017
    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.
Commits on Oct 10, 2017
  1. acme: check file content before declaring file "modified since last r…

    rsc committed Oct 10, 2017
    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
    (False positive "modified since last read" make the real ones
    difficult to notice.)
Commits on Oct 9, 2017
  1. devdraw: fix build on macOS < 10.12

    ruda authored and 0intro committed Mar 26, 2017
    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.
Commits on Oct 1, 2017
  1. xd: add -R for runewise dump

    chneukirchen authored and 0intro committed Sep 26, 2017
    Ported from Plan 9 2013-05-21.
    Closes #16.
  2. web: add Chromium support on FreeBSD

    0intro committed Oct 1, 2017
    On FreeBSD, the Chromium executable is called chrome.
    Fixes #108.
Commits on Sep 22, 2017
  1. .travis.yml: configure build matrix to build on OS X and Linux (thank…

    0intro committed Sep 22, 2017
    …s Michaelian Ennis)
    Fixes #78.