diff options
author | Petter Rodhelind <petter.rodhelind@gmail.com> | 2020-01-14 11:41:08 +0100 |
---|---|---|
committer | Petter Rodhelind <petter.rodhelind@gmail.com> | 2020-01-14 11:41:08 +0100 |
commit | 02d7aa8915f9c3a3288dab01f321eb94ba219e3b (patch) | |
tree | f053238978479e408a2b83571443e132f30586ab /bin | |
parent | c0c9d8f883dfd3a7f5a74499d91bb95884b15873 (diff) | |
parent | 3d1382b98a502d0c34d5ba2c462396acc515016e (diff) | |
download | plan9port-02d7aa8915f9c3a3288dab01f321eb94ba219e3b.tar.gz plan9port-02d7aa8915f9c3a3288dab01f321eb94ba219e3b.tar.bz2 plan9port-02d7aa8915f9c3a3288dab01f321eb94ba219e3b.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/9c | 11 | ||||
-rwxr-xr-x | bin/9l | 15 | ||||
-rwxr-xr-x | bin/quote1 | 11 | ||||
-rwxr-xr-x | bin/quote2 | 2 | ||||
-rwxr-xr-x | bin/wintext | 8 |
5 files changed, 17 insertions, 30 deletions
@@ -14,6 +14,10 @@ usegcc() -Wno-comment \ -Wno-sign-compare \ -Wno-unknown-pragmas \ + -Wno-misleading-indentation \ + -Wno-stringop-truncation \ + -Wno-stringop-overflow \ + -Wno-format-truncation \ -fno-omit-frame-pointer \ -fsigned-char \ " @@ -79,9 +83,8 @@ useclang() tag="${SYSNAME:-`uname`}-${OBJTYPE:-`uname -m`}-${CC9:-cc}" case "$tag" in -*FreeBSD*gcc*) usegcc ;; -*FreeBSD*clang*) useclang ;; -*DragonFly*|*BSD*) usegcc ;; +*DragonFly*gcc*|*BSD*gcc*) usegcc ;; +*DragonFly*clang|*BSD*clang*) useclang ;; *Darwin-x86_64*) useclang cflags="$ngflags -g3 -m64" @@ -133,7 +136,7 @@ case "$tag" in esac # N.B. Must use temp file to avoid pipe; pipe loses status. -xtmp=/tmp/9c.$$.$USER.out +xtmp=${TMPDIR-/tmp}/9c.$$.$USER.out $cc -DPLAN9PORT -I$PLAN9/include $cflags "$@" 2>$xtmp status=$? quiet $xtmp @@ -11,19 +11,6 @@ nmflags="" extralibs="-lm" tag="${SYSNAME:-`uname`}-${OBJTYPE:-`uname -m`}" case "$tag" in -*FreeBSD*) - ld=${CC9:-gcc} - userpath=true - extralibs="$extralibs -lutil" - case "`uname -r`" in - 5.2.*) - extralibs="$extralibs -lkse" - ;; - [5-9].*|1[0-9].*) - extralibs="$extralibs -lpthread" - ;; - esac - ;; *DragonFly*|*BSD*) ld=${CC9:-gcc} userpath=true @@ -346,7 +333,7 @@ then echo $ld -L$PLAN9/lib "$@" $libsl $extralibs $frameworks fi -xtmp=/tmp/9l.$$.$USER.out +xtmp="${TMPDIR-/tmp}/9l.$$.$USER.out" xxout() { sed 's/.*: In function `[^:]*: *//' $xtmp | egrep . | egrep -v 'is (often|almost always) misused|is dangerous, better use|text-based stub' @@ -2,19 +2,10 @@ . 9.rc -fn text { - if(~ $winid [0-9]*) - 9p read acme/$winid/body - if not if(~ $text9term unix!*) - dial -e $text9term </dev/null - if not - status='' -} - PROMPT='[^ ]*[%;$#][ ]+' fn cmds { - text | sed -n 's/^'$PROMPT'([^"])/ \1/p' + wintext | sed -n 's/^'$PROMPT'([^"])/ \1/p' } switch($#*) { @@ -1,6 +1,6 @@ #!/usr/local/plan9/bin/rc -cmd = `{" $* | tail -1} +cmd = `{quote1 $* | tail -1} if (~ $#cmd 0) { echo no such command found >[1=2] exit notfound diff --git a/bin/wintext b/bin/wintext index 93fe40ea..80a89957 100755 --- a/bin/wintext +++ b/bin/wintext @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash case "$winid" in [0-9]*) @@ -12,5 +12,11 @@ unix!*) exit 0 esac +case "$TMUX" in +?*) + tmux capture-pane -p + exit 0 +esac + echo 'no running window found' 2>&1 exit 1 |