File: gdoc-error

package info (click to toggle)
shishi 0.0.37-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 19,428 kB
  • ctags: 7,107
  • sloc: ansic: 51,676; xml: 18,621; sh: 10,909; yacc: 1,227; makefile: 1,102; perl: 634; sed: 16
file content (42 lines) | stat: -rwxr-xr-x 1,195 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/perl

# Copyright (C) 2002, 2004 Simon Josefsson.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This file is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this file; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA

# I consider the output of this program to be unrestricted.  Use it as
# you will.

use strict;

my ($inerror);
my ($label, $txt);

while (<>) {
    if ($inerror) {
	$txt .= $1 if (m,"(.*)",);
	$inerror = 0 if m/},/;
	if (!$inerror) {
	    print "\@item $label\n";
	    print $txt, "\n\n";
	}
    } else {
	next unless m/{(SHISHI.*),/;
	next if $1 =~ m,SHISHI_OK,; # Handled separately.
	$inerror = 1;
	$label = $1;
	$txt = "";
    }
}