--- loncom/build/lpml_parse.pl 2001/12/07 04:45:16 1.29 +++ loncom/build/lpml_parse.pl 2001/12/15 20:20:11 1.32 @@ -3,7 +3,7 @@ # The LearningOnline Network with CAPA # lpml_parse.pl - Linux Packaging Markup Language parser # -# $Id: lpml_parse.pl,v 1.29 2001/12/07 04:45:16 harris41 Exp $ +# $Id: lpml_parse.pl,v 1.32 2001/12/15 20:20:11 harris41 Exp $ # # Written by Scott Harrison, harris41@msu.edu # @@ -35,7 +35,7 @@ # 9/5/2001,9/6,9/7,9/8 - Scott Harrison # 9/17,9/18 - Scott Harrison # 11/4,11/5,11/6,11/7,11/16,11/17 - Scott Harrison -# 12/2,12/3,12/4,12/5,12/6 - Scott Harrison +# 12/2,12/3,12/4,12/5,12/6,12/13 - Scott Harrison # ### @@ -298,6 +298,8 @@ $parser->xml_mode('1'); # Define handling methods for mode-dependent text rendering $parser->{textify}={ + specialnotices => \&format_specialnotices, + specialnotice => \&format_specialnotice, targetroot => \&format_targetroot, sourceroot => \&format_sourceroot, categories => \&format_categories, @@ -399,9 +401,12 @@ sub end { "". "". "". + "". + "". join("\n",(map {"". - ""} + "". + ""} @categorynamelist)). "
File Category Count
IconNameNumber of OccurrencesNumber of Incorrect Counts
$_$categorycount{$_}
$_$categorycount{$_}
". "\n"; @@ -887,7 +892,7 @@ sub format_directory { my ($chmod,$chown)=split(/\s/,$categoryhash{$categoryname}); return $directory="\n". "$categoryname". - " ". + " ". "$chmod
$chown". "$thtml". "". @@ -1061,7 +1066,7 @@ sub format_file { if ($mode eq 'html') { return ($file="\n". "". - " ". @@ -1192,7 +1197,7 @@ sub format_link { $categorycount{$categoryname}++; push @links,("\n". "". - " ". "get_tag('/fileglob'); if ($mode eq 'html') { return $fileglob="\n". - " ". @@ -1285,9 +1290,13 @@ sub format_fileglob { # "\nEND FILEGLOB"; } elsif ($mode eq 'install') { + my $eglob=$glob; + if ($glob eq '*') { + $eglob='[^C][^V][^S]'.$glob; + } return "\t".'install '. $categoryhash{$categoryname}.' '. - $sourceroot.'/'.$sourcedir.'[^C][^V][^S]'.$glob.' '. + $sourceroot.'/'.$sourcedir.$eglob.' '. $targetroot.'/'.$targetdir.'.'."\n"; } else { @@ -1423,6 +1432,16 @@ sub format_filenames { } return ''; } +# ------------------------------------------------ Format specialnotice section +sub format_specialnotices { + $parser->get_tag('/specialnotices'); + return ''; +} +# ------------------------------------------------ Format specialnotice section +sub format_specialnotice { + $parser->get_tag('/specialnotice'); + return ''; +} # ------------------------------------------------------- Format linkto section sub format_linkto { my @tokeninfo=@_;