validator/httpd/cgi-bin check,1.685,1.686

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

Modified Files:
	check 
Log Message:
Code cleanups.

Index: check
===================================================================
RCS file: /sources/public/validator/httpd/cgi-bin/check,v
retrieving revision 1.685
retrieving revision 1.686
diff -u -d -r1.685 -r1.686
--- check	5 Sep 2009 11:45:16 -0000	1.685
+++ check	5 Sep 2009 12:07:36 -0000	1.686
@@ -413,18 +413,18 @@
 
 #
 # Set session switches.
-$File->{Opt}->{'Outline'}        = $q->param('outline') ? TRUE                   :  FALSE;
-$File->{Opt}->{'Show Source'}    = $q->param('ss')      ? TRUE                   :  FALSE;
-$File->{Opt}->{'Show Tidy'}      = $q->param('st')      ? TRUE                   :  FALSE;
-$File->{Opt}->{'Verbose'}        = $q->param('verbose') ? TRUE                   :  FALSE;
-$File->{Opt}->{'Group Errors'}   = $q->param('group') ? TRUE                   :  FALSE;
-$File->{Opt}->{'Debug'}          = $q->param('debug')   ? TRUE                   :  FALSE;
-$File->{Opt}->{'No200'}          = $q->param('No200')   ? TRUE                   :  FALSE;
-$File->{Opt}->{'Charset'}        = $q->param('charset') ? lc $q->param('charset'):     '';
-$File->{Opt}->{'DOCTYPE'}        = $q->param('doctype') ? $q->param('doctype')   :     '';
-$File->{Opt}->{'Output'}         = $q->param('output')  ? $q->param('output')    : 'html';
-$File->{Opt}->{'Prefill'}        = $q->param('prefill') ? TRUE                   :  FALSE;
-$File->{Opt}->{'Prefill Doctype'}        = $q->param('prefill_doctype') ? $q->param('prefill_doctype')   :     'html401';
+$File->{Opt}->{'Outline'}         = $q->param('outline') ? TRUE  :  FALSE;
+$File->{Opt}->{'Show Source'}     = $q->param('ss')      ? TRUE  :  FALSE;
+$File->{Opt}->{'Show Tidy'}       = $q->param('st')      ? TRUE  :  FALSE;
+$File->{Opt}->{'Verbose'}         = $q->param('verbose') ? TRUE  :  FALSE;
+$File->{Opt}->{'Group Errors'}    = $q->param('group')   ? TRUE  :  FALSE;
+$File->{Opt}->{'Debug'}           = $q->param('debug')   ? TRUE  :  FALSE;
+$File->{Opt}->{'No200'}           = $q->param('No200')   ? TRUE  :  FALSE;
+$File->{Opt}->{'Prefill'}         = $q->param('prefill') ? TRUE  :  FALSE;
+$File->{Opt}->{'Prefill Doctype'} = $q->param('prefill_doctype') || 'html401';
+$File->{Opt}->{'Charset'}         = lc($q->param('charset')      || '');
+$File->{Opt}->{'DOCTYPE'}         = $q->param('doctype')         || '';
+$File->{Opt}->{'Output'}          = $q->param('output')          || 'html';
 
 $File->{Opt}->{'User Agent'} = $q->param('user-agent') && $q->param('user-agent') ne 1 ? $q->param('user-agent') : "W3C_Validator/$VERSION";
 $File->{Opt}->{'User Agent'} =~ tr/\x00-\x09\x0b\x0c-\x1f//d;
@@ -434,12 +434,11 @@
 }
 
 
-$File->{Opt}->{'Accept Header'} = $q->param('accept') ? $q->param('accept') : '';
-$File->{Opt}->{'Accept Header'} =~ tr/\x00-\x09\x0b\x0c-\x1f//d;
-$File->{Opt}->{'Accept-Language Header'} = $q->param('accept-language') ? $q->param('accept-language') : '';
-$File->{Opt}->{'Accept-Language Header'} =~ tr/\x00-\x09\x0b\x0c-\x1f//d;
-$File->{Opt}->{'Accept-Charset Header'} = $q->param('accept-charset') ? $q->param('accept-charset') : '';
-$File->{Opt}->{'Accept-Charset Header'} =~ tr/\x00-\x09\x0b\x0c-\x1f//d;
+$File->{Opt}->{'Accept Header'}          = $q->param('accept')          || '';
+$File->{Opt}->{'Accept-Language Header'} = $q->param('accept-language') || '';
+$File->{Opt}->{'Accept-Charset Header'}  = $q->param('accept-charset')  || '';
+$File->{Opt}->{$_} =~ tr/\x00-\x09\x0b\x0c-\x1f//d
+  for ('Accept Header', 'Accept-Language Header', 'Accept-Charset Header');
 
 #
 # "Fallback" info for Character Encoding (fbc), Content-Type (fbt),
@@ -1343,12 +1342,12 @@
 
   #
   # Output options...
-  $T->param(opt_show_source    => $File->{Opt}->{'Show Source'});
+  $T->param(opt_show_source  => $File->{Opt}->{'Show Source'});
   $T->param(opt_show_tidy    => $File->{Opt}->{'Show Tidy'});
-  $T->param(opt_show_outline   => $File->{Opt}->{'Outline'});
-  $T->param(opt_verbose        => $File->{Opt}->{'Verbose'});
-  $T->param(opt_group_errors        => $File->{Opt}->{'Group Errors'});
-  $T->param(opt_no200          => $File->{Opt}->{'No200'});
+  $T->param(opt_show_outline => $File->{Opt}->{'Outline'});
+  $T->param(opt_verbose      => $File->{Opt}->{'Verbose'});
+  $T->param(opt_group_errors => $File->{Opt}->{'Group Errors'});
+  $T->param(opt_no200        => $File->{Opt}->{'No200'});
 
   #
   # Tip of the Day...

Received on Saturday, 5 September 2009 12:07:48 UTC