line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# |
2
|
|
|
|
|
|
|
# bibliography package for Perl |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
# ISO-8859-1 character set. |
5
|
|
|
|
|
|
|
# |
6
|
|
|
|
|
|
|
# This is really easy since this is the canonical character set, with the |
7
|
|
|
|
|
|
|
# exception of the escape character. |
8
|
|
|
|
|
|
|
# |
9
|
|
|
|
|
|
|
# Dana Jacobsen (dana@acm.org) |
10
|
|
|
|
|
|
|
# 18 November 1995 |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
package bp_cs_88591; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
###### |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
$bib'charsets{'8859-1', 'i_name'} = '8859-1'; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
$bib'charsets{'8859-1', 'tocanon'} = "bp_cs_88591'tocanon"; |
19
|
|
|
|
|
|
|
$bib'charsets{'8859-1', 'fromcanon'} = "bp_cs_88591'fromcanon"; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
$bib'charsets{'8859-1', 'toesc'} = "[\000]"; # we'd prefer to never call it |
22
|
|
|
|
|
|
|
$bib'charsets{'8859-1', 'fromesc'} = "${bib'cs_ext}|${bib'cs_meta}"; |
23
|
|
|
|
|
|
|
###### |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
##################### |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub tocanon { |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
# We're eight bit ISO-8859-1, so there isn't anything for us to do. |
31
|
|
|
|
|
|
|
# We assume here that the escape character is already done. |
32
|
|
|
|
|
|
|
|
33
|
0
|
|
|
0
|
|
|
$_[0]; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
###### |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub fromcanon { |
39
|
0
|
|
|
0
|
|
|
local($_, $protect) = @_; |
40
|
0
|
|
|
|
|
|
local($repl, $unicode, $can); |
41
|
|
|
|
|
|
|
|
42
|
0
|
0
|
|
|
|
|
return $_ unless /$bib'cs_escape/o; |
43
|
|
|
|
|
|
|
|
44
|
0
|
|
|
|
|
|
1 while s/${bib'cs_ext}00(..)/&bib'unicode_to_canon('00'.$1)/ge; |
|
0
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
|
46
|
0
|
|
|
|
|
|
while (/${bib'cs_ext}(....)/) { |
47
|
0
|
|
|
|
|
|
$unicode = $1; |
48
|
0
|
|
|
|
|
|
$can = &bib'unicode_approx($unicode); |
49
|
0
|
0
|
0
|
|
|
|
defined $can && s/$bib'cs_ext$unicode/$can/g && next; |
50
|
0
|
|
|
|
|
|
&bib'gotwarn("Can't convert ".&bib'unicode_name($unicode)." to ISO-8859-1"); |
51
|
0
|
|
|
|
|
|
s/${bib'cs_ext}$unicode//g; |
52
|
|
|
|
|
|
|
} |
53
|
0
|
|
|
|
|
|
while (/${bib'cs_meta}(....)/) { |
54
|
0
|
|
|
|
|
|
$repl = $1; |
55
|
0
|
|
|
|
|
|
$can = &bib'meta_approx($repl); |
56
|
0
|
0
|
0
|
|
|
|
defined $can && s/$bib'cs_meta$repl/$can/g && next; |
57
|
0
|
|
|
|
|
|
&bib'gotwarn("Can't convert ".&bib'meta_name($repl)." to ISO-8859-1"); |
58
|
0
|
|
|
|
|
|
s/${bib'cs_meta}$repl//g; |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
|
61
|
0
|
|
|
|
|
|
$_; |
62
|
|
|
|
|
|
|
} |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
####################### |
65
|
|
|
|
|
|
|
# end of package |
66
|
|
|
|
|
|
|
####################### |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
1; |