-###RUN_PERL: #!/usr/bin/perl
+#!/usr/bin/perl
# update.pl is generated from update.1.pl.
#
use Encode::Locale ('decode_argv');
use Encode ('encode', 'decode');
-###PERL_LIB: use lib /botm/lib/bsta
+use lib '/botm/lib/test-bsta';
use botm_common (
'read_data_file',
'join_path'
use bsta_lib (
'STATE',
'ong',
- 'write_index', 'write_static_viewer_page'
+ 'write_index', 'write_static_viewer_page', 'write_static_goto'
);
###PERL_PATH_SEPARATOR: PATH_SEPARATOR = /
my %all_frame_data = ();
my %all_words_data = ();
+my $update_goto = 0;
+
my $ong_state = int($state{'state'});
my $last_frame = ($ong_state > STATE->{'inactive'}) ?
int($state{'last'}) :
foreach my $id (@ARGV) {
if ($id eq 'all') {
+ $update_goto = 1;
push @list, 'i';
push @list, 'c';
for (my $f=0; $f<=$last_frame; $f+=1) {
}
}
elsif ($id =~ /^[0-9]+$/) {
+ $update_goto = 1;
my $f = int($&);
if ($f <= $last_frame) {
push @list, $f
}
make_static_pages($id);
}
+if ($update_goto) {
+ print 'static GOTO';
+ my $r = write_static_goto(
+ \%state,
+ \%settings,
+ '' # \%goto_list
+ );
+ if ($r) {
+ print " OK\n";
+ }
+ else {
+ print " FAIL\n";
+ $fail += 1;
+ }
+}
+
print "\n";
return;
}
my $f = int($id);
- unless (($f >= 0) && ($f <= $last_frame)) {
+ unless (
+ ($f >= 0) && (
+ ($f < $last_frame-1) || (
+ ($ong_state >= STATE->{'ready'}) &&
+ ($f <= $last_frame-1)
+ ) || (
+ ($ong_state >= STATE->{'end'}) &&
+ ($f <= $last_frame)
+ )
+ )
+ ) {
return;
}
my $r;