--- index.cgi.orig Mon Apr 10 17:48:18 2000 +++ index.cgi Tue Apr 11 22:59:10 2000 @@ -42,8 +42,14 @@ 'HOSU', " %value歩", ); -require './config.ph'; #設定ファイルです。 +require './config.ph'; + +BEGIN { + $| = 1; + # Server ErrorをBrowserから見えるようにするテクノロジー + $SIG{'__DIE__'} = \&die_handler; +} if ($use_onccnv) { # HTML to ONCコンバータ使用 require './onccnv.pl'; @@ -644,7 +650,7 @@ $grp = 1; # grp mode on } - if (/^NEW\s(.+)/ or /^LNEW\s\S+\s(.+)/){ + if (/^NEW\s+(.+)/ or /^LNEW\s\S+\s+(.+)/ or /^RLNEW\s\S+\s+\S+\s+(.+)/){ if ($grp == 1) { # GRPの内部は非表示にする $grp = 2; @@ -659,7 +665,7 @@ #$out .= "
  • $t:\n" unless ($grp); $out .= "$newmark$newcount:$new1$t$new2\n" unless ($grp); # listingをやめた - } elsif (/^SUB\s(.+)/ or /^LSUB\s\S+\s(.+)/) { + } elsif (/^SUB\s+(.+)/ or /^LSUB\s+\S+\s+(.+)/ or /^RLSUB\s+\S+\s+\S+\s+(.+)/) { my $t = &html_escape($1); $out .= "$t \n" unless ($grp); } @@ -1454,6 +1460,18 @@ return 0; } +# dieをフックしてメッセージを表示する +sub die_handler { + my $msg = shift; + if ($msg !~ /unimplemented/ && + $msg !~ /eval/){ + print "content-type: text/html\n\n"; + print "
    "; + print qq(Error Occured: $msg
    ); + } +} + + # i system history # yns(1999/9) > mns(1999/10) > mns for iMODE(2000/1) > i system(2000/2) # yns: yar-3 nikki system @@ -1504,8 +1522,6 @@ # # thanks 2 all users. # 1999,2000,2001 (C)yar-3 All rights reserved. - -