validator/httpd/cgi-bin check,1.305.2.112,1.305.2.113

Update of /sources/public/validator/httpd/cgi-bin
In directory hutz:/tmp/cvs-serv16215

Modified Files:
      Tag: validator-0_6_0-branch
	check 
Log Message:
Workaround for onsgmls 1.5 sometimes reporting errors beyond EOL (bug 715).

Index: check
===================================================================
RCS file: /sources/public/validator/httpd/cgi-bin/check,v
retrieving revision 1.305.2.112
retrieving revision 1.305.2.113
diff -u -d -r1.305.2.112 -r1.305.2.113
--- check	8 May 2004 19:16:44 -0000	1.305.2.112
+++ check	15 May 2004 06:58:10 -0000	1.305.2.113
@@ -1709,6 +1709,10 @@
     $err->{src}  = $errors[1];
     $err->{line} = $errors[2];
     $err->{char} = $errors[3];
+    # Workaround for onsgmls 1.5 sometimes reporting errors beyond EOL.
+    if ((my $l = length($File->{Content}->[$err->{line}-1])) < $err->{char}) {
+      $err->{char} = $l;
+    }
     $err->{num}  = $errors[4] || '';
     $err->{type} = $errors[5] || '';
     if ($err->{type} eq 'E' or $err->{type} eq 'X' or $err->{type} eq 'Q') {

Received on Saturday, 15 May 2004 03:00:14 UTC