aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* initHEADmasterEthan Morgan37 hours3-87/+106
|
* troff: fix SIGFPE when using modulus operatorG. Branden Robinson2025-11-091-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I uncovered this problem while writing unit tests for GNU troff's delimited expression handling. Plan 9 troff's numeric expression evaluator handles division by zero but not modulus by zero. Fixes: $ echo '.if %0%0% .tm true' | 9 troff Floating point exception (core dumped) $ echo '.if 1%0 .tm true' | 9 troff Floating point exception (core dumped) After this patch: $ echo '.if %0%0% .tm true' | 9 troff x T utf x res 720 1 1 x init troff: modulus by zero.; stdin:1 troff: modulus by zero.; stdin:1 x trailer V0 x stop $ echo '.if 1%0 .tm true' | 9 troff x T utf x res 720 1 1 x init troff: modulus by zero.; stdin:1 x trailer V0 x stop
* cmd/devdraw: handle X11 selections betterScott Schwartz2025-11-041-1/+2
| | | | | | | | | x11-screen.c accepts selection targets with the MIME type "text/plain;charset-UTF8", but it should do so case insensitively. The current code draws an error when working with xfce4-terminal 1.0.4, which sends lower case. To reproduce, run acme, snarf some text, then paste in the terminal. acme will report: acme: cannot handle selection request for 'text/plain;charset=utf-8' (590)
* nroff: bad symbold definition on command line.Dan Cross2025-10-101-1/+1
| | | | | | | `-DTDEVNAME=...` should be `-DNDEVNAME=...`. We've been defaulting for "37", probably forever. Signed-off-by: Dan Cross <cross@gajendra.net>
* devdraw: work around XWayland pointer warpingRuss Cox2025-10-091-0/+23
|
* devdraw: fix dangling elseArusekk2025-10-091-2/+2
| | | | | | | | | | | | Because of a dangling else, after adding a name to an image with 'N', it was immediately deleted, resulting in Enoname in response to 'n'. This went mostly unnoticed, since plan9port itself does not use named images, but it can break external applications like truedraw[1]. [1]: https://git.sr.ht/~arusekk/truedraw Fixes: c66b52501b63 ("new draw server")
* src/cmd/rc: import rc syntax `delim{cmd} for splitting commands from 9atomlufia2025-07-276-10/+34
| | | | Co-authored-by: <ori@eigenstate.org>
* SunOS: silence some warningsDan Cross2025-07-251-1/+1
| | | | | | Give `-Wformat=0` on illumos/Solaris so that the build does not complain about `execlp` not having a sentinel (it's nil). Also fix an integer size issue when casting to a void pointer.
* DragonFly: fix buildDan Cross2025-07-252-4/+10
| | | | Fix the build for DragonFlyBSD.
* libthread: remove check for LinuxThreadsDan Cross2025-07-251-15/+0
| | | | | | | | | | | libthread had code in `_pthreadinit` to test for LinuxThreads, and error if it was in use. This hasn't been relevant since Linux 2.6, and I can't imagine there are many people trying to build (recent) plan9port on systems that old. Unfortunately, this code violated aliasing rules, and compilers were complaining about it. But, since it likely hasn't had much relevance in 20ish years, we can probably just remove it.
* all: remove need for `-fcommon`Dan Cross2025-07-2538-191/+337
| | | | | | | | | | Use `extern` where appropriate so that we can remove `-fcommon` on macOS and others. On macOS, `-fcommon` generates a number of linker warnings. I've tested building on macOS, Linux, FreeBSD, NetBSD, OpenBSD and illumos. I am not in a position to test on AIX or other more esoteric platforms, however.
* rio: proper prototypes in `fns.h`Dan Cross2025-07-2510-93/+98
| | | | | Use proper function prototypes in `fns.h`, that include argument type information.
* all: clean up misleading indentation warningsDan Cross2025-07-256-22/+28
| | | | | | | | | Misleading indentation warnings are actually useful, as they will occasionally reveal actual bugs (cf the apple `goto fail` security bug from a few years ago). Newer versions of clang (at least) are more aggressive about warnings in this regard, which has exposed a few warnings that are annoying. However, they are easy to address.
* sort: rename kcmp to keycmpDan Cross2025-07-241-6/+6
| | | | | Fixes: #648 Fixes: #655
* warnings: fix warnings on newer compilersDan Cross2025-07-245-15/+21
| | | | | | | | | | Mostly turning the crank on fixing simple warnings: arrays, for instance, can never be nil. A couple of pointers should have been initialized to `nil` before being tested. Some logic in `troff` was simplified: basically, an `if` statement had a condition that must have always been true if that section of code were being executed at all.
* config: add $egrepDan Cross2025-07-235-6/+14
| | | | | | | | | | | Introduce a new variable set in $PLAN9/config: $egrep, which is conditionally set to either `egrep` or `grep -E`, based on platform, and use this when we want to invoke `egrep`. This works around the endless warnings from GNU grep stating that `egrep` is deprecated in favor of `grep -E`, when run on e.g. Linux.
* libflate: fiz inflatezlibblockRuss Cox2025-05-081-2/+2
| | | | This has obviously never been run.
* cmd/devdraw: avoid use of X button state fieldRoger Peppe2025-03-291-51/+12
| | | | | | | | | | | | | | | | | | This bug is an intermittent annoyance and does not seem likely to be fixed soon. It means that every so often my acme becomes unusable because it behaves as if a mouse button is permanently set. Avoid that issue by keeping track of mouse button state directly. While we're about it, fix another annoying issue: under Linux the FocusOut event reset the kstate field but not the kbuttons field, meaning that the buttons state could inappropriately persist. This happened occasionally by accident, but was easy to reproduce: with the mouse button held down, drag outside the window and click Alt-Tab to switch away from the window. We see a KeyDown event followed by FocusOut but no KeyUp event. Change-Id: I3708316478c80c41806d7157ae9929c6cd84b662
* devdraw: handle shift of real mouse buttons correctlyRuss Cox2024-06-172-10/+23
|
* lib9: skip buggy S_ISCHR check in disksize on OpenBSDRuss Cox2024-06-151-2/+0
| | | | The portable code is already checking S_ISCHR anyway.
* acme: remove debug printRuss Cox2024-06-151-1/+0
|
* acme: shift button 3 for reverse searchRuss Cox2024-06-159-74/+183
| | | | | An experiment. Let's see if it's any good. Also document the Mac conventions in devdraw(3).
* all: quiet macOS build againRuss Cox2024-06-151-1/+0
|
* tpic: clean upRuss Cox2024-04-065-8/+14
|
* acme: clean up environment after execRuss Cox2024-04-061-0/+9
| | | | Make up for the lack of a real rfork(RFENVG).
* mntgen: import mntgen(4) from Plan 9fgergo2024-01-091-0/+256
| | | | | new file: man/man4/mntgen.4 new file: src/cmd/mntgen.c
* ramfs: update to workfgergo2023-12-301-5/+4
| | | | | | | ramfs: update to work erealloc(p, 0) is handled correctly removed fprint(2, ... removed assert()
* page: fix viewing of graphicsRuss Cox2023-09-131-2/+4
| | | | 940f1fd6af broke page on non-PDF files.
* acme: have Dump save both low and high DPI fontnamesmatheuristic2023-09-051-4/+13
| | | | | | | | Instead of only saving a window's currently displayed font's name to the dump file, have Acme's Dump command save that window's combined low DPI and high DPI font names when both are available. See 9fans/plan9port#630
* libframe: Match the color of tickjapanoise2023-08-231-1/+1
| | | | | | | Previously the vertical bar in tick was always black; fine if you use the standard black-on-white for everything, but any attempt to add a dark mode ran into trouble with the tick being half hard-coded black, half the new text color.
* libdraw: fix subfont scalingmatheuristic2023-08-211-1/+1
| | | | | A subfont with n chars has n+1 Fontchars, so scalesubfont() needs to scale all n+1 info entries.
* libregexp: allow up to 127 captured subexpressions in one regexpIgor Burago2023-03-311-1/+1
| | | | 128 counting with the entire expression match ($0).
* plumber: increase NMATCHSUBEXP up to 100Igor Burago2023-03-311-1/+1
| | | | | Thus up to two-digit subexpression match variables are supported ($1 through $99) in addition to the entire expression match ($0).
* plumber: use strtoul to parse subexpression match variable substitutionsIgor Burago2023-03-301-24/+9
|
* plumber: increase NMATCHSUBEXP up to libregexp's NSUBEXPIgor Burago2023-03-301-1/+1
|
* plumber: allow multi-digit subexpression match variable substitutionsIgor Burago2023-03-301-2/+23
|
* plumber: parametrize the number of stored match pattern subexpressionsIgor Burago2023-03-302-9/+15
|
* devdraw: Fix mouse wheel scrolling in 1-tick increments on macOSzakkor2023-03-291-3/+3
|
* acme: allow larger paste amountsRuss Cox2023-01-061-1/+1
|
* page: scale ppi on high-res displaysRuss Cox2023-01-061-8/+8
| | | | Also fix wording of -w warning.
* rio: check the return value of malloc(3)Tom Schwindl2022-09-123-0/+14
|
* fix double free bug, simplify error handling, reduce X11 callsMvA2022-09-111-63/+58
|
* fix double free bug, simplify error handling, reduce X11 calls, improve styleMvA2022-09-111-100/+74
|
* fix indentationDerek Stevens2022-09-071-1/+1
|
* acme/wind.c: redraw window body with bg color if too small for a single ↵Derek Stevens2022-09-071-0/+1
| | | | line; ref #10
* factotum: fix log read inuse bugTw2022-09-073-0/+3
| | | | | | When log reading exits, inuse flag should be cleared. Signed-off-by: Tw <wei.tan@intel.com>
* acme: accept paths with spaces in the 'name' ctl messageIgor Burago2022-09-071-1/+1
| | | | | | | | As it is allowed to use spaces in file names set interactively through the tag since 7b1c85f, do not reject names with spaces in the 'name' ctl message either. Fixes #559.
* plumber: allow underscores in variable names in plumbing rulesIgor Burago2022-09-071-10/+19
| | | | Fixes #561.
* plumber: set match variables past the first non-matching subexpressionIgor Burago2022-09-071-6/+6
| | | | Fixes #563.
* plumber: fail on buffer exhaustion or runaway quotes in string expansionIgor Burago2022-09-061-11/+25
|