[sword-svn] r281 - trunk/modules/nasb/cutil

Troy A. Griffitts scribe at crosswire.org
Mon Jun 7 15:45:41 MST 2010


Nice finds Karl.  New rev should be available with these fixes.

On 06/07/2010 03:41 PM, scribe at crosswire.org wrote:
> Author: scribe
> Date: 2010-06-07 15:41:04 -0700 (Mon, 07 Jun 2010)
> New Revision: 281
>
> Modified:
>    trunk/modules/nasb/cutil/nasbosis.cpp
> Log:
> fixed ' getting transformed before divineName LORD'S
> fixed extra comma added after divine name
>
>
> Modified: trunk/modules/nasb/cutil/nasbosis.cpp
> ===================================================================
> --- trunk/modules/nasb/cutil/nasbosis.cpp	2010-06-04 08:51:42 UTC (rev 280)
> +++ trunk/modules/nasb/cutil/nasbosis.cpp	2010-06-07 22:41:04 UTC (rev 281)
> @@ -256,9 +256,9 @@
>  		
>  		//<SF>
>  		if (!strncmp(outstring.c_str(), "<SF>", 4)) {
> -			outstring = "";
>  			string heading = outstring.c_str()+4;
>  			heading = heading.substr(0, heading.find("</SF>"));
> +			outstring = "";
>  				
>  			if (!strncmp(lookahead.c_str(), "<PM>", 4)) {
>  				lookahead.erase(0, 4);
> @@ -273,9 +273,9 @@
>  
>  		//<SH>
>  		if (!strncmp(outstring.c_str(), "<SH>", 4)) {
> -			outstring = "";
>  			string heading = outstring.c_str()+4;
>  			heading = heading.substr(0, heading.find("</SH>"));
> +			outstring = "";
>  				
>  			if (!strncmp(lookahead.c_str(), "<PM>", 4)) {
>  				lookahead.erase(0, 4);
> @@ -747,14 +747,9 @@
>  		int end = 0;
>  
>  		while (1) {
> -			// silly, have to do this here or can't find the ' in strstr
> -			const char *outstr = outstring.c_str();
> -			const char *found = strstr(outstr, "L\\{ORD'S}/");
> -			int start = (found) ? (found - outstr) : -1;
> -			if (start > -1) {
> -				outstring.replace(start, 10, "<seg><divineName>Lord's</divineName></seg>");
> -				continue;
> -			}
> +			const char *outstr;
> +			const char *found;
> +			int start;
>  
>  			outstr = outstring.c_str();
>  			found = strstr(outstr, "``");
> @@ -878,10 +873,24 @@
>  				continue;
>  			}
>  			outstr = outstring.c_str();
> +			found = strstr(outstr, "L\\{ORD}/’\\{S}/");
> +			start = (found) ? (found - outstr) : -1;
> +			if (start > -1) {
> +				outstring.replace(start, 16, "<seg><divineName>Lord’s</divineName></seg>");
> +				continue;
> +			}
> +			outstr = outstring.c_str();
> +			found = strstr(outstr, "L\\{ORD,}/");
> +			start = (found) ? (found - outstr) : -1;
> +			if (start > -1) {
> +				outstring.replace(start, 9, "<seg><divineName>Lord</divineName></seg>,");
> +				continue;
> +			}
> +			outstr = outstring.c_str();
>  			found = strstr(outstr, "L\\{ORD}/");
>  			start = (found) ? (found - outstr) : -1;
>  			if (start > -1) {
> -				outstring.replace(start, 8, "<seg><divineName>Lord</divineName></seg>,");
> +				outstring.replace(start, 8, "<seg><divineName>Lord</divineName></seg>");
>  				continue;
>  			}
>  			outstr = outstring.c_str();
>
>
> _______________________________________________
> sword-cvs mailing list
> sword-cvs at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-cvs
>   




More information about the sword-cvs mailing list