ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cfmaps/cfmapidx
(Generate patch)

Comparing cfmaps/cfmapidx (file contents):
Revision 1.7 by root, Wed Feb 14 03:26:55 2007 UTC vs.
Revision 1.8 by root, Thu Jun 21 12:30:10 2007 UTC

17# along with cfmaps; if not, write to the Free Software 17# along with cfmaps; if not, write to the Free Software
18# Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18# Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 19
20our $VERSION = '0.912'; 20our $VERSION = '0.912';
21 21
22use Storable; 22use Crossfire;
23use DB_File; 23use DB_File;
24 24
25sub escape_html($) { 25sub escape_html($) {
26 local $_ = shift; 26 local $_ = shift;
27 s/([<>&])/sprintf "&#%d;", ord $1/ge; 27 s/([<>&])/sprintf "&#%d;", ord $1/ge;
91 91
92 for my $path (@ARGV) { 92 for my $path (@ARGV) {
93 (my $base = $path) =~ s/\.map$//; 93 (my $base = $path) =~ s/\.map$//;
94 my $docnum = pack "n", ++$idx{Vdocnum}; 94 my $docnum = pack "n", ++$idx{Vdocnum};
95 $idx{"D$docnum"} = $base; 95 $idx{"D$docnum"} = $base;
96 my $meta = Storable::retrieve "$base.pst"; 96 my $meta = read_arch "$base.map";
97 97
98 for my $x (0 .. $meta->{width} - 1) { 98 for my $x (0 .. $meta->{width} - 1) {
99 for my $y (0 .. $meta->{height} - 1) { 99 for my $y (0 .. $meta->{height} - 1) {
100 for my $a (@{ $meta->{map}[$x][$y] }) { 100 for my $a (@{ $meta->{map}[$x][$y] }) {
101 for my $v (values %$a) { 101 for my $v (values %$a) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines