summaryrefslogtreecommitdiffstats
path: root/src/cmd
Commit message (Collapse)AuthorAgeFilesLines
...
* devdraw: stop redirecting ^H in cocoa-metal (#209)Xiao-Yong2019-04-051-1/+0
|
* libdraw,devdraw: fix compatibility with old 16x16 cursor protocol (#217)Fazlul Shahriar2019-04-052-0/+9
| | | | Some libraries that depend on devdraw don't know about 32x32 cursor -- mainly 9fans.net/go/draw.
* devdraw: prefer low-power GPU for macOS metal rendering (#231)Chris Schultz2019-04-051-2/+13
|
* devdraw: avoid deadlock on pre-Mojave macOSRuss Cox2019-04-051-0/+6
|
* acme: Update tag after receiving menu/nomenu control event (#251)Martin Kühl2019-04-051-0/+2
|
* devdraw: fix cocoa metal _flushmemscreen for invalid rectangles (#240)Xiao-Yong2019-04-051-0/+4
| | | | | | | | | | It is possible to receive multiple screen resize events, and resizeimg would be called for different sizes, before _flushmemscreen actually gets called with rectangle sizes different from the most recent resizeimg call. The size mismatch would trigger illegal memory access inside _flushmemscreen. This commit protects _flushmemscreen by returning early if the requested rectangle is outside of the current texture rectangle.
* devdraw: respond to windowDidBecomeKey on darwin (#239)Jacob Vosmaer2019-04-051-0/+5
| | | | Fixes bug where devdraw does not "notice" mouse position after task switch. Fixes https://github.com/9fans/plan9port/issues/232.
* page: handle EPS without showpageRuss Cox2019-02-252-1/+6
|
* rio: delete ancient Imakefile (use mk instead)Russ Cox2019-02-011-27/+0
| | | | Fixes #235.
* acme: drop trailing spaces during Put of auto-indent windowRuss Cox2019-02-011-3/+38
| | | | | | | | | | | Auto-indent mode leaves trailing spaces on blank lines as you type past them, so silently elide them from the window content as it gets written back to disk. Another option would be to remove them from the window entirely during Put, but they're actually nice to have while editing, and to date Put has never modified the window content.
* libdraw: redo default font construction to be hidpi-safeRuss Cox2018-11-162-4/+0
| | | | | | | | | | | | | | | | If $font is not set, the default font is constructed from font data linked into every libdraw binary. That process was different from the usual openfont code, and so it was not hidpi-aware, resulting in very tiny fonts out of the box on hidpi systems, until users set $font. Fix this by using openfont to construct the default font, by recognizing the name *default* when looking for font and subfont file contents. Then all the hidpi scaling applies automatically. As a side effect, the concept of a 'default subfont' is gone, as are display->defaultsubfont, getdefont, and memgetdefont.
* file: recognize Mach-O binaries and Java class filesMartin Kühl2018-11-151-0/+3
|
* file: add missing newlines to file typesMartin Kühl2018-11-151-3/+3
|
* paint: add drawing program from 9front (#112)Tobias Heinicke2018-11-153-0/+1128
| | | | | | Paint first appeared in 9front. The 9front license is reproduced in the related source files - the original repository is located at https://code.9front.org/hg/plan9front.
* rio: make 'mk all' explain why it does nothing on non-x11 systemsRuss Cox2018-11-151-2/+4
| | | | Fixes #98.
* devdraw: remove os x 10.5 compatibility codeJacob Vosmaer2018-11-154-1790/+2
|
* acme: add 32x32 boxcursorRuss Cox2018-11-154-2/+71
| | | | | | The only difference from the upscaled 16x16 is a one-pixel adjustment in the offset position, but this at least exercises setcursor2.
* devdraw: add Cursor2 support on macOS 10.14 MojaveRuss Cox2018-11-158-45/+113
| | | | | This replaces the pixel-art scaling algorithm used for upscaling before. The results were not crisp enough to serve as everyday cursors.
* tweak: add support for Cursor2Russ Cox2018-11-151-30/+78
|
* devdraw: rewrite the Cocoa screen using MetalXiao-Yong Jin2018-11-158-21/+1307
| | | | | | | | | | | | | | | | | | | | | | | | | Add a new macOS cocoa screen, cocoa-screen-metal.m. Rewrite the macOS cocoa drawing code to use the builtin runloop, and use Metal to push pixels with CAMetalLayer. Remove all of the deprecated code, and simplify some of the logic. Modify mkwsysrules.sh such that the new code is used only when the system version is equal or higher than 10.14. Allow touch events to simulate mouse clicks: three finger tap for the middle mouse button; four finger tap for the 2-1 chord. Support Tresize. Scale 16x16 Cursor up to 32x32 with an EPX algorithm. Support macOS input sources including the basic dead keys and the advanced CJK input methods. Increase the communication buffers in cocoa-srv.c to allow more input, especially for long sentences prepared by the macOS input souces.
* upas/smtp: fix TLS connections (#163)Zach Scott2018-11-142-0/+49
| | | | | | | | | Both `upas/nfs` and `upas/smtp` call the currently broken `tlsClient()` from libsec. This commit copies a fix from upas/nfs into upas/smtp. In `imapdial()`, upas/nfs replaces a process call for tlsClient with `stunnel3` when not on Plan 9. upas/smtp calls tlsClient directly as a function, so imapdial was copied into mxdial.c as `smtpdial()`, and tlsClient+dial replaced with a call to smtpdial.
* devdraw: set displaydpi on devdraw x11 attach (#178)Gabriel Díaz2018-11-141-2/+7
| | | | | | | | | | See https://plan9port-review.googlesource.com/c/plan9/+/1470 for discussion of the approach, especially Michael Stapleberg's comment: Note that chromium, firefox and others have tried this and then switched to using the Xft.dpi X resource, see e.g. https://code.google.com/p/chromium/codesearch#chromium/src/chrome/browser/ui/libgtk2ui/gtk2_ui.cc and especially http://sources.debian.net/src/gnome-settings-daemon/3.18.2-1/plugins/xsettings/gsd-xsettings-manager.c/?hl=824#L80 for some anecdata about why this approach doesn’t work out. The Xft.dpi resource is being set accurately by desktop environments (GNOME, KDE, …) and can easily be changed by users of niche window managers by editing ~/.Xresources. I suggest we check only Xft.dpi, without considering the DPI environment variable or the monitor width/height.
* 9term: make 9term -l invoke $SHELL with -lRuss Cox2018-11-141-1/+6
|
* fontsrv: increase x11 font height scale (#111)iru-2018-11-141-1/+1
|
* devdraw: make ctrl generate 1-click while mouse down (#119)Xiao-Yong2018-11-131-0/+2
| | | This makes 2-1 chords possible with touchpad on a mac laptop.
* fontsrv: x11 uses FC_POSTSCRIPT_NAME (#174)Xiao-Yong2018-11-131-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.
* acme: avoid division by zero when resizing col (#189)Fazlul Shahriar2018-11-131-2/+6
| | | | To reproduce, create a column with at least two windows and resize acme to have almost zero height.
* fontsrv: disable font smoothing on osx (#196)Xiao-Yong2018-11-132-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.
* 9term: fix getpts on FreeBSD 11.2 (#199)Xiao-Yong2018-11-131-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.
* fontsrv: copy some fixes from OS X to X11Fazlul Shahriar2018-10-051-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
* upas/nfs: correctly quote IMAP LOGIN argumentsCharles Collicutt2018-10-051-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.
* grep: update from Plan 9David du Colombier2018-10-011-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.
* acme: Apply each -/+ only once (#156)Martin Kühl2018-09-191-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.
* fontsrv: omit box-drawing characters from line struts on macOSIgor Burago2018-06-261-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.
* mc: fix crash in acme with hidpi displayXiao-Yong Jin2018-03-271-5/+9
|
* samterm: free some getenv resultsXiao-Yong Jin2018-03-271-2/+7
|
* sam: freetmpstr instead of freeXiao-Yong Jin2018-03-271-1/+1
|
* fontsrv: fix some memory leaksXiao-Yong Jin2018-03-272-1/+4
|
* devdraw: fix some memory leaks in x11Xiao-Yong Jin2018-03-272-1/+5
|
* acme: fix some memory leaksXiao-Yong Jin2018-03-273-2/+8
|
* fontsrv: enlarge drawing buffer for subfonts on macOSXiao-Yong Jin2018-03-271-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.
* mount, 9pfuse: detect macports installed osxfuseXiao-Yong Jin2018-03-271-0/+8
| | | | MacPorts installs osxfuse under /opt/local.
* fontsrv: skip only the surrogate pairsMechiel Lukkien2018-03-231-1/+1
| | | | | fontsrv wasn't rendering fontawesome icons, which uses the private use area around 0xf000.
* 9pserve: fix memory leak in warningRay Lai2018-03-231-0/+2
|
* 9term: Set TERM_PROGRAM to termprogMartin Kühl2018-03-231-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.
* 9pfuse: retries read(3) upon EINTRXiao-Yong Jin2018-03-231-2/+5
| | | | | read(3) sometimes errors with EINTR on macOS over slow connections. 9pfuse(1) now retries read(3) instead of sysfatal(3)ing.
* 9pfuse: fix handling of access mode (thanks Kenji Arisawa)David du Colombier2018-02-051-1/+3
| | | | Fixes #81.
* auxstats: get network stats in a portable manner on FreeBSDBakul Shah2018-01-231-33/+14
| | | | as the old grody way doesn't work any more on FreeBSD-10 and later.
* rc: use proper type for storing ulimit valuesRay Lai2018-01-171-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.
* gview: fix int vs ulong confusion causing silent exit 1 at startupRuss Cox2018-01-031-4/+4
|