[sword-devel] IMAGES in SWORD

Joachim Ansorg sword-devel@crosswire.org
Mon, 4 Mar 2002 21:38:51 +0100

> Ok, there is now a check to be sure buf ends in '/' before skipping the
> '/' at the beginning of the image url.

Won't compile on ym box :)
/bin/sh ../libtool --mode=compile g++  -DUNIX  -I. -I. -I.. -I../include    
-g -O2 -Werror -c -o thmlhtml.lo `
test -f ../src/modules/filters/thmlhtml.cpp || echo 
g++ -DUNIX -I. -I. -I.. -I../include -g -O2 -Werror -c 
../src/modules/filters/thmlhtml.cpp -Wp,-MD,.deps/thmlh
../src/modules/filters/thmlhtml.cpp: In method `bool 
ThMLHTML::handleToken(char **, const char *, map<basic_st
<true,0> > 
> > > &)':
../src/modules/filters/thmlhtml.cpp:192: ANSI C++ forbids comparison between 
pointer and integer
make[2]: *** [thmlhtml.lo] Error 1
make[2]: Leaving directory `/work/devel/cvs/anonsword/sword/lib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/work/devel/cvs/anonsword/sword'
make: *** [all] Error 2

I hope this helps you.
IMHO the correction is (noteh the second *):
	if (*(*buf-1) == '/')      

> Not arguing the merits of this naming scheme (it's too late to change
> this now), it seems that the byproduct of the current bug isn't so bad a
> solutions.  This currently allows you to keep strongshebrew images in a
> directory: .../strongs/strongshebrew/images, and greek in a similar
> structure.  Let me know..

I think we should have one way to store images for all module types. It will 
confuse module creators if some types of modules need the images in another 
subdir of DataPath.
In the case of Strongs the modules should give urls like <img 
src="/strongshebrew/image.jpg"> and <img src="/strongsgreek/image.jpg">. I 
think this solution is better - all modules use the same way.