#!/bin/nawk -f 
#
# Usage: genStyleSheet < *.style
#
# Generates C version of the stylesheets
#
# # ViolaWWW HTML Processing/Rendering #  inline?
# # Configuration File		     #  | notfy-on-creation?	top
# ######################################  | | ?flushBySelf?	| bttm
# #					| | | on-sub?		| | left 
# # Tag Name	Processing Obj		| | | | hpane? 	        | | | right
# 
# P 		HTML_txt 		0 0 0 1 0		3 6 3 5
# A 		HTML_txtAnchor	 	1 0 0 0 0		0 0 0 0
# B 		HTML_txtBold	 	1 0 0 0 0		0 0 0 0
#
BEGIN {
}
/#/{
	next
}
/^$/{
	next
}
{
# use split?
	scanf($0,
		"%s %s %d %d %d %d %d %d %d %d %d",
		tagName, type,
		inlineP,
	        notifyOnCreationP,
	        flushAlwaysP,
	        flushOnSubTagP,
		hpaneP,
		top, bttm, left, right);

	printf(">> %s %s %d %d %d %d %d %d %d %d %d\n",
		tagName, type,
		inlineP, notifyOnCreationP,
		flushAlwaysP, flushOnSubTagP,
		hpaneP,
		top, bttm, left, right);
}
END {
	print "Done. Result in " OUT
}
