macros/0000755000175000017500000000000014342660530010723 5ustar bagebagemacros/wilytools0000644000175000017500000000072014342660530012712 0ustar bagebageftp.*.c$ sg accept( select( cvs diff p9/wily.*/$ gconfig gmake install src/wily.*/$ gconfig gmake install norman def make wman \.c$ sg uses def wman work*/$ cvs diff make proxy/$ SO_KEEP .h/$ $h $m $M $g $html rdist Mail/guide$ frm sin html/guide$ Indent remote macros/guide$ magic Makefile make install clean Errors$ Clear win$ uptime df who Mace/$ subject mace Mace.*/$ subject Mace/out deliver Mace reply wrm News followup tmp xv print/$ gv bpr /$ make install macros/Cut0000644000175000017500000000006514342660530011402 0ustar bagebageTo: steve Subject: fake sendmail input Hev's Duties macros/acme0000644000175000017500000000355114342660530011557 0ustar bagebage#!/usr/bin/rc # acme - start up wily with some nice defaults # # usage: wily -f p9font -F p9fixed -a 8 # # addresses: file:10 (line 10) file:/wow/ file:#0 (start of file) # file:#20 (character 20) file:?wow? file:$ (end of file) cd $home h=`{pwd} macros=$h/wily/macros SHELL=/usr/bin/rc HISTORY=$h/wily/hist WILYTOOLS=$macros/wilytools WILYFIFO=/tmp/wilyfifo.acme-$USER WFILETAG='Del | Look . .. Anchor Snarf' WDIRTAG='Del Get | Look .. gre sg uses' WCOLTAG='Delcol New Cut Paste Snarf Anchor Split | Font remote ' WMAINTAG='Indent rdist -v 9term sam en enr phone tel locate files glimpse wman :, :,. h ' test -f $h/.rcrc && . $h/.rcrc path=($h/wily/html/bin $macros $path) m=/var/spool/mail/$USER M=$h/Mail/guide g=$h/wily/guide html=$h/wily/html/guide docs=/usr/doc work=$h/work/guide # export some functions fn tarlook { gunzip -c $* | tar tvf - } fn untarz { gunzip -c $* | tar xvf - } fn tardir { tar cvf $1.tar $1 && gzip -v $1.tar } fn gconfig { CC=shlicc CFLAGS='-g' ./configure '--prefix=/usr/local' } fn en { nenscript -G -fCourier7 $* } fn enr { nenscript -G -2r -fCourier5 $* } # gre - general-purpose grep # sg - source grep # def - find C/Alef definitions, from Gary (aka decl in Help paper) # uses - very crude, from Rob Pike's Help paper # wman - manpage browser, uses sed to cut the .1 suffix if it's there fn gre { grep -sn $1 * /dev/null } fn sg { grep -sn $1 *.[hcyl] *.java *.cat /dev/null } fn def { grep -sn '^'^$1 *.[lc] *.java *.cat /dev/null } fn uses { grep -sn -w $* *.[cly] *.java *.cat /dev/null } fn wman { man `{echo $*|sed 's/\..//'}|col -b|cat -s } fn wlint { lint $w } fn wspell { spell $w } # mh functions fn chfolder { folder +^$1 } fn sin { scan +inbox} fn sTodo { scan +Todo } fn sBugs { scan +Bugs } fn sBoS { scan +BoS } fn sBSD { scan +BSD } fn sFire { scan +Firewalls} fn wpack { echo y | packf } exec wily $* $macros/guide $h macros/README0000644000175000017500000000271614342660530011611 0ustar bagebageSome Wily macros: README this file acme rc script - start up wily with some nice macros guide guide file h history program, by Gary magic magic-cat program utf sample UTF text wbiff wily biff wilytools wilytools for wily freaks, additions welcome The acme script sets some variables (SHELL, HISTORY, $mail), reads in your .rcrc file if you have one, defines some useful functions for code browsing (untarz, gre, def, uses), and then fires up wily with $home and $home/wily/macros/guide open. The guide file assumes you have the html tools in $home/html and has strings for common programming and editing tasks. The 3 different grep functions are listed by decreasing generality: - gre is likely to get many 'hits' in large source directories - sg is a general-purpose source grep - def searches for function definitions, assumed to start at column 1. - uses searches for variable/function calls, it depends on 'grep -w', which is available from gnu-grep if your system doesn't support it. The second line of the guide file forms a primitive mail interface. Click B2 on 'frm' (the elm program) to list your messages, click B2 on $mail to view your mailbox, select some text that contains a valid 'To: ' header and then fire B2 on sendmail to quickly send some mail, or if you want to use the aliases in your .mailrc file you can use the ">mail -s 'subject' who" guide instead. I install these files in $home/wily/macros -- Steve Kotsopoulos macros/utf0000644000175000017500000000206314342660530011445 0ustar bagebageUTF encoding/font test ====================== Cat this file to test the unicode support. Your font should be set to something like pelm/unicode.8.font or pelm/unicode.9.font in whatever place you have installed the Xg unicode fonts, e.g., font=~matty/lib/font/Xg/pelm/unicode.8.font. The Plan 9 window system is 8½ (8 1/2). Here are some chess pieces: ♔♕♖♗♘♙♚♛♜♝♞♟ Now some accented characters: áàäéèëíìï (aei each with acute, grave, diaeresis) Some greek characters: τραπεζα Some mathematical symbols: ∀x: x ∈ Integers ⇒ x+1 ≮ x Demonstrate proportional fonts, toggle Font builtin: iiiiiii mmmmmmm ☺ ☻ ☹ ★ ☆ ☉ ☌ ☎ ☏ ☐ ☑ ☒ ☜ ☞ ♀ ♁ ♂  ∙ Why use :-) when you can use ☺? ∙ Gøëring, Garçon ∙ Γαρη Ξαπελλ ∙ ∀x ∃y : ½y ≧ x² ∙ ♘♙♚♜♝♞♟♠♡♢♣♤♥♦♧♩♪♭♮♯ ∙ ЙКЛ МОП РСУФХЦЧШЩЪЫЬЭЯабвг ∙ ひびぴふぶぷへべ ぺみむめもゃやゅゆょよるゎゐァイキ ∙ ∴ Use Wily macros/magic0000644000175000017500000000452714342660530011736 0ustar bagebage#!/usr/bin/sh # # magic-cat - this script tries to guess what kind of data a file contains, # and then runs a program that knows what to do with that data # It can be teamed with AFDP by 'afdpsend -c magic-cat file1 file2' # to send multimedia files to many systems at once. Upon receiving # the files each system will run magic-cat to display them locally. # Steve Kotsopoulos # # rcsid[] = "$Id: magic-cat,v 1.10 1995/10/24 16:37:25 steve Exp $"; PATH=/local/bin:/usr/local/bin:/usr/ucb:/usr/bin:/bin:$PATH:$HOME/bin # start with some reasonable defaults TMP=/tmp/magic.$$ MYMAGIC=$HOME/bin/etc.magic # for systems where /etc/magic is incomplete PROGfile="file -m $MYMAGIC" PROGfile="file" PROGimage="xli -delay 10 -geometry +200+200 -quiet" PROGps="ghostview -geometry -0-0" PROGmpeg="mpeg_play" PROGmovie="xanim" PROGsound=$PROGfile PROGrgb=$PROGfile PROGtext="head" case $# in 0) echo 'Usage: magic-cat file ...'; exit ;; 1) BACKGROUND=1 ;; # run file in background, if only 1 arg *) BACKGROUND=0 ;; # run files in foreground, 1 at a time esac case `uname` in NetBSD|"BSD/OS"|"BSD/386") XPLAYGIZMO=false; export XPLAYGIZMO; PROGimage="xv"; PROGsound="showaudio audio/au" ;; IRIX) PROGsound="sfplay -p"; PROGrgb="ipaste" ;; SunOS) PROGsound="play" ;; *) PROGps=$PROGfile ;; # assume we don't have ghostview esac # if !$DISPLAY ; then # we aren't running under X Windows!? # PROGimage=$PROGfile # fi for ARG do # default program to run, if we can't figure out what file contains PROG=$PROGfile $PROGfile $ARG > $TMP if grep "SGI imagelib image" $TMP; then PROG=$PROGrgb elif egrep '(image|GIF|JPEG|jpeg|rasterfile|xpm|xbm)' $TMP ; then PROG=$PROGimage elif grep face $TMP ; then PROG=xview # xv does not support face files elif grep AIFF $TMP ; then PROG=playaiff # only on SGI systems elif egrep '(audio|sound)' $TMP ; then PROG=$PROGsound elif grep -i PostScript $TMP ; then PROG=$PROGps elif grep -i mpg $TMP ; then PROG=$PROGmpeg elif grep -i movie $TMP ; then PROG=$PROGmovie elif grep -i text $TMP; then PROG=$PROGtext elif grep "shell script" $TMP; then PROG=$PROGtext else echo "$ARG: file type not supported:" fi if test "$BACKGROUND" = 1 ; then $PROG $ARG & # run program in background, so we exit NOW else $PROG $ARG fi done rm -f $TMP exit 0 macros/guide0000644000175000017500000000037714342660530011752 0ustar bagebage $h $m $M $g $html $docs $work remote magic h frm >sendmail >mail -s 'subject' wbiff |sort -nr rm wc sam B |fmt |quote |indent |undent wspell tarlook untarz gconfig mk make install clean tardir gre sg uses def cvs diff lpr en lpq wman wlint win macros/wbiff0000644000175000017500000000102614342660530011742 0ustar bagebage#!/usr/bin/rc # wbiff - wily/acme mailbox watcher, by steve@border.com # it includes the string $mail:line in all output, so you can B3 on it mail=/var/mail/$USER # Unix mailbox test -f /dev/sysstat && mail=/mail/box/$user/mbox # Plan 9 mailbox interval=30 t1=/tmp/wbiff.1.$USER t2=/tmp/wbiff.2.$USER fn frm { egrep -n '^From |^Subject:' $1 | sed 's/^/wbiff $m:/' } frm $mail > $t1 > $t1 echo wbiff watching $mail on `{sdate} while() { frm $mail > $t2 diff $t1 $t2 | egrep '>' | sed 's/> //' mv $t2 $t1 sleep $interval } macros/fonts0000644000175000017500000000175714342660530012011 0ustar bagebageFont /usr/X11R6/lib/X11/fonts/Xg/lucm/euro.9.font Font /usr/X11R6/lib/X11/fonts/Xg/lucm/latin1.9.font Font /usr/X11R6/lib/X11/fonts/Xg/lucm/unicode.9.font Font /usr/X11R6/lib/X11/wily/fixed.9.font Font /usr/X11R6/lib/X11/wily/prop.9.font Font /usr/X11R6/lib/X11/fonts/Xg/matty/unicode.9.font Font /usr/X11R6/lib/X11/fonts/Xg/pelm/ascii.10.font Font /usr/X11R6/lib/X11/fonts/Xg/pelm/ascii.12.font Font /usr/X11R6/lib/X11/fonts/Xg/pelm/ascii.16.font Font /usr/X11R6/lib/X11/fonts/Xg/pelm/euro.8.font Font /usr/X11R6/lib/X11/fonts/Xg/pelm/euro.9.font Font /usr/X11R6/lib/X11/fonts/Xg/pelm/fangsong.9.font Font /usr/X11R6/lib/X11/fonts/Xg/pelm/hku.9.font Font /usr/X11R6/lib/X11/fonts/Xg/pelm/jis.9.font Font /usr/X11R6/lib/X11/fonts/Xg/pelm/latin1.8.font Font /usr/X11R6/lib/X11/fonts/Xg/pelm/latin1.9.font Font /usr/X11R6/lib/X11/fonts/Xg/pelm/song.9.font Font /usr/X11R6/lib/X11/fonts/Xg/pelm/unicode.8.font Font /usr/X11R6/lib/X11/fonts/Xg/pelm/unicode.9.font Font /usr/X11R6/lib/X11/fonts/Xg/smiley/0.font macros/h0000644000175000017500000000012614342660530011074 0ustar bagebage#!/usr/bin/rc switch ($#*) { case 0 tail $HISTORY case 1 grep $1 $HISTORY | tail }