[sword-svn] r184 - trunk/versification

chrislit at crosswire.org chrislit at crosswire.org
Wed Mar 18 01:51:09 MST 2009


Author: chrislit
Date: 2009-03-18 01:51:09 -0700 (Wed, 18 Mar 2009)
New Revision: 184

Modified:
   trunk/versification/makeabbrevs.pl
   trunk/versification/v11nsys.pl
Log:
minor changes to output formatting for drop-in to Sword's include path


Modified: trunk/versification/makeabbrevs.pl
===================================================================
--- trunk/versification/makeabbrevs.pl	2009-03-16 20:34:41 UTC (rev 183)
+++ trunk/versification/makeabbrevs.pl	2009-03-18 08:51:09 UTC (rev 184)
@@ -56,17 +56,17 @@
     close (MAP);
 }
 
-$abbrevs = "/******************************************************************************\n *	Abbreviations - MUST be in alphabetical order & by PRIORITY\n *		RULE: first match of entire key\n *			(e.g. key: \"1CH\"; match: \"1CHRONICLES\")\n */\n\nconst struct abbrev builtin_abbrevs\[\] = {\n";
+$abbrevs = "/******************************************************************************\n * canon_abbrevs.h - Canonical text information to be included by VerseKey.cpp\n *\n * Copyright 1998-2009 CrossWire Bible Society (http://www.crosswire.org)\n *	CrossWire Bible Society\n *	P. O. Box 2528\n *	Tempe, AZ  85280-2528\n *\n * This program is free software; you can redistribute it and/or modify it\n * under the terms of the GNU General Public License as published by the\n * Free Software Foundation version 2.\n *\n * This program is distributed in the hope that it will be useful, but\n * WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * General Public License for more details.\n *\n */\n\n#ifndef CANON_ABBREVS_H\n#define CANON_ABBREVS_H\n\nSWORD_NAMESPACE_START\n\n\n/******************************************************************************\n *	Abbreviations - MUST be in alphabetical order & by PRIORITY\n *		RULE: first match of entire key\n *			(e.g. key: \"1CH\"; match: \"1CHRONICLES\")\n */\n\nconst struct abbrev builtin_abbrevs\[\] = {\n";
 
 @abbrevsQueue = sort @abbrevsQueue;
 foreach $a (@abbrevsQueue) {
     if ($a =~ /^.+\d/) {
 	$abbrevs .= "//";
     }
-    $abbrevs .= "  {\"" . uc($a) . "\", \"" . $osis{lc($a)} . "\"},\t\t//" . $idmap{$osis{lc($a)}} . "\n";
+    $abbrevs .= "  {\"" . uc($a) . "\", \"" . $osis{lc($a)} . "\"},\t\t// " . $idmap{$osis{lc($a)}} . "\n";
 }
-$abbrevs .= "  {\"\", \"\"}\n};\n\n\n";
+$abbrevs .= "  {\"\", \"\"}\n};\n\n\nSWORD_NAMESPACE_END\n\n\n#endif\n";
 
-open OUTF, ">builtin_abbrevs.h";
+open OUTF, ">canon_abbrevs.h";
 print OUTF $abbrevs;
 close OUTF;

Modified: trunk/versification/v11nsys.pl
===================================================================
--- trunk/versification/v11nsys.pl	2009-03-16 20:34:41 UTC (rev 183)
+++ trunk/versification/v11nsys.pl	2009-03-18 08:51:09 UTC (rev 184)
@@ -185,13 +185,13 @@
 	if ($v11n eq "") {
 	    $v11n = "NRSVA";
 	}
-	$outfile = lc("v11n$2.h");
+	$outfile = lc("canon_$2.h");
     }
     else {
 	$v11n = $infile;
 	$v11n =~ s/\.[^\.]*$//;
 	$v11n =~ s/^.+\///;
-	$outfile = lc("v11n$v11n.h");
+	$outfile = lc("canon_$v11n.h");
     }
 
     print "Processing $infile --> $outfile (v11n: $v11n).\n";
@@ -331,7 +331,7 @@
     }
     @abbrevsQueue = sort @abbrevsQueue;
     foreach $a (@abbrevsQueue) {
-	$abbrevs .= "  {\"" . uc($a) . "\", \"" . $osis{lc($a)} . "\"},\t\t//" . $idmap{$osis{lc($a)}} . "\n";
+	$abbrevs .= "  {\"" . uc($a) . "\", \"" . $osis{lc($a)} . "\"},\t\t// " . $idmap{$osis{lc($a)}} . "\n";
     }
     $abbrevs .= $abbrevsCloser;
 




More information about the sword-cvs mailing list