Re: [sword-devel] CrossWire wiki status?
Thanks DM. DM Smith-5 wrote: The wiki is back. -- View this message in context: http://n4.nabble.com/CrossWire-wiki-status-tp360452p360607.html Sent from the SWORD Dev mailing list archive at Nabble.com. ___ sword-devel mailing list: sword-devel@crosswire.org http://www.crosswire.org/mailman/listinfo/sword-devel Instructions to unsubscribe/change your settings at above page
[sword-devel] SlideBible
Hello, Sword developers society. I want present new Windows Mobile frontend project for early use and cooperative developement. Main priority of this project are people, who meet God's Word at first time and on screen of electronic device. Current state - you can read Sword Bible modules, only for touch screen now ___ sword-devel mailing list: sword-devel@crosswire.org http://www.crosswire.org/mailman/listinfo/sword-devel Instructions to unsubscribe/change your settings at above page
Re: [sword-devel] curl library and download termination
On Fri, 30 Oct 2009, Eeli Kaikkonen wrote: It shouldn't be too hard to replace per-object easy_init with static global_init. This seems to be easier than any. Currently curlftpt.cpp has these lines: static CURLFTPTransport_init _CURLFTPTransport_init; CURLFTPTransport_init::CURLFTPTransport_init() { //curl_global_init(CURL_GLOBAL_DEFAULT); // curl_easy_init automatically calls it if needed } CURLFTPTransport_init::~CURLFTPTransport_init() { curl_global_cleanup(); } The only change needed should be to uncomment curl_global_init. Apparently this has been written according to documentation but for some reason left out. Maybe because curl_easy_init calls it only when needed. But the documentation in several places discourages using the automatic global init by easy_init and instead exhorts to use global init explicitly: This failsafe feature exists mainly for backward compatibility because there was a time when the global functions didn't exist. Because it is sufficient only in the simplest of programs, it is not recommended for any program to rely on it. I don't have tested this but my claim and the current code is based on the documentation: The global constant situation merits special consideration when the code you are writing to use libcurl is not the main program, but rather a modular piece of a program, e.g. another library. As a module, your code doesn't know about other parts of the program -- it doesn't know whether they use libcurl or not. And its code doesn't necessarily run at the start and end of the whole program. A module like this must have global constant functions of its own, just like curl_global_init() and curl_global_cleanup(). The module thus has control at the beginning and end of the program and has a place to call the libcurl functions. Note that if multiple modules in the program use libcurl, they all will separately call the libcurl functions, and that's OK because only the first curl_global_init() and the last curl_global_cleanup() in a program change anything. (libcurl uses a reference count in static memory). In a C++ module, it is common to deal with the global constant situation by defining a special class that represents the global constant environment of the module. A program always has exactly one object of the class, in static storage. That way, the program automatically calls the constructor of the object as the program starts up and the destructor as it terminates. As the author of this libcurl-using module, you can make the constructor call curl_global_init() and the destructor call curl_global_cleanup() and satisfy libcurl's requirements without your user having to think about it. Yours, Eeli Kaikkonen (Mr.), Oulu, Finland e-mail: eekai...@mailx.studentx.oulux.fix (with no x) ___ sword-devel mailing list: sword-devel@crosswire.org http://www.crosswire.org/mailman/listinfo/sword-devel Instructions to unsubscribe/change your settings at above page
[sword-devel] Understanding the structure of generic books and their relationship with TreeKey.
Through browsing through some source code i've managed to figure out that you need to convert a SWKey (SWModule::getKey()) to a TreeKey to be able to iterate through the sections/chapters of a GenBook. However, i have yet to figure out how to obtain the children for each section/chapter. Rather than taking a guess with trial and error and searching through more Sword frontends' source code, i would prefer to have a _full_ understanding on how Sword handles GenBooks and how frontends can make use of those methods. My questions: Is TreeKey the only way to obtain the sections/chapters of a Genbook? And how do i get a list of the children for each section/chapter? Am i right to assume that i have to use SWModule::setKey() to set the current key to one of the root sections and then re-cast SWModule::getKey() to a TreeKey and iterate through that? Or is another method required? ___ sword-devel mailing list: sword-devel@crosswire.org http://www.crosswire.org/mailman/listinfo/sword-devel Instructions to unsubscribe/change your settings at above page
Re: [sword-devel] Understanding the structure of generic books and their relationship with TreeKey.
Rendezvous, On Sun, Nov 1, 2009 at 4:01 PM, Rendezvous junk_and_m...@yahoo.com wrote: Through browsing through some source code i've managed to figure out that you need to convert a SWKey (SWModule::getKey()) to a TreeKey to be able to iterate through the sections/chapters of a GenBook. However, i have yet to figure out how to obtain the children for each section/chapter. Rather than taking a guess with trial and error and searching through more Sword frontends' source code, i would prefer to have a _full_ understanding on how Sword handles GenBooks and how frontends can make use of those methods. My questions: Is TreeKey the only way to obtain the sections/chapters of a Genbook? And how do i get a list of the children for each section/chapter? Am i right to assume that i have to use SWModule::setKey() to set the current key to one of the root sections and then re-cast SWModule::getKey() to a TreeKey and iterate through that? Or is another method required? You might want to look into the documentation on http://www.crosswire.org/~ghellings/1_6_0classdocs/ for version 1.6.0 of the engine. Particularly look under TreeKey::firstChild() and TreeKey::nextSibling/previousSibling. --Greg ___ sword-devel mailing list: sword-devel@crosswire.org http://www.crosswire.org/mailman/listinfo/sword-devel Instructions to unsubscribe/change your settings at above page ___ sword-devel mailing list: sword-devel@crosswire.org http://www.crosswire.org/mailman/listinfo/sword-devel Instructions to unsubscribe/change your settings at above page