
#	rtfstrike - generate output file representing a strike for a given
#		RTF charset.

#	Script type:	perl

#	Syntax:	rtfstrike [ -s ] charset

#	charset is either "ansi", "mac", "pc", or "pca".
#	If -s is given, write characters so they appear in Symbol font

#	10 Sep 93	Paul DuBois	dubois@primate.wisc.edu

$symbol = 0;
if ($#ARGV >= 0 && $ARGV[0] eq "-s")
{
	$symbol = 1;
	shift (@ARGV);
}

die "Usage: rtfstrike [ -s ] charset\n" unless $#ARGV == 0;
$charset=$ARGV[0];

# prolog stuff
printf "{\\rtf1 \\%s\n", $charset;
printf "{\\fonttbl{\\f1\\froman Times;}{\\f2\\ftech Symbol;}}\n";
printf "\\sectd \\linemod0\\cols4 \\pard\\plain\\fs24\\f1\n";
printf "%s charset\\par\\par\n", $charset;

for($i = 0; $i < 256; $i++)
{
	printf "%3d %03o %02x [", $i, $i, $i;
	printf "\\f2" if ($symbol);
	printf "\\'%02x", $i;
	printf "\\f1" if ($symbol);
	printf "]\\par\n";
}

# epilog stuff
printf "}\n";
