Lynn Allan wrote:
If it would help, I put together a series of vc6 .dsp project files
for sword\examples\cmdline and sword\tests. Also, I incorporated some
changes in some of the usage messages to hopefully make it a little
clearer what the cmdline expects. In addition, there is a vc7.1
project for showchapter.cpp
http://lcdbible.sf.net/misc/swordvc6.zip

I found the .cpp programs in examples\cmdline and tests useful in
getting up-to-speed with the sword-api ... can be much easier to
"step-thru and step-into" with a console app than a gui like biblecs
... especially for vc7 and vc7.1 users

In the future, we should probably add MSVC projects for the utilities. I actually thought we had them but either I'm confused or they've been misplaced from CVS. I think examples and tests are less important, but we can see about adding projects for them also.


Some other suggestions:

* Pls save libsword.sln with libsword.vcproj (it's generated, but
could throw off newbies when first thing vc7.1 does is ask whether to
save libsword.sln)

I'm not sure what to do about maintaining two version of library project files. I'll try to set aside some time in the future to fully investigate whether we need to maintain separate VC7.1 project files or whether the VC6 versions would work fine. (When I was testing, the VC6 project files for diatheke worked fine in VC7.1 using the VC6 library project files also, so my suspicion is that we need not maintain VC7.1 projects specifically. But better testing is necessary.) If VC6 project files can't be used correctly in VC7.1, we may just drop VC6 support unless some good reason can be given for not doing so.


* Pls revise diatheke to allow it to run without arguments. It can be
less than obvious to figure out the cmdline to get it to run . (or
perhaps detect -help or /? and make substitutes if this would throw
off apps that use diatheke for real work?)
int main(int argc, char **argv)
{
...
   if (argc == 1) {
      outputencoding = FMT_PLAIN;
      text = "KJV";
      ref = "James 1:19";
      runquery = RQ_BOOK | RQ_REF;
   }
   if (runquery == (RQ_BOOK | RQ_REF)) {
      doquery( .... );
   }
      else printsyntax();

   return 0;
}

I'm not clear on what you're asking here, but it sounds like you're basically saying diatheke should print a default verse (based on the code snippet). Diatheke isn't a test or a toy program, it's a command-line tool, which behaves in a manner consistent with other command-line tools that do not take input from stdin. Namely, when executed without arguments, it prints its own argument syntax.


Would a couple of usage examples in the argument syntax printout achieve what you are suggesting?

* tests\modtest.cpp references RWP ... KJV probably more likely to
work

* tests\parsekey.cpp doesn't work any longer ... obsolete call to
 VerseKey *element = dynamic_cast<VerseKey *>(verses.GetElement(i));

* tests\swbuftest ... won't compile with vc6 ... redefinition of j
may hang when running ... runs a looooong time

* examples\cmdline\lookup and search ... usage gives example

These all belong to Troy.

--Chris

_______________________________________________
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

Reply via email to