| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
| |
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)
|
| |
|
|
|
|
|
| |
`-DTDEVNAME=...` should be `-DNDEVNAME=...`. We've been
defaulting for "37", probably forever.
Signed-off-by: Dan Cross <cross@gajendra.net>
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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")
|
| |
|
|
| |
Co-authored-by: <ori@eigenstate.org>
|
| |
|
|
|
|
| |
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.
|
| |
|
|
| |
Fix the build for DragonFlyBSD.
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
Use proper function prototypes in `fns.h`, that include argument
type information.
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
Fixes: #648
Fixes: #655
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
| |
This has obviously never been run.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| | |
|
| |
|
|
| |
The portable code is already checking S_ISCHR anyway.
|
| | |
|
| |
|
|
|
| |
An experiment. Let's see if it's any good.
Also document the Mac conventions in devdraw(3).
|
| | |
|
| | |
|
| |
|
|
| |
Make up for the lack of a real rfork(RFENVG).
|
| |
|
|
|
| |
new file: man/man4/mntgen.4
new file: src/cmd/mntgen.c
|
| |
|
|
|
|
|
| |
ramfs: update to work
erealloc(p, 0) is handled correctly
removed fprint(2, ...
removed assert()
|
| |
|
|
| |
940f1fd6af broke page on non-PDF files.
|
| |
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
A subfont with n chars has n+1 Fontchars, so scalesubfont() needs to
scale all n+1 info entries.
|
| |
|
|
| |
128 counting with the entire expression match ($0).
|
| |
|
|
|
| |
Thus up to two-digit subexpression match variables are supported
($1 through $99) in addition to the entire expression match ($0).
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Also fix wording of -w warning.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
line; ref #10
|
| |
|
|
|
|
| |
When log reading exits, inuse flag should be cleared.
Signed-off-by: Tw <wei.tan@intel.com>
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
| |
Fixes #561.
|
| |
|
|
| |
Fixes #563.
|
| | |
|