jump to content

#! /bin/ksh
calls -w 132 -x "$@"|sed 's/(.*)//'|awk 'BEGIN {
	# Standard HTML headers
	printf("\"#FFFFFF\">
\n");
	starting_col=13;
}
/\[/ {
	#there should a markup here 
	printf("\"line_%s\">",$1) ;
	content=substr($0,starting_col) ;
	gsub("\[","",content)
	gsub("\]","",content)
	printf("%3d %s\n",$1,content);
}
/see line/ {
	#this should point to the markup
	markup=sprintf("\"#line_%s\">%s",$NF,$NF) ;
	# here , we need to extract content also
	content=substr($0,starting_col,index($0,"see line")-starting_col) ;
	printf("%3d %s%s\n",$1,content,markup);
}
END {
	# Standard HTML footers
	printf("
\n"); }'