diff options
author | danglassey <danglassey> | 2002-08-14 09:57:17 +0000 |
---|---|---|
committer | danglassey <danglassey> | 2002-08-14 09:57:17 +0000 |
commit | c9458897ebbb739d8db83c80e06512d8a612f743 (patch) | |
tree | f8c5381045887e34388cc6b26cfccc254bf766dc /utilities/mkfastmod.cpp | |
download | sword-sf-cvs-c9458897ebbb739d8db83c80e06512d8a612f743.tar.gz |
*** empty log message ***
Diffstat (limited to 'utilities/mkfastmod.cpp')
-rw-r--r-- | utilities/mkfastmod.cpp | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/utilities/mkfastmod.cpp b/utilities/mkfastmod.cpp new file mode 100644 index 0000000..a1664f8 --- /dev/null +++ b/utilities/mkfastmod.cpp @@ -0,0 +1,38 @@ +#include <stdio.h> +#include <rawtext.h> +#include <swmgr.h> + +int main(int argc, char **argv) +{ + SWMgr manager(0,0,true); + SWModule *target; + ListKey listkey; + VerseKey vk; + ModMap::iterator it; + + if (argc != 2) { + fprintf(stderr, "usage: %s <modname>\n", argv[0]); + exit(-1); + } + + it = manager.Modules.find(argv[1]); + if (it == manager.Modules.end()) { + fprintf(stderr, "Could not find module [%s]. Available modules:\n", argv[1]); + for (it = manager.Modules.begin(); it != manager.Modules.end(); it++) { + fprintf(stderr, "[%s]\t - %s\n", (*it).second->Name(), (*it).second->Description()); + } + exit(-1); + } + target = it->second; + + if (!target->hasSearchFramework()) { + fprintf(stderr, "%s: error: %s does not support a search framework.\n", *argv, it->second->Name()); + exit(-2); + } + + printf("Building framework, please wait...\n"); + char error = target->createSearchFramework(); + if (error) { + fprintf(stderr, "%s: couldn't create search framework (permissions?)\n", *argv); + } +} |