#!/bin/sh
if [ $# -ne 2 ];then echo 'Usage: $0 0-x y-9 <foo.b >foo.c'; exit 1;fi
sed -e 's/^:['$1']//' \
	-e 's/^:['$2'].*//' 
#	-e '1s|%D|'`date -u +%y/%m/%d`'|'
exit 0
# This is a B-to-C translator, designed to be called from a makefile as:
#   .b.c:  ;b-c 0-6t 7-9 <$*.b >$@
# What this command does is enable all lines that start with ":0" thru ":6" or
# ":t" and disable all lines that start with ":7" thru ":9".  We also look for
# an initial line of the form:
#    static char ID[] = "@(#) foobar %D";
# We replace the %D with the date.  This should convert  a  foo.b  file  to  a
# compilable  foo.c  file,  with an ID string containing the current date, and
# with debug lines ":0" thru ":6" enabled.
