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"; |
113 |
} |
} |
114 |
} |
} |
115 |
local(%ctab) = ('&', '&', '<', '<', '>', '>'); |
local(%ctab) = ('&', '&', '<', '<', '>', '>'); |
|
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 |
# |
# |