Click here to get back home

text-chm

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
text-chm tlviewer 05-06-2005
---> Re: text-chm Jean-Louis MORE...05-08-2005
Posted by tlviewer on May 6, 2005, 10:53 pm
Please log in for more thread options


hello,

Using Perl 5.8.1
Win2k sp4

I tried to build Text-CHM using VS6, sp5.
Homepage for the module is here
http://digilander.libero.it/bash/text-chm/

I get fatal errors. I have emailed the author
my error log.

I managed to build pychm in the same env., which
also is based on CHMLIB.

Anyone succeeded, or knows another way to read the
CHM central directory with Perl?

regards,
tlviewer


Posted by Sisyphus on May 7, 2005, 7:09 pm
Please log in for more thread options




>I get fatal errors. I have emailed the author
>my error log.

If you post those fatal errors here, someone might be able to offer some
advice regarding them.

Cheers,
Rob




Posted by Jean-Louis MOREL on May 8, 2005, 11:17 am
Please log in for more thread options


tlviewerSHRUB@yahooCHENEY.com a dit...
>
>hello,
>
>Using Perl 5.8.1
> Win2k sp4
>
>I tried to build Text-CHM using VS6, sp5.
>Homepage for the module is here
>http://digilander.libero.it/bash/text-chm/
>
>I get fatal errors. I have emailed the author
>my error log.
>

Apply the following patch to CHM.xs:

--- CHM.xs.orig        Mon Mar 07 21:48:52 2005
+++ CHM.xs        Sun May 08 11:14:20 2005
@@ -6,6 +6,10 @@

#include <string.h>

+#ifdef WIN32
+#define strncasecmp _strnicmp
+#endif
+
/* Including the chm header */
#include <chm_lib.h>

@@ -359,7 +363,7 @@
get_object( self, objname )
ChmObj * self;
char * objname;
- INIT:
+ PREINIT:
unsigned char * buf;
size_t len;
PPCODE:
@@ -370,7 +374,7 @@
void *
get_filelist( self )
ChmObj * self;
- INIT:
+ PREINIT:
struct ChmObjData *contents = NULL;
HV * hash;
PPCODE:


No compilation error with VisualC++ 6.0 + Service Pack 6.
You can find Text::CHM in my ppm repository:

http://www.bribes.org/perl/ppmdir.html

for Perl5.6 and Perl5.8

You can install it with the command

ppm install http://www.bribes.org/perl/ppm/Text-CHM.ppd

in a DOS console.

HTH

--
J-L.M.
http://www.bribes.org/perl



Posted by tlviewer on May 23, 2005, 9:01 pm
Please log in for more thread options


hello again,

Your PPD did the trick--thanks.

One of the first CHM files I tried it on had a corrupted #STRINGS file,
leading to a Dr. Watson. What I didn't realize was that this module
doesn't correctly give you the central directory, but instead, dumps
the #STRINGS file. This is not the ideal way.

Any CHM that has a valid #STRINGS will work fine. However, the one CHM
virus that I tried to open had the corrupted variety.

thanks again for the PPD and VC patches,
tlviewer



Posted by Sisyphus on May 8, 2005, 1:02 pm
Please log in for more thread options




Anyone succeeded, or knows another way to read the
CHM central directory with Perl?

-----------------------------------

The module builds ok with mingw-built perl. I could send you a ppm if you
want - it should also work fine with your perl.

Cheers,
Rob





Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap