#!/usr/bin/perl
#	mkdmpfct < recnamefile
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# This little program produces the cases in cm_read(). What you do is let the #
# make  build  the  cm4_record.h  or  cm4_msgtyp.h file, and when you need to #
# implement the dump code for a new message, feed the record (type) names  to #
# this program.  It will spit out dmpcmmsg's cases for those names, which can #
# be pasted into dmpcmmsg.b and compiled.  They will, of course, call a bunch #
# of  new  routines  whose names start with "DM4_"; adding those (in dmp.b is #
# the best place) is the job of the mkdmpfct program.                         #
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #

for (<>) {
	if (/C[TM]([34])(_\w+)\s/) {
		$rlse
		$name = $2;
		print "	case CT$rlse$name:\n";
		print "		++cmsglvl[$rlse];	\n";
		print ":3		D3(\"### CT$rlse$name message from %s\",SymSockAddr(cmsndr.v));\n";
		print "		Fail;\n";
	}
}
