ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/DC/Pod.pm
(Generate patch)

Comparing deliantra/Deliantra-Client/DC/Pod.pm (file contents):
Revision 1.19 by root, Tue Mar 25 02:12:35 2008 UTC vs.
Revision 1.21 by root, Sun Mar 30 10:18:16 2008 UTC

25sub P_INDENT (){ 0 } 25sub P_INDENT (){ 0 }
26sub P_LEVEL (){ 1 } 26sub P_LEVEL (){ 1 }
27sub P_MARKUP (){ 2 } 27sub P_MARKUP (){ 2 }
28sub P_INDEX (){ 3 } 28sub P_INDEX (){ 3 }
29 29
30*wiki = Storable::retrieve DC::find_rcfile "docwiki.pst"; 30our %wiki;
31
32sub load_docwiki {
33 *wiki = Storable::retrieve $_[0];
34}
31 35
32sub goto_document($) { 36sub goto_document($) {
33 $goto_document->(split /\//, $_[0]); 37 $goto_document->(split /\//, $_[0]);
34} 38}
35 39
41 my $kw = lc pop @path; 45 my $kw = lc pop @path;
42 46
43 $node = $node->[N_PARENT] 47 $node = $node->[N_PARENT]
44 or return 0; 48 or return 0;
45 49
50 #TODO: maybe get rid of lowercasing?
46 return scalar grep $_ eq $kw, @{ $node->[N_KW] }; 51 return scalar grep lc eq $kw, @{ $node->[N_KW] };
47} 52}
48 53
49sub find(@) { 54sub find(@) {
50 my (@path) = @_; 55 my (@path) = @_;
51 56

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines