/[global]/global/htags/global.cgi.tmpl.in
ViewVC logotype

Diff of /global/htags/global.cgi.tmpl.in

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.11 by h-iwamoto, Mon Nov 7 16:30:39 2005 UTC revision 1.12 by h-iwamoto, Tue Nov 8 17:22:43 2005 UTC
# Line 89  if ($form{'id'}) { Line 89  if ($form{'id'}) {
89                  exit 0;                  exit 0;
90          }          }
91  }  }
92  if ($flag eq 'g' || $flag eq 'I' || $form{'type'} eq 'source') {  if ($flag eq 'g' || $flag eq 'I') {
93          if (($flag eq 'g' && ! -f "../../GTAGS")          if (($flag eq 'g' && ! -f "../../GTAGS")
94           || ($flag eq 'I' && ! -f "../../ID")           || ($flag eq 'I' && ! -f "../../ID")) {
          || ($form{'type'} eq 'source' && ! -f "../../GTAGS")) {  
95                  print "@error_begin@Error@error_end@\n";                  print "@error_begin@Error@error_end@\n";
96                  print "@message_begin@Couldn't execute command. <a href='$htmlbase/mains.@normal_suffix@'>[return]</a>@message_end@\n";                  print "@message_begin@Couldn't execute command. <a href='$htmlbase/mains.@normal_suffix@'>[return]</a>@message_end@\n";
97                  print "@body_end@\n";                  print "@body_end@\n";
# Line 114  if ($flag eq 'g' || $flag eq 'I' || $for Line 113  if ($flag eq 'g' || $flag eq 'I' || $for
113          }          }
114  }  }
115  local(%ctab) = ('&', '&amp;', '<', '&lt;', '>', '&gt;');  local(%ctab) = ('&', '&amp;', '<', '&lt;', '>', '&gt;');
 if ($form{'type'} eq 'source') {  
         open(PIPE, "-|") || exec '@gtagspath@', '--secure', '--expand', '-@tabs@', './'.$pattern;  
         if ($?) {        
                 print "@error_begin@Error@error_end@\n";  
                 print "@message_begin@Cannot execute gtags. <a href='$htmlbase/mains.@normal_suffix@'>[return]</a>@message_end@\n";  
                 print "@body_end@\n";  
                 print "@page_end@\n";  
                 exit 0;  
         }  
         print "@verbatim_begin@\n";  
         while (<PIPE>) {  
                 s/([&<>])/$ctab{$1}/ge;  
                 print "@lineno_anchor@";  
                 print;  
         }  
         close(PIPE);  
         print "@verbatim_end@\n";  
         print "@body_end@\n";  
         print "@page_end@\n";  
         exit 0;  
 }  
116  #  #
117  # fork and exec global(1) to avoid command substitutions in $pattern.  # fork and exec global(1) to avoid command substitutions in $pattern.
118  #  #

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26