#include <swmgr.h>
#include <swmodule.h>
#include <swkey.h>
#include <versekey.h>
#include <stdio.h>
#include <iostream>
Go to the source code of this file.
void cleanbuf |
( |
char * |
buf | ) |
|
Definition at line 43 of file mod2vpl.cpp.
48 if ((*from != 10) && (*from != 13)) {
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 58 of file mod2vpl.cpp.
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)