24 #pragma warning( disable: 4251 )
34 #ifndef NO_SWORD_NAMESPACE
36 using sword::VerseKey;
37 using sword::SWModule;
39 using sword::SW_POSITION;
48 if ((*from != 10) && (*from != 13)) {
58 int main(
int argc,
char **argv) {
62 fprintf(stderr,
"usage: %s <Mod Name> [0|1 - prepend verse reference to each line]\n", argv[0]);
68 ModMap::iterator it = mgr.
Modules.find(argv[1]);
70 fprintf(stderr,
"error: %s: couldn't find module: %s \n", argv[0], argv[1]);
76 vref = (argv[2][0] ==
'0') ?
false :
true;
84 vkey =
dynamic_cast<VerseKey *
>(key);
89 fprintf(stderr,
"error: %s: %s module is not keyed to verses \n", argv[0], argv[1]);
102 if ((strlen(buffer) > 0) && (vref)) {
103 std::cout << (
const char *)(*vkey) <<
" ";
104 std::cout << buffer << std::endl;
107 else std::cout << buffer << std::endl;
unsigned long length() const
SWBuf renderText(const char *buf, int len=-1, bool render=true) const
virtual void setIntros(bool val)
std::map< SWBuf, SWModule *, std::less< SWBuf > > ModMap