Commit Graph

3959 Commits

Author SHA1 Message Date
Dmitri Vereshchagin
10564b1175 tmac/tmac.an: define .MR in a groff compatible way
groff 1.23.0 added .MR to its -man macro package.  The NEWS file states
that the inclusion of the macro "was prompted by its introduction to
Plan 9 from User Space's troff in August 2020."  From d32deab it seems
that the name for Plan 9 from User Space's implementation was suggested
by groff maintainer G. Brandon Robinson.

Not sure if the intention was to make these definitions compatible, but
it would be nice if they were.

Currently, Plan 9 from User Space's .MR expects its second argument to
be parenthesized.  groff's .MR does not.  This results in extra
parentheses appearing in manual references when viewing Plan 9 from User
Space's manual pages on a system using groff.
2025-07-27 09:58:50 -04:00
Kare Nuorteva
00446db7d8 ci: add Dependabot for GitHub Actions
Dependabot automatically maintains GitHub Actions workflows by sending
Pull Requests to project when action updates are released. Dependabot
labels the pull requests 'ci: bump actions/checkout from v3 to v4'.
Dependabot opens a maximum of five Pull Requests at a time and reviews
the need for PRs once a week.
2025-07-27 09:56:22 -04:00
lufia
8ff39da062 src/cmd/rc: import rc syntax `delim{cmd} for splitting commands from 9atom
Co-authored-by: <ori@eigenstate.org>
2025-07-27 09:55:45 -04:00
Kare Nuorteva
cc89d24235 .gitignore: ignore macOS .DS_Store files 2025-07-27 09:52:08 -04:00
Dan Cross
b2fc88d60a SunOS: silence some warnings
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.
2025-07-25 18:46:52 +00:00
Dan Cross
9d2e0d31f7 DragonFly: fix build
Fix the build for DragonFlyBSD.
2025-07-25 19:02:59 +00:00
Dan Cross
0bc66bfb3d libthread: remove check for LinuxThreads
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.
2025-07-25 13:06:53 -04:00
Dan Cross
156e745be9 all: remove need for -fcommon
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.
2025-07-25 12:25:11 -04:00
Dan Cross
1e6e30e91e rio: proper prototypes in fns.h
Use proper function prototypes in `fns.h`, that include argument
type information.
2025-07-25 11:58:36 -04:00
Dan Cross
655f7c3184 all: clean up misleading indentation warnings
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.
2025-07-25 11:20:03 -04:00
Dan Cross
5a9ced10ee sort: rename kcmp to keycmp
Fixes: #648
Fixes: #655
2025-07-24 16:35:15 +00:00
Dan Cross
67dd74a964 INSTALL: set defaults for awk and egrep
Set defaults for `awk` and `egrep`, instead of
setting things multiple times when specializing on
OS, and using a default in a `case` statement.
This is cleaner and less error-prone.
2025-07-24 16:25:44 +00:00
Dan Cross
4089e29e89 warnings: fix warnings on newer compilers
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.
2025-07-24 15:45:31 +00:00
Dan Cross
564d45b5a5 config: add $egrep
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.
2025-07-23 19:44:54 +00:00
erentar
28690cd427 9c: change -std=c17 to -stc=c11 based on feedback in \#716 2025-07-22 12:12:39 +02:00
erentar
f97483e519 u.h: define __USE_POSIX to make glibc happy
glibc will only expose sigjmp_buf if __USE_POSIX is defined.
2025-07-22 12:12:39 +02:00
erentar
53ed65a982 9c: Explicitly set c standard as newer changes in c23 break compilation 2025-07-22 12:12:39 +02:00
erentar
6df4828542 9c: "-Wdeprecated-pragma" is only present in clang and is absent from gcc 2025-07-22 12:12:39 +02:00
Russ Cox
df9b195ebf libflate: fiz inflatezlibblock
This has obviously never been run.
2025-05-08 13:29:20 -04:00
Roger Peppe
9da5b44513 cmd/devdraw: avoid use of X button state field
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
2025-03-29 11:23:26 -04:00
Igor Burago
13582b1a89 .gitignore: add bin/mntgen 2025-02-17 20:15:27 -05:00
macie
776db626b6 dist/main.html: remove dead link to Belorussian translation
According to web.archive.org this link is dead since 2012/2013. According to
original issue (http://codereview.appspot.com/4251044) that translation could be
a machine translation.
2025-02-17 20:15:14 -05:00
Anthony Sorace
a5d6857a3b man: don't paginate when using nroff
This tells bin/man to set the register L to very high to avoid pagination
and updates tmac/tmac.an to use that value, if it's set, to set the page
length. This is per Plan 9's rc/bin/man and sys/lib/tmac/tmac.an.
2025-01-29 15:55:23 -05:00
Russ Cox
61e362add9 mac: arrange for arm64 run on arm64
Makes 9term.app work again (not put you in an x86_64 jail).
2024-10-22 08:11:37 -04:00
Russ Cox
a2567fcac9 devdraw: handle shift of real mouse buttons correctly 2024-06-17 09:28:40 -04:00
Russ Cox
e9cbe46fe6 lib9: skip buggy S_ISCHR check in disksize on OpenBSD
The portable code is already checking S_ISCHR anyway.
2024-06-15 22:15:06 -04:00
Russ Cox
e243a4c391 man: update indexes 2024-06-15 22:10:59 -04:00
Russ Cox
211de84701 acme: remove debug print 2024-06-15 22:10:55 -04:00
Russ Cox
0c79c32675 acme: shift button 3 for reverse search
An experiment. Let's see if it's any good.
Also document the Mac conventions in devdraw(3).
2024-06-15 10:57:45 -04:00
Russ Cox
60ca2be037 all: quiet macOS build again 2024-06-15 10:57:45 -04:00
Kevin Hovsäter
8eb063cffd Remove redundant echo 2024-05-31 05:36:50 -04:00
Russ Cox
ace7bcb75b INSTALL: fix $PLAN9 in message 2024-04-06 11:14:36 -04:00
Russ Cox
b1b88c75fd tpic: clean up 2024-04-06 11:13:59 -04:00
Russ Cox
d5b2552b95 acme: clean up environment after exec
Make up for the lack of a real rfork(RFENVG).
2024-04-06 11:13:24 -04:00
Sevan Janiyan
be7c68f695 .github/workflows/actions.yaml: Run CI on pull requests too
Not just on pushes
2024-01-09 19:00:21 -05:00
Sevan Janiyan
b5e415d97d .travis.yml: Delete
Service is no longer around.
2024-01-09 19:00:21 -05:00
Sevan Janiyan
f3201246d7 README.md: Add GH actions badge 2024-01-09 19:00:21 -05:00
Sevan Janiyan
e0dd1865ff .github/workflows/actions.yaml: Add
Basic configuration which builds p9p on latest Ubuntu & macOS.
Skipped on adding more operating systems as build would hold up
waiting for runners, whereas with -latest targets, build starts
immediately.
Supported runners can be found on
https://docs.github.com/en/actions/using-jobs/choosing-the-runner-for-a-job
2024-01-09 19:00:21 -05:00
fgergo
897625ff9b mntgen: import mntgen(4) from Plan 9
new file:   man/man4/mntgen.4
new file:   src/cmd/mntgen.c
2024-01-09 15:25:19 -05:00
fgergo
f8681acb37 ramfs: update to work
ramfs: update to work

erealloc(p, 0) is handled correctly
removed fprint(2, ...
removed assert()
2023-12-30 08:58:44 -05:00
Igor Burago
3a877764da 9l: silence the 'ignoring duplicate libraries' warning on macOS 2023-12-18 10:10:55 -05:00
Igor Burago
0bc1ff0fa0 9l: refactor the warning-silencing mechanics to match that of 9c 2023-12-18 10:10:55 -05:00
Russ Cox
984c2824e3 page: fix viewing of graphics
940f1fd6af broke page on non-PDF files.
2023-09-13 10:48:18 -04:00
matheuristic
dfbafb68e2 acme: have Dump save both low and high DPI fontnames
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
2023-09-05 12:55:40 -04:00
japanoise
65c090346a libframe: Match the color of tick
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.
2023-08-23 14:47:08 -04:00
matheuristic
a36e66f0d2 libdraw: fix subfont scaling
A subfont with n chars has n+1 Fontchars, so scalesubfont() needs to
scale all n+1 info entries.
2023-08-21 11:38:17 -04:00
Igor Burago
cc4571fec6 libregexp: allow up to 127 captured subexpressions in one regexp
128 counting with the entire expression match ($0).
2023-03-31 11:50:53 -04:00
Igor Burago
727ce0e123 plumber: increase NMATCHSUBEXP up to 100
Thus up to two-digit subexpression match variables are supported
($1 through $99) in addition to the entire expression match ($0).
2023-03-31 08:17:47 -04:00
Igor Burago
4cd06ff66c libregexp: allow up to 128 character classes in one regexp 2023-03-31 08:16:11 -04:00
Sevan Janiyan
6eaa52d3f7 README.md: Drop travis-ci badge
Service is dead.
2023-03-30 15:04:28 -04:00