Skip to content

Instantly share code, notes, and snippets.

Created March 18, 2013 14:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/5187582 to your computer and use it in GitHub Desktop.
Save anonymous/5187582 to your computer and use it in GitHub Desktop.
//
// Display content at 0:0 and n:0.
//
char oldAutoNorm = key->isAutoNormalize();
key->setAutoNormalize(0);
for (int i = 0; i < 2; ++i) {
// Get chapter 0 iff we're in chapter 1.
if ((i == 0) && (chapter != 1))
continue;
key->setChapter(i*chapter);
key->setVerse(0);
#if 0 // with footnote counting, we no longer cache before/after verses.
ModuleCache::CacheVerse& cVerse = ModuleMap
[ModuleName]
[key->Testament()]
[key->Book()]
[key->Chapter()]
[key->Verse()];
if (!cVerse.CacheIsValid(cache_flags))
cVerse.SetText((strongs_or_morph
? block_render((const char *)imodule)
: (const char *)imodule),
cache_flags);
buf = g_strdup_printf("%s<br />", cVerse.GetText());
#else
buf = g_strdup_printf("%s<br />", (strongs_or_morph
? block_render((const char *)imodule)
: (const char *)imodule));
#endif /* !0 */
swbuf.append(buf);
g_free(buf);
}
key->setAutoNormalize(oldAutoNorm);
key->setBook(curBook);
key->setChapter(chapter);
key->setVerse(curVerse);
key->setTestament(curTest);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment