vx32

Local 9vx git repository for patches.
git clone git://r-36.net/vx32
Log | Files | Refs

AUTOGEN (1092B)


      1 #!/bin/sh
      2 
      3 # Most of the library files come in virtually unchanged.
      4 # Rather than maintain the few changes by hand, we keep a set
      5 # of ed scripts that we can run on the originals to produce 
      6 # the versions we need.
      7 #
      8 # Note that the headers are in ../a
      9 
     10 autofiles="
     11 /sys/src/libdraw/arith.c
     12 /sys/src/libdraw/bytesperline.c
     13 /sys/src/libdraw/chan.c
     14 /sys/src/libdraw/computil.c
     15 /sys/src/libdraw/defont.c
     16 /sys/src/libdraw/drawrepl.c
     17 /sys/src/libdraw/fmt.c
     18 /sys/src/libdraw/icossin.c
     19 /sys/src/libdraw/icossin2.c
     20 /sys/src/libdraw/rectclip.c
     21 /sys/src/libdraw/rgb.c
     22 "
     23 
     24 case "$#" in
     25 0)
     26 	;;
     27 *)
     28 	autofiles="$*"
     29 esac
     30 
     31 plan9=/home/rsc/plan9/4e
     32 
     33 for f in $autofiles
     34 do
     35 	ed=`echo $f | sed 's;.*/;;; s;\.[ch]$;;; s;$;.ed;'`
     36 	out=`echo $f | sed 's;.*/;;;'`
     37 	echo $f '->' $out
     38 	test -f $out && chmod +w $out
     39 	(
     40 		echo ',s;"../port/;";g'
     41 		echo ',s;#include.*<;#include ";g'
     42 		echo ',s;#include.*>;&FIXINCLUDEME;g'
     43 		echo ',s;>FIXINCLUDEME;";g'
     44 		echo ',s;"libc.h";"lib.h";g'
     45 		echo 'g/#pragma/d'
     46 		test -f $ed && cat $ed
     47 		echo w $out
     48 		echo q
     49 	) | ed $plan9/$f 2>&1 | egrep -v '^[0-9?]+$'
     50 	chmod -w $out
     51 done