aboutsummaryrefslogtreecommitdiff
path: root/src/cmd
AgeCommit message (Collapse)AuthorFilesLines
2020-12-309term: use openpty on NetBSDNicola Girardi1-0/+16
Fixes #376.
2020-12-30devdraw: add /usr/X11R7 for NetBSDRuss Cox1-0/+2
Fixes #362.
2020-12-30libthread: add threadmaybackgroundRuss Cox12-0/+72
Programs that want to background themselves now need to define threadmaybackground returning 1. This avoids a confusing (to people and debuggers) extra parent process for all the threaded programs that will never want to background themselves.
2020-12-15time: print 1s of millisecondsRuss Cox1-3/+3
2020-08-15all: a few more #define tricks for AIXRuss Cox1-0/+3
This should make the AIX build finally work. Fixes #400.
2020-08-15fontsrv: fix handling of colored glyphs (emoji)Russ Cox1-5/+17
Drawing as white on black to produce a mask only works if the white on black is the inversion of black on white. Emoji that force use of specific colors don't respect that. Draw black on white and invert to mask separately.
2020-08-08touch: fix for OpenBSD.James Cook1-1/+1
This fixes https://github.com/9fans/plan9port/issues/436 This doesn't necessarily address the underlying issue: calling p9create with mode = OREAD should probably be allowed, but currently doesn't work on OpenBSD.
2020-07-22devdraw, libdraw: fix memory leaks by freeing getns() malloced string (#431)Igor Böhm1-2/+6
2020-07-18acme: add font control messageRuss Cox1-0/+18
2020-06-22src/cmd: rm dformatRuss Cox1-108/+0
Unclear why it is here (wkj added it long ago). It has never been installed into $PLAN9/bin, so it's doubtful that anyone has ever used it. Arnold Robbins has an alternate version at https://github.com/arnoldrobbins/dformat. Fixes #421.
2020-06-04fontsrv: fix compilation on X11 (#420)Gregor Best1-0/+1
2020-05-29ed: handle Unicode beyond the BMP correctly in list mode.sean1-9/+32
List mode was constrained to the BMP. This change introduces the following new list mode convention, using Go string literal syntax: Non-printing ASCII characters display as \xhh. Non-ASCII characters in the BMP display as \uhhhh. Characters beyond the BMP display as \Uhhhhhhhh.
2020-05-29devdraw: accept 5- and 6-byte Unicode hex valuesRuss Cox1-8/+31
Alt X 1234 for U+1234 Alt X X 12345 for U+12345 Alt X X X 103456 for U+103456.
2020-05-29fontsrv: scale f->originy to match f->height on x11dzklaim1-1/+1
Co-authored-by: dzklaim <smmoth.rp@gmail.com>
2020-05-29fontsrv: handle non-BMP runes on X11Russ Cox4-43/+44
Have to adjust algorithms to deal with much larger number of subfont files as well.
2020-05-18devdraw, libdraw: handle keyboard runes > U+FFFFRuss Cox2-3/+8
Runes in Plan 9 were limited to the 16-bit BMP when I drew up the RPC protocol between graphical programs and devdraw a long time ago. Now that they can be 32-bit, use a 32-bit wire encoding too. A new message number to avoid problems with other clients (like 9fans.net/go). Add keyboard shortcut alt : , for U+1F602, face with tears of joy, to test that it all works.
2020-05-18rc: avoid problematic internal names "var", "thread"Russ Cox1-0/+6
For AIX.
2020-05-18acme: avoid global named "class"Russ Cox1-0/+3
For AIX.
2020-05-18diff: rename class to fix AIXRuss Cox1-0/+3
math.h defines a function named class on AIX.
2020-05-18devdraw: use indirect impl interface in x11Gabriel Diaz1-0/+21
2020-05-17devdraw: use global drawlk instead of per-clientRuss Cox3-18/+20
Setting up for a real window system.
2020-05-17devdraw: use indirect impl interfaceRuss Cox4-30/+61
Setting up for a real window system.
2020-05-17mk: replace overlapping strcpy with memmoveRuss Cox1-1/+2
Found by ASAN.
2020-05-07all: fix #includes for AIX, add a few AIX "implementation" filesBen Huntsman5-0/+17
2020-05-07mk: support Big Archive Format under AIXBen Huntsman1-0/+4
2020-05-07all: update build scripts to fix AIX XL/C compatibilityBen Huntsman1-1/+1
2020-05-05rc: clean up parser levels, disallow free carats on listsRuss Cox4-31/+37
2020-05-04rc: allow unquoted = in command argumentsRuss Cox2-10/+27
dd fans rejoice! Also helps with commands like go test -run=x.
2020-05-04rc: move free carat handling into parserRuss Cox4-74/+103
This fixes at least one shell script (printfont) that expected 'x'`{y}'z' to mean 'x'^`{y}^'z' as it now does. Before it meant: 'x'^`{y} 'z' One surprise is that adjacent lists get a free carat: (x y z)(1 2 3) is (x1 y2 z3) This doesn't affect any rc script in Plan 9 or plan9port.
2020-05-04rc: move newline handling into parserRuss Cox6-24/+67
2020-05-04rc: add recursive descent parserRuss Cox13-9/+730
The old yacc-based parser is available with the -Y flag, which will probably be removed at some point. The new -D flag dumps a parse tree of the input, without executing it. This allows comparing the output of rc -D and rc -DY on different scripts to see that the two parsers behave the same. The rc paper ends by saying: It is remarkable that in the four most recent editions of the UNIX system programmer’s manual the Bourne shell grammar described in the manual page does not admit the command who|wc. This is surely an oversight, but it suggests something darker: nobody really knows what the Bourne shell’s grammar is. Even examination of the source code is little help. The parser is implemented by recursive descent, but the routines corresponding to the syntactic categories all have a flag argument that subtly changes their operation depending on the context. Rc’s parser is implemented using yacc, so I can say precisely what the grammar is. The new recursive descent parser here has no such flags. It is a straightforward translation of the yacc. The new parser will make it easier to handle free carats in more generality as well as potentially allow the use of unquoted = as a word character. Going through this exercise has highlighted a few dark corners here as well. For example, I was surprised to find that x >f | y >f x | y are different commands (the latter redirects y's output). It is similarly surprising that a=b x | y sets a during the execution of y. It is also a bit counter-intuitive x | y | z x | if(c) y | z are not both 3-phase pipelines. These are certainly not things we should change, but they are not entirely obvious from the man page description, undercutting the quoted claim a bit. On the other hand, who | wc is clearly accepted by the grammar in the manual page, and the new parser still handles that test case.
2020-03-30acme: scale window bodies on resize, not including tag spaceRuss Cox1-3/+5
This avoids reopening collapsed windows after a large vertical resize.
2020-02-03devdraw: fix `cmd-r` to toggle retina vs. non-retina mode on macOS (#361)Martin Palma1-1/+1
and not unexpectedly quitting an application. Fixes #360
2020-01-24acme: report close failure in Put, this time for sureRuss Cox1-5/+5
Missed in 0b349f6f that Bterm is not closing fd.
2020-01-16devdraw: abort alt sequence on window change on macOSRuss Cox1-0/+4
Fixes #3.
2020-01-16malloc: remove lockingDan Cross1-10/+0
The issue manifests in fork: POSIX fork mandates that a fork'd process is created with a single thread. If a multithreaded program forks, and some thread was in malloc() when the fork() happened, then in the child the lock will be held but there will be no thread to release it. We assume the system malloc() must already know how to deal with this and is thread-safe, but it won't know about our custom spinlock. Judging that this is no longer necessary (the lock code was added 15 years ago) we remove it. Signed-off-by: Dan Cross <cross@gajendra.net>
2020-01-15devdraw: avoid deadlock in x11 resizeRuss Cox2-0/+3
Fixes #347.
2020-01-15cmd/rio: xshove: set geometry by window idNicola Girardi1-1/+6
2020-01-15devdraw: set windowrect correctly on x11 if window gets unexpected sizeRuss Cox1-2/+2
Fixes #54.
2020-01-15devdraw: actually send resize event on resizeRuss Cox1-0/+7
Fixes #340. Fixes #343.
2020-01-15factotum: update for new nbrecvul return valueRuss Cox1-2/+30
Unclear whether the old semantics were the right ones, but at least this preserves what they've been for the past however many years.
2020-01-15compress: import Plan9 compresssean2-0/+1289
Add #define USED(x)... boilerplate compress: import Plan9 manpage.
2020-01-15winwatch: Plan 9-ify.Dan Cross1-426/+412
This is new code, and custom to plan9port. Make it conform more closely to plan9 style. Signed-off-by: Dan Cross <cross@gajendra.net>
2020-01-15clock: Remove unused static variable in clock.cDan Cross1-2/+0
`struct Tm tms` was set but never referenced; noticed in a compiler warning. Remove it. Signed-off-by: Dan Cross <cross@gajendra.net>
2020-01-15winwatch: port based Plan 9 winwatchmarkvanatten2-1/+539
Port of Plan 9's winwatch(1).
2020-01-159pfuse: update errortabOleg Nemanov1-0/+2
2020-01-14venti/buildindex: fix hang on large indexesRuss Cox1-1/+1
Fixes #93.
2020-01-14devdraw: notify window resize promptly on x11Russ Cox5-13/+28
Fixes #339.
2020-01-14acme: save/restore multiline tags in Dump/LoadRuss Cox1-4/+16
The dump substitutes each \n in a multiline tag with a 0xff byte. Since it is not valid UTF it cannot occur in an ordinary dump file. Old acmes will just read it in as an error rune. Fixes #135. Fixes #153.
2020-01-14tar: remove /bin/ when invoking compressorsphonologus1-6/+1