[sword-cvs] sword/bindings/swig/perl Sword.cxx,1.13,1.14
sword@www.crosswire.org
sword@www.crosswire.org
Thu, 17 Jul 2003 14:38:33 -0700
Update of /usr/local/cvsroot/sword/bindings/swig/perl
In directory www:/tmp/cvs-serv7428/perl
Modified Files:
Sword.cxx
Log Message:
dglassey: fix to build with swig1.3.19 and run it
Index: Sword.cxx
===================================================================
RCS file: /usr/local/cvsroot/sword/bindings/swig/perl/Sword.cxx,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- Sword.cxx 29 Jun 2003 10:49:39 -0000 1.13
+++ Sword.cxx 17 Jul 2003 21:38:30 -0000 1.14
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
- * Version 1.3.17u-20030317-1807
+ * Version 1.3.19
*
* This file is not intended to be easily readable and contains a number of
* coding conventions designed to improve portability and efficiency. Do not make
@@ -90,6 +90,7 @@
SWIGIMPORT(swig_type_info *) SWIG_TypeCheck(char *c, swig_type_info *);
SWIGIMPORT(void *) SWIG_TypeCast(swig_type_info *, void *);
SWIGIMPORT(swig_type_info *) SWIG_TypeDynamicCast(swig_type_info *, void **);
+SWIGIMPORT(const char *) SWIG_TypeName(const swig_type_info *);
SWIGIMPORT(swig_type_info *) SWIG_TypeQuery(const char *);
SWIGIMPORT(void) SWIG_TypeClientData(swig_type_info *, void *);
@@ -132,6 +133,7 @@
head = tc;
tc++;
}
+ if (next) next->prev = head; /**/
head->next = next;
return ret;
}
@@ -155,6 +157,7 @@
s->next = ty->next;
if (ty->next) ty->next->prev = s;
ty->next = s;
+ s->prev = ty; /**/
return s;
}
s = s->next;
@@ -183,6 +186,12 @@
return lastty;
}
+/* Return the name associated with this type */
+SWIGRUNTIME(const char *)
+SWIG_TypeName(const swig_type_info *ty) {
+ return ty->name;
+}
+
/* Search for a swig_type_info structure */
SWIGRUNTIME(swig_type_info *)
SWIG_TypeQuery(const char *name) {
@@ -508,6 +517,58 @@
+#ifdef do_open
+ #undef do_open
+#endif
+#ifdef do_close
+ #undef do_close
+#endif
+#ifdef scalar
+ #undef scalar
+#endif
+#ifdef list
+ #undef list
+#endif
+#ifdef apply
+ #undef apply
+#endif
+#ifdef convert
+ #undef convert
+#endif
+#ifdef Error
+ #undef Error
+#endif
+#ifdef form
+ #undef form
+#endif
+#ifdef vform
+ #undef vform
+#endif
+#ifdef LABEL
+ #undef LABEL
+#endif
+#ifdef METHOD
+ #undef METHOD
+#endif
+#ifdef Move
+ #undef Move
+#endif
+#ifdef yylex
+ #undef yylex
+#endif
+#ifdef yyparse
+ #undef yyparse
+#endif
+#ifdef yyerror
+ #undef yyerror
+#endif
+#ifdef invert
+ #undef invert
+#endif
+#ifdef ref
+ #undef ref
+#endif
+
/* -------- TYPES TABLE (BEGIN) -------- */
@@ -522,36 +583,36 @@
#define SWIGTYPE_p_RawLD swig_types[8]
#define SWIGTYPE_p_char swig_types[9]
#define SWIGTYPE_p_TreeKey swig_types[10]
-#define SWIGTYPE_p_bool swig_types[11]
-#define SWIGTYPE_p_SWFilterMgr swig_types[12]
-#define SWIGTYPE_p_SWLD swig_types[13]
-#define SWIGTYPE_p_SWTextDirection swig_types[14]
-#define SWIGTYPE_p_RawText swig_types[15]
-#define SWIGTYPE_p_f_char_p_void__void swig_types[16]
-#define SWIGTYPE_p_VerseKey swig_types[17]
-#define SWIGTYPE_p_SWBuf swig_types[18]
-#define SWIGTYPE_p_ModMap swig_types[19]
-#define SWIGTYPE_p_zCom swig_types[20]
-#define SWIGTYPE_p_SectionMap swig_types[21]
-#define SWIGTYPE_p_SWDisplay swig_types[22]
-#define SWIGTYPE_p_AttributeTypeList swig_types[23]
-#define SWIGTYPE_p_SWText swig_types[24]
-#define SWIGTYPE_p_std__listTSWBuf_t swig_types[25]
-#define SWIGTYPE_p_TreeKeyIdx swig_types[26]
-#define SWIGTYPE_p_SWCompress swig_types[27]
-#define SWIGTYPE_p_LZSSCompress swig_types[28]
-#define SWIGTYPE_p_ZipCompress swig_types[29]
-#define SWIGTYPE_p_SW_POSITION swig_types[30]
-#define SWIGTYPE_p_SWModule swig_types[31]
-#define SWIGTYPE_p_zLD swig_types[32]
-#define SWIGTYPE_p_SWGenBook swig_types[33]
-#define SWIGTYPE_p_RawCom swig_types[34]
-#define SWIGTYPE_p_RawGenBook swig_types[35]
-#define SWIGTYPE_p_SWConfig swig_types[36]
-#define SWIGTYPE_p_LocaleMgr swig_types[37]
-#define SWIGTYPE_p_int swig_types[38]
-#define SWIGTYPE_p_SWTextMarkup swig_types[39]
-#define SWIGTYPE_p_OptionsList swig_types[40]
+#define SWIGTYPE_p_StringList swig_types[11]
+#define SWIGTYPE_p_bool swig_types[12]
+#define SWIGTYPE_p_SWFilterMgr swig_types[13]
+#define SWIGTYPE_p_SWLD swig_types[14]
+#define SWIGTYPE_p_SWTextDirection swig_types[15]
+#define SWIGTYPE_p_RawText swig_types[16]
+#define SWIGTYPE_p_f_char_p_void__void swig_types[17]
+#define SWIGTYPE_p_VerseKey swig_types[18]
+#define SWIGTYPE_p_SWBuf swig_types[19]
+#define SWIGTYPE_p_ModMap swig_types[20]
+#define SWIGTYPE_p_zCom swig_types[21]
+#define SWIGTYPE_p_SectionMap swig_types[22]
+#define SWIGTYPE_p_SWDisplay swig_types[23]
+#define SWIGTYPE_p_AttributeTypeList swig_types[24]
+#define SWIGTYPE_p_SWText swig_types[25]
+#define SWIGTYPE_p_std__listTSWBuf_t swig_types[26]
+#define SWIGTYPE_p_TreeKeyIdx swig_types[27]
+#define SWIGTYPE_p_SWCompress swig_types[28]
+#define SWIGTYPE_p_LZSSCompress swig_types[29]
+#define SWIGTYPE_p_ZipCompress swig_types[30]
+#define SWIGTYPE_p_SW_POSITION swig_types[31]
+#define SWIGTYPE_p_SWModule swig_types[32]
+#define SWIGTYPE_p_zLD swig_types[33]
+#define SWIGTYPE_p_SWGenBook swig_types[34]
+#define SWIGTYPE_p_RawCom swig_types[35]
+#define SWIGTYPE_p_RawGenBook swig_types[36]
+#define SWIGTYPE_p_SWConfig swig_types[37]
+#define SWIGTYPE_p_LocaleMgr swig_types[38]
+#define SWIGTYPE_p_int swig_types[39]
+#define SWIGTYPE_p_SWTextMarkup swig_types[40]
#define SWIGTYPE_p_zText swig_types[41]
#define SWIGTYPE_p_SWTextEncoding swig_types[42]
#define SWIGTYPE_p_unsigned_long swig_types[43]
@@ -586,9 +647,9 @@
#include <stdio.h>
#include <string>
-#include <map>
+//#include <map>
#include <defs.h>
-#include <multimapwdef.h>
+//#include <multimapwdef.h>
#include "swconfig.h"
using namespace sword;
@@ -611,13 +672,13 @@
#define SWIG_exception(a,b) SWIG_croak(b)
-#include <string>
-
-
#include <vector>
#include <algorithm>
#include <stdexcept>
+
+#include <string>
+
void SWConfig_set(SWConfig *self,char const *group,char const *entry,char const *value){
self->Sections[group][entry] = value;
}
@@ -1431,8 +1492,12 @@
else arg2 = (char *) SvPV(ST(1), PL_na);
{
if (arg1->prefixPath) delete [] arg1->prefixPath;
- arg1->prefixPath = (char *) (new char[strlen(arg2)+1]);
- strcpy((char *) arg1->prefixPath,arg2);
+ if (arg2) {
+ arg1->prefixPath = (char *) (new char[strlen(arg2)+1]);
+ strcpy((char *) arg1->prefixPath,arg2);
+ }else {
+ arg1->prefixPath = 0;
+ }
}
XSRETURN(argvi);
@@ -1497,8 +1562,12 @@
else arg2 = (char *) SvPV(ST(1), PL_na);
{
if (arg1->configPath) delete [] arg1->configPath;
- arg1->configPath = (char *) (new char[strlen(arg2)+1]);
- strcpy((char *) arg1->configPath,arg2);
+ if (arg2) {
+ arg1->configPath = (char *) (new char[strlen(arg2)+1]);
+ strcpy((char *) arg1->configPath,arg2);
+ }else {
+ arg1->configPath = 0;
+ }
}
XSRETURN(argvi);
@@ -1887,7 +1956,7 @@
const char *_swigerr = _swigmsg;
{
SWMgr *arg1 = (SWMgr *) 0 ;
- OptionsList result;
+ StringList result;
int argvi = 0;
dXSARGS;
@@ -1902,9 +1971,9 @@
result = (arg1)->getGlobalOptions();
{
- OptionsList * resultobj = new OptionsList((OptionsList &)result);
+ StringList * resultobj = new StringList((StringList &)result);
ST(argvi) = sv_newmortal();
- SWIG_MakePtr(ST(argvi++), (void *) resultobj, SWIGTYPE_p_OptionsList,0);
+ SWIG_MakePtr(ST(argvi++), (void *) resultobj, SWIGTYPE_p_StringList,0);
}
XSRETURN(argvi);
fail:
@@ -1920,7 +1989,7 @@
{
SWMgr *arg1 = (SWMgr *) 0 ;
char *arg2 ;
- OptionsList result;
+ StringList result;
int argvi = 0;
dXSARGS;
@@ -1937,9 +2006,9 @@
result = (arg1)->getGlobalOptionValues((char const *)arg2);
{
- OptionsList * resultobj = new OptionsList((OptionsList &)result);
+ StringList * resultobj = new StringList((StringList &)result);
ST(argvi) = sv_newmortal();
- SWIG_MakePtr(ST(argvi++), (void *) resultobj, SWIGTYPE_p_OptionsList,0);
+ SWIG_MakePtr(ST(argvi++), (void *) resultobj, SWIGTYPE_p_StringList,0);
}
XSRETURN(argvi);
fail:
@@ -9528,7 +9597,7 @@
int argvi = 0;
dXSARGS;
- if (items < 1) {
+ if (items < 2) {
SWIG_croak("Usage: SWBuf_appendFormatted(self,format,...);");
}
{
@@ -9536,10 +9605,8 @@
SWIG_croak("Type error in argument 1 of SWBuf_appendFormatted. Expected _p_SWBuf");
}
}
- if (items >= 1) {
- if (!SvOK((SV*) ST(1))) arg2 = 0;
- else arg2 = (char *) SvPV(ST(1), PL_na);
- }
+ if (!SvOK((SV*) ST(1))) arg2 = 0;
+ else arg2 = (char *) SvPV(ST(1), PL_na);
(arg1)->appendFormatted((char const *)arg2,arg3);
@@ -9709,11 +9776,12 @@
static swig_type_info _swigt__p_RawLD4[] = {{"Sword::RawLD4", 0, "RawLD4 *", 0},{"Sword::RawLD4"},{0}};
static swig_type_info _swigt__p_ListKey[] = {{"Sword::ListKey", 0, "ListKey *", 0},{"Sword::ListKey"},{0}};
static swig_type_info _swigt__p_SWKey[] = {{"Sword::SWKey", 0, "SWKey *", 0},{"Sword::SWKey"},{"Sword::ListKey", _p_ListKeyTo_p_SWKey},{"Sword::TreeKeyIdx", _p_TreeKeyIdxTo_p_SWKey},{"Sword::VerseKey", _p_VerseKeyTo_p_SWKey},{"Sword::TreeKey", _p_TreeKeyTo_p_SWKey},{0}};
-static swig_type_info _swigt__p_ConfigEntMap[] = {{"_p_ConfigEntMap", 0, "ConfigEntMap const &", 0},{"_p_ConfigEntMap"},{0}};
+static swig_type_info _swigt__p_ConfigEntMap[] = {{"_p_ConfigEntMap", 0, "ConfigEntMap *", 0},{"_p_ConfigEntMap"},{0}};
static swig_type_info _swigt__p_p_char[] = {{"_p_p_char", 0, "char **", 0},{"_p_p_char"},{0}};
static swig_type_info _swigt__p_RawLD[] = {{"Sword::RawLD", 0, "RawLD *", 0},{"Sword::RawLD"},{0}};
static swig_type_info _swigt__p_char[] = {{"_p_char", 0, "char *", 0},{"_p_char"},{0}};
static swig_type_info _swigt__p_TreeKey[] = {{"Sword::TreeKey", 0, "TreeKey *", 0},{"Sword::TreeKeyIdx", _p_TreeKeyIdxTo_p_TreeKey},{"Sword::TreeKey"},{0}};
+static swig_type_info _swigt__p_StringList[] = {{"_p_StringList", 0, "StringList *", 0},{"_p_StringList"},{0}};
static swig_type_info _swigt__p_bool[] = {{"_p_bool", 0, "bool *", 0},{"_p_bool"},{0}};
static swig_type_info _swigt__p_SWFilterMgr[] = {{"Sword::SWFilterMgr", 0, "SWFilterMgr *", 0},{"Sword::SWFilterMgr"},{0}};
static swig_type_info _swigt__p_SWLD[] = {{"Sword::SWLD", 0, "SWLD *", 0},{"Sword::zLD", _p_zLDTo_p_SWLD},{"Sword::SWLD"},{"Sword::RawLD4", _p_RawLD4To_p_SWLD},{"Sword::RawLD", _p_RawLDTo_p_SWLD},{0}};
@@ -9743,7 +9811,6 @@
static swig_type_info _swigt__p_LocaleMgr[] = {{"Sword::LocaleMgr", 0, "LocaleMgr *", 0},{"Sword::LocaleMgr"},{0}};
static swig_type_info _swigt__p_int[] = {{"_p_int", 0, "int *", 0},{"_p_int"},{0}};
static swig_type_info _swigt__p_SWTextMarkup[] = {{"_p_SWTextMarkup", 0, "SWTextMarkup *", 0},{"_p_SWTextMarkup"},{0}};
-static swig_type_info _swigt__p_OptionsList[] = {{"_p_OptionsList", 0, "OptionsList *", 0},{"_p_OptionsList"},{0}};
static swig_type_info _swigt__p_zText[] = {{"Sword::zText", 0, "zText *", 0},{"Sword::zText"},{0}};
static swig_type_info _swigt__p_SWTextEncoding[] = {{"_p_SWTextEncoding", 0, "SWTextEncoding *", 0},{"_p_SWTextEncoding"},{0}};
static swig_type_info _swigt__p_unsigned_long[] = {{"_p_unsigned_long", 0, "unsigned long *", 0},{"_p_unsigned_long"},{0}};
@@ -9760,6 +9827,7 @@
_swigt__p_RawLD,
_swigt__p_char,
_swigt__p_TreeKey,
+_swigt__p_StringList,
_swigt__p_bool,
_swigt__p_SWFilterMgr,
_swigt__p_SWLD,
@@ -9789,7 +9857,6 @@
_swigt__p_LocaleMgr,
_swigt__p_int,
_swigt__p_SWTextMarkup,
-_swigt__p_OptionsList,
_swigt__p_zText,
_swigt__p_SWTextEncoding,
_swigt__p_unsigned_long,