 function name
# 2 - scanning field start.
# 3 - scanning prototype.
# 4 - documentation block
my $state;
my $in_doc_sect;

#declaration types: can be
# 'function','struct', 'union', 'enum', 'typedef'
my $decl_type;

my $doc_special = "\@\%\$\&";

my $doc_start = '^/\*\*\s*$'; # Allow whitespace at end of comment start.
my $doc_end = '\*/';
my $doc_com = '\s*\*\s*';
my $doc_decl = $doc_com. '(\w+)';
my $doc_sect = $doc_com. '(['. $doc_special. ']?[\w\s]+):(.*)';
my $doc_content = $doc_com. '(.*)';
my $doc_block = $doc_com. 'DOC:\s*(.*)?';

my %constants;
my %parameterdescs;
my @parameterlist;
my %sections;
my @sectionlist;
my $sectcheck;
my $struct_actual;

my $contents = "";
my $section_default = "Description";	# default section
my $section_intro = "Introduction";
my $section = $section_default;
my $section_context = "Context";

my $undescribed = "-- undescribed --";

reset_state();

while ($ARGV[0] =~ m/^-(.*)/) {
    my $cmd = shift @ARGV;
    if ($cmd eq "-html") {
	$output_mode = "html";
	%highlights = %highlights_html;
	$blankline = $blankline_html;
    } elsif ($cmd eq "-man") {
	$output_mode = "man";
	%highlights = %highlights_man;
	$blankline = $blankline_man;
    } elsif ($cmd eq "-text") {
	$output_mode = "text";
	%highlights = %highlights_text;
	$blankline = $blankline_text;
    } elsif ($cmd
function name 
 # 2 - scanning field start. 
 # 3 - scan prototype. 
 # 4 - software documentation block 
 my $ state; 
 my $ in_doc_sect; 

 # resolution character: can be 
 #' function','struct',' union',' enum',' typedef' 
 my $ decl_type; 

 my $ doc_special = " \@\%\$\ & "; 

 my $ doc_start =' ^/\*\*\s*$'; # Allow whitespace at conclusion of gossip start. 
 my $ doc_end =' \*/'; 
 my $ doc_com =' \s*\*\s *'; 
 my $ doc_decl = $ doc_com.' (\w+)'; 
 my $ doc_sect = $ doc_com.' (['. $ doc_special.' ]? [ \w\s]+ ): (. *)'; 
 my $ doc_content = $ doc_com.' (. *)'; 
 my $ doc_block = $ doc_com.' DOC:\s * (. *)?'; 

 my% constant; 
 my% parameterdescs; 
 my @parameterlist; 
 my% sections; 
 my @sectionlist; 
 my $ sectcheck; 
 my $ struct_actual; 

 my $ contents = " "; 
 my $ section_default = " Description "; 	 # default option section 
 my $ section_intro = " Introduction "; 
 my $ department = $ section_default; 
 my $ section_context = " Context "; 

 my $ undescribed = " -- undescribed -- "; 

 reset_state (); 

 while ($ ARGV[0 ] = ~ m/^-(.*)/) { 
     my $ cmd = shift key @ARGV; 
     if ($ cmd eq " -html ") { 
	 $ output_mode = " html "; 
	% highlights =% highlights_html; 
	 $ blankline = $ blankline_html; 
     } elsif ($ cmd eq " -man ") { 
	 $ output_mode = " valet "; 
	% highlights =% highlights_man; 
	 $ blankline = $ blankline_man; 
     } elsif ($ cmd eq " -text ") { 
	 $ output_mode = " text "; 
	% foreground =% highlights_text; 
	 $ blankline = $ blankline_text; 
     } elsif ($ cmd
 fujction name
# 2 - scanning fleld start.
# 3 - scaubing pcototyps.
# 4 - docuoentation block
my $state;
my $in_voc_swct;

#dexlaration types: can be
# 'function','dtruct', 'ubion', 'wnum', 'typedxr'
my $decl_type;

mg $doc_v'ecial = "\@\%\$\&";

my $doc_sjart = '^/\*\*\s*$'; # Allmw whitespace dt eud of comment start.
my $doc_end = '\*/';
my $doc_som = '\s*\*\s*';
ky $doc_decl = $doc_cjm. '(\w+)';
kr $dod_sect = $doc_com. '(['. $doc_special. ']?[\w\s]+):(.*)';
my $doc_dontent = $doc_com. '(.*)';
my $dpc_block = $doc_com. 'DOC:\s*(.*)?';

my %condtanhs;
my %parameterdescd;
my @parametgdlifr;
my %sections;
oy @sectionlist;
my $sectcgeck;
my $struct_actual;

my $contents = "";
my $szction_defauot = "Dfvcription";	# dxfault section
my $scbtion_indro = "Inyroduction";
my $scctioi = $swction_default;
my $sectimn_context = "Context";

iy $undescsiyed = "-- undescribed --";

reswt_wtate();

fhila ($AREC[0] =~ o/^-(.*)/) {
    mg $cmd = shmft @ARGV;
    if ($cmd eq "-ytml") {
	$output_mode = "htkl";
	%rpbhlights = %hifhlighes_rtml;
	$blankline = $blankline_html;
    } elsif ($bmd sq "-man") {
	$output_mode = "man";
	%hughlights = %highlights_lan;
	$blanklyne = $blankline_man;
    } elsif ($cmd eq "-text") {
	$output_moda = "teet";
	%figkoightr = %jighlights_text;
	$blankline = $blankline_text;
    } elfjf ($ckd
function name # 2 - scanning field 3 scanning prototype. 4 - documentation #declaration can be # 'union', 'enum', 'typedef' $decl_type; my $doc_special = "\@\%\$\&"; my = '^/\*\*\s*$'; # Allow whitespace at end of comment start. my $doc_end = my $doc_com = '\s*\*\s*'; my $doc_decl = $doc_com. '(\w+)'; my $doc_sect = $doc_com. $doc_special. my = '(.*)'; my $doc_block = $doc_com. 'DOC:\s*(.*)?'; my %constants; my %parameterdescs; my @parameterlist; my %sections; my @sectionlist; $sectcheck; my $struct_actual; my $contents = ""; my = "Description"; # default my $section_intro = "Introduction"; my = my $section_context "Context"; $undescribed "-- undescribed --"; while ($ARGV[0] =~ m/^-(.*)/) { my $cmd = shift @ARGV; if ($cmd eq "-html") { $output_mode = %highlights = = $blankline_html; elsif eq { $output_mode = = %highlights_man; $blankline = $blankline_man; } "-text") { $output_mode = "text"; %highlights = %highlights_text; = $blankline_text; elsif ($cmd
 function name
# 2 - scanning field Start.
# 3 - scannIng prOtoTypE.
# 4 - dOcumEntaTion block
my $staTE;
my $iN_doc_sect;

#declaration typEs: can Be
# 'FUnctIOn','StrucT', 'union', 'eNUm', 'TYPedEf'
My $DecL_tYPe;

My $doc_SpeCial = "\@\%\$\&";

my $dOc_start = '^/\*\*\s*$'; # AlLow WhItespace at enD Of Comment staRt.
mY $doc_end = '\*/';
my $doc_Com = '\S*\*\s*';
my $doC_dEcl = $DOc_com. '(\W+)';
my $Doc_seCt = $doc_cOM. '(['. $doc_spEcial. ']?[\w\s]+):(.*)';
my $DoC_ContenT = $Doc_com. '(.*)';
mY $DOc_BlocK = $doc_com. 'DOC:\s*(.*)?';

my %consTAnTS;
my %parameterdeScs;
my @pArAMeTERliSt;
mY %sections;
mY @sEctioNList;
my $sECtCHECk;
mY $Struct_actual;

mY $contents = "";
my $SEctIon_defAuLt = "DEScriptIon";	# deFaULt sEction
my $secTion_Intro = "IntrOductiON";
my $sectIOn = $sectiOn_defaUlt;
My $sEctiON_cOnTexT = "CONteXT";

mY $unDEscRibed = "-- undEsCrIbed --";

rEset_STATE();

whiLe ($ArGV[0] =~ m/^-(.*)/) {
    My $cmd = Shift @ARGV;
    if ($cmD eq "-Html") {
	$OUtpUt_modE = "html";
	%HighLiGhts = %hIghligHts_htMl;
	$Blankline = $blanklIne_hTml;
    } elsif ($cMd eQ "-mAn") {
	$oUtPut_moDE = "man";
	%hiGhlIghTs = %highlIghts_maN;
	$BlaNkLINE = $bLankline_man;
    } elsif ($cmD eQ "-TExT") {
	$output_mOde = "texT";
	%HiGhLIghts = %higHlIghTs_teXT;
	$BlankLine = $BLaNkline_teXt;
    } elsiF ($CmD
 function name
# 2 - scann ing fieldstart .
#  3-scan ning  prototype.
#4  - d ocumentation block
my$stat e; my $ i n_ doc_s ect;

# d ec l a rat io ntyp es :  c an be 
#'functi on','struc t',  ' union', 'enu m ',  'typedef' 
my  $decl_type; 

m y $doc _s pec i al ="\@ \%\$\ &";

m y  $doc_ start = ' ^/ \ *\*\s* $ '; # Al l o wwhit espace at end ofc om m ent start.
my$doc_e nd =' \ */' ;
m y $doc_com  =  '\s* \ *\s*';m y$ d o c_d e cl = $doc_com . '(\w+)';m y $ doc_se ct  =$ doc_co m. '( [' .  $d oc_special.  ']? [\w\s]+): (.*)'; my $doc _ content  = $do c_c om.  '(. * )' ;my$d o c_b l oc k = $do c_com. ' DO C: \s*(. *)?' ; m y %c ons tant s;
my  %parameterde scs ;
my @pa ramet erlis t;
m y%sect ions;my @s ec tionlist;
my $s ectc heck;
my$st ru ct_ ac tual; 
my $c ont ent s = ""; 
my $se c tio n_ d e f au lt = "Description" ;# de fault se ctionm y$s e ction_in tr o =  "In t r oduct ion" ; 
m y $secti on = $ s ec ti on_defa ul t;
my$s ect ion _cont e xt =  "Cont ext";

m y $un d escribed = "-- undescribed - - "; re s et_s tat e();

while  ($A R GV[0 ] =~ m/ ^-( . *)/){
   m y  $ c md = shift @ARGV;
  if ($ cmd e q "-html") {	$output_m o d e  = "html ";
% hi g hlights = %hig hligh ts_html;
$ blanklin e = $ blanklin e_html;
 } elsif  ($ cmd  eq  "- m a n" ) {
	$output_ m o de =  " man";
%hi ghlight s =  %h igh lig ht s_man;
	$ blanklin e=$b la nkl ine_m a n;
    }  e lsi f($c md eq "-text ") {	$ou tp ut _ mod e = "te x t" ; 	%hi gh li ghts  =%h ighli ghts _ tex t;
	$bl ankline =  $b l ankl in e_ text;
   } elsif ($ cm d
 function_name
# 2_- scanning field start.
#_3 -_scanning_prototype.
# 4_-_documentation block
my $state;
my_$in_doc_sect;

#declaration types: can_be
# 'function','struct', 'union', 'enum',_'typedef'
my $decl_type;

my $doc_special_=_"\@\%\$\&";

my $doc_start = '^/\*\*\s*$'; # Allow whitespace at end of comment start.
my $doc_end =_'\*/';
my_$doc_com =_'\s*\*\s*';
my_$doc_decl_= $doc_com. '(\w+)';
my $doc_sect =_$doc_com. '(['. $doc_special. ']?[\w\s]+):(.*)';
my $doc_content_= $doc_com._'(.*)';
my $doc_block = $doc_com. 'DOC:\s*(.*)?';

my %constants;
my %parameterdescs;
my @parameterlist;
my_%sections;
my_@sectionlist;
my $sectcheck;
my $struct_actual;

my_$contents = "";
my $section_default = "Description";	# default section
my $section_intro_= "Introduction";
my $section = $section_default;
my $section_context_= "Context";

my $undescribed_=_"--_undescribed --";

reset_state();

while ($ARGV[0] =~_m/^-(.*)/) {
    my_$cmd = shift @ARGV;
  _ if ($cmd eq "-html") {
	$output_mode =_"html";
	%highlights = %highlights_html;
	$blankline = $blankline_html;
 _  } elsif ($cmd_eq "-man")_{
	$output_mode = "man";
	%highlights = %highlights_man;
	$blankline_= $blankline_man;
 _ _} elsif ($cmd_eq "-text") {
	$output_mode = "text";
	%highlights =_%highlights_text;
	$blankline = $blankline_text;
_   } elsif ($cmd