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.18 by root, Tue Mar 25 01:46:36 2008 UTC vs.
Revision 1.19 by root, Tue Mar 25 02:12:35 2008 UTC

38 38
39 return 1 unless @path; 39 return 1 unless @path;
40 40
41 my $kw = lc pop @path; 41 my $kw = lc pop @path;
42 42
43 $node = $node->{parent} 43 $node = $node->[N_PARENT]
44 or return 0; 44 or return 0;
45 45
46 return scalar grep $_ eq $kw, @{ $node->{kw} }; 46 return scalar grep $_ eq $kw, @{ $node->[N_KW] };
47} 47}
48 48
49sub find(@) { 49sub find(@) {
50 my (@path) = @_; 50 my (@path) = @_;
51 51
65 my ($node) = @_; 65 my ($node) = @_;
66 66
67 my @path; 67 my @path;
68 68
69 # skip toplevel hierarchy pod/, because its not a document 69 # skip toplevel hierarchy pod/, because its not a document
70 while ($node->{parent}) { 70 while ($node->[N_PARENT]) {
71 unshift @path, $node; 71 unshift @path, $node;
72 $node = $node->{parent}; 72 $node = $node->[N_PARENT];
73 } 73 }
74 74
75 @path 75 @path
76} 76}
77 77
78sub full_path($) { 78sub full_path($) {
79 join "/", map $_->{kw}[0], &full_path_of 79 join "/", map $_->[N_KW][0], &full_path_of
80} 80}
81 81
82sub section_of($) { 82sub section_of($) {
83 my ($node) = @_; 83 my ($node) = @_;
84 84
85 my $doc = $node->{doc}; 85 my $doc = $node->[N_DOC];
86 my $par = $node->{par}; 86 my $par = $node->[N_PAR];
87 my $lvl = $node->{level}; 87 my $lvl = $node->[N_LEVEL];
88 88
89 my @res; 89 my @res;
90 90
91 do { 91 do {
92 my $p = $doc->[$par]; 92 my $p = $doc->[$par];

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines