[sword-cvs] sword/src/keys versekey.cpp,1.55,1.56

sword@www.crosswire.org sword@www.crosswire.org
Tue, 10 Jun 2003 11:44:56 -0700


Update of /usr/local/cvsroot/sword/src/keys
In directory www:/tmp/cvs-serv30215/src/keys

Modified Files:
	versekey.cpp 
Log Message:
	Added tests/testsuite for building a good set
		of regression tests
	Fixed VerseKey parsing of "1. book" and osisRefs



Index: versekey.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/keys/versekey.cpp,v
retrieving revision 1.55
retrieving revision 1.56
diff -C2 -d -r1.55 -r1.56
*** versekey.cpp	6 Jun 2003 19:42:19 -0000	1.55
--- versekey.cpp	10 Jun 2003 18:44:54 -0000	1.56
***************
*** 394,397 ****
--- 394,398 ----
  	char lastPartial = 0;
  	bool inTerm = true;
+ 	int notAllDigits;
  
  	curkey.AutoNormalize(0);
***************
*** 574,578 ****
  		case '.':
  			if (buf > orig)			// ignore (break) if preceeding char is not a digit
! 				if ((chap < 0) || (!isdigit(*(buf-1))))
  					break;
  
--- 575,583 ----
  		case '.':
  			if (buf > orig)			// ignore (break) if preceeding char is not a digit
! 				for (notAllDigits = tobook; notAllDigits; notAllDigits--) {
! 					if ((!isdigit(book[notAllDigits-1])) && (!strchr(" .", book[notAllDigits-1])))
! 						break;
! 				}
! 				if (!notAllDigits)
  					break;