diff options
author | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 1999-02-02 14:43:42 +0000 |
---|---|---|
committer | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 1999-02-02 14:43:42 +0000 |
commit | 9ad489fb7548847678024900b2264e3d8c6b9a42 (patch) | |
tree | a5d20438e2af59b0c7162b2172eeb72b14a3b209 | |
parent | cb0cb71e8b484344496bbfa028fae0bbd3263ad3 (diff) |
Now gives an error when no description is specified for a schedule block.
Fixes to get STARTUP working.
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@182 17b73243-c579-4c4c-a9d2-2d5706c11dac
-rw-r--r-- | lib/sbin/schedule_parser.pl | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/lib/sbin/schedule_parser.pl b/lib/sbin/schedule_parser.pl index 0a041b8a..41e800e8 100644 --- a/lib/sbin/schedule_parser.pl +++ b/lib/sbin/schedule_parser.pl @@ -53,7 +53,9 @@ sub create_schedule_code $rfr_files .= " $thorn_rfr"; $startup_files .= " $thorn_startup"; - &parse_schedule_ccl($thorn,"startup",@indata); + ($proto,$out,@wrappers) = &parse_schedule_ccl($thorn,"startup",@indata); + print OUTSTART $proto; + print OUTSTART $out; # The footer for the thorn RFR routine print OUTRFR "}\n"; @@ -274,10 +276,19 @@ sub find_schedule_block for ($i=$line_number+1; $i<@data; $i++) { $line = @data[$i]; - if ($line =~ m/\s*}\s*\"(.*)\"\s*/) + if ($line =~ m/\}/) { + $line =~ m/\s*\}\s*\"(.*)\"\s*/; $line_number = $i; - $desc = "\"$1\""; + if($1) + { + $desc = "\"$1\""; + } + else + { + print STDERR "No description listed for routine '$routine' registered at '$rfr_entry'\n"; + $desc = "Please write a description of what this routine does."; + } return ($routine,$rfr_entry,$desc,@block); } else @@ -306,17 +317,23 @@ sub parse_schedule_block { local($thorn,$type,@data)=@_; local($proto,$out); + local($wrapper_file, $proto, $out); + + $wrapper_file = ""; + $proto = ""; + $out = ""; ($routine,$when,$desc,@block) = &find_schedule_block(@data); # At the moment can schedule at RFR entry points of at STARTUP if ($type eq "startup" && $when eq "STARTUP") { - $out = &parse_schedule_at_STARTUP($thorn,$routine,$desc,@block); - return ; + ($wrapper_file, $proto, $out) = &parse_schedule_at_STARTUP($thorn,$routine,$desc,@block); } elsif ($type eq "rfr" && $when ne "STARTUP") { ($wrapper_file,$proto,$out) = &parse_schedule_at_RFR($thorn,$routine,$when,$desc,@block); - return ($wrapper_file,$proto,$out); } + + return ($wrapper_file,$proto,$out); + } sub parse_schedule_at_STARTUP { @@ -326,7 +343,7 @@ sub parse_schedule_at_STARTUP { $out .= " $routine();\n"; - return $out; + return ("", "", $out); } |