You can subscribe to this list here.
| 2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(447) |
Nov
(163) |
Dec
(57) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2005 |
Jan
(172) |
Feb
|
Mar
(123) |
Apr
(64) |
May
(1) |
Jun
(278) |
Jul
(89) |
Aug
(97) |
Sep
(62) |
Oct
(53) |
Nov
(119) |
Dec
(60) |
| 2006 |
Jan
(76) |
Feb
(1094) |
Mar
(363) |
Apr
(163) |
May
(57) |
Jun
(43) |
Jul
(39) |
Aug
(15) |
Sep
(33) |
Oct
(62) |
Nov
(8) |
Dec
|
| 2007 |
Jan
(9) |
Feb
(34) |
Mar
(2) |
Apr
(14) |
May
(8) |
Jun
(40) |
Jul
(21) |
Aug
(1) |
Sep
(20) |
Oct
(15) |
Nov
(26) |
Dec
|
| 2008 |
Jan
(1) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(3) |
Oct
|
Nov
|
Dec
(1) |
| 2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(32) |
Jun
|
Jul
|
Aug
(3) |
Sep
(3) |
Oct
|
Nov
|
Dec
|
| 2010 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2011 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(7) |
Dec
|
| 2012 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <cre...@us...> - 2007-06-12 08:22:17
|
Revision: 1668
http://svn.sourceforge.net/frontierkernel/?rev=1668&view=rev
Author: creecode
Date: 2007-06-12 01:22:18 -0700 (Tue, 12 Jun 2007)
Log Message:
-----------
minor formatting tweaks
Modified Paths:
--------------
Frontier/trunk/Common/source/fileverbs.c
Modified: Frontier/trunk/Common/source/fileverbs.c
===================================================================
--- Frontier/trunk/Common/source/fileverbs.c 2007-06-05 00:49:31 UTC (rev 1667)
+++ Frontier/trunk/Common/source/fileverbs.c 2007-06-12 08:22:18 UTC (rev 1668)
@@ -2035,21 +2035,22 @@
#endif
-static boolean findapplicationverb (hdltreenode hparam1, tyvaluerecord *v) {
-
+static boolean findapplicationverb ( hdltreenode hparam1, tyvaluerecord *v ) {
+
OSType creator;
tyfilespec fsapp;
flnextparamislast = true;
- if (!getostypevalue (hparam1, 1, &creator))
- return (false);
+ if ( ! getostypevalue ( hparam1, 1, &creator ) )
+ return ( false );
+
+ if ( ! findapplication ( creator, &fsapp ) )
+ clearbytes ( &fsapp, sizeof ( fsapp ) );
+
+ return ( setfilespecvalue ( &fsapp, v ) );
- if (!findapplication (creator, &fsapp))
- clearbytes (&fsapp, sizeof (fsapp));
-
- return (setfilespecvalue (&fsapp, v));
- } /*findapplicationverb*/
+ } // findapplicationverb
#ifdef WIN95VERSION
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dav...@us...> - 2007-06-05 00:49:32
|
Revision: 1667
http://svn.sourceforge.net/frontierkernel/?rev=1667&view=rev
Author: davidgewirtz
Date: 2007-06-04 17:49:31 -0700 (Mon, 04 Jun 2007)
Log Message:
-----------
Fix for returning TEXT type variant of BLOB from getRow verb. -- DG
Modified Paths:
--------------
Frontier/branches/mysql/Common/source/langmysql.c
Frontier/branches/mysql/build_VC2K5/Frontier.vcproj
Modified: Frontier/branches/mysql/Common/source/langmysql.c
===================================================================
--- Frontier/branches/mysql/Common/source/langmysql.c 2007-06-02 18:02:34 UTC (rev 1666)
+++ Frontier/branches/mysql/Common/source/langmysql.c 2007-06-05 00:49:31 UTC (rev 1667)
@@ -444,8 +444,8 @@
boolean mysqlgetrowverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
//
+ // 2007-06-04 gewirtz: fix for returning TEXT type variant of BLOB
// 2007-05-31 creedon, asseily: fix for crash when column_text is NULL, return nil
- //
// 2007-05-29 gewirtz: created
//
@@ -478,7 +478,7 @@
The only formats we explicitly don't support are:
MYSQL_TYPE_BIT
- MYSQL_TYPE_BLOB
+ MYSQL_TYPE_BLOB (although we do return TEXT, which is a BLOB variant)
MYSQL_TYPE_SET
MYSQL_TYPE_ENUM
MYSQL_TYPE_GEOMETRY
@@ -563,7 +563,17 @@
case MYSQL_TYPE_YEAR:
case MYSQL_TYPE_STRING:
case MYSQL_TYPE_VAR_STRING:
+ case MYSQL_TYPE_BLOB:
{
+ if (field->type == MYSQL_TYPE_BLOB) {
+ // This is a special case, to see if the type is really TEXT
+ if (field->charsetnr == 63) {
+ // binary data, see http://dev.mysql.com/doc/refman/5.0/en/c-api-datatypes.html
+ if (!langpushlistlong (hlist, (long) 0))
+ goto error;
+ return (setheapvalue ((Handle) hlist, listvaluetype, vreturned));
+ }
+ }
column_text = row[fieldNumber];
if ( column_text == NULL )
Modified: Frontier/branches/mysql/build_VC2K5/Frontier.vcproj
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cre...@us...> - 2007-06-02 18:02:33
|
Revision: 1666
http://svn.sourceforge.net/frontierkernel/?rev=1666&view=rev
Author: creecode
Date: 2007-06-02 11:02:34 -0700 (Sat, 02 Jun 2007)
Log Message:
-----------
removed #if 0 from around webservergetpref function and moved higher up in file so webservergetserverstring function can use it
in webservergetserverstring function, call webservergetpref to grab value at user.webserver.prefs.headerFieldServer if defined
Modified Paths:
--------------
Frontier/trunk/Common/source/langhtml.c
Modified: Frontier/trunk/Common/source/langhtml.c
===================================================================
--- Frontier/trunk/Common/source/langhtml.c 2007-06-02 09:51:43 UTC (rev 1665)
+++ Frontier/trunk/Common/source/langhtml.c 2007-06-02 18:02:34 UTC (rev 1666)
@@ -74,7 +74,7 @@
#define fldebugwebsite false
-#define str_separatorline BIGSTRING ("\x17<hr size=2 width=100% />\r")/* 2005-12-18 creedon - end tag with space slash for compatibility with post HTML 4.01 standards */
+#define str_separatorline BIGSTRING ("\x17<hr size=\"2\" width=\"100%\" />\r")/* 2005-12-18 creedon - end tag with space slash for compatibility with post HTML 4.01 standards */
#define str_macroerror BIGSTRING ("\x20<b>[</b>Macro error: ^0<b>]</b>\r")
#define str_mailto BIGSTRING ("\x1A<a href=\"mailto:^0\">^0</a>")
#define str_hotlink BIGSTRING ("\x13<a href=\"^0\">^1</a>")
@@ -205,7 +205,7 @@
#define STR_P_CONDITION BIGSTRING ("\x09" "condition")
#define STR_P_RESPONDER BIGSTRING ("\x09" "responder")
#define STR_P_PATHARGS BIGSTRING ("\x08" "pathArgs")
-#define STR_P_ADRTABLE BIGSTRING ("\x08" "adrTable")
+#define STR_P_ADRTABLE BIGSTRING ("\x08" "adrTable")
#define STR_P_FLPARAMS BIGSTRING ("\x08" "flParams")
#define STR_P_ENABLED BIGSTRING ("\x07" "enabled")
#define STR_P_REQUEST BIGSTRING ("\x07" "request")
@@ -245,6 +245,7 @@
#define STR_P_DOLLAR BIGSTRING ("\x01" "$")
#define STR_P_SPACE BIGSTRING ("\x01" " ")
#define STR_P_EMPTY BIGSTRING ("\x00")
+#define STR_P_USERWEBSERVERSTRING BIGSTRING ( "\x11" "headerFieldServer" )
#define STR_STATUSCONTINUE "HTTP/1.1 100 CONTINUE\r\n\r\n"
#define sizestatuscontinue 25
@@ -5507,38 +5508,82 @@
}/*webserverparsecookies*/
-
-static boolean webservergetserverstring (tyvaluerecord *vreturn) {
-
+static boolean webservergetpref (bigstring bsprefname, tyvaluerecord *vreturn) {
+
/*
- 6.1d2 AR: Return a string identifying the server software, i.e. UserLand Frontier/6.1d2-WinNT
+ 6.1d2 AR: A utility function for getting a pref from user.webserver.prefs.
+ If no value is found in that table, we return false in vreturn.
6.1d4 AR: Reviewed for proper error handling and reporting.
+
+ 2007-06-02 aradke: Don't set *vreturn to false if the requested pref doesn't exist.
+ return false instead. This makes it possible for the caller to differentiate
+ between a non-existant pref and one that is actually set to false.
*/
+
+ hdlhashtable hprefstable;
+ tyvaluerecord val;
+ boolean fl;
+ hdlhashnode hnode;
+
+ disablelangerror ();
+
+ fl = langfastaddresstotable (roottable, STR_P_USERWEBSERVERPREFS, &hprefstable)
+ && langhashtablelookup (hprefstable, bsprefname, &val, &hnode);
+
+ if (fl)
+ fl = copyvaluerecord (val, vreturn);
+
+ if (fl)
+ if ((*vreturn).valuetype == externalvaluetype)
+ if (langexternalgettype (*vreturn) == idwordprocessor)
+ fl = coercetostring (vreturn);
+
+ enablelangerror ();
+
+ return (fl);
+ } /*webservergetpref*/
+
+static boolean webservergetserverstring ( tyvaluerecord *vreturn ) {
+
+ //
+ // 2007-06-02 creedon: call webservergetpref to grab value at
+ // user.webserver.prefs.headerFieldServer if defined
+ //
+ // 6.1d2 AR: Return a string identifying the server software, i.e.
+ // Frontier/6.1d2-WinNT
+ //
+ // 6.1d4 AR: Reviewed for proper error handling and reporting.
+ //
+
Handle h = nil;
tyvaluerecord vversion, vos;
- if (!newtexthandle (STR_P_SERVERSTRING, &h))
- return (false);
+ if ( webservergetpref ( STR_P_USERWEBSERVERSTRING, vreturn ) )
+ return ( true );
+
+ if ( ! newtexthandle ( STR_P_SERVERSTRING, &h ) )
+ return ( false );
- if (!frontierversion (&vversion))
+ if ( ! frontierversion ( &vversion ) )
goto exit;
- if (!sysos (&vos))
+ if ( ! sysos ( &vos ) )
goto exit;
- if (!parsedialoghandle (h, vversion.data.stringvalue, vos.data.stringvalue, nil, nil))
+ if ( ! parsedialoghandle ( h, vversion.data.stringvalue, vos.data.stringvalue, nil, nil ) )
goto exit;
- return (setheapvalue (h, stringvaluetype, vreturn));
+ return ( setheapvalue ( h, stringvaluetype, vreturn ) );
-exit:
+ exit:
- disposehandle (h);
+ disposehandle ( h );
- return (false);
- }/*webservergetserverstring*/
+ return ( false );
+
+ } // webservergetserverstring
static boolean webserverbuilderrorpage (Handle hshort, Handle hlong, Handle *hpage) {
@@ -5749,7 +5794,7 @@
exemptfromtmpstack (&val);
- /* add Server: UserLand Frontier/6.1d1-NT to header table */
+ /* add Server: Frontier/6.1d1-NT to header table */
if (!webservergetserverstring (&val))
goto exit;
@@ -5920,47 +5965,7 @@
505 HTTP Version Not Supported
*/
-#if 0
-static boolean webservergetpref (bigstring bsprefname, tyvaluerecord *vreturn) {
-
- /*
- 6.1d2 AR: A utility function for getting a pref from user.webserver.prefs.
- If no value is found in that table, we return false in vreturn.
-
- 6.1d4 AR: Reviewed for proper error handling and reporting.
-
- 2007-06-02 aradke: Don't set *vreturn to false if the requested pref doesn't exist.
- return false instead. This makes it possible for the caller to differentiate
- between a non-existant pref and one that is actually set to false.
- */
-
- hdlhashtable hprefstable;
- tyvaluerecord val;
- boolean fl;
- hdlhashnode hnode;
-
- disablelangerror ();
-
- fl = langfastaddresstotable (roottable, STR_P_USERWEBSERVERPREFS, &hprefstable)
- && langhashtablelookup (hprefstable, bsprefname, &val, &hnode);
-
- if (fl)
- fl = copyvaluerecord (val, vreturn);
-
- if (fl)
- if ((*vreturn).valuetype == externalvaluetype)
- if (langexternalgettype (*vreturn) == idwordprocessor)
- fl = coercetostring (vreturn);
-
- enablelangerror ();
-
- return (fl);
- } /*webservergetpref*/
-
-#endif
-
-
static boolean webservergetrespondertableaddress (bigstring bsname, tyaddress *adr) {
/*
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <and...@us...> - 2007-06-02 09:51:43
|
Revision: 1665
http://svn.sourceforge.net/frontierkernel/?rev=1665&view=rev
Author: andreradke
Date: 2007-06-02 02:51:43 -0700 (Sat, 02 Jun 2007)
Log Message:
-----------
webservergetpref now returns false if the requested pref doesn't exist or if an error occurred processing it.
Modified Paths:
--------------
Frontier/trunk/Common/source/langhtml.c
Modified: Frontier/trunk/Common/source/langhtml.c
===================================================================
--- Frontier/trunk/Common/source/langhtml.c 2007-05-31 22:22:15 UTC (rev 1664)
+++ Frontier/trunk/Common/source/langhtml.c 2007-06-02 09:51:43 UTC (rev 1665)
@@ -5929,6 +5929,10 @@
If no value is found in that table, we return false in vreturn.
6.1d4 AR: Reviewed for proper error handling and reporting.
+
+ 2007-06-02 aradke: Don't set *vreturn to false if the requested pref doesn't exist.
+ return false instead. This makes it possible for the caller to differentiate
+ between a non-existant pref and one that is actually set to false.
*/
hdlhashtable hprefstable;
@@ -5941,19 +5945,17 @@
fl = langfastaddresstotable (roottable, STR_P_USERWEBSERVERPREFS, &hprefstable)
&& langhashtablelookup (hprefstable, bsprefname, &val, &hnode);
- enablelangerror ();
+ if (fl)
+ fl = copyvaluerecord (val, vreturn);
- if (!fl)
- return (setbooleanvalue (false, vreturn));
-
- if (!copyvaluerecord (val, vreturn))
- return (false);
+ if (fl)
+ if ((*vreturn).valuetype == externalvaluetype)
+ if (langexternalgettype (*vreturn) == idwordprocessor)
+ fl = coercetostring (vreturn);
- if ((*vreturn).valuetype == externalvaluetype)
- if (langexternalgettype (*vreturn) == idwordprocessor)
- coercetostring (vreturn);
+ enablelangerror ();
- return (true);
+ return (fl);
} /*webservergetpref*/
#endif
@@ -6429,38 +6431,38 @@
tyvaluerecord vserve;
- if (!webservergetpref (BIGSTRING ("\x19" "flEnableDirectFileServing"), &vserve))
- goto internal_error;
+ if (webservergetpref (BIGSTRING ("\x19" "flEnableDirectFileServing"), &vserve)) {
- if (!coercetoboolean (&vserve))
- goto internal_error;
-
- if (vserve.data.flvalue) {
+ if (!coercetoboolean (&vserve))
+ goto internal_error;
- unsigned long stream;
- unsigned long fsize;
- tyvaluerecord vheader;
- tyfilespec fs = **val.data.filespecvalue;
-
- if (!filesize (&fs, &fsize))
- goto internal_error;
+ if (vserve.data.flvalue) {
+
+ unsigned long stream;
+ unsigned long fsize;
+ tyvaluerecord vheader;
+ tyfilespec fs = **val.data.filespecvalue;
+
+ if (!filesize (&fs, &fsize))
+ goto internal_error;
- if (!langassignlongvalue (hresponseheaderstable, STR_P_CONTENT_LENGTH, fsize))
- goto internal_error;
+ if (!langassignlongvalue (hresponseheaderstable, STR_P_CONTENT_LENGTH, fsize))
+ goto internal_error;
- if (!webserverbuildresponse (bscode, hresponseheaderstable, nil, &vheader))
- goto internal_error;
+ if (!webserverbuildresponse (bscode, hresponseheaderstable, nil, &vheader))
+ goto internal_error;
- if (!langlookuplongvalue (hparamtable, STR_P_STREAM, &stream))
- goto internal_error;
-
- if (!fwsNetEventWriteFileToStream (stream, vheader.data.stringvalue, nil, &fs))
- goto internal_error;
-
- if (!setbooleanvalue (true, vreturn))
- goto internal_error;
-
- goto done;
+ if (!langlookuplongvalue (hparamtable, STR_P_STREAM, &stream))
+ goto internal_error;
+
+ if (!fwsNetEventWriteFileToStream (stream, vheader.data.stringvalue, nil, &fs))
+ goto internal_error;
+
+ if (!setbooleanvalue (true, vreturn))
+ goto internal_error;
+
+ goto done;
+ }
}
}
#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cre...@us...> - 2007-05-31 22:22:14
|
Revision: 1664
http://svn.sourceforge.net/frontierkernel/?rev=1664&view=rev
Author: creecode
Date: 2007-05-31 15:22:15 -0700 (Thu, 31 May 2007)
Log Message:
-----------
in function mysqlgetrowverb, fix for crash when column_text is NULL, return nil
Modified Paths:
--------------
Frontier/branches/mysql/Common/source/langmysql.c
Modified: Frontier/branches/mysql/Common/source/langmysql.c
===================================================================
--- Frontier/branches/mysql/Common/source/langmysql.c 2007-05-30 22:26:15 UTC (rev 1663)
+++ Frontier/branches/mysql/Common/source/langmysql.c 2007-05-31 22:22:15 UTC (rev 1664)
@@ -440,7 +440,73 @@
} /* mysqlclearqueryverb */
+
boolean mysqlgetrowverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
+
+ //
+ // 2007-05-31 creedon, asseily: fix for crash when column_text is NULL, return nil
+ //
+ // 2007-05-29 gewirtz: created
+ //
+
+ /*
+
+ mysql.getRow(queryid)
+
+ Action: return the next row from the query result set
+ Params: a query id
+ Returns: 0 if no more rows, or a Frontier list containing data
+
+ MySQL docs: http://dev.mysql.com/doc/refman/5.1/en/mysql-fetch-row.html
+ http://dev.mysql.com/doc/refman/5.1/en/mysql-num-fields.html
+ http://dev.mysql.com/doc/refman/5.1/en/mysql-field-seek.html
+ http://dev.mysql.com/doc/refman/5.1/en/mysql-fetch-field.html
+
+ Notes:
+
+ MySQL might also return a 0 if there's an error. It's important to check
+ for an error if a zero value is returned to differentiate between end of
+ dataset and last row.
+
+ The MySQL fetch_row function is interesting, in that it looks like
+ each field returned is returned as a string. This is great for Frontier,
+ since Frontier can't handle some of MySQL's bigger number types (like double),
+ but it can handle strings. So everything that's supported is returned as
+ a string to Frontier. The Frontier programmer can then do whatever
+ coercing is necessary.
+
+ The only formats we explicitly don't support are:
+
+ MYSQL_TYPE_BIT
+ MYSQL_TYPE_BLOB
+ MYSQL_TYPE_SET
+ MYSQL_TYPE_ENUM
+ MYSQL_TYPE_GEOMETRY
+ MYSQL_TYPE_NULL
+
+ Formats supported and returned as string:
+
+ MYSQL_TYPE_TINY
+ MYSQL_TYPE_SHORT
+ MYSQL_TYPE_LONG
+ MYSQL_TYPE_INT24
+ MYSQL_TYPE_LONGLONG
+ MYSQL_TYPE_DECIMAL
+ MYSQL_TYPE_NEWDECIMAL
+ MYSQL_TYPE_FLOAT
+ MYSQL_TYPE_DOUBLE
+ MYSQL_TYPE_TIMESTAMP
+ MYSQL_TYPE_DATE
+ MYSQL_TYPE_TIME
+ MYSQL_TYPE_DATETIME
+ MYSQL_TYPE_YEAR
+ MYSQL_TYPE_STRING
+ MYSQL_TYPE_VAR_STRING
+
+ More info: http://dev.mysql.com/doc/refman/5.1/en/c-api-datatypes.html
+
+ */
+
unsigned int fieldNumber; /* field number */
unsigned int fieldCount; /* number of fields */
MYSQL_RES *queryid; /* query id */
@@ -451,63 +517,7 @@
const unsigned char *column_text;
tyvaluerecord val;
- /*
- mysql.getRow(queryid)
-
- Action: return the next row from the query result set
- Params: a query id
- Returns: 0 if no more rows, or a Frontier list containing data
-
- MySQL docs: http://dev.mysql.com/doc/refman/5.1/en/mysql-fetch-row.html
- http://dev.mysql.com/doc/refman/5.1/en/mysql-num-fields.html
- http://dev.mysql.com/doc/refman/5.1/en/mysql-field-seek.html
- http://dev.mysql.com/doc/refman/5.1/en/mysql-fetch-field.html
-
- Notes:
- MySQL might also return a 0 if there's an error. It's important to check
- for an error if a zero value is returned to differentiate between end of
- dataset and last row.
-
- The MySQL fetch_row function is interesting, in that it looks like
- each field returned is returned as a string. This is great for Frontier,
- since Frontier can't handle some of MySQL's bigger number types (like double),
- but it can handle strings. So everything that's supported is returned as
- a string to Frontier. The Frontier programmer can then do whatever
- coercing is necessary.
-
- The only formats we explicitly don't support are:
-
- MYSQL_TYPE_BIT
- MYSQL_TYPE_BLOB
- MYSQL_TYPE_SET
- MYSQL_TYPE_ENUM
- MYSQL_TYPE_GEOMETRY
- MYSQL_TYPE_NULL
-
- Formats supported and returned as string:
-
- MYSQL_TYPE_TINY
- MYSQL_TYPE_SHORT
- MYSQL_TYPE_LONG
- MYSQL_TYPE_INT24
- MYSQL_TYPE_LONGLONG
- MYSQL_TYPE_DECIMAL
- MYSQL_TYPE_NEWDECIMAL
- MYSQL_TYPE_FLOAT
- MYSQL_TYPE_DOUBLE
- MYSQL_TYPE_TIMESTAMP
- MYSQL_TYPE_DATE
- MYSQL_TYPE_TIME
- MYSQL_TYPE_DATETIME
- MYSQL_TYPE_YEAR
- MYSQL_TYPE_STRING
- MYSQL_TYPE_VAR_STRING
-
- More info: http://dev.mysql.com/doc/refman/5.1/en/c-api-datatypes.html
-
- */
-
flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
if (!getlongvalue (hparam1, 1, (long *) &queryid)) /* Get the long value, which becomes the queryid pointer */
@@ -555,12 +565,21 @@
case MYSQL_TYPE_VAR_STRING:
{
column_text = row[fieldNumber];
+
+ if ( column_text == NULL )
+
+ setnilvalue ( &val );
+
+ else {
- // Exit the verb, converting column_name back to Frontier handle
- if (!newfilledhandle ((ptrvoid) column_text, strlen (column_text), &returnH))
- return false; /* Allocation failed */
- if (!setheapvalue (returnH, stringvaluetype, &val)) // convert handle to value
- goto error;
+ // Exit the verb, converting column_name back to Frontier handle
+ if (!newfilledhandle ((ptrvoid) column_text, strlen (column_text), &returnH))
+ return false; /* Allocation failed */
+ if (!setheapvalue (returnH, stringvaluetype, &val)) // convert handle to value
+ goto error;
+
+ }
+
if (!langpushlistval (hlist, nil, &val))
goto error;
break;
@@ -581,6 +600,7 @@
} /* mysqlgetrow */
+
boolean mysqlgeterrornumberverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
MYSQL *dbid; // the MySQL object handle
unsigned int returnCode; // return code from MySQL call
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dav...@us...> - 2007-05-30 22:26:13
|
Revision: 1663
http://svn.sourceforge.net/frontierkernel/?rev=1663&view=rev
Author: davidgewirtz
Date: 2007-05-30 15:26:15 -0700 (Wed, 30 May 2007)
Log Message:
-----------
MySQL client library for Windows. Mac client available from http://dev.mysql.com/downloads/mysql/5.0.html#macosx-dmg.
Added Paths:
-----------
Frontier/vendor/mysql5-client-win/
Frontier/vendor/mysql5-client-win/include/
Frontier/vendor/mysql5-client-win/include/config-netware.h
Frontier/vendor/mysql5-client-win/include/config-win.h
Frontier/vendor/mysql5-client-win/include/errmsg.h
Frontier/vendor/mysql5-client-win/include/libmysql.def
Frontier/vendor/mysql5-client-win/include/m_ctype.h
Frontier/vendor/mysql5-client-win/include/m_string.h
Frontier/vendor/mysql5-client-win/include/my_alloc.h
Frontier/vendor/mysql5-client-win/include/my_dbug.h
Frontier/vendor/mysql5-client-win/include/my_getopt.h
Frontier/vendor/mysql5-client-win/include/my_global.h
Frontier/vendor/mysql5-client-win/include/my_list.h
Frontier/vendor/mysql5-client-win/include/my_pthread.h
Frontier/vendor/mysql5-client-win/include/my_sys.h
Frontier/vendor/mysql5-client-win/include/mysql.h
Frontier/vendor/mysql5-client-win/include/mysql_com.h
Frontier/vendor/mysql5-client-win/include/mysql_embed.h
Frontier/vendor/mysql5-client-win/include/mysql_time.h
Frontier/vendor/mysql5-client-win/include/mysql_version.h
Frontier/vendor/mysql5-client-win/include/mysqld_ername.h
Frontier/vendor/mysql5-client-win/include/mysqld_error.h
Frontier/vendor/mysql5-client-win/include/raid.h
Frontier/vendor/mysql5-client-win/include/typelib.h
Frontier/vendor/mysql5-client-win/lib/
Frontier/vendor/mysql5-client-win/lib/debug/
Frontier/vendor/mysql5-client-win/lib/debug/libmysql.dll
Frontier/vendor/mysql5-client-win/lib/debug/libmysql.lib
Frontier/vendor/mysql5-client-win/lib/debug/mysqlclient.lib
Frontier/vendor/mysql5-client-win/lib/debug/mysys.lib
Frontier/vendor/mysql5-client-win/lib/debug/regex.lib
Frontier/vendor/mysql5-client-win/lib/debug/strings.lib
Frontier/vendor/mysql5-client-win/lib/debug/zlib.lib
Frontier/vendor/mysql5-client-win/lib/opt/
Frontier/vendor/mysql5-client-win/lib/opt/libmysql.dll
Frontier/vendor/mysql5-client-win/lib/opt/libmysql.lib
Frontier/vendor/mysql5-client-win/lib/opt/mysqlclient.lib
Frontier/vendor/mysql5-client-win/lib/opt/mysys-nt.lib
Frontier/vendor/mysql5-client-win/lib/opt/regex.lib
Frontier/vendor/mysql5-client-win/lib/opt/strings.lib
Frontier/vendor/mysql5-client-win/lib/opt/zlib.lib
Added: Frontier/vendor/mysql5-client-win/include/config-netware.h
===================================================================
--- Frontier/vendor/mysql5-client-win/include/config-netware.h (rev 0)
+++ Frontier/vendor/mysql5-client-win/include/config-netware.h 2007-05-30 22:26:15 UTC (rev 1663)
@@ -0,0 +1,141 @@
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+
+/* Header for NetWare compatible with MySQL */
+
+#ifndef _config_netware_h
+#define _config_netware_h
+
+/* required headers */
+#include <unistd.h>
+#include <stdio.h>
+#include <errno.h>
+#include <screen.h>
+#include <limits.h>
+#include <signal.h>
+#include <errno.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <time.h>
+#include <sys/time.h>
+#include <pthread.h>
+#include <termios.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* required adjustments */
+#undef HAVE_READDIR_R
+#undef HAVE_RWLOCK_INIT
+#undef HAVE_SCHED_H
+#undef HAVE_SYS_MMAN_H
+#undef HAVE_SYNCH_H
+#undef HAVE_MMAP
+#undef HAVE_RINT
+
+#define HAVE_PTHREAD_ATTR_SETSTACKSIZE 1
+#define HAVE_PTHREAD_SIGMASK 1
+#define HAVE_PTHREAD_YIELD_ZERO_ARG 1
+#define HAVE_BROKEN_REALPATH 1
+
+/* changes made to make use of LibC-June-2004 for building purpose */
+#undef HAVE_POSIX_SIGNALS
+#undef HAVE_PTHREAD_ATTR_SETSCOPE
+#undef HAVE_ALLOC_A
+#undef HAVE_FINITE
+#undef HAVE_GETPWNAM
+#undef HAVE_GETPWUID
+#undef HAVE_PTHREAD_SETSCHEDPARAM
+#undef HAVE_READLINK
+#undef HAVE_STPCPY
+/* changes end */
+
+/* no libc crypt() function */
+#ifdef HAVE_OPENSSL
+ #define HAVE_CRYPT 1
+#else
+ #undef HAVE_CRYPT
+#endif /* HAVE_OPENSSL */
+
+/* Netware has an ancient zlib */
+#undef HAVE_COMPRESS
+#define HAVE_COMPRESS
+#undef HAVE_ARCHIVE_DB
+
+/* include the old function apis */
+#define USE_OLD_FUNCTIONS 1
+
+/* no case sensitivity */
+#define FN_NO_CASE_SENCE 1
+
+/* the thread alarm is not used */
+#define DONT_USE_THR_ALARM 1
+
+/* signals do not interrupt sockets */
+#define SIGNALS_DONT_BREAK_READ 1
+
+/* signal by closing the sockets */
+#define SIGNAL_WITH_VIO_CLOSE 1
+
+/* On NetWare, stack grows towards lower address*/
+#define STACK_DIRECTION -1
+
+/* On NetWare, we need to set stack size for threads, otherwise default 16K is used */
+#define NW_THD_STACKSIZE 65536
+
+/* On NetWare, to fix the problem with the deletion of open files */
+#define CANT_DELETE_OPEN_FILES 1
+
+#define FN_LIBCHAR '\\'
+#define FN_ROOTDIR "\\"
+#define FN_DEVCHAR ':'
+
+/* default directory information */
+#define DEFAULT_MYSQL_HOME "sys:/mysql"
+#define PACKAGE "mysql"
+#define DEFAULT_BASEDIR "sys:/"
+#define SHAREDIR "share/"
+#define DEFAULT_CHARSET_HOME "sys:/mysql/"
+#define DATADIR "data/"
+
+/* 64-bit file system calls */
+#define SIZEOF_OFF_T 8
+#define off_t off64_t
+#define chsize chsize64
+#define ftruncate ftruncate64
+#define lseek lseek64
+#define pread pread64
+#define pwrite pwrite64
+#define tell tell64
+
+/* do not use the extended time in LibC sys\stat.h */
+#define _POSIX_SOURCE
+
+/* Some macros for portability */
+
+#define set_timespec(ABSTIME,SEC) { (ABSTIME).tv_sec=time(NULL)+(SEC); (ABSTIME).tv_nsec=0; }
+
+/* extra protection against CPU Hogs on NetWare */
+#define NETWARE_YIELD pthread_yield()
+/* Screen mode for help texts */
+#define NETWARE_SET_SCREEN_MODE(A) setscreenmode(A)
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _config_netware_h */
Added: Frontier/vendor/mysql5-client-win/include/config-win.h
===================================================================
--- Frontier/vendor/mysql5-client-win/include/config-win.h (rev 0)
+++ Frontier/vendor/mysql5-client-win/include/config-win.h 2007-05-30 22:26:15 UTC (rev 1663)
@@ -0,0 +1,473 @@
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+
+/* Defines for Win32 to make it compatible for MySQL */
+
+#ifdef __WIN2000__
+/* We have to do this define before including windows.h to get the AWE API
+functions */
+#define _WIN32_WINNT 0x0500
+#endif
+
+#if defined(_MSC_VER) && _MSC_VER >= 1400
+/* Avoid endless warnings about sprintf() etc. being unsafe. */
+#define _CRT_SECURE_NO_DEPRECATE 1
+#endif
+
+#include <sys/locking.h>
+#include <windows.h>
+#include <math.h> /* Because of rint() */
+#include <fcntl.h>
+#include <io.h>
+#include <malloc.h>
+
+#define HAVE_SMEM 1
+
+#if defined(_WIN64) || defined(WIN64)
+#define SYSTEM_TYPE "Win64"
+#elif defined(_WIN32) || defined(WIN32)
+#define SYSTEM_TYPE "Win32"
+#else
+#define SYSTEM_TYPE "Windows"
+#endif
+
+#if defined(_M_IA64)
+#define MACHINE_TYPE "ia64"
+#elif defined(_M_IX86)
+#define MACHINE_TYPE "ia32"
+#elif defined(_M_ALPHA)
+#define MACHINE_TYPE "axp"
+#else
+#define MACHINE_TYPE "unknown" /* Define to machine type name */
+#endif
+
+#if !(defined(_WIN64) || defined(WIN64))
+#ifndef _WIN32
+#define _WIN32 /* Compatible with old source */
+#endif
+#ifndef __WIN32__
+#define __WIN32__
+#endif
+#endif /* _WIN64 */
+#ifndef __WIN__
+#define __WIN__ /* To make it easier in VC++ */
+#endif
+
+#ifndef MAX_INDEXES
+#define MAX_INDEXES 64
+#endif
+
+/* File and lock constants */
+#define O_SHARE 0x1000 /* Open file in sharing mode */
+#ifdef __BORLANDC__
+#define F_RDLCK LK_NBLCK /* read lock */
+#define F_WRLCK LK_NBRLCK /* write lock */
+#define F_UNLCK LK_UNLCK /* remove lock(s) */
+#else
+#define F_RDLCK _LK_NBLCK /* read lock */
+#define F_WRLCK _LK_NBRLCK /* write lock */
+#define F_UNLCK _LK_UNLCK /* remove lock(s) */
+#endif
+
+#define F_EXCLUSIVE 1 /* We have only exclusive locking */
+#define F_TO_EOF (INT_MAX32/2) /* size for lock of all file */
+#define F_OK 0 /* parameter to access() */
+#define W_OK 2
+
+#define S_IROTH S_IREAD /* for my_lib */
+
+#ifdef __BORLANDC__
+#define FILE_BINARY O_BINARY /* my_fopen in binary mode */
+#define O_TEMPORARY 0
+#define O_SHORT_LIVED 0
+#define SH_DENYNO _SH_DENYNO
+#else
+#define O_BINARY _O_BINARY /* compability with MSDOS */
+#define FILE_BINARY _O_BINARY /* my_fopen in binary mode */
+#define O_TEMPORARY _O_TEMPORARY
+#define O_SHORT_LIVED _O_SHORT_LIVED
+#define SH_DENYNO _SH_DENYNO
+#endif
+#define NO_OPEN_3 /* For my_create() */
+
+#define SIGQUIT SIGTERM /* No SIGQUIT */
+
+#undef _REENTRANT /* Crashes something for win32 */
+#undef SAFE_MUTEX /* Can't be used on windows */
+
+#if defined(_MSC_VER) && _MSC_VER >= 1310
+#define LL(A) A##ll
+#define ULL(A) A##ull
+#else
+#define LL(A) ((__int64) A)
+#define ULL(A) ((unsigned __int64) A)
+#endif
+
+#define LONGLONG_MIN LL(0x8000000000000000)
+#define LONGLONG_MAX LL(0x7FFFFFFFFFFFFFFF)
+#define ULONGLONG_MAX ULL(0xFFFFFFFFFFFFFFFF)
+
+/* Type information */
+
+#if defined(__EMX__) || !defined(HAVE_UINT)
+#undef HAVE_UINT
+#define HAVE_UINT
+typedef unsigned short ushort;
+typedef unsigned int uint;
+#endif /* defined(__EMX__) || !defined(HAVE_UINT) */
+
+typedef unsigned __int64 ulonglong; /* Microsofts 64 bit types */
+typedef __int64 longlong;
+#ifndef HAVE_SIGSET_T
+typedef int sigset_t;
+#endif
+#define longlong_defined
+/*
+ off_t should not be __int64 because of conflicts in header files;
+ Use my_off_t or os_off_t instead
+*/
+#ifndef HAVE_OFF_T
+typedef long off_t;
+#endif
+typedef __int64 os_off_t;
+#ifdef _WIN64
+typedef UINT_PTR rf_SetTimer;
+#else
+#ifndef HAVE_SIZE_T
+typedef unsigned int size_t;
+#endif
+typedef uint rf_SetTimer;
+#endif
+
+#define Socket_defined
+#define my_socket SOCKET
+#define bool BOOL
+#define SIGPIPE SIGINT
+#define RETQSORTTYPE void
+#define QSORT_TYPE_IS_VOID
+#define RETSIGTYPE void
+#define SOCKET_SIZE_TYPE int
+#define my_socket_defined
+#define bool_defined
+#define byte_defined
+#define HUGE_PTR
+#define STDCALL __stdcall /* Used by libmysql.dll */
+#define isnan(X) _isnan(X)
+#define finite(X) _finite(X)
+
+#ifndef UNDEF_THREAD_HACK
+#define THREAD
+#endif
+#define VOID_SIGHANDLER
+#define SIZEOF_CHAR 1
+#define SIZEOF_LONG 4
+#define SIZEOF_LONG_LONG 8
+#define SIZEOF_OFF_T 8
+#ifdef _WIN64
+#define SIZEOF_CHARP 8
+#else
+#define SIZEOF_CHARP 4
+#endif
+#define HAVE_BROKEN_NETINET_INCLUDES
+#ifdef __NT__
+#define HAVE_NAMED_PIPE /* We can only create pipes on NT */
+#endif
+
+/* ERROR is defined in wingdi.h */
+#undef ERROR
+
+/* We need to close files to break connections on shutdown */
+#ifndef SIGNAL_WITH_VIO_CLOSE
+#define SIGNAL_WITH_VIO_CLOSE
+#endif
+
+/* Use all character sets in MySQL */
+#define USE_MB 1
+#define USE_MB_IDENT 1
+#define USE_STRCOLL 1
+
+/* All windows servers should support .sym files */
+#undef USE_SYMDIR
+#define USE_SYMDIR
+
+/* If LOAD DATA LOCAL INFILE should be enabled by default */
+#define ENABLED_LOCAL_INFILE 1
+
+/* If query profiling should be enabled by default */
+#define ENABLED_PROFILING 1
+
+/* Convert some simple functions to Posix */
+
+#define my_sigset(A,B) signal((A),(B))
+#define finite(A) _finite(A)
+#define sleep(A) Sleep((A)*1000)
+#define popen(A,B) _popen((A),(B))
+#define pclose(A) _pclose(A)
+
+#ifndef __BORLANDC__
+#define access(A,B) _access(A,B)
+#endif
+
+#if !defined(__cplusplus)
+#define inline __inline
+#endif /* __cplusplus */
+
+inline double rint(double nr)
+{
+ double f = floor(nr);
+ double c = ceil(nr);
+ return (((c-nr) >= (nr-f)) ? f :c);
+}
+
+#ifdef _WIN64
+#define ulonglong2double(A) ((double) (ulonglong) (A))
+#define my_off_t2double(A) ((double) (my_off_t) (A))
+
+#else
+inline double ulonglong2double(ulonglong value)
+{
+ longlong nr=(longlong) value;
+ if (nr >= 0)
+ return (double) nr;
+ return (18446744073709551616.0 + (double) nr);
+}
+#define my_off_t2double(A) ulonglong2double(A)
+#endif /* _WIN64 */
+
+#if SIZEOF_OFF_T > 4
+#define lseek(A,B,C) _lseeki64((A),(longlong) (B),(C))
+#define tell(A) _telli64(A)
+#endif
+
+
+#define STACK_DIRECTION -1
+
+/* Optimized store functions for Intel x86 */
+
+#ifndef _WIN64
+#define sint2korr(A) (*((int16 *) (A)))
+#define sint3korr(A) ((int32) ((((uchar) (A)[2]) & 128) ? \
+ (((uint32) 255L << 24) | \
+ (((uint32) (uchar) (A)[2]) << 16) |\
+ (((uint32) (uchar) (A)[1]) << 8) | \
+ ((uint32) (uchar) (A)[0])) : \
+ (((uint32) (uchar) (A)[2]) << 16) |\
+ (((uint32) (uchar) (A)[1]) << 8) | \
+ ((uint32) (uchar) (A)[0])))
+#define sint4korr(A) (*((long *) (A)))
+#define uint2korr(A) (*((uint16 *) (A)))
+/*
+ ATTENTION !
+
+ Please, note, uint3korr reads 4 bytes (not 3) !
+ It means, that you have to provide enough allocated space !
+*/
+#define uint3korr(A) (long) (*((unsigned int *) (A)) & 0xFFFFFF)
+#define uint4korr(A) (*((unsigned long *) (A)))
+#define uint5korr(A) ((ulonglong)(((uint32) ((uchar) (A)[0])) +\
+ (((uint32) ((uchar) (A)[1])) << 8) +\
+ (((uint32) ((uchar) (A)[2])) << 16) +\
+ (((uint32) ((uchar) (A)[3])) << 24)) +\
+ (((ulonglong) ((uchar) (A)[4])) << 32))
+#define uint8korr(A) (*((ulonglong *) (A)))
+#define sint8korr(A) (*((longlong *) (A)))
+#define int2store(T,A) *((uint16*) (T))= (uint16) (A)
+#define int3store(T,A) { *(T)= (uchar) ((A));\
+ *(T+1)=(uchar) (((uint) (A) >> 8));\
+ *(T+2)=(uchar) (((A) >> 16)); }
+#define int4store(T,A) *((long *) (T))= (long) (A)
+#define int5store(T,A) { *(T)= (uchar)((A));\
+ *((T)+1)=(uchar) (((A) >> 8));\
+ *((T)+2)=(uchar) (((A) >> 16));\
+ *((T)+3)=(uchar) (((A) >> 24)); \
+ *((T)+4)=(uchar) (((A) >> 32)); }
+#define int8store(T,A) *((ulonglong *) (T))= (ulonglong) (A)
+
+#define doubleget(V,M) do { *((long *) &V) = *((long*) M); \
+ *(((long *) &V)+1) = *(((long*) M)+1); } while(0)
+#define doublestore(T,V) do { *((long *) T) = *((long*) &V); \
+ *(((long *) T)+1) = *(((long*) &V)+1); } while(0)
+#define float4get(V,M) { *((long *) &(V)) = *((long*) (M)); }
+#define floatstore(T,V) memcpy((byte*)(T), (byte*)(&V), sizeof(float))
+#define floatget(V,M) memcpy((byte*)(&V), (byte*)(M), sizeof(float))
+#define float8get(V,M) doubleget((V),(M))
+#define float4store(V,M) memcpy((byte*) V,(byte*) (&M),sizeof(float))
+#define float8store(V,M) doublestore((V),(M))
+#endif /* _WIN64 */
+
+#define HAVE_PERROR
+#define HAVE_VFPRINT
+#define HAVE_RENAME /* Have rename() as function */
+#define HAVE_BINARY_STREAMS /* Have "b" flag in streams */
+#define HAVE_LONG_JMP /* Have long jump function */
+#define HAVE_LOCKING /* have locking() call */
+#define HAVE_ERRNO_AS_DEFINE /* errno is a define */
+#define HAVE_STDLIB /* everything is include in this file */
+#define HAVE_MEMCPY
+#define HAVE_MEMMOVE
+#define HAVE_GETCWD
+#define HAVE_TELL
+#define HAVE_TZNAME
+#define HAVE_PUTENV
+#define HAVE_SELECT
+#define HAVE_SETLOCALE
+#define HAVE_SOCKET /* Giangi */
+#define HAVE_FLOAT_H
+#define HAVE_LIMITS_H
+#define HAVE_STDDEF_H
+#define HAVE_RINT /* defined in this file */
+#define NO_FCNTL_NONBLOCK /* No FCNTL */
+#define HAVE_ALLOCA
+#define HAVE_STRPBRK
+#define HAVE_STRSTR
+#define HAVE_COMPRESS
+#define HAVE_CREATESEMAPHORE
+#define HAVE_ISNAN
+#define HAVE_FINITE
+#define HAVE_QUERY_CACHE
+#define SPRINTF_RETURNS_INT
+#define HAVE_SETFILEPOINTER
+#define HAVE_VIO_READ_BUFF
+#define HAVE_STRNLEN
+
+#ifndef __NT__
+#undef FILE_SHARE_DELETE
+#define FILE_SHARE_DELETE 0 /* Not implemented on Win 98/ME */
+#endif
+
+#ifdef NOT_USED
+#define HAVE_SNPRINTF /* Gave link error */
+#define _snprintf snprintf
+#endif
+
+#ifdef _MSC_VER
+#define HAVE_LDIV /* The optimizer breaks in zortech for ldiv */
+#define HAVE_ANSI_INCLUDE
+#define HAVE_SYS_UTIME_H
+#define HAVE_STRTOUL
+#endif
+#define my_reinterpret_cast(A) reinterpret_cast <A>
+#define my_const_cast(A) const_cast<A>
+
+
+/* MYSQL OPTIONS */
+
+#ifdef _CUSTOMCONFIG_
+#include <custom_conf.h>
+#else
+#define DEFAULT_MYSQL_HOME "c:\\mysql"
+#define DATADIR "c:\\mysql\\data"
+#define PACKAGE "mysql"
+#define DEFAULT_BASEDIR "C:\\"
+#define SHAREDIR "share"
+#define DEFAULT_CHARSET_HOME "C:/mysql/"
+#endif
+#ifndef DEFAULT_HOME_ENV
+#define DEFAULT_HOME_ENV MYSQL_HOME
+#endif
+#ifndef DEFAULT_GROUP_SUFFIX_ENV
+#define DEFAULT_GROUP_SUFFIX_ENV MYSQL_GROUP_SUFFIX
+#endif
+
+/* File name handling */
+
+#define FN_LIBCHAR '\\'
+#define FN_ROOTDIR "\\"
+#define FN_DEVCHAR ':'
+#define FN_NETWORK_DRIVES /* Uses \\ to indicate network drives */
+#define FN_NO_CASE_SENCE /* Files are not case-sensitive */
+#define OS_FILE_LIMIT 2048
+
+#define DO_NOT_REMOVE_THREAD_WRAPPERS
+#define thread_safe_increment(V,L) InterlockedIncrement((long*) &(V))
+#define thread_safe_decrement(V,L) InterlockedDecrement((long*) &(V))
+/* The following is only used for statistics, so it should be good enough */
+#ifdef __NT__ /* This should also work on Win98 but .. */
+#define thread_safe_add(V,C,L) InterlockedExchangeAdd((long*) &(V),(C))
+#define thread_safe_sub(V,C,L) InterlockedExchangeAdd((long*) &(V),-(long) (C))
+#define statistic_add(V,C,L) thread_safe_add((V),(C),(L))
+#else
+#define thread_safe_add(V,C,L) \
+ pthread_mutex_lock((L)); (V)+=(C); pthread_mutex_unlock((L));
+#define thread_safe_sub(V,C,L) \
+ pthread_mutex_lock((L)); (V)-=(C); pthread_mutex_unlock((L));
+#define statistic_add(V,C,L) (V)+=(C)
+#endif
+#define statistic_increment(V,L) thread_safe_increment((V),(L))
+#define statistic_decrement(V,L) thread_safe_decrement((V),(L))
+
+#define shared_memory_buffer_length 16000
+#define default_shared_memory_base_name "MYSQL"
+
+#ifdef CYBOZU
+#define MYSQL_DEFAULT_CHARSET_NAME "utf8"
+#define MYSQL_DEFAULT_COLLATION_NAME "utf8_general_cs"
+#define HAVE_UTF8_GENERAL_CS 1
+#else
+#define MYSQL_DEFAULT_CHARSET_NAME "latin1"
+#define MYSQL_DEFAULT_COLLATION_NAME "latin1_swedish_ci"
+#endif
+
+#define HAVE_SPATIAL 1
+#define HAVE_RTREE_KEYS 1
+
+#define HAVE_OPENSSL 1
+#define HAVE_YASSL 1
+
+/* Define charsets you want */
+/* #undef HAVE_CHARSET_armscii8 */
+/* #undef HAVE_CHARSET_ascii */
+#ifndef CYBOZU
+#define HAVE_CHARSET_big5 1
+#define HAVE_CHARSET_cp1250 1
+#endif
+/* #undef HAVE_CHARSET_cp1251 */
+/* #undef HAVE_CHARSET_cp1256 */
+/* #undef HAVE_CHARSET_cp1257 */
+/* #undef HAVE_CHARSET_cp850 */
+/* #undef HAVE_CHARSET_cp852 */
+/* #undef HAVE_CHARSET_cp866 */
+#define HAVE_CHARSET_cp932 1
+/* #undef HAVE_CHARSET_dec8 */
+#ifndef CYBOZU
+#define HAVE_CHARSET_eucjpms 1
+#define HAVE_CHARSET_euckr 1
+#define HAVE_CHARSET_gb2312 1
+#define HAVE_CHARSET_gbk 1
+#endif
+/* #undef HAVE_CHARSET_greek */
+/* #undef HAVE_CHARSET_hebrew */
+/* #undef HAVE_CHARSET_hp8 */
+/* #undef HAVE_CHARSET_keybcs2 */
+/* #undef HAVE_CHARSET_koi8r */
+/* #undef HAVE_CHARSET_koi8u */
+#ifndef CYBOZU
+#define HAVE_CHARSET_latin1 1
+#define HAVE_CHARSET_latin2 1
+#endif
+/* #undef HAVE_CHARSET_latin5 */
+/* #undef HAVE_CHARSET_latin7 */
+/* #undef HAVE_CHARSET_macce */
+/* #undef HAVE_CHARSET_macroman */
+#define HAVE_CHARSET_sjis 1
+/* #undef HAVE_CHARSET_swe7 */
+#ifndef CYBOZU
+#define HAVE_CHARSET_tis620 1
+#define HAVE_CHARSET_ucs2 1
+#define HAVE_CHARSET_ujis 1
+#endif
+#define HAVE_CHARSET_utf8 1
+#define HAVE_UCA_COLLATIONS 1
+
Added: Frontier/vendor/mysql5-client-win/include/errmsg.h
===================================================================
--- Frontier/vendor/mysql5-client-win/include/errmsg.h (rev 0)
+++ Frontier/vendor/mysql5-client-win/include/errmsg.h 2007-05-30 22:26:15 UTC (rev 1663)
@@ -0,0 +1,102 @@
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+
+/* Error messages for MySQL clients */
+/* (Error messages for the daemon are in share/language/errmsg.sys) */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+void init_client_errs(void);
+void finish_client_errs(void);
+extern const char *client_errors[]; /* Error messages */
+#ifdef __cplusplus
+}
+#endif
+
+#define CR_MIN_ERROR 2000 /* For easier client code */
+#define CR_MAX_ERROR 2999
+#if defined(OS2) && defined(MYSQL_SERVER)
+#define CER(X) client_errors[(X)-CR_MIN_ERROR]
+#elif !defined(ER)
+#define ER(X) client_errors[(X)-CR_MIN_ERROR]
+#endif
+#define CLIENT_ERRMAP 2 /* Errormap used by my_error() */
+
+/* Do not add error numbers before CR_ERROR_FIRST. */
+/* If necessary to add lower numbers, change CR_ERROR_FIRST accordingly. */
+#define CR_ERROR_FIRST 2000 /*Copy first error nr.*/
+#define CR_UNKNOWN_ERROR 2000
+#define CR_SOCKET_CREATE_ERROR 2001
+#define CR_CONNECTION_ERROR 2002
+#define CR_CONN_HOST_ERROR 2003
+#define CR_IPSOCK_ERROR 2004
+#define CR_UNKNOWN_HOST 2005
+#define CR_SERVER_GONE_ERROR 2006
+#define CR_VERSION_ERROR 2007
+#define CR_OUT_OF_MEMORY 2008
+#define CR_WRONG_HOST_INFO 2009
+#define CR_LOCALHOST_CONNECTION 2010
+#define CR_TCP_CONNECTION 2011
+#define CR_SERVER_HANDSHAKE_ERR 2012
+#define CR_SERVER_LOST 2013
+#define CR_COMMANDS_OUT_OF_SYNC 2014
+#define CR_NAMEDPIPE_CONNECTION 2015
+#define CR_NAMEDPIPEWAIT_ERROR 2016
+#define CR_NAMEDPIPEOPEN_ERROR 2017
+#define CR_NAMEDPIPESETSTATE_ERROR 2018
+#define CR_CANT_READ_CHARSET 2019
+#define CR_NET_PACKET_TOO_LARGE 2020
+#define CR_EMBEDDED_CONNECTION 2021
+#define CR_PROBE_SLAVE_STATUS 2022
+#define CR_PROBE_SLAVE_HOSTS 2023
+#define CR_PROBE_SLAVE_CONNECT 2024
+#define CR_PROBE_MASTER_CONNECT 2025
+#define CR_SSL_CONNECTION_ERROR 2026
+#define CR_MALFORMED_PACKET 2027
+#define CR_WRONG_LICENSE 2028
+
+/* new 4.1 error codes */
+#define CR_NULL_POINTER 2029
+#define CR_NO_PREPARE_STMT 2030
+#define CR_PARAMS_NOT_BOUND 2031
+#define CR_DATA_TRUNCATED 2032
+#define CR_NO_PARAMETERS_EXISTS 2033
+#define CR_INVALID_PARAMETER_NO 2034
+#define CR_INVALID_BUFFER_USE 2035
+#define CR_UNSUPPORTED_PARAM_TYPE 2036
+
+#define CR_SHARED_MEMORY_CONNECTION 2037
+#define CR_SHARED_MEMORY_CONNECT_REQUEST_ERROR 2038
+#define CR_SHARED_MEMORY_CONNECT_ANSWER_ERROR 2039
+#define CR_SHARED_MEMORY_CONNECT_FILE_MAP_ERROR 2040
+#define CR_SHARED_MEMORY_CONNECT_MAP_ERROR 2041
+#define CR_SHARED_MEMORY_FILE_MAP_ERROR 2042
+#define CR_SHARED_MEMORY_MAP_ERROR 2043
+#define CR_SHARED_MEMORY_EVENT_ERROR 2044
+#define CR_SHARED_MEMORY_CONNECT_ABANDONED_ERROR 2045
+#define CR_SHARED_MEMORY_CONNECT_SET_ERROR 2046
+#define CR_CONN_UNKNOW_PROTOCOL 2047
+#define CR_INVALID_CONN_HANDLE 2048
+#define CR_SECURE_AUTH 2049
+#define CR_FETCH_CANCELED 2050
+#define CR_NO_DATA 2051
+#define CR_NO_STMT_METADATA 2052
+#define CR_NO_RESULT_SET 2053
+#define CR_NOT_IMPLEMENTED 2054
+#define CR_SERVER_LOST_EXTENDED 2055
+#define CR_ERROR_LAST /*Copy last error nr:*/ 2055
+/* Add error numbers before CR_ERROR_LAST and change it accordingly. */
+
Added: Frontier/vendor/mysql5-client-win/include/libmysql.def
===================================================================
--- Frontier/vendor/mysql5-client-win/include/libmysql.def (rev 0)
+++ Frontier/vendor/mysql5-client-win/include/libmysql.def 2007-05-30 22:26:15 UTC (rev 1663)
@@ -0,0 +1,155 @@
+LIBRARY LIBMYSQL
+DESCRIPTION 'MySQL 5.0 Client Library'
+VERSION 6.0
+EXPORTS
+ _dig_vec_lower
+ _dig_vec_upper
+ bmove_upp
+ delete_dynamic
+ free_defaults
+ getopt_compare_strings
+ getopt_ull_limit_value
+ handle_options
+ init_dynamic_array
+ insert_dynamic
+ int2str
+ is_prefix
+ list_add
+ list_delete
+ load_defaults
+ my_end
+ my_getopt_print_errors
+ my_init
+ my_malloc
+ my_memdup
+ my_no_flags_free
+ my_path
+ mysql_get_parameters
+ my_print_help
+ my_print_variables
+ my_realloc
+ my_strdup
+ mysql_thread_end
+ mysql_thread_init
+ myodbc_remove_escape
+ mysql_affected_rows
+ mysql_autocommit
+ mysql_stmt_bind_param
+ mysql_stmt_bind_result
+ mysql_change_user
+ mysql_character_set_name
+ mysql_close
+ mysql_commit
+ mysql_data_seek
+ mysql_debug
+ mysql_dump_debug_info
+ mysql_eof
+ mysql_errno
+ mysql_error
+ mysql_escape_string
+ mysql_hex_string
+ mysql_stmt_execute
+ mysql_stmt_fetch
+ mysql_stmt_fetch_column
+ mysql_fetch_field
+ mysql_fetch_field_direct
+ mysql_fetch_fields
+ mysql_fetch_lengths
+ mysql_fetch_row
+ mysql_field_count
+ mysql_field_seek
+ mysql_field_tell
+ mysql_free_result
+ mysql_get_client_info
+ mysql_get_host_info
+ mysql_get_proto_info
+ mysql_get_server_info
+ mysql_get_client_version
+ mysql_get_ssl_cipher
+ mysql_info
+ mysql_init
+ mysql_insert_id
+ mysql_kill
+ mysql_set_server_option
+ mysql_list_dbs
+ mysql_list_fields
+ mysql_list_processes
+ mysql_list_tables
+ mysql_more_results
+ mysql_next_result
+ mysql_num_fields
+ mysql_num_rows
+ mysql_odbc_escape_string
+ mysql_options
+ mysql_stmt_param_count
+ mysql_stmt_param_metadata
+ mysql_ping
+ mysql_stmt_result_metadata
+ mysql_query
+ mysql_read_query_result
+ mysql_real_connect
+ mysql_real_escape_string
+ mysql_real_query
+ mysql_refresh
+ mysql_rollback
+ mysql_row_seek
+ mysql_row_tell
+ mysql_select_db
+ mysql_stmt_send_long_data
+ mysql_send_query
+ mysql_shutdown
+ mysql_ssl_set
+ mysql_stat
+ mysql_stmt_affected_rows
+ mysql_stmt_close
+ mysql_stmt_reset
+ mysql_stmt_data_seek
+ mysql_stmt_errno
+ mysql_stmt_error
+ mysql_stmt_free_result
+ mysql_stmt_num_rows
+ mysql_stmt_row_seek
+ mysql_stmt_row_tell
+ mysql_stmt_store_result
+ mysql_store_result
+ mysql_thread_id
+ mysql_thread_safe
+ mysql_use_result
+ mysql_warning_count
+ mysql_stmt_sqlstate
+ mysql_sqlstate
+ mysql_get_server_version
+ set_dynamic
+ strcend
+ strcont
+ strdup_root
+ strfill
+ strinstr
+ strmake
+ strmov
+ strxmov
+ mysql_stmt_prepare
+ mysql_stmt_init
+ mysql_stmt_insert_id
+ mysql_stmt_attr_get
+ mysql_stmt_attr_set
+ mysql_stmt_field_count
+ client_errors
+ mysql_set_local_infile_default
+ mysql_set_local_infile_handler
+ mysql_disable_reads_from_master
+ mysql_disable_rpl_parse
+ mysql_enable_reads_from_master
+ mysql_enable_rpl_parse
+ mysql_master_query
+ mysql_rpl_parse_enabled
+ mysql_rpl_probe
+ mysql_rpl_query_type
+ mysql_slave_query
+ mysql_embedded
+ mysql_server_init
+ mysql_server_end
+ mysql_set_character_set
+ mysql_get_character_set_info
+ get_defaults_options
+ modify_defaults_file
Added: Frontier/vendor/mysql5-client-win/include/m_ctype.h
===================================================================
--- Frontier/vendor/mysql5-client-win/include/m_ctype.h (rev 0)
+++ Frontier/vendor/mysql5-client-win/include/m_ctype.h 2007-05-30 22:26:15 UTC (rev 1663)
@@ -0,0 +1,507 @@
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+
+/*
+ A better inplementation of the UNIX ctype(3) library.
+ Notes: my_global.h should be included before ctype.h
+*/
+
+#ifndef _m_ctype_h
+#define _m_ctype_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define MY_CS_NAME_SIZE 32
+#define MY_CS_CTYPE_TABLE_SIZE 257
+#define MY_CS_TO_LOWER_TABLE_SIZE 256
+#define MY_CS_TO_UPPER_TABLE_SIZE 256
+#define MY_CS_SORT_ORDER_TABLE_SIZE 256
+#define MY_CS_TO_UNI_TABLE_SIZE 256
+
+#define CHARSET_DIR "charsets/"
+
+#define my_wc_t ulong
+
+typedef struct unicase_info_st
+{
+ uint16 toupper;
+ uint16 tolower;
+ uint16 sort;
+} MY_UNICASE_INFO;
+
+
+extern MY_UNICASE_INFO *my_unicase_default[256];
+extern MY_UNICASE_INFO *my_unicase_turkish[256];
+
+
+/* wm_wc and wc_mb return codes */
+#define MY_CS_ILSEQ 0 /* Wrong by sequence: wb_wc */
+#define MY_CS_ILUNI 0 /* Cannot encode Unicode to charset: wc_mb */
+#define MY_CS_TOOSMALL -101 /* Need at least one byte: wc_mb and mb_wc */
+#define MY_CS_TOOSMALL2 -102 /* Need at least two bytes: wc_mb and mb_wc */
+#define MY_CS_TOOSMALL3 -103 /* Need at least three bytes: wc_mb and mb_wc */
+/* These following three are currently not really used */
+#define MY_CS_TOOSMALL4 -104 /* Need at least 4 bytes: wc_mb and mb_wc */
+#define MY_CS_TOOSMALL5 -105 /* Need at least 5 bytes: wc_mb and mb_wc */
+#define MY_CS_TOOSMALL6 -106 /* Need at least 6 bytes: wc_mb and mb_wc */
+/* A helper macros for "need at least n bytes" */
+#define MY_CS_TOOSMALLN(n) (-100-(n))
+
+#define MY_SEQ_INTTAIL 1
+#define MY_SEQ_SPACES 2
+
+ /* My charsets_list flags */
+#define MY_CS_COMPILED 1 /* compiled-in sets */
+#define MY_CS_CONFIG 2 /* sets that have a *.conf file */
+#define MY_CS_INDEX 4 /* sets listed in the Index file */
+#define MY_CS_LOADED 8 /* sets that are currently loaded */
+#define MY_CS_BINSORT 16 /* if binary sort order */
+#define MY_CS_PRIMARY 32 /* if primary collation */
+#define MY_CS_STRNXFRM 64 /* if strnxfrm is used for sort */
+#define MY_CS_UNICODE 128 /* is a charset is full unicode */
+#define MY_CS_READY 256 /* if a charset is initialized */
+#define MY_CS_AVAILABLE 512 /* If either compiled-in or loaded*/
+#define MY_CS_CSSORT 1024 /* if case sensitive sort order */
+#define MY_CHARSET_UNDEFINED 0
+
+
+typedef struct my_uni_idx_st
+{
+ uint16 from;
+ uint16 to;
+ uchar *tab;
+} MY_UNI_IDX;
+
+typedef struct
+{
+ uint beg;
+ uint end;
+ uint mblen;
+} my_match_t;
+
+enum my_lex_states
+{
+ MY_LEX_START, MY_LEX_CHAR, MY_LEX_IDENT,
+ MY_LEX_IDENT_SEP, MY_LEX_IDENT_START,
+ MY_LEX_REAL, MY_LEX_HEX_NUMBER, MY_LEX_BIN_NUMBER,
+ MY_LEX_CMP_OP, MY_LEX_LONG_CMP_OP, MY_LEX_STRING, MY_LEX_COMMENT, MY_LEX_END,
+ MY_LEX_OPERATOR_OR_IDENT, MY_LEX_NUMBER_IDENT, MY_LEX_INT_OR_REAL,
+ MY_LEX_REAL_OR_POINT, MY_LEX_BOOL, MY_LEX_EOL, MY_LEX_ESCAPE,
+ MY_LEX_LONG_COMMENT, MY_LEX_END_LONG_COMMENT, MY_LEX_SEMICOLON,
+ MY_LEX_SET_VAR, MY_LEX_USER_END, MY_LEX_HOSTNAME, MY_LEX_SKIP,
+ MY_LEX_USER_VARIABLE_DELIMITER, MY_LEX_SYSTEM_VAR,
+ MY_LEX_IDENT_OR_KEYWORD,
+ MY_LEX_IDENT_OR_HEX, MY_LEX_IDENT_OR_BIN, MY_LEX_IDENT_OR_NCHAR,
+ MY_LEX_STRING_OR_DELIMITER
+};
+
+struct charset_info_st;
+
+
+/* See strings/CHARSET_INFO.txt for information about this structure */
+typedef struct my_collation_handler_st
+{
+ my_bool (*init)(struct charset_info_st *, void *(*alloc)(uint));
+ /* Collation routines */
+ int (*strnncoll)(struct charset_info_st *,
+ const uchar *, uint, const uchar *, uint, my_bool);
+ int (*strnncollsp)(struct charset_info_st *,
+ const uchar *, uint, const uchar *, uint,
+ my_bool diff_if_only_endspace_difference);
+ int (*strnxfrm)(struct charset_info_st *,
+ uchar *, uint, const uchar *, uint);
+ uint (*strnxfrmlen)(struct charset_info_st *, uint);
+ my_bool (*like_range)(struct charset_info_st *,
+ const char *s, uint s_length,
+ pchar w_prefix, pchar w_one, pchar w_many,
+ uint res_length,
+ char *min_str, char *max_str,
+ uint *min_len, uint *max_len);
+ int (*wildcmp)(struct charset_info_st *,
+ const char *str,const char *str_end,
+ const char *wildstr,const char *wildend,
+ int escape,int w_one, int w_many);
+
+ int (*strcasecmp)(struct charset_info_st *, const char *, const char *);
+
+ uint (*instr)(struct charset_info_st *,
+ const char *b, uint b_length,
+ const char *s, uint s_length,
+ my_match_t *match, uint nmatch);
+
+ /* Hash calculation */
+ void (*hash_sort)(struct charset_info_st *cs, const uchar *key, uint len,
+ ulong *nr1, ulong *nr2);
+ my_bool (*propagate)(struct charset_info_st *cs, const uchar *str, uint len);
+} MY_COLLATION_HANDLER;
+
+extern MY_COLLATION_HANDLER my_collation_mb_bin_handler;
+extern MY_COLLATION_HANDLER my_collation_8bit_bin_handler;
+extern MY_COLLATION_HANDLER my_collation_8bit_simple_ci_handler;
+extern MY_COLLATION_HANDLER my_collation_ucs2_uca_handler;
+
+
+/* See strings/CHARSET_INFO.txt about information on this structure */
+typedef struct my_charset_handler_st
+{
+ my_bool (*init)(struct charset_info_st *, void *(*alloc)(uint));
+ /* Multibyte routines */
+ int (*ismbchar)(struct charset_info_st *, const char *, const char *);
+ int (*mbcharlen)(struct charset_info_st *, uint);
+ uint (*numchars)(struct charset_info_st *, const char *b, const char *e);
+ uint (*charpos)(struct charset_info_st *, const char *b, const char *e, uint pos);
+ uint (*well_formed_len)(struct charset_info_st *,
+ const char *b,const char *e,
+ uint nchars, int *error);
+ uint (*lengthsp)(struct charset_info_st *, const char *ptr, uint length);
+ uint (*numcells)(struct charset_info_st *, const char *b, const char *e);
+
+ /* Unicode convertion */
+ int (*mb_wc)(struct charset_info_st *cs,my_wc_t *wc,
+ const unsigned char *s,const unsigned char *e);
+ int (*wc_mb)(struct charset_info_st *cs,my_wc_t wc,
+ unsigned char *s,unsigned char *e);
+
+ /* Functions for case and sort convertion */
+ uint (*caseup_str)(struct charset_info_st *, char *);
+ uint (*casedn_str)(struct charset_info_st *, char *);
+ uint (*caseup)(struct charset_info_st *, char *src, uint srclen,
+ char *dst, uint dstlen);
+ uint (*casedn)(struct charset_info_st *, char *src, uint srclen,
+ char *dst, uint dstlen);
+
+ /* Charset dependant snprintf() */
+ int (*snprintf)(struct charset_info_st *, char *to, uint n, const char *fmt,
+ ...) ATTRIBUTE_FORMAT_FPTR(printf, 4, 5);
+ int (*long10_to_str)(struct charset_info_st *, char *to, uint n, int radix,
+ long int val);
+ int (*longlong10_to_str)(struct charset_info_st *, char *to, uint n,
+ int radix, longlong val);
+
+ void (*fill)(struct charset_info_st *, char *to, uint len, int fill);
+
+ /* String-to-number convertion routines */
+ long (*strntol)(struct charset_info_st *, const char *s, uint l,
+ int base, char **e, int *err);
+ ulong (*strntoul)(struct charset_info_st *, const char *s, uint l,
+ int base, char **e, int *err);
+ longlong (*strntoll)(struct charset_info_st *, const char *s, uint l,
+ int base, char **e, int *err);
+ ulonglong (*strntoull)(struct charset_info_st *, const char *s, uint l,
+ int base, char **e, int *err);
+ double (*strntod)(struct charset_info_st *, char *s, uint l, char **e,
+ int *err);
+ longlong (*strtoll10)(struct charset_info_st *cs,
+ const char *nptr, char **endptr, int *error);
+ ulonglong (*strntoull10rnd)(struct charset_info_st *cs,
+ const char *str, uint length, int unsigned_fl,
+ char **endptr, int *error);
+ ulong (*scan)(struct charset_info_st *, const char *b, const char *e,
+ int sq);
+} MY_CHARSET_HANDLER;
+
+extern MY_CHARSET_HANDLER my_charset_8bit_handler;
+extern MY_CHARSET_HANDLER my_charset_ucs2_handler;
+
+
+/* See strings/CHARSET_INFO.txt about information on this structure */
+typedef struct charset_info_st
+{
+ uint number;
+ uint primary_number;
+ uint binary_number;
+ uint state;
+ const char *csname;
+ const char *name;
+ const char *comment;
+ const char *tailoring;
+ uchar *ctype;
+ uchar *to_lower;
+ uchar *to_upper;
+ uchar *sort_order;
+ uint16 *contractions;
+ uint16 **sort_order_big;
+ uint16 *tab_to_uni;
+ MY_UNI_IDX *tab_from_uni;
+ MY_UNICASE_INFO **caseinfo;
+ uchar *state_map;
+ uchar *ident_map;
+ uint strxfrm_multiply;
+ uchar caseup_multiply;
+ uchar casedn_multiply;
+ uint mbminlen;
+ uint mbmaxlen;
+ uint16 min_sort_char;
+ uint16 max_sort_char; /* For LIKE optimization */
+ uchar pad_char;
+ my_bool escape_with_backslash_is_dangerous;
+
+ MY_CHARSET_HANDLER *cset;
+ MY_COLLATION_HANDLER *coll;
+
+} CHARSET_INFO;
+
+
+extern CHARSET_INFO my_charset_bin;
+extern CHARSET_INFO my_charset_big5_chinese_ci;
+extern CHARSET_INFO my_charset_big5_bin;
+extern CHARSET_INFO my_charset_cp932_japanese_ci;
+extern CHARSET_INFO my_charset_cp932_bin;
+extern CHARSET_INFO my_charset_eucjpms_japanese_ci;
+extern CHARSET_INFO my_charset_eucjpms_bin;
+extern CHARSET_INFO my_charset_euckr_korean_ci;
+extern CHARSET_INFO my_charset_euckr_bin;
+extern CHARSET_INFO my_charset_gb2312_chinese_ci;
+extern CHARSET_INFO my_charset_gb2312_bin;
+extern CHARSET_INFO my_charset_gbk_chinese_ci;
+extern CHARSET_INFO my_charset_gbk_bin;
+extern CHARSET_INFO my_charset_latin1;
+extern CHARSET_INFO my_charset_latin1_german2_ci;
+extern CHARSET_INFO my_charset_latin1_bin;
+extern CHARSET_INFO my_charset_latin2_czech_ci;
+extern CHARSET_INFO my_charset_sjis_japanese_ci;
+extern CHARSET_INFO my_charset_sjis_bin;
+extern CHARSET_INFO my_charset_tis620_thai_ci;
+extern CHARSET_INFO my_charset_tis620_bin;
+extern CHARSET_INFO my_charset_ucs2_general_ci;
+extern CHARSET_INFO my_charset_ucs2_bin;
+extern CHARSET_INFO my_charset_ucs2_general_uca;
+extern CHARSET_INFO my_charset_ujis_japanese_ci;
+extern CHARSET_INFO my_charset_ujis_bin;
+extern CHARSET_INFO my_charset_utf8_general_ci;
+extern CHARSET_INFO my_charset_utf8_bin;
+extern CHARSET_INFO my_charset_cp1250_czech_ci;
+
+/* declarations for simple charsets */
+extern int my_strnxfrm_simple(CHARSET_INFO *, uchar *, uint, const uchar *,
+ uint);
+uint my_strnxfrmlen_simple(CHARSET_INFO *, uint);
+extern int my_strnncoll_simple(CHARSET_INFO *, const uchar *, uint,
+ const uchar *, uint, my_bool);
+
+extern int my_strnncollsp_simple(CHARSET_INFO *, const uchar *, uint,
+ const uchar *, uint,
+ my_bool diff_if_only_endspace_difference);
+
+extern void my_hash_sort_simple(CHARSET_INFO *cs,
+ const uchar *key, uint len,
+ ulong *nr1, ulong *nr2);
+
+extern uint my_lengthsp_8bit(CHARSET_INFO *cs, const char *ptr, uint length);
+
+extern uint my_instr_simple(struct charset_info_st *,
+ const char *b, uint b_length,
+ const char *s, uint s_length,
+ my_match_t *match, uint nmatch);
+
+
+/* Functions for 8bit */
+extern uint my_caseup_str_8bit(CHARSET_INFO *, char *);
+extern uint my_casedn_str_8bit(CHARSET_INFO *, char *);
+extern uint my_caseup_8bit(CHARSET_INFO *, char *src, uint srclen,
+ char *dst, uint dstlen);
+extern uint my_casedn_8bit(CHARSET_INFO *, char *src, uint srclen,
+ char *dst, uint dstlen);
+
+extern int my_strcasecmp_8bit(CHARSET_INFO * cs, const char *, const char *);
+
+int my_mb_wc_8bit(CHARSET_INFO *cs,my_wc_t *wc, const uchar *s,const uchar *e);
+int my_wc_mb_8bit(CHARSET_INFO *cs,my_wc_t wc, uchar *s, uchar *e);
+
+ulong my_scan_8bit(CHARSET_INFO *cs, const char *b, const char *e, int sq);
+
+int my_snprintf_8bit(struct charset_info_st *, char *to, uint n,
+ const char *fmt, ...)
+ ATTRIBUTE_FORMAT(printf, 4, 5);
+
+long my_strntol_8bit(CHARSET_INFO *, const char *s, uint l, int base,
+ char **e, int *err);
+ulong my_strntoul_8bit(CHARSET_INFO *, const char *s, uint l, int base,
+ char **e, int *err);
+longlong my_strntoll_8bit(CHARSET_INFO *, const char *s, uint l, int base,
+ char **e, int *err);
+ulonglong my_strntoull_8bit(CHARSET_INFO *, const char *s, uint l, int base,
+ char **e, int *err);
+double my_strntod_8bit(CHARSET_INFO *, char *s, uint l,char **e,
+ int *err);
+int my_long10_to_str_8bit(CHARSET_INFO *, char *to, uint l, int radix,
+ long int val);
+int my_longlong10_to_str_8bit(CHARSET_INFO *, char *to, uint l, int radix,
+ longlong val);
+
+longlong my_strtoll10_8bit(CHARSET_INFO *cs,
+ const char *nptr, char **endptr, int *error);
+longlong my_strtoll10_ucs2(CHARSET_INFO *cs,
+ const char *nptr, char **endptr, int *error);
+
+ulonglong my_strntoull10rnd_8bit(CHARSET_INFO *cs,
+ const char *str, uint length, int unsigned_fl,
+ char **endptr, int *error);
+ulonglong my_strntoull10rnd_ucs2(CHARSET_INFO *cs,
+ const char *str, uint length, int unsigned_fl,
+ char **endptr, int *error);
+
+void my_fill_8bit(CHARSET_INFO *cs, char* to, uint l, int fill);
+
+my_bool my_like_range_simple(CHARSET_INFO *cs,
+ const char *ptr, uint ptr_length,
+ pbool escape, pbool w_one, pbool w_many,
+ uint res_length,
+ char *min_str, char *max_str,
+ uint *min_length, uint *max_length);
+
+my_bool my_like_range_mb(CHARSET_INFO *cs,
+ const char *ptr, uint ptr_length,
+ pbool escape, pbool w_one, pbool w_many,
+ uint res_length,
+ char *min_str, char *max_str,
+ uint *min_length, uint *max_length);
+
+my_bool my_like_range_ucs2(CHARSET_INFO *cs,
+ const char *ptr, uint ptr_length,
+ pbool escape, pbool w_one, pbool w_many,
+ uint res_length,
+ char *min_str, char *max_str,
+ uint *min_length, uint *max_length);
+
+
+int my_wildcmp_8bit(CHARSET_INFO *,
+ const char *str,const char *str_end,
+ const char *wildstr,const char *wildend,
+ int escape, int w_one, int w_many);
+
+int my_wildcmp_bin(CHARSET_INFO *,
+ const char *str,const char *str_end,
+ const char *wildstr,const char *wildend,
+ int escape, int w_one, int w_many);
+
+uint my_numchars_8bit(CHARSET_INFO *, const char *b, const char *e);
+uint my_numcells_8bit(CHARSET_INFO *, const char *b, const char *e);
+uint my_charpos_8bit(CHARSET_INFO *, const char *b, const char *e, uint pos);
+uint my_well_formed_len_8bit(CHARSET_INFO *, const char *b, const char *e,
+ uint pos, int *error);
+int my_mbcharlen_8bit(CHARSET_INFO *, uint c);
+
+
+/* Functions for multibyte charsets */
+extern uint my_caseup_str_mb(CHARSET_INFO *, char *);
+extern uint my_casedn_str_mb(CHARSET_INFO *, char *);
+extern uint my_caseup_mb(CHARSET_INFO *, char *src, uint srclen,
+ char *dst, uint dstlen);
+extern uint my_casedn_mb(CHARSET_INFO *, char *src, uint srclen,
+ char *dst, uint dstlen);
+extern int my_strcasecmp_mb(CHARSET_INFO * cs,const char *, const char *);
+
+int my_wildcmp_mb(CHARSET_INFO *,
+ const char *str,const char *str_end,
+ const char *wildstr,const char *wildend,
+ int escape, int w_one, int w_many);
+uint my_numchars_mb(CHARSET_INFO *, const char *b, const char *e);
+uint my_numcells_mb(CHARSET_INFO *, const char *b, const char *e);
+uint my_charpos_mb(CHARSET_INFO *, const char *b, const char *e, uint pos);
+uint my_well_formed_len_mb(CHARSET_INFO *, const char *b, const char *e,
+ uint pos, int *error);
+uint my_instr_mb(struct charset_info_st *,
+ const char *b, uint b_length,
+ const char *s, uint s_length,
+ my_match_t *match, uint nmatch);
+
+int my_wildcmp_unicode(CHARSET_INFO *cs,
+ const char *str, const char *str_end,
+ const char *wildstr, const char *wildend,
+ int escape, int w_one, int w_many,
+ MY_UNICASE_INFO **weights);
+
+extern my_bool my_parse_charset_xml(const char *bug, uint len,
+ int (*add)(CHARSET_INFO *cs));
+
+my_bool my_propagate_simple(CHARSET_INFO *cs, const uchar *str, uint len);
+my_bool my_propagate_complex(CHARSET_INFO *cs, const uchar *str, uint len);
+
+
+#define _MY_U 01 /* Upper case */
+#define _MY_L 02 /* Lower case */
+#define _MY_NMR 04 /* Numeral (digit) */
+#define _MY_SPC 010 /* Spacing character */
+#define _MY_PNT 020 /* Punctuation */
+#define _MY_CTR 040 /* Control character */
+#define _MY_B 0100 /* Blank */
+#define _MY_X 0200 /* heXadecimal digit */
+
+
+#define my_isascii(c) (!((c) & ~0177))
+#define my_toascii(c) ((c) & 0177)
+#define my_tocntrl(c) ((c) & 31)
+#define my_toprint(c) ((c) | 64)
+#define my_toupper(s,c) (char) ((s)->to_upper[(uchar) (c)])
+#define my_tolower(s,c) (char) ((s)->to_lower[(uchar) (c)])
+#define my_isalpha(s, c) (((s)->ctype+1)[(uchar) (c)] & (_MY_U | _MY_L))
+#define my_isupper(s, c) (((s)->ctype+1)[(uchar) (c)] & _MY_U)
+#define my_islower(s, c) (((s)->ctype+1)[(uchar) (c)] & _MY_L)
+#define my_isdigit(s, c) (((s)->ctype+1)[(uchar) (c)] & _MY_NMR)
+#define my_isxdigit(s, c) (((s)->ctype+1)[(uchar) (c)] & _MY_X)
+#define my_isalnum(s, c) (((s)->ctype+1)[(uchar) (c)] & (_MY_U | _MY_L | _MY_NMR))
+#define my_isspace(s, c) (((s)->ctype+1)[(uchar) (c)] & _MY_SPC)
+#define my_ispunct(s, c) (((s)->ctype+1)[(uchar) (c)] & _MY_PNT)
+#define my_isprint(s, c) (((s)->ctype+1)[(uchar) (c)] & (_MY_PNT | _MY_U | _MY_L | _MY_NMR | _MY_B))
+#define my_isgraph(s, c) (((s)->ctype+1)[(uchar) (c)] & (_MY_PNT | _MY_U | _MY_L | _MY_NMR))
+#define my_iscntrl(s, c) (((s)->ctype+1)[(uchar) (c)] & _MY_CTR)
+
+/* Some macros that should be cleaned up a little */
+#define my_isvar(s,c) (my_isalnum(s,c) || (c) == '_')
+#define my_isvar_start(s,c) (my_isalpha(s,c) || (c) == '_')
+
+#define my_binary_compare(s) ((s)->state & MY_CS_BINSORT)
+#define use_strnxfrm(s) ((s)->state & MY_CS_STRNXFRM)
+#define my_strnxfrm(s, a, b, c, d) ((s)->coll->strnxfrm((s), (a), (b), (c), (d)))
+#define my_strnncoll(s, a, b, c, d) ((s)->coll->strnncoll((s), (a), (b), (c), (d), 0))
+#define my_like_range(s, a, b, c, d, e, f, g, h, i, j) \
+ ((s)->coll->like_range((s), (a), (b), (c), (d), (e), (f), (g), (h), (i), (j)))
+#define my_wildcmp(cs,s,se,w,we,e,o,m) ((cs)->coll->wildcmp((cs),(s),(se),(w),(we),(e),(o),(m)))
+#define my_strcasecmp(s, a, b) ((s)->coll->strcasecmp((s), (a), (b)))
+#define my_charpos(cs, b, e, num) (cs)->cset->charpos((cs), (const char*) (b), (const char *)(e), (num))
+
+
+#define use_mb(s) ((s)->cset->ismbchar != NULL)
+#define my_ismbchar(s, a, b) ((s)->cset->ismbchar((s), (a), (b)))
+#ifdef USE_MB
+#define my_mbcharlen(s, a) ((s)->cset->mbcharlen((s),(a)))
+#else
+#define my_mbcharlen(s, a) 1
+#endif
+
+#define my_caseup_str(s, a) ((s)->cset->caseup_str((s), (a)))
+#define my_casedn_str(s, a) ((s)->cset->casedn_str((s), (a)))
+#define my_strntol(s, a, b, c, d, e) ((s)->cset->strntol((s),(a),(b),(c),(d),(e)))
+#define my_strntoul(s, a, b, c, d, e) ((s)->cset->strntoul((s),(a),(b),(c),(d),(e)))
+#define my_strntoll(s, a, b, c, d, e) ((s)->cset->strntoll((s),(a),(b),(c),(d),(e)))
+#define my_strntoull(s, a, b, c,d, e) ((s)->cset->strntoull((s),(a),(b),(c),(d),(e)))
+#define my_strntod(s, a, b, c, d) ((s)->cset->strntod((s),(a),(b),(c),(d)))
+
+
+/* XXX: still need to take care of this one */
+#ifdef MY_CHARSET_TIS620
+#error The TIS620 charset is broken at the moment. Tell tim to fix it.
+#define USE_TIS620
+#include "t_ctype.h"
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _m_ctype_h */
Added: Frontier/vendor/mysql5-client-win/include/m_string.h
===================================================================
--- Frontier/vendor/mysql5-client-win/include/m_string.h (rev 0)
+++ Frontier/vendor/mysql5-client-win/include/m_string.h 2007-05-30 22:26:15 UTC (rev 1663)
@@ -0,0 +1,262 @@
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+
+/* There may be prolems include all of theese. Try to test in
+ configure with ones are needed? */
+
+/* This is needed for the definitions of strchr... on solaris */
+
+#ifndef _m_string_h
+#define _m_string_h
+#ifndef __USE_GNU
+#define __USE_GNU /* We want to use stpcpy */
+#endif
+#if defined(HAVE_STRINGS_H)
+#include <strings.h>
+#endif
+#if defined(HAVE_STRING_H)
+#include <string.h>
+#endif
+
+/* need by my_vsnprintf */
+#include <stdarg.h>
+
+/* Correct some things for UNIXWARE7 */
+#ifdef HAVE_UNIXWARE7_THREADS
+#undef HAVE_STRINGS_H
+#undef HAVE_MEMORY_H
+#define HAVE_MEMCPY
+#ifndef HAVE_MEMMOVE
+#define HAVE_MEMMOVE
+#endif
+#undef HAVE_BCMP
+#undef bcopy
+#undef bcmp
+#undef bzero
+#endif /* HAVE_UNIXWARE7_THREADS */
+#ifdef _AIX
+#undef HAVE_BCMP
+#endif
+
+/* This is needed for the definitions of bzero... on solaris */
+#if defined(HAVE_STRINGS_H) && !defined(HAVE_mit_thread)
+#include <strings.h>
+#endif
+
+/* This is needed for the definitions of memcpy... on solaris */
+#if defined(HAVE_MEMORY_H) && !defined(__cplusplus)
+#include <memory.h>
+#endif
+
+#if !defined(HAVE_MEMCPY) && !defined(HAVE_MEMMOVE)
+# define memcpy(d, s, n) bcopy ((s), (d), (n))
+# define memset(A,C,B) bfill((A),(B),(C))
+# define memmove(d, s, n) bmove ((d), (s), (n))
+#elif defined(HAVE_MEMMOVE)
+# define bmove(d, s, n) memmove((d), (s), (n))
+#else
+# define memmove(d, s, n) bmove((d), (s), (n)) /* our bmove */
+#endif
+
+/* Unixware 7 */
+#if !defined(HAVE_BFILL)
+# define bfill(A,B,C) memset((A),(C),(B))
+# define bmove_align(A,B,C) memcpy((A),(B),(C))
+#endif
+
+#if !defined(HAVE_BCMP)
+# define bcopy(s, d, n) memcpy((d), (s), (n))
+# define bcmp(A,B,C) memcmp((A),(B),(C))
+# define bzero(A,B) memset((A),0,(B))
+# define bmove_align(A,B,C) memcpy((A),(B),(C))
+#endif
+
+#if defined(__cplusplus) && !defined(OS2)
+extern "C" {
+#endif
+
+/*
+ my_str_malloc() and my_str_free() are assigned to implementations in
+ strings/alloc.c, but can be overridden in the calling program.
+ */
+extern void *(*my_str_malloc)(size_t);
+extern void (*my_str_free)(void *);
+
+#if defined(HAVE_STPCPY) && !defined(HAVE_mit_thread)
+#define strmov(A,B) stpcpy((A),(B))
+#ifndef stpcpy
+extern char *stpcpy(char *, const char *); /* For AIX with gcc 2.95.3 */
+#endif
+#endif
+
+/* Declared in int2str() */
+extern char NEAR _dig_vec_upper[];
+extern char NEAR _dig_vec_lower[];
+
+#ifdef BAD_STRING_COMPILER
+#define strmov(A,B) (memccpy(A,B,0,INT_MAX)-1)
+#else
+#define strmov_overlapp(A,B) strmov(A,B)
+#define strmake_overlapp(A,B,C) strmake(A,B,C)
+#endif
+
+#ifdef BAD_MEMCPY /* Problem with gcc on Alpha */
+#define memcpy_fixed(A,B,C) bmove((A),(B),(C))
+#else
+#define memcpy_fixed(A,B,C) memcpy((A),(B),(C))
+#endif
+
+#ifdef MSDOS
+#undef bmove_align
+#define bmove512(A,B,C) bmove_align(A,B,C)
+extern void bmove_align(gptr dst,const gptr src,uint len);
+#endif
+
+#if (!defined(USE_BMOVE512) || defined(HAVE_purify)) && !defined(bmove512)
+#define bmove512(A,B,C) memcpy(A,B,C)
+#endif
+
+ /* Prototypes for string functions */
+
+#if !defined(bfill) && !defined(HAVE_BFILL)
+extern void bfill(gptr dst,uint len,pchar fill);
+#endif
+
+#if !defined(bzero) && !defined(HAVE_BZERO)
+extern void bzero(gptr dst,uint len);
+#endif
+
+#if !defined(bcmp) && !defined(HAVE_BCMP)
+extern int bcmp(const char *s1,const char *s2,uint len);
+#endif
+#ifdef HAVE_purify
+extern int my_bcmp(const char *s1,const char *s2,uint len);
+#undef bcmp
+#define bcmp(A,B,C) my_bcmp((A),(B),(C))
+#endif
+
+#ifndef bmove512
+extern void bmove512(gptr dst,const gptr src,uint len);
+#endif
+
+#if !defined(HAVE_BMOVE) && !defined(bmove)
+extern void bmove(char *dst, const char *src,uint len);
+#endif
+
+extern void bmove_upp(char *dst,const char *src,uint len);
+extern void bchange(char *dst,uint old_len,const char *src,
+ uint new_len,uint tot_len);
+extern void strappend(char *s,uint len,pchar fill);
+extern char *strend(const char *s);
+extern char *strcend(const char *, pchar);
+extern char *strfield(char *src,int fields,int chars,int blanks,
+ int tabch);
+extern char *strfill(my_string s,uint len,pchar fill);
+extern uint strinstr(const char *str,const char *search);
+extern uint r_strinstr(reg1 my_string str,int from, reg4 my_string search);
+extern char *strkey(char *dst,char *head,char *tail,char *flags);
+extern char *strmake(char *dst,const char *src,uint length);
+#ifndef strmake_overlapp
+extern char *strmake_overlapp(char *dst,const char *src, uint length);
+#endif
+
+#ifndef strmov
+extern char *strmov(char *dst,const char *src);
+#endif
+extern char *strnmov(char *dst,const char *src,uint n);
+extern char *strsuff(const char *src,const char *suffix);
+extern char *strcont(const char *src,const char *set);
+extern char *strxcat _VARARGS((char *dst,const char *src, ...));
+extern char *strxmov _VARARGS((char *dst,const char *src, ...));
+extern char *strxcpy _VARARGS((char *dst,const char *src, ...));
+extern char *strxncat _VARARGS((char *dst,uint len, const char *src, ...));
+extern char *strxnmov _VARARGS((char *dst,uint len, const char *src, ...));
+extern char *strxncpy _VARARGS((char *dst,uint len, const char *src, ...));
+
+/* Prototypes of normal stringfunctions (with may ours) */
+
+#ifdef WANT_STRING_PROTOTYPES
+extern char *strcat(char *, const char *);
+extern char *strchr(const char *, pchar);
+extern char *strrchr(const char *, pchar);
+extern char *strcpy(char *, const char *);
+extern int strcmp(const char *, const char *);
+#ifndef __GNUC__
+extern size_t strlen(const char *);
+#endif
+#endif
+#ifndef HAVE_STRNLEN
+extern uint strnlen(const char *s, uint n);
+#endif
+
+#if !defined(__cplusplus)
+#ifndef HAVE_STRPBRK
+extern char *strpbrk(const char *, const char *);
+#endif
+#ifndef HAVE_STRSTR
+extern char *strstr(const char *, const char *);
+#endif
+#endif
+extern int is_prefix(const char *, const char *);
+
+/* Conversion routines */
+double my_strtod(const char *str, char **end, int *error);
+double my_atof(const char *nptr);
+
+extern char *llstr(longlong value,char *buff);
+#ifndef HAVE_STRTOUL
+extern long strtol(const char *str, char **ptr, int base);
+extern ulong strtoul(const char *str, char **ptr, int base);
+#endif
+
+extern char *int2str(long val, char *dst, int radix, int upcase);
+extern char *int10_to_str(long val,char *dst,int radix);
+extern char *str2int(const char *src,int radix,long lower,long upper,
+ long *val);
+longlong my_strtoll10(const char *nptr, char **endptr, int *error);
+#if SIZEOF_LONG == SIZEOF_LONG_LONG
+#define longlong2str(A,B,C) int2str((A),(B),(C),1)
+#define longlong10_to_str(A,B,C) int10_to_str((A),(B),(C))
+#undef strtoll
+#define strtoll(A,B,C) strtol((A),(B),(C))
+#define strtoull(A,B,C) strtoul((A),(B),(C))
+#ifndef HAVE_STRTOULL
+#define HAVE_STRTOULL
+#endif
+#ifndef HAVE_STRTOLL
+#define HAVE_STRTOLL
+#endif
+#else
+#ifdef HAVE_LONG_LONG
+extern char *longlong2str(longlong val,char *dst,int radix);
+extern char *longlong10_to_str(longlong val,char *dst,int radix);
+#if (!defined(HAVE_STRTOULL) || defined(HAVE_mit_thread)) || defined(NO_STRTOLL_PROTO)
+extern longlong strtoll(const char *str, char **ptr, int base);
+extern ulonglong strtoull(const char *str, char **ptr, int base);
+#endif
+#endif
+#endif
+
+/* my_vsnprintf.c */
+
+extern int my_vsnprintf( char *str, size_t n,
+ const char *format, va_list ap );
+extern int my_snprintf(char *to, size_t n, const char *fmt, ...)
+ ATTRIBUTE_FORMAT(printf, 3, 4);
+
+#if defined(__cplusplus) && !defined(OS2)
+}
+#endif
+#endif
Added: Frontier/vendor/mysql5-client-win/include/my_alloc.h
===================================================================
--- Frontier/vendor/mysql5-client-win/include/my_alloc.h (rev 0)
+++ Frontier/vendor/mysql5-client-win/include/my_alloc.h 2007-05-30 22:26:15 UTC (rev 1663)
@@ -0,0 +1,51 @@
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+
+/*
+ Data structures for mysys/my_alloc.c (root memory allocator)
+*/
+
+#ifndef _my_alloc_h
+#define _my_alloc_h
+
+#define ALLOC_MAX_BLOCK_TO_DROP 4096
+#define ALLOC_MAX_BLOCK_USAGE_BEFORE_DROP 10
+
+typedef struct st_used_mem
+{ /* struct for once_alloc (block) */
+ struct st_used_mem *next; /* Next block in use */
+ unsigned int left; /* memory left in block */
+ unsigned int size; /* size of block */
+} USED_MEM;
+
+
+typedef struct st_mem_root
+{
+ USED_MEM *free; /* blocks with free memory in it */
+ USED_MEM *used; /* blocks almost without free memory */
+ USED_MEM *pr...
[truncated message content] |
|
From: <dav...@us...> - 2007-05-30 22:14:42
|
Revision: 1662
http://svn.sourceforge.net/frontierkernel/?rev=1662&view=rev
Author: davidgewirtz
Date: 2007-05-30 15:14:39 -0700 (Wed, 30 May 2007)
Log Message:
-----------
Clearing MySQL folder for a refresh.
Removed Paths:
-------------
Frontier/vendor/mysql5/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dav...@us...> - 2007-05-30 02:27:29
|
Revision: 1661
http://svn.sourceforge.net/frontierkernel/?rev=1661&view=rev
Author: davidgewirtz
Date: 2007-05-29 19:27:31 -0700 (Tue, 29 May 2007)
Log Message:
-----------
Check-in of MySQL vendor files, MySQL 5.037 client library.
Added Paths:
-----------
Frontier/vendor/mysql5/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dav...@us...> - 2007-05-30 02:25:04
|
Revision: 1660
http://svn.sourceforge.net/frontierkernel/?rev=1660&view=rev
Author: davidgewirtz
Date: 2007-05-29 19:25:03 -0700 (Tue, 29 May 2007)
Log Message:
-----------
Check-in of the final, working branch build of the Frontier MySQL client for Windows.
Modified Paths:
--------------
Frontier/branches/mysql/Common/source/langmysql.c
Modified: Frontier/branches/mysql/Common/source/langmysql.c
===================================================================
--- Frontier/branches/mysql/Common/source/langmysql.c 2007-05-22 19:13:26 UTC (rev 1659)
+++ Frontier/branches/mysql/Common/source/langmysql.c 2007-05-30 02:25:03 UTC (rev 1660)
@@ -219,7 +219,7 @@
Action: initializes the mySQL library.
Params: none
- Returns: a MySQL object handle or an error
+ Returns: 0 if successful, otherwise an error
Usage: call in a try statement, call before any other MySQL call
MySQL docs: http://dev.mysql.com/doc/refman/5.1/en/mysql-library-init.html
@@ -243,7 +243,7 @@
Action: closes out the MySQL library
Params: none
- Returns: a MySQL object handle or an error
+ Returns: true
Usage: call in a try statement, call after any other MySQL call
MySQL docs: http://dev.mysql.com/doc/refman/5.1/en/mysql-library-end.html
@@ -273,7 +273,8 @@
Returns: a MySQL object handle or an error
Usage: call in a try statement
- MySQL docs: http://dev.mysql.com/doc/refman/5.1/en/mysql-real-connect.html
+ MySQL docs: http://dev.mysql.com/doc/refman/5.1/en/mysql-init.html
+ http://dev.mysql.com/doc/refman/5.1/en/mysql-real-connect.html
If problems are encountered connecting to a Windows-based MySQL server, see:
http://dev.mysql.com/doc/refman/5.1/en/can-not-connect-to-server.html#can-not-connect-to-server-on-windows
@@ -940,8 +941,8 @@
Note:
- Returns the number of rows changed (for) UPDATE), deleted (for DELETE, or inserted
- (for INSERT. For SELECT statements, works like mysql.getSelectedRowCount()
+ Returns the number of rows changed (for UPDATE), deleted (for DELETE), or inserted
+ (for INSERT). For SELECT statements, works like mysql.getSelectedRowCount()
*/
@@ -1335,7 +1336,7 @@
Notes:
- This is unlikely to be used by the Frontier programmer, but is an easy check to be sure
+ This is unlikely to be used by the Frontier scripter, but is an easy check to be sure
the right MySQL client is being linked into the Frontier kernel.
*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cre...@us...> - 2007-05-22 19:14:59
|
Revision: 1659
http://svn.sourceforge.net/frontierkernel/?rev=1659&view=rev
Author: creecode
Date: 2007-05-22 12:13:26 -0700 (Tue, 22 May 2007)
Log Message:
-----------
expanded table of legal tags
Added Paths:
-----------
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/212D2D/
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/212D2D/flClose.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/212D2D/flLegal.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/a.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/abbr.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/acronym.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/address.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/area.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/b.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/basefont/
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/basefont/flClose.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/basefont/flLegal.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/bdo.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/big.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/blockquote.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/br/
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/br/flClose.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/br/flLegal.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/button.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/caption.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/cite.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/code.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/col/
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/col/flClose.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/col/flLegal.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/colgroup/
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/colgroup/flClose.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/colgroup/flLegal.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/dd/
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/dd/flClose.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/dd/flLegal.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/del.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/dfn.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/div.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/dl/
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/dl/flClose.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/dl/flLegal.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/dt/
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/dt/flClose.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/dt/flLegal.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/em.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/fieldset.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/font.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/form.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/frame/
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/frame/flClose.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/frame/flLegal.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/frameset.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/h1.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/h2.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/h3.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/h4.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/h5.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/h6.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/hr/
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/hr/flClose.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/hr/flLegal.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/i.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/iframe.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/img/
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/img/flClose.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/img/flLegal.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/input/
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/input/flClose.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/input/flLegal.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/ins.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/kbd.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/label.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/legend.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/li/
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/li/flClose.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/li/flLegal.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/map.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/noframes.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/noscript.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/object.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/ol.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/optgroup.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/option.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/p/
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/p/flClose.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/p/flLegal.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/param/
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/param/flClose.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/param/flLegal.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/pre.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/q.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/samp.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/script.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/select.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/small.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/span.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/strong.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/style.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/sub.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/sup.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/table.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/tbody/
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/tbody/flClose.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/tbody/flLegal.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/td.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/textarea.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/tfoot/
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/tfoot/flClose.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/tfoot/flLegal.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/th.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/thead/
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/thead/flClose.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/thead/flLegal.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/tr.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/tt.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/ul.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/url.fvc
ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/var.fvc
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/212D2D/flClose.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/212D2D/flClose.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/212D2D/flClose.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.["!--"].flClose
+
+false
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/212D2D/flClose.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/212D2D/flLegal.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/212D2D/flLegal.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/212D2D/flLegal.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.["!--"].flLegal
+
+false
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/212D2D/flLegal.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/a.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/a.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/a.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.a
+
+true
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/a.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/abbr.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/abbr.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/abbr.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.abbr
+
+true
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/abbr.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/acronym.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/acronym.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/acronym.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.acronym
+
+true
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/acronym.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/address.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/address.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/address.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.address
+
+true
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/address.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/area.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/area.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/area.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.area
+
+false
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/area.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/b.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/b.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/b.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.b
+
+true
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/b.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/basefont/flClose.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/basefont/flClose.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/basefont/flClose.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.basefont.flClose
+
+false
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/basefont/flClose.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/basefont/flLegal.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/basefont/flLegal.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/basefont/flLegal.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.basefont.flLegal
+
+false
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/basefont/flLegal.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/bdo.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/bdo.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/bdo.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.bdo
+
+false
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/bdo.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/big.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/big.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/big.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.big
+
+true
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/big.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/blockquote.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/blockquote.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/blockquote.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.blockquote
+
+true
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/blockquote.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/br/flClose.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/br/flClose.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/br/flClose.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.br.flClose
+
+false
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/br/flClose.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/br/flLegal.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/br/flLegal.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/br/flLegal.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.br.flLegal
+
+true
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/br/flLegal.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/button.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/button.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/button.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.button
+
+false
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/button.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/caption.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/caption.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/caption.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.caption
+
+true
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/caption.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/cite.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/cite.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/cite.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.cite
+
+false
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/cite.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/code.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/code.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/code.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.code
+
+true
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/code.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/col/flClose.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/col/flClose.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/col/flClose.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.col.flClose
+
+false
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/col/flClose.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/col/flLegal.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/col/flLegal.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/col/flLegal.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.col.flLegal
+
+true
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/col/flLegal.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/colgroup/flClose.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/colgroup/flClose.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/colgroup/flClose.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.colgroup.flClose
+
+false
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/colgroup/flClose.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/colgroup/flLegal.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/colgroup/flLegal.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/colgroup/flLegal.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.colgroup.flLegal
+
+true
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/colgroup/flLegal.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/dd/flClose.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/dd/flClose.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/dd/flClose.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.dd.flClose
+
+false
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/dd/flClose.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/dd/flLegal.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/dd/flLegal.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/dd/flLegal.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.dd.flLegal
+
+true
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/dd/flLegal.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/del.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/del.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/del.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.del
+
+true
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/del.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/dfn.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/dfn.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/dfn.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.dfn
+
+true
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/dfn.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/div.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/div.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/div.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.div
+
+true
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/div.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/dl/flClose.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/dl/flClose.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/dl/flClose.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.dl.flClose
+
+false
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/dl/flClose.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/dl/flLegal.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/dl/flLegal.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/dl/flLegal.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.dl.flLegal
+
+true
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/dl/flLegal.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/dt/flClose.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/dt/flClose.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/dt/flClose.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.dt.flClose
+
+false
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/dt/flClose.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/dt/flLegal.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/dt/flLegal.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/dt/flLegal.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.dt.flLegal
+
+true
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/dt/flLegal.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/em.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/em.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/em.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.em
+
+true
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/em.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/fieldset.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/fieldset.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/fieldset.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.fieldset
+
+false
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/fieldset.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/font.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/font.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/font.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.font
+
+true
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/font.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/form.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/form.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/form.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.form
+
+false
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/form.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/frame/flClose.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/frame/flClose.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/frame/flClose.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.frame.flClose
+
+false
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/frame/flClose.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/frame/flLegal.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/frame/flLegal.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/frame/flLegal.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.frame.flLegal
+
+false
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/frame/flLegal.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/frameset.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/frameset.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/frameset.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.frameset
+
+false
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/frameset.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/h1.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/h1.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/h1.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.h1
+
+true
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/h1.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/h2.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/h2.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/h2.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.h2
+
+true
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/h2.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/h3.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/h3.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/h3.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.h3
+
+true
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/h3.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/h4.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/h4.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/h4.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.h4
+
+true
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/h4.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/h5.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/h5.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/h5.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.h5
+
+true
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/h5.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/h6.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/h6.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/h6.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.h6
+
+true
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/h6.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/hr/flClose.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/hr/flClose.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/hr/flClose.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.hr.flClose
+
+false
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/hr/flClose.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/hr/flLegal.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/hr/flLegal.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/hr/flLegal.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.hr.flLegal
+
+true
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/hr/flLegal.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/i.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/i.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/i.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.i
+
+true
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/i.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/iframe.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/iframe.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/iframe.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.iframe
+
+false
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/iframe.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/img/flClose.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/img/flClose.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/img/flClose.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.img.flClose
+
+false
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/img/flClose.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/img/flLegal.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/img/flLegal.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/img/flLegal.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.img.flLegal
+
+true
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/img/flLegal.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/input/flClose.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/input/flClose.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/input/flClose.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.input.flClose
+
+false
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/input/flClose.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/input/flLegal.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/input/flLegal.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/input/flLegal.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.input.flLegal
+
+false
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/input/flLegal.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/ins.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/ins.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/ins.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.ins
+
+true
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/ins.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/kbd.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/kbd.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/kbd.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.kbd
+
+true
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/kbd.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/label.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/label.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/label.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.label
+
+false
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/label.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/legend.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/legend.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/legend.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.legend
+
+false
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/legend.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/li/flClose.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/li/flClose.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/li/flClose.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.li.flClose
+
+false
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/li/flClose.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/li/flLegal.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/li/flLegal.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/li/flLegal.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.li.flLegal
+
+true
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/li/flLegal.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/map.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/map.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/map.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.map
+
+false
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/map.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/noframes.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/noframes.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/noframes.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.noframes
+
+false
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/noframes.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/noscript.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/noscript.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/noscript.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.noscript
+
+false
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/noscript.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/object.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/object.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/object.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.object
+
+false
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/object.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/ol.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/ol.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/ol.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.ol
+
+true
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/ol.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/optgroup.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/optgroup.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/optgroup.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.optgroup
+
+false
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/optgroup.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/option.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/option.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/option.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.option
+
+true
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/option.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/p/flClose.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/p/flClose.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/p/flClose.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.p.flClose
+
+false
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/p/flClose.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/p/flLegal.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/p/flLegal.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/p/flLegal.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.p.flLegal
+
+true
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/p/flLegal.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/param/flClose.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/param/flClose.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/param/flClose.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.param.flClose
+
+false
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/param/flClose.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/param/flLegal.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/param/flLegal.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/param/flLegal.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.param.flLegal
+
+false
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/param/flLegal.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/pre.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/pre.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/pre.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.pre
+
+true
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/pre.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/q.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/q.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/q.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.q
+
+true
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/q.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/samp.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/samp.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/samp.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.samp
+
+true
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/samp.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/script.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/script.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/script.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.script
+
+false
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/script.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/select.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/select.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/select.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.select
+
+false
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/select.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/small.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/small.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/small.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.small
+
+true
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/small.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/span.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/span.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/span.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.span
+
+true
+
+
Property changes on: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/span.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/strong.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/strong.fvc (rev 0)
+++ ODBs/trunk/mainResponderRoot/mainResponder/data/htmlLegalTags/strong.fvc 2007-05-22 19:13:26 UTC (rev 1659)
@@ -0,0 +1,5 @@
+FrontierVcsFile:3:bool:mainResponder.data.htmlLegalTags.strong
+
+true
...
[truncated message content] |
|
From: <cre...@us...> - 2007-05-22 00:37:17
|
Revision: 1658
http://svn.sourceforge.net/frontierkernel/?rev=1658&view=rev
Author: creecode
Date: 2007-05-21 17:37:17 -0700 (Mon, 21 May 2007)
Log Message:
-----------
fix for imageCowSkull url in #urls table not being changed
support site glossary
Modified Paths:
--------------
ODBs/trunk/mainResponderRoot/mainResponder/utilities/installSite.fvc
Modified: ODBs/trunk/mainResponderRoot/mainResponder/utilities/installSite.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/utilities/installSite.fvc 2007-05-01 16:04:10 UTC (rev 1657)
+++ ODBs/trunk/mainResponderRoot/mainResponder/utilities/installSite.fvc 2007-05-22 00:37:17 UTC (rev 1658)
@@ -1,88 +1,108 @@
-FrontierVcsFile:1:scpt:mainResponder.utilities.installSite
+FrontierVcsFile:3:scpt:mainResponder.utilities.installSite
-on installSite (adrSite, siteName, oldUrl, newUrl, flNotifySiteInstalled = true, flForceSiteTree = false) {
- \xC7Changes
- \xC72/10/06; 12:55:21 PM by TAC
- \xC7update navigation
- \xC72/9/06; 1:27:42 PM by TAC
- \xC7created, factored from mainResponder.menuCommands.installMainResponderSite
+on installSite ( adrSite, siteName, oldUrl, newUrl, flNotifySiteInstalled = true, flForceSiteTree = false ) {
- config.mainresponder.sites.[siteName] = adrSite;
+ «Changes
+ «5/21/07; 5:07:43 PM by TAC
+ «fix for imageCowSkull url in #urls table not being changed
+ «support site glossary
+ «2/10/06; 12:55:21 PM by TAC
+ «update navigation
+ «2/9/06; 1:27:42 PM by TAC
+ «created, factored from mainResponder.menuCommands.installMainResponderSite
- [system.temp.mainResponder.discussRootFile].[adrSite^.["#prefs"].discussionRoot] = @adrSite^.["#discussionGroup"];
+ config.mainresponder.sites.[ siteName ] = adrSite;
- [system.temp.mainResponder.membersRootFile].[adrSite^.["#prefs"].defaultMembershipGroup] = @adrSite^.["#membershipGroup"];
+ [ system.temp.mainResponder.discussRootFile ].[ adrSite^.[ "#prefs" ].discussionRoot ] = @adrSite^.[ "#discussionGroup" ];
- if not (newUrl endsWith "/") {
+ [ system.temp.mainResponder.membersRootFile ].[ adrSite^.[ "#prefs" ].defaultMembershipGroup ] = @adrSite^.[ "#membershipGroup" ];
+
+ if not ( newUrl endsWith "/" ) {
newUrl = newUrl + "/"};
- if not (string.lower (newUrl) beginsWith "http://") {
+ if not ( string.lower ( newUrl ) beginsWith "http://" ) {
newUrl = "http://" + newUrl};
- adrSite^.["#discussionGroup"].prefs.adrMsgReader = @adrSite^.discussionGroup.messageReader;
+ adrSite^.[ "#discussionGroup" ].prefs.adrMsgReader = @adrSite^.discussionGroup.messageReader;
- if string.lower (oldUrl) != string.lower (newUrl) { // change url
- adrSite^.["#ftpSite"].url = string.replace (adrSite^.["#ftpSite"].url, oldUrl, newUrl);
+ if string.lower ( oldUrl ) != string.lower ( newUrl ) { // change url
+ adrSite^.[ "#ftpSite" ].url = string.replace ( adrSite^.[ "#ftpSite" ].url, oldUrl, newUrl );
- adrSite^.["#discussionGroup"].prefs.msgReaderUrl = string.replace (adrSite^.["#discussionGroup"].prefs.msgReaderUrl, oldUrl, newUrl);
+ adrSite^.[ "#discussionGroup" ].prefs.msgReaderUrl = string.replace ( adrSite^.[ "#discussionGroup" ].prefs.msgReaderUrl, oldUrl, newUrl );
- adrSite^.["#prefs"].search.siteUrl = string.replace (adrSite^.["#prefs"].search.siteUrl, oldUrl, newUrl);
+ adrSite^.[ "#prefs" ].search.siteUrl = string.replace ( adrSite^.[ "#prefs" ].search.siteUrl, oldUrl, newUrl );
- local (adr, s);
+ local ( adr, s );
- for adr in @adrSite^.["#urls"] {
- s = string.lower (nameOf (adr^));
-
+ for adr in @adrSite^.[ "#glossary" ] {
+ adr^ = string.replace ( adr^, oldUrl, newUrl )};
+
+ for adr in @adrSite^.[ "#urls" ] {
if adr^ == nil {
continue};
+ s = string.lower ( nameOf ( adr^ ) );
+
case s {
"discusseditinfrontier";
"memberhome" {
+ continue};
+ "imagecowskull" {
+ local ( newUrlParts = string.urlSplit ( newUrl ) );
+ local ( oldUrlParts = string.urlSplit ( oldUrl ) );
+ local ( newUrl = newUrlParts [ 1 ] + newUrlParts [ 2 ] + '/' );
+ local ( oldUrl = oldUrlParts [ 1 ] + oldUrlParts [ 2 ] + '/' );
+
+ adr^ = string.replace ( adr^, oldUrl, newUrl );
+
continue}};
- adr^ = string.replace (adr^, oldUrl, newUrl)};
+ adr^ = string.replace ( adr^, oldUrl, newUrl )};
bundle { // update navigation
- local (oldPath, newPath, structure);
+ local ( oldPath, newPath, structure );
bundle { // old path
- oldPath = string.urlSplit (oldUrl);
- oldPath = "/" + oldPath [3]};
+ oldPath = string.urlSplit ( oldUrl );
+ oldPath = "/" + oldPath [ 3 ]};
bundle { // new path
- newPath = string.urlSplit (newUrl);
- newPath = "/" + newPath [3]};
+ newPath = string.urlSplit ( newUrl );
+ newPath = "/" + newPath [ 3 ]};
- xml.compile (string (adrSite^.["#navigator"].outline), @structure);
+ xml.compile ( string ( adrSite^.[ "#navigator" ].outline ), @structure );
- for adr in @structure [1] {
- adr^.["/atts"].pagename = string.replace (adr^.["/atts"].pagename, oldPath, newPath)};
+ for adr in @structure [ 1 ] {
+ adr^.[ "/atts" ].pagename = string.replace ( adr^.[ "/atts" ].pagename, oldPath, newPath )};
- s = xml.decompile (@structure);
- s = string.delete (s, 1, string.patternMatch ('\n', s));
+ s = xml.decompile ( @structure );
+ s = string.delete ( s, 1, string.patternMatch ( '\n', s ) );
- op.newOutlineObject (s, @adrSite^.["#navigator"].outline)}};
+ op.newOutlineObject ( s, @adrSite^.[ "#navigator" ].outline )}};
try { // config.mainResponder.domains
- local (url = adrSite^.["#ftpSite"].url);
- local (urlParts = string.urlSplit (url));
- local (path = urlParts [3]);
- local (domain = string.lower (urlParts [2]));
+ local ( url = adrSite^.[ "#ftpSite" ].url );
+ local ( urlParts = string.urlSplit ( url ) );
+ local ( path = urlParts [ 3 ] );
+ local ( domain = string.lower ( urlParts [ 2 ] ) );
- if sizeOf (path) > 0 or flForceSiteTree {
- if not defined (config.mainResponder.domains.[domain]) { // use default domain
+ if sizeOf ( path ) > 0 or flForceSiteTree {
+ if not defined ( config.mainResponder.domains.[ domain ] ) { // use default domain
domain = "default"};
- mainResponder.siteTree.addSiteToTree (domain, path, adrSite, false, true)}
+ mainResponder.siteTree.addSiteToTree ( domain, path, adrSite, false, true )}
else { // top-level site
- if not defined (config.mainResponder.domains.[domain]) {
- config.mainResponder.domains.[domain] = adrSite}}};
+ if not defined ( config.mainResponder.domains.[ domain ] ) {
+ config.mainResponder.domains.[ domain ] = adrSite}}};
if flNotifySiteInstalled {
- dialog.notify ("The mainResponder website \"" + siteName + "\" has been installed.")}};
+ dialog.notify ( "The mainResponder website \"" + siteName + "\" has been installed." )}};
-\xC7bundle // testing
- \xC7installSite (@myFirstMainresponderWebsiteMrWs, "myFirstMainresponderWebsite", "http://127.0.0.1/myFirstMainresponderWebsite/", "http://127.0.0.1/", false, true)
- \xC7installSite (@myFirstMainresponderWebsiteMrWs, "myFirstMainresponderWebsite", "http://127.0.0.1/", "http://127.0.0.1/myFirstMainresponderWebsite/", false, true)
- \xC7installSite (@sampleMrWs, "sample", "http://127.0.0.1/", "http://127.0.0.1/", false, true)
\ No newline at end of file
+«bundle // testing
+ «installSite ( @myFirstMainresponderWebsiteMrWs, "myFirstMainresponderWebsite", "http://127.0.0.1/myFirstMainresponderWebsite/", "http://127.0.0.1/", false, true )
+ «installSite ( @myFirstMainresponderWebsiteMrWs, "myFirstMainresponderWebsite", "http://127.0.0.1/", "http://127.0.0.1/myFirstMainresponderWebsite/", false, true )
+ «installSite ( @sampleMrWs, "sample", "http://127.0.0.1/", "http://127.0.0.1/", false, true )
+ «installSite ( @localDocserverMrWs, "localDocserver", "http://127.0.0.1/", "http://127.0.0.1:81/", false, true )
+ «installSite ( @localDocserverMrWs, "localDocserver", "http://127.0.0.1:81/", "http://127.0.0.1/", false, true )
+
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dav...@us...> - 2007-05-01 16:04:09
|
Revision: 1657
http://svn.sourceforge.net/frontierkernel/?rev=1657&view=rev
Author: davidgewirtz
Date: 2007-05-01 09:04:10 -0700 (Tue, 01 May 2007)
Log Message:
-----------
Tested and documented MySQL integrated source. No Mac testing in this build.
Modified Paths:
--------------
Frontier/branches/mysql/Common/source/langmysql.c
Modified: Frontier/branches/mysql/Common/source/langmysql.c
===================================================================
--- Frontier/branches/mysql/Common/source/langmysql.c 2007-04-15 23:37:08 UTC (rev 1656)
+++ Frontier/branches/mysql/Common/source/langmysql.c 2007-05-01 16:04:10 UTC (rev 1657)
@@ -1,1258 +1,1350 @@
-
-/* $Id: langmysql.c,v 2007/04/08 18:32:00 davidgewirtz Exp $ */
-
-/******************************************************************************
-
- UserLand Frontier(tm) -- High performance Web content management,
- object database, system-level and Internet scripting environment,
- including source code editing and debugging.
-
- Copyright (C) 1992-2004 UserLand Software, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-******************************************************************************/
-
-#include "frontier.h"
-#include "standard.h"
-
-#include "frontierconfig.h"
-
-#include "error.h"
-#include "ops.h"
-#include "langinternal.h"
-#include "kernelverbs.h"
-#include "kernelverbdefs.h"
-#include "resources.h"
-#include "strings.h"
-#include "tablestructure.h"
-#include "lang.h"
-#include "oplist.h"
-#include "langsystem7.h"
-#include "langexternal.h"
-
-#include "langmysql.h"
-#include <mysql.h>
-
-#ifdef MACVERSION
-
- #include <sys/param.h>
-
-#endif // MACVERSION
-
-#include "file.h"
-
-#ifdef WIN95VERSION
-
- #define MAXPATHLEN 1024
-
-#endif // WIN95VERSION
-
-
-/* Building MySQL into Frontier
-
-See the Frontier Lab Notebook article:
-
-http://manila.zatz.com/frontierkernel/stories/storyReader$33
-
--- DG
-
-*/
-
-typedef enum tymysqlverbtoken { /* verbs that are processed by langmysql.c */
-
- initfunc,
- endfunc,
- connectfunc,
- compilequeryfunc,
- clearqueryfunc,
- getrowfunc,
- geterrornumberfunc,
- geterrormessagefunc,
- getclientinfofunc,
- getclientversionfunc,
- gethostinfofunc,
- getserverversionfunc,
- getprotocolinfofunc,
- getserverinfofunc,
- getqueryinfofunc,
- getaffectedrowcountfunc,
- getselectedrowcountfunc,
- getcolumncountfunc,
- getserverstatusfunc,
- getquerywarningcountfunc,
- pingserverfunc,
- seekrowfunc,
- selectdatabasefunc,
- getsqlstatefunc,
- escapestringfunc,
- isthreadsafefunc,
- closefunc,
- ctmysqlverbs
- } tymysqlverbtoken;
-
-
-static boolean mysqlfunctionvalue (short token, hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
-
- hdltreenode hp1 = hparam1;
- tyvaluerecord *v = vreturned;
-
- setbooleanvalue (false, v); /* by default, sqlite functions return false */
-
- switch (token) {
-
- case initfunc: { /* 2007-04-08 gewirtz: initialize MySQL */
- return (mysqlinitverb (hp1, v, bserror));
- } /* initfunc */
- case endfunc: { /* 2007-04-08 gewirtz: initialize MySQL */
- return (mysqlendverb (hp1, v, bserror));
- } /* endfunc */
- case connectfunc: { /* 2007-04-08 gewirtz: initialize MySQL */
- return (mysqlconnectverb (hp1, v, bserror));
- } /* connectfunc */
- case compilequeryfunc: { /* 2007-04-09 gewirtz: prepare a MySQL query */
- return (mysqlcompilequeryverb (hp1, v, bserror));
- } /* compilequeryfunc */
- case clearqueryfunc: { /* 2007-04-09 gewirtz: clear a MySQL query from memory */
- return (mysqlclearqueryverb (hp1, v, bserror));
- } /* clearqueryfunc */
- case getrowfunc: { /* 2007-04-09 gewirtz: get a full row from a query */
- return (mysqlgetrowverb (hp1, v, bserror));
- } /* getrowfunc */
- case geterrornumberfunc: { /* 2007-04-10 gewirtz: get the error number from the most recent call */
- return (mysqlgeterrornumberverb (hp1, v, bserror));
- } /* geterrornumberfunc */
- case geterrormessagefunc: { /* 2007-04-10 gewirtz: get the error message from the most recent call */
- return (mysqlgeterrormessageverb (hp1, v, bserror));
- } /* geterrormessagefunc */
- case getclientinfofunc: { /* 2007-04-10 gewirtz: get the MySQL client info */
- return (mysqlgetclientinfoverb (hp1, v, bserror));
- } /* getclientinfofunc */
- case getclientversionfunc: { /* 2007-04-10 gewirtz: get the MySQL client version */
- return (mysqlgetclientversionverb (hp1, v, bserror));
- } /* getclientversionfunc */
- case gethostinfofunc: { /* 2007-04-10 gewirtz: get the MySQL host info */
- return (mysqlgethostinfoverb (hp1, v, bserror));
- } /* gethostinfofunc */
- case getserverversionfunc: { /* 2007-04-10 gewirtz: get the MySQL server version */
- return (mysqlgetserverversionverb (hp1, v, bserror));
- } /* getserverversionfunc */
- case getprotocolinfofunc: { /* 2007-04-10 gewirtz: get the MySQL protocol info */
- return (mysqlgetprotocolinfoverb (hp1, v, bserror));
- } /* getprotocolinfofunc */
- case getserverinfofunc: { /* 2007-04-10 gewirtz: get the MySQL server info */
- return (mysqlgetserverinfoverb (hp1, v, bserror));
- } /* getserverinfofunc */
- case getqueryinfofunc: { /* 2007-04-10 gewirtz: get the results messages from the last query */
- return (mysqlgetqueryinfoverb (hp1, v, bserror));
- } /* getqueryinfofunc */
- case getaffectedrowcountfunc: { /* 2007-04-11 gewirtz: get the rows added, deleted, updated */
- return (mysqlgetaffectedrowcountverb (hp1, v, bserror));
- } /* getaffectedrowcountfunc */
- case getselectedrowcountfunc: { /* 2007-04-11 gewirtz: get the rows selected in last query */
- return (mysqlgetselectedrowcountverb (hp1, v, bserror));
- } /* getselectedrowcountfunc */
- case getcolumncountfunc: { /* 2007-04-11 gewirtz: get the columns returned in last query */
- return (mysqlgetcolumncountverb (hp1, v, bserror));
- } /* getcolumncountfunc */
- case getserverstatusfunc: { /* 2007-04-11 gewirtz: get the MySQL server status */
- return (mysqlgetserverstatusverb (hp1, v, bserror));
- } /* getserverstatusfunc */
- case getquerywarningcountfunc: { /* 2007-04-11 gewirtz: get the number of warnings returned by the last query */
- return (mysqlgetquerywarningcountverb (hp1, v, bserror));
- } /* getquerywarningcountfunc */
- case pingserverfunc: { /* 2007-04-11 gewirtz: check to see if there's still a connection with the server */
- return (mysqlpingserververb (hp1, v, bserror));
- } /* pingserverfunc */
- case seekrowfunc: { /* 2007-04-11 gewirtz: move to specific row in query result set */
- return (mysqlseekrowverb (hp1, v, bserror));
- } /* seekrowfunc */
- case selectdatabasefunc: { /* 2007-04-11 gewirtz: choose a MySQL database as current */
- return (mysqlselectdatabaseverb (hp1, v, bserror));
- } /* selectdatabasefunc */
- case getsqlstatefunc: { /* 2007-04-11 gewirtz: choose a MySQL database as current */
- return (mysqlgetsqlstateverb (hp1, v, bserror));
- } /* getsqlstatefunc */
- case escapestringfunc: { /* 2007-04-11 gewirtz: choose a MySQL database as current */
- return (mysqlescapestringverb (hp1, v, bserror));
- } /* escapestringfunc */
- case isthreadsafefunc: { /* 2007-04-11 gewirtz: choose a MySQL database as current */
- return (mysqlisthreadsafeverb (hp1, v, bserror));
- } /* isthreadsafefunc */
- case closefunc: { /* 2007-04-08 gewirtz: close a MySQL db */
- return (mysqlcloseverb (hp1, v, bserror));
- } /* closefunc */
- default:
- getstringlist (langerrorlist, unimplementedverberror, bserror);
- return (false);
- } /* switch */
- } /* mysqlfunctionvalue */
-
-
-boolean mysqlinitverbs (void) {
-
- return (loadfunctionprocessor (idmysqlverbs, &mysqlfunctionvalue));
- } /* mysqlinitverbs */
-
-boolean mysqlinitverb ( hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror ) {
- int resultCode;
+
+/* $Id: langmysql.c,v 2007/04/08 18:32:00 davidgewirtz Exp $ */
+
+/******************************************************************************
+
+ UserLand Frontier(tm) -- High performance Web content management,
+ object database, system-level and Internet scripting environment,
+ including source code editing and debugging.
+
+ Copyright (C) 1992-2004 UserLand Software, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+******************************************************************************/
+
+#include "frontier.h"
+#include "standard.h"
+
+#include "frontierconfig.h"
+
+#include "error.h"
+#include "ops.h"
+#include "langinternal.h"
+#include "kernelverbs.h"
+#include "kernelverbdefs.h"
+#include "resources.h"
+#include "strings.h"
+#include "tablestructure.h"
+#include "lang.h"
+#include "oplist.h"
+#include "langsystem7.h"
+#include "langexternal.h"
+
+#include "langmysql.h"
+#include <mysql.h>
+
+#ifdef MACVERSION
+
+ #include <sys/param.h>
+
+#endif // MACVERSION
+
+#include "file.h"
+
+#ifdef WIN95VERSION
+
+ #define MAXPATHLEN 1024
+
+#endif // WIN95VERSION
+
+
+/* Building MySQL into Frontier
+
+See the Frontier Lab Notebook article:
+
+http://manila.zatz.com/frontierkernel/stories/storyReader$33
+
+-- DG
+
+*/
+
+typedef enum tymysqlverbtoken { /* verbs that are processed by langmysql.c */
+
+ initfunc,
+ endfunc,
+ connectfunc,
+ compilequeryfunc,
+ clearqueryfunc,
+ getrowfunc,
+ geterrornumberfunc,
+ geterrormessagefunc,
+ getclientinfofunc,
+ getclientversionfunc,
+ gethostinfofunc,
+ getserverversionfunc,
+ getprotocolinfofunc,
+ getserverinfofunc,
+ getqueryinfofunc,
+ getaffectedrowcountfunc,
+ getselectedrowcountfunc,
+ getcolumncountfunc,
+ getserverstatusfunc,
+ getquerywarningcountfunc,
+ pingserverfunc,
+ seekrowfunc,
+ selectdatabasefunc,
+ getsqlstatefunc,
+ escapestringfunc,
+ isthreadsafefunc,
+ closefunc,
+ ctmysqlverbs
+ } tymysqlverbtoken;
+
+
+static boolean mysqlfunctionvalue (short token, hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
+
+ hdltreenode hp1 = hparam1;
+ tyvaluerecord *v = vreturned;
+
+ setbooleanvalue (false, v); /* by default, sqlite functions return false */
+
+ switch (token) {
+
+ case initfunc: { /* 2007-04-08 gewirtz: initialize MySQL */
+ return (mysqlinitverb (hp1, v, bserror));
+ } /* initfunc */
+ case endfunc: { /* 2007-04-08 gewirtz: initialize MySQL */
+ return (mysqlendverb (hp1, v, bserror));
+ } /* endfunc */
+ case connectfunc: { /* 2007-04-08 gewirtz: initialize MySQL */
+ return (mysqlconnectverb (hp1, v, bserror));
+ } /* connectfunc */
+ case compilequeryfunc: { /* 2007-04-09 gewirtz: prepare a MySQL query */
+ return (mysqlcompilequeryverb (hp1, v, bserror));
+ } /* compilequeryfunc */
+ case clearqueryfunc: { /* 2007-04-09 gewirtz: clear a MySQL query from memory */
+ return (mysqlclearqueryverb (hp1, v, bserror));
+ } /* clearqueryfunc */
+ case getrowfunc: { /* 2007-04-09 gewirtz: get a full row from a query */
+ return (mysqlgetrowverb (hp1, v, bserror));
+ } /* getrowfunc */
+ case geterrornumberfunc: { /* 2007-04-10 gewirtz: get the error number from the most recent call */
+ return (mysqlgeterrornumberverb (hp1, v, bserror));
+ } /* geterrornumberfunc */
+ case geterrormessagefunc: { /* 2007-04-10 gewirtz: get the error message from the most recent call */
+ return (mysqlgeterrormessageverb (hp1, v, bserror));
+ } /* geterrormessagefunc */
+ case getclientinfofunc: { /* 2007-04-10 gewirtz: get the MySQL client info */
+ return (mysqlgetclientinfoverb (hp1, v, bserror));
+ } /* getclientinfofunc */
+ case getclientversionfunc: { /* 2007-04-10 gewirtz: get the MySQL client version */
+ return (mysqlgetclientversionverb (hp1, v, bserror));
+ } /* getclientversionfunc */
+ case gethostinfofunc: { /* 2007-04-10 gewirtz: get the MySQL host info */
+ return (mysqlgethostinfoverb (hp1, v, bserror));
+ } /* gethostinfofunc */
+ case getserverversionfunc: { /* 2007-04-10 gewirtz: get the MySQL server version */
+ return (mysqlgetserverversionverb (hp1, v, bserror));
+ } /* getserverversionfunc */
+ case getprotocolinfofunc: { /* 2007-04-10 gewirtz: get the MySQL protocol info */
+ return (mysqlgetprotocolinfoverb (hp1, v, bserror));
+ } /* getprotocolinfofunc */
+ case getserverinfofunc: { /* 2007-04-10 gewirtz: get the MySQL server info */
+ return (mysqlgetserverinfoverb (hp1, v, bserror));
+ } /* getserverinfofunc */
+ case getqueryinfofunc: { /* 2007-04-10 gewirtz: get the results messages from the last query */
+ return (mysqlgetqueryinfoverb (hp1, v, bserror));
+ } /* getqueryinfofunc */
+ case getaffectedrowcountfunc: { /* 2007-04-11 gewirtz: get the rows added, deleted, updated */
+ return (mysqlgetaffectedrowcountverb (hp1, v, bserror));
+ } /* getaffectedrowcountfunc */
+ case getselectedrowcountfunc: { /* 2007-04-11 gewirtz: get the rows selected in last query */
+ return (mysqlgetselectedrowcountverb (hp1, v, bserror));
+ } /* getselectedrowcountfunc */
+ case getcolumncountfunc: { /* 2007-04-11 gewirtz: get the columns returned in last query */
+ return (mysqlgetcolumncountverb (hp1, v, bserror));
+ } /* getcolumncountfunc */
+ case getserverstatusfunc: { /* 2007-04-11 gewirtz: get the MySQL server status */
+ return (mysqlgetserverstatusverb (hp1, v, bserror));
+ } /* getserverstatusfunc */
+ case getquerywarningcountfunc: { /* 2007-04-11 gewirtz: get the number of warnings returned by the last query */
+ return (mysqlgetquerywarningcountverb (hp1, v, bserror));
+ } /* getquerywarningcountfunc */
+ case pingserverfunc: { /* 2007-04-11 gewirtz: check to see if there's still a connection with the server */
+ return (mysqlpingserververb (hp1, v, bserror));
+ } /* pingserverfunc */
+ case seekrowfunc: { /* 2007-04-11 gewirtz: move to specific row in query result set */
+ return (mysqlseekrowverb (hp1, v, bserror));
+ } /* seekrowfunc */
+ case selectdatabasefunc: { /* 2007-04-11 gewirtz: choose a MySQL database as current */
+ return (mysqlselectdatabaseverb (hp1, v, bserror));
+ } /* selectdatabasefunc */
+ case getsqlstatefunc: { /* 2007-04-11 gewirtz: choose a MySQL database as current */
+ return (mysqlgetsqlstateverb (hp1, v, bserror));
+ } /* getsqlstatefunc */
+ case escapestringfunc: { /* 2007-04-11 gewirtz: choose a MySQL database as current */
+ return (mysqlescapestringverb (hp1, v, bserror));
+ } /* escapestringfunc */
+ case isthreadsafefunc: { /* 2007-04-11 gewirtz: choose a MySQL database as current */
+ return (mysqlisthreadsafeverb (hp1, v, bserror));
+ } /* isthreadsafefunc */
+ case closefunc: { /* 2007-04-08 gewirtz: close a MySQL db */
+ return (mysqlcloseverb (hp1, v, bserror));
+ } /* closefunc */
+ default:
+ getstringlist (langerrorlist, unimplementedverberror, bserror);
+ return (false);
+ } /* switch */
+ } /* mysqlfunctionvalue */
+
+
+boolean mysqlinitverbs (void) {
+
+ return (loadfunctionprocessor (idmysqlverbs, &mysqlfunctionvalue));
+ } /* mysqlinitverbs */
+
+boolean mysqlinitverb ( hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror ) {
+ int resultCode;
static char *server_args[] = {
"this_program" // this string is not used
// "--datadir=.", // these arguments aren't, either, since we're not using
// "--key_buffer_size=32M" // the embedded server
- };
-
- //
- // mysql.init()
- //
- // Action: initializes the mySQL connection object
- // Params: none
- // Returns: a MySQL object handle or an error
- // Usage: call in a try statement, call before any other MySQL call
- //
- // MySQL docs: http://dev.mysql.com/doc/refman/5.1/en/mysql-init.html
- //
-
- // Initialize the MySQL object
- resultCode = mysql_library_init(-1, server_args, NULL); // -1 means don't start embedded server
- if (resultCode != 0) {
- langerrormessage ("\x1B""MySQL could not initialize.");
- return (false);
- }
-
- return (setlongvalue ((long) resultCode, vreturned));
-
-} // mysqlinitverb
-
-boolean mysqlendverb ( hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror ) {
-
- //
- // mysql.init()
- //
- // Action: initializes the mySQL connection object
- // Params: none
- // Returns: a MySQL object handle or an error
- // Usage: call in a try statement, call before any other MySQL call
- //
- // MySQL docs: http://dev.mysql.com/doc/refman/5.1/en/mysql-init.html
- //
-
- // Close out the library
- mysql_library_end();
-
- return(setbooleanvalue (true, vreturned));
-
-} // mysqlendverb
-
-boolean mysqlconnectverb ( hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror ) {
-
- MYSQL *dbid; // the MySQL object handle
- Handle host; // hostname of the MySQL server
- Handle user; // valid username on the MySQL server
- Handle passwd; // password for user on MySQL server
- Handle dbname; // existing database on MySQL server
- long port; // TCP/IP port for the connection
-
- //
- // mysql.connect (dbid, host, user, password, database, port)
- //
- // Action: connects to a MySQL server and database, initializing the mySQL connection object
- // Params: dbid (the MySQL object) the hostname, user id, password, existing database name, and port
- // Returns: a MySQL object handle or an error
- // Usage: call in a try statement
- //
- // MySQL docs: http://dev.mysql.com/doc/refman/5.1/en/mysql-real-connect.html
- //
- // If problems are encountered connecting to a Windows-based MySQL server, see:
- // http://dev.mysql.com/doc/refman/5.1/en/can-not-connect-to-server.html#can-not-connect-to-server-on-windows
- //
-
- if (!gettextvalue (hparam1, 1, &host)) /* get the host param */
- return (false);
-
- if (!gettextvalue (hparam1, 2, &user)) /* get the user param */
- return (false);
-
- if (!gettextvalue (hparam1, 3, &passwd)) /* get the passwd param */
- return (false);
-
- if (!gettextvalue (hparam1, 4, &dbname)) /* get the dbname param */
- return (false);
-
- flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
-
- if (!getlongvalue (hparam1, 5, &port)) /* get the port param */
- return (false);
-
- // Null terminate strings
- if (!pushcharhandle (0x00, host)) return (false);
- if (!pushcharhandle (0x00, user)) return (false);
- if (!pushcharhandle (0x00, passwd)) return (false);
- if (!pushcharhandle (0x00, dbname)) return (false);
-
- // Initialize the MySQL object
- dbid = mysql_init((MYSQL*) 0);
- if (dbid == NULL) {
- langerrormessage ("\x2D""MySQL could not allocate a connection object.");
- return (false);
- }
- // Attempt the connection
- dbid = mysql_real_connect(dbid, *host, *user, *passwd, *dbname, (unsigned int) port, NULL, 0 );
- if (dbid == NULL) {
- langerrormessage ("\x22""Could not connect to MySQL server.");
- return (false);
- }
-
- return (setlongvalue ((long) dbid, vreturned));
-
-} // mysqlconnectverb
-
-
-boolean mysqlcloseverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
- MYSQL *dbid; // the MySQL object handle
- int returnCode; // return code from close call
-
- //
- // mysql.close(dbid)
- //
- // Action: close a MySQL session
- // Params: dbid, the MySQL object
- // Returns: nothing
- // Usage: there doesn't appear to be a way to check for success or failure
- //
- // MySQL docs: http://dev.mysql.com/doc/refman/5.1/en/mysql-close.html
- //
-
- flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
-
- if (!getlongvalue (hparam1, 1, (long *) &dbid)) /* Get the long value, which becomes the db pointer */
- return (false);
-
- // Check that server's still alive
- if (mysql_ping(dbid) != 0) {
- langerrormessage ("\x20""Lost connection to MySQL server.");
- return (false);
- }
-
- /* Process the SQLite sequence */
- mysql_close(dbid);
- returnCode = 0; // placeholder for debugging. mysql_close doesn't return anything.
-
- return setlongvalue (returnCode, vreturned);
-
-} /* mysqlcloseverb */
-
-boolean mysqlcompilequeryverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
- Handle query; // the SQL query passed to the MySQL server
- MYSQL *dbid; // the MySQL object handle
- MYSQL_RES *queryid; // the returned MySQL query id
- int returnCode; // return code from MySQL query
-
- /*
- sqlite.compileQuery(dbid, query)
-
- Action: compile an SQLite query
- Params: a database id and a query string
- Returns: a query id
- Usage: call in a try statement
- Notes: do not pass the opened database ID across threads.
-
- SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_prepare.
-
- Code that is a good example of prepare in use:
- http://souptonuts.sourceforge.net/code/eatblob.c.html
- */
-
- if (!getlongvalue (hparam1, 1, (long *) &dbid)) /* Get the long value, which becomes the db pointer */
- return (false);
-
- flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
-
- if (!gettextvalue (hparam1, 2, &query)) /* get the query param */
- return (false);
-
- // Null terminate strings
- if (!pushcharhandle (0x00, query))
- return (false);
-
- // Check that server's still alive
- if (mysql_ping(dbid) != 0) {
- langerrormessage ("\x20""Lost connection to MySQL server.");
- return (false);
- }
-
- /* Process the initial query sequence */
- returnCode = mysql_query(dbid, *query);
- if(returnCode != 0) {
- langerrormessage ("\x21""Could not initialize MySQL query.");
- return (false);
- }
-
- queryid = mysql_store_result(dbid);
- if(mysql_errno(dbid) != 0) {
- langerrormessage ("\x21""Could initialize MySQL query.");
- return (false);
- }
-
- if (mysql_field_count(dbid) == 0)
- return (setlongvalue ((long) 0, vreturned)); /* return 0 to the scripter */
- else
- return (setlongvalue ((long) queryid, vreturned)); /* return the db address to the scripter */
-} /* mysqlcompilequeryverb */
-
-boolean mysqlclearqueryverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
- MYSQL_RES *queryid; // the returned MySQL query id
- int returnCode;
-
- /*
- sqlite.clearQuery(queryid)
-
- Action: clear an SQLite query
- Params: a query id
- Returns: an SQLite result code
- Notes: do not pass the opened database ID across threads.
-
- SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_finalize.
- */
-
- flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
-
- if (!getlongvalue (hparam1, 1, (long *) &queryid)) /* Get the long value, which becomes the queryid pointer */
- return (false);
-
- /* Process the MySQL sequence */
- mysql_free_result(queryid);
-
- returnCode = 0; // placeholder for debugging. mysql_free_result doesn't return anything.
- return setlongvalue (returnCode, vreturned);
-
-} /* mysqlclearqueryverb */
-
-boolean mysqlgetrowverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
- unsigned int fieldNumber; /* field number */
- unsigned int fieldCount; /* number of fields */
- MYSQL_RES *queryid; /* query id */
- MYSQL_ROW row;
- MYSQL_FIELD *field;
-
- hdllistrecord hlist;
-
- Handle returnH;
- const unsigned char *column_text;
-
- tyvaluerecord val;
-
-
- /*
- http://dev.mysql.com/doc/refman/5.1/en/c-api-datatypes.html
-
- */
-
- flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
-
- if (!getlongvalue (hparam1, 1, (long *) &queryid)) /* Get the long value, which becomes the queryid pointer */
- return (false);
-
- row = mysql_fetch_row(queryid);
- if (row == NULL) {
- // return 0, meaning no more rows
- // **** NOTE THIS COULD ALSO MEAN AN ERROR, MIGHT BE GOOD TO CHECK
- return (setlongvalue ((long) 0, vreturned));
- }
-
- fieldCount = mysql_num_fields(queryid);
-
- if (fieldCount == 0) {
- langerrormessage ("\x2D""MySQL.getRow requires a minimum of one field.");
- return (false);
- }
-
- mysql_field_seek(queryid, 0); // restart gathering field data from the first field
-
- if (!opnewlist (&hlist, false)) /* fail out if we can't create the list */
- return (false);
-
- for (fieldNumber=0; fieldNumber<fieldCount; ++fieldNumber) {
-
- field = mysql_fetch_field(queryid);
-
- switch(field->type) {
-
- /*
- The MySQL fetch_row function is interesting, in that it looks like
- each field returned is returned as a string. This is great for Frontier,
- since Frontier can't handle some of MySQL's bigger number types (like double),
- but it can handle strings. So everything that's supported is returned as
- a string to Frontier. The Frontier programmer can then do whatever
- coercing is necessary.
-
- The only formats we explicitly don't support are:
-
- MYSQL_TYPE_BIT
- MYSQL_TYPE_BLOB
- MYSQL_TYPE_SET
- MYSQL_TYPE_ENUM
- MYSQL_TYPE_GEOMETRY
- MYSQL_TYPE_NULL
-
- Formats supported and returned as string:
-
- MYSQL_TYPE_TINY
- MYSQL_TYPE_SHORT
- MYSQL_TYPE_LONG
- MYSQL_TYPE_INT24
- MYSQL_TYPE_LONGLONG
- MYSQL_TYPE_DECIMAL
- MYSQL_TYPE_NEWDECIMAL
- MYSQL_TYPE_FLOAT
- MYSQL_TYPE_DOUBLE
- MYSQL_TYPE_TIMESTAMP
- MYSQL_TYPE_DATE
- MYSQL_TYPE_TIME
- MYSQL_TYPE_DATETIME
- MYSQL_TYPE_YEAR
- MYSQL_TYPE_STRING
- MYSQL_TYPE_VAR_STRING
- */
-
- case MYSQL_TYPE_TINY:
- case MYSQL_TYPE_SHORT:
- case MYSQL_TYPE_LONG:
- case MYSQL_TYPE_INT24:
- case MYSQL_TYPE_LONGLONG:
- case MYSQL_TYPE_DECIMAL:
- case MYSQL_TYPE_NEWDECIMAL:
- case MYSQL_TYPE_FLOAT:
- case MYSQL_TYPE_DOUBLE:
- case MYSQL_TYPE_TIMESTAMP:
- case MYSQL_TYPE_DATE:
- case MYSQL_TYPE_TIME:
- case MYSQL_TYPE_DATETIME:
- case MYSQL_TYPE_YEAR:
- case MYSQL_TYPE_STRING:
- case MYSQL_TYPE_VAR_STRING:
- {
- column_text = row[fieldNumber];
-
- /* Exit the verb, converting column_name back to Frontier handle */
- if (!newfilledhandle ((ptrvoid) column_text, strlen (column_text), &returnH))
- return false; /* Allocation failed */
- if (!setheapvalue (returnH, stringvaluetype, &val)) /* convert handle to value */
- goto error;
- if (!langpushlistval (hlist, nil, &val))
- goto error;
- break;
- }
- default: {
- /* SQLite spec says sqlite3_column_type only returns the above 5 types. But,
- just in case it lied, this time we return a 0, so the rest of the fields
- can be read properly. */
- if (!langpushlistlong (hlist, (long) 0))
- goto error;
- }
- } /* switch */
- } /* for */
-
- return (setheapvalue ((Handle) hlist, listvaluetype, vreturned));
-
- error: {
- opdisposelist (hlist);
- return (false);
- }
-
-} /* mysqlgetrow */
-
-boolean mysqlgeterrornumberverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
- MYSQL *dbid; // the MySQL object handle
- unsigned int returnCode; // return code from MySQL call
-
- /*
- sqlite.getColumnInt(queryid, columnNumber)
-
- Action: Retrieve the value of the specified integer-type column
- Params: a query id and the number of the column (1 base)
- Returns: an SQLite result code
- Notes: do not pass the opened database ID across threads.
-
- SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_column_int.
- */
-
- flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
-
- if (!getlongvalue (hparam1, 1, (long *) &dbid)) /* Get the long value, which becomes the pline pointer */
- return (false);
-
- // Check that server's still alive
- if (mysql_ping(dbid) != 0) {
- langerrormessage ("\x20""Lost connection to MySQL server.");
- return (false);
- }
-
- /* Process the MySQL call */
- returnCode = mysql_errno(dbid);
-
- return (setlongvalue ((long) returnCode, vreturned));
-
-} /* mysqlgeterrornumberverb */
-
-boolean mysqlgeterrormessageverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
- MYSQL *dbid; // the MySQL object handle
- const char *mysqlError; // pointer to the error message
- Handle returnH = nil; // The handle being returned back to Frontier
-
- /*
- Frontier verb: sqlite.getErrorMessage(dbfile)
-
- Returns the error message for the most recent SQLite API call.
- Takes a database ID.
- Returns a string containing the error message.
- NOTE: do not pass the opened database ID across threads.
-
- SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_errmsg.
- */
-
- flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
-
- if (!getlongvalue (hparam1, 1, (long *) &dbid)) /* Get the long value, which becomes the db pointer */
- return (false);
-
- // Check that server's still alive
- if (mysql_ping(dbid) != 0) {
- langerrormessage ("\x20""Lost connection to MySQL server.");
- return (false);
- }
-
- /* Process the SQLite sequence */
- mysqlError = mysql_error(dbid);
-
- /* Exit the verb, converting errMsg back to Frontier handle */
- if(!newfilledhandle ((ptrvoid) mysqlError, strlen (mysqlError), &returnH))
- return false; /* Allocation failed */
-
- return (setheapvalue (returnH, stringvaluetype, vreturned));
-
-} /* mysqlgeterrormessageverb */
-
-boolean mysqlgetclientinfoverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
- const char *mysqlMsg; // pointer to the message
- Handle returnH = nil; // The handle being returned back to Frontier
-
- /*
- Frontier verb: sqlite.getErrorMessage(dbfile)
-
- Returns the error message for the most recent SQLite API call.
- Takes a database ID.
- Returns a string containing the error message.
- NOTE: do not pass the opened database ID across threads.
-
- SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_errmsg.
- */
-
- /* Process the SQLite sequence */
- mysqlMsg = mysql_get_client_info();
-
- /* Exit the verb, converting errMsg back to Frontier handle */
- if(!newfilledhandle ((ptrvoid) mysqlMsg, strlen (mysqlMsg), &returnH))
- return false; /* Allocation failed */
-
- return (setheapvalue (returnH, stringvaluetype, vreturned));
-
-} /* mysqlgetclientinfoverb */
-
-boolean mysqlgetclientversionverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
- unsigned long returnCode; // The number being returned back to Frontier
-
- /*
- Frontier verb: sqlite.getErrorMessage(dbfile)
-
- Returns the error message for the most recent SQLite API call.
- Takes a database ID.
- Returns a string containing the error message.
- NOTE: do not pass the opened database ID across threads.
-
- SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_errmsg.
- */
-
- /* Process the MySQL call */
- returnCode = mysql_get_client_version();
-
- return (setlongvalue ((long) returnCode, vreturned));
-
-} /* mysqlgetclientversionverb */
-
-boolean mysqlgethostinfoverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
- MYSQL *dbid; // the MySQL object handle
- const char *mysqlMsg; // pointer to the message
- Handle returnH = nil; // The handle being returned back to Frontier
-
- /*
- Frontier verb: sqlite.getErrorMessage(dbfile)
-
- Returns the error message for the most recent SQLite API call.
- Takes a database ID.
- Returns a string containing the error message.
- NOTE: do not pass the opened database ID across threads.
-
- SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_errmsg.
- */
-
- flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
-
- if (!getlongvalue (hparam1, 1, (long *) &dbid)) /* Get the long value, which becomes the db pointer */
- return (false);
-
- // Check that server's still alive
- if (mysql_ping(dbid) != 0) {
- langerrormessage ("\x20""Lost connection to MySQL server.");
- return (false);
- }
-
- /* Process the SQLite sequence */
- mysqlMsg = mysql_get_host_info(dbid);
-
- /* Exit the verb, converting errMsg back to Frontier handle */
- if(!newfilledhandle ((ptrvoid) mysqlMsg, strlen (mysqlMsg), &returnH))
- return false; /* Allocation failed */
-
- return (setheapvalue (returnH, stringvaluetype, vreturned));
-
-} /* mysqlgethostinfoverb */
-
-boolean mysqlgetserverversionverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
- MYSQL *dbid; // the MySQL object handle
- unsigned long returnCode; // the return code
- Handle returnH = nil; // The handle being returned back to Frontier
-
- /*
- Frontier verb: sqlite.getErrorMessage(dbfile)
-
- Returns the error message for the most recent SQLite API call.
- Takes a database ID.
- Returns a string containing the error message.
- NOTE: do not pass the opened database ID across threads.
-
- SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_errmsg.
- */
-
- flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
-
- if (!getlongvalue (hparam1, 1, (long *) &dbid)) /* Get the long value, which becomes the db pointer */
- return (false);
-
- // Check that server's still alive
- if (mysql_ping(dbid) != 0) {
- langerrormessage ("\x20""Lost connection to MySQL server.");
- return (false);
- }
-
- /* Process the SQLite sequence */
- returnCode = mysql_get_server_version(dbid);
-
- /* Exit the verb, converting errMsg back to Frontier handle */
- return (setlongvalue ((long) returnCode, vreturned));
-
-} /* mysqlgetserverversionverb */
-
-boolean mysqlgetprotocolinfoverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
- MYSQL *dbid; // the MySQL object handle
- unsigned int returnCode; // the return code
- Handle returnH = nil; // The handle being returned back to Frontier
-
- /*
- Frontier verb: sqlite.getErrorMessage(dbfile)
-
- Returns the error message for the most recent SQLite API call.
- Takes a database ID.
- Returns a string containing the error message.
- NOTE: do not pass the opened database ID across threads.
-
- SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_errmsg.
- */
-
- flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
-
- if (!getlongvalue (hparam1, 1, (long *) &dbid)) /* Get the long value, which becomes the db pointer */
- return (false);
-
- // Check that server's still alive
- if (mysql_ping(dbid) != 0) {
- langerrormessage ("\x20""Lost connection to MySQL server.");
- return (false);
- }
-
- /* Process the SQLite sequence */
- returnCode = mysql_get_proto_info(dbid);
-
- /* Exit the verb, converting errMsg back to Frontier handle */
- return (setlongvalue ((long) returnCode, vreturned));
-
-} /* mysqlgetprotocolinfoverb */
-
-boolean mysqlgetserverinfoverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
- MYSQL *dbid; // the MySQL object handle
- const char *mysqlMsg; // pointer to the message
- Handle returnH = nil; // The handle being returned back to Frontier
-
- /*
- Frontier verb: sqlite.getErrorMessage(dbfile)
-
- Returns the error message for the most recent SQLite API call.
- Takes a database ID.
- Returns a string containing the error message.
- NOTE: do not pass the opened database ID across threads.
-
- SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_errmsg.
- */
-
- flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
-
- if (!getlongvalue (hparam1, 1, (long *) &dbid)) /* Get the long value, which becomes the db pointer */
- return (false);
-
- // Check that server's still alive
- if (mysql_ping(dbid) != 0) {
- langerrormessage ("\x20""Lost connection to MySQL server.");
- return (false);
- }
-
- /* Process the SQLite sequence */
- mysqlMsg = mysql_get_server_info(dbid);
-
- /* Exit the verb, converting errMsg back to Frontier handle */
- if(!newfilledhandle ((ptrvoid) mysqlMsg, strlen (mysqlMsg), &returnH))
- return false; /* Allocation failed */
-
- return (setheapvalue (returnH, stringvaluetype, vreturned));
-
-} /* mysqlgetserverinfoverb */
-
-boolean mysqlgetqueryinfoverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
- MYSQL *dbid; // the MySQL object handle
- const char *mysqlMsg; // pointer to the message
- Handle returnH = nil; // The handle being returned back to Frontier
-
- /*
- Frontier verb: sqlite.getErrorMessage(dbfile)
-
- Returns the error message for the most recent SQLite API call.
- Takes a database ID.
- Returns a string containing the error message.
- NOTE: do not pass the opened database ID across threads.
-
- SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_errmsg.
- */
-
- flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
-
- if (!getlongvalue (hparam1, 1, (long *) &dbid)) /* Get the long value, which becomes the db pointer */
- return (false);
-
- // Check that server's still alive
- if (mysql_ping(dbid) != 0) {
- langerrormessage ("\x20""Lost connection to MySQL server.");
- return (false);
- }
-
- /* Process the SQLite sequence */
- mysqlMsg = mysql_info(dbid);
-
- if (mysqlMsg == NULL) {
- /* Exit the verb, converting errMsg back to Frontier handle */
- if(!newfilledhandle ((ptrvoid) "", 0, &returnH))
- return false; /* Allocation failed */
- } else {
- /* Exit the verb, converting errMsg back to Frontier handle */
- if(!newfilledhandle ((ptrvoid) mysqlMsg, strlen (mysqlMsg), &returnH))
- return false; /* Allocation failed */
- }
-
- return (setheapvalue (returnH, stringvaluetype, vreturned));
-
-} /* mysqlgetqueryinfoverb */
-
-boolean mysqlgetaffectedrowcountverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
- MYSQL *dbid; // the MySQL object handle
- my_ulonglong rowCount; // this datastructure is too big for Frontier
-
- /*
- sqlite.getColumnInt(queryid, columnNumber)
-
- Action: Retrieve the value of the specified integer-type column
- Params: a query id and the number of the column (1 base)
- Returns: an SQLite result code
- Notes: do not pass the opened database ID across threads.
-
- SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_column_int.
- */
-
- flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
-
- if (!getlongvalue (hparam1, 1, (long *) &dbid)) /* Get the long value, which becomes the pointer */
- return (false);
-
- // Check that server's still alive
- if (mysql_ping(dbid) != 0) {
- langerrormessage ("\x20""Lost connection to MySQL server.");
- return (false);
- }
-
- /* Process the MySQL call */
- rowCount = mysql_affected_rows(dbid);
-
- return (setdoublevalue ((double) rowCount, vreturned));
-
-} /* mysqlgetaffectedrowcountverb */
-
-boolean mysqlgetselectedrowcountverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
- MYSQL_RES *queryid; // query id
- my_ulonglong rowCount; // this datastructure is too big for Frontier
-
- /*
- sqlite.getColumnInt(queryid, columnNumber)
-
- Action: Retrieve the value of the specified integer-type column
- Params: a query id and the number of the column (1 base)
- Returns: an SQLite result code
- Notes: do not pass the opened database ID across threads.
-
- SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_column_int.
- */
-
- flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
-
- if (!getlongvalue (hparam1, 1, (long *) &queryid)) /* Get the long value, which becomes the pointer */
- return (false);
-
- /* Process the MySQL call */
- rowCount = mysql_num_rows(queryid);
-
- return (setdoublevalue ((double) rowCount, vreturned));
-
-} /* mysqlgetselectedrowcountverb */
-
-boolean mysqlgetcolumncountverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
- MYSQL *dbid; // the MySQL object handle
- unsigned int returnCode; // return code from MySQL call
-
- /*
- sqlite.getColumnInt(queryid, columnNumber)
-
- Action: Retrieve the value of the specified integer-type column
- Params: a query id and the number of the column (1 base)
- Returns: an SQLite result code
- Notes: do not pass the opened database ID across threads.
-
- SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_column_int.
- */
-
- flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
-
- if (!getlongvalue (hparam1, 1, (long *) &dbid)) /* Get the long value, which becomes the pline pointer */
- return (false);
-
- // Check that server's still alive
- if (mysql_ping(dbid) != 0) {
- langerrormessage ("\x20""Lost connection to MySQL server.");
- return (false);
- }
-
- /* Process the MySQL call */
- returnCode = mysql_field_count(dbid);
-
- return (setlongvalue ((long) returnCode, vreturned));
-
-} /* mysqlgetcolumncountverb */
-
-boolean mysqlgetserverstatusverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
- MYSQL *dbid; // the MySQL object handle
- const char *mysqlStatus; // pointer to the status message
- Handle returnH = nil; // The handle being returned back to Frontier
-
- /*
- Status will fail/crash if mysql.connect hasn't previously succeeded
- */
-
- flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
-
- if (!getlongvalue (hparam1, 1, (long *) &dbid)) /* Get the long value, which becomes the db pointer */
- return (false);
-
- // Check that server's still alive
- if (mysql_ping(dbid) != 0) {
- langerrormessage ("\x20""Lost connection to MySQL server.");
- return (false);
- }
-
- /* Process the SQLite sequence */
- mysqlStatus = mysql_stat(dbid);
-
- if (mysqlStatus == NULL) {
- return (setlongvalue ((long) 0, vreturned));
- }
- else {
- /* Exit the verb, converting errMsg back to Frontier handle */
- if(!newfilledhandle ((ptrvoid) mysqlStatus, strlen (mysqlStatus), &returnH))
- return false; /* Allocation failed */
- }
-
- return (setheapvalue (returnH, stringvaluetype, vreturned));
-
-} /* mysqlgetserverstatusverb */
-
-boolean mysqlgetquerywarningcountverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
- MYSQL *dbid; // the MySQL object handle
- unsigned int returnCode; // return code from MySQL call
-
- /*
- sqlite.getColumnInt(queryid, columnNumber)
-
- Action: Retrieve the value of the specified integer-type column
- Params: a query id and the number of the column (1 base)
- Returns: an SQLite result code
- Notes: do not pass the opened database ID across threads.
-
- SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_column_int.
- */
-
- flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
-
- if (!getlongvalue (hparam1, 1, (long *) &dbid)) /* Get the long value, which becomes the pline pointer */
- return (false);
-
- // Check that server's still alive
- if (mysql_ping(dbid) != 0) {
- langerrormessage ("\x20""Lost connection to MySQL server.");
- return (false);
- }
-
- /* Process the MySQL call */
- returnCode = mysql_warning_count(dbid);
-
- return (setlongvalue ((long) returnCode, vreturned));
-
-} /* mysqlgetquerywarningcountverb */
-
-boolean mysqlpingserververb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
- MYSQL *dbid; // the MySQL object handle
- unsigned int returnCode; // return code from MySQL call
-
- /*
- sqlite.getColumnInt(queryid, columnNumber)
-
- Action: Retrieve the value of the specified integer-type column
- Params: a query id and the number of the column (1 base)
- Returns: an SQLite result code
- Notes: do not pass the opened database ID across threads.
-
- SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_column_int.
- */
-
- flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
-
- if (!getlongvalue (hparam1, 1, (long *) &dbid)) /* Get the long value, which becomes the pline pointer */
- return (false);
-
- /* Process the MySQL call */
- returnCode = mysql_ping(dbid);
-
- return (setlongvalue ((long) returnCode, vreturned));
-
-} /* mysqlpingserververb */
-
-boolean mysqlseekrowverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
- MYSQL_RES *queryid; // the returned MySQL query id
- tyvaluerecord v1;
- double row; // row to seek
-
- /*
- sqlite.compileQuery(dbid, query)
-
- Action: compile an SQLite query
- Params: a database id and a query string
- Returns: a query id
- Usage: call in a try statement
- Notes: do not pass the opened database ID across threads.
-
- SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_prepare.
-
- Code that is a good example of prepare in use:
- http://souptonuts.sourceforge.net/code/eatblob.c.html
- */
-
- if (!getlongvalue (hparam1, 1, (long *) &queryid)) /* Get the long value, which becomes the query pointer */
- return (false);
-
- flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
-
- if (!getdoubleparam (hparam1, 2, &v1)) /* get the seek row */
- return (false);
-
- row = **v1.data.doublevalue;
-
- mysql_data_seek(queryid, (my_ulonglong) row);
-
- return (setlongvalue ((long) 0, vreturned));
-
-} /* mysqlseekrowverb */
-
-boolean mysqlselectdatabaseverb ( hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror ) {
-
- MYSQL *dbid; // the MySQL object handle
- int resultCode; // result code
- Handle dbname; // existing database on MySQL server
-
- //
- // mysql.connect (dbid, host, user, password, database, port)
- //
- // Action: connects to a MySQL server and database, initializing the mySQL connection object
- // Params: dbid (the MySQL object) the hostname, user id, password, existing database name, and port
- // Returns: a MySQL object handle or an error
- // Usage: call in a try statement
- //
- // MySQL docs: http://dev.mysql.com/doc/refman/5.1/en/mysql-real-connect.html
- //
- // If problems are encountered connecting to a Windows-based MySQL server, see:
- // http://dev.mysql.com/doc/refman/5.1/en/can-not-connect-to-server.html#can-not-connect-to-server-on-windows
- //
-
- if (!getlongvalue (hparam1, 1, (long *) &dbid)) /* Get the long value, which becomes the db pointer */
- return (false);
-
- flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
-
- if (!gettextvalue (hparam1, 2, &dbname)) /* get the dbname param */
- return (false);
-
- // Null terminate strings
- if (!pushcharhandle (0x00, dbname))
- return (false);
-
- // Check that server's still alive
- if (mysql_ping(dbid) != 0) {
- langerrormessage ("\x20""Lost connection to MySQL server.");
- return (false);
- }
-
- // Process the MySQL request
- resultCode = mysql_select_db(dbid, *dbname);
- if (resultCode != 0) {
- langerrormessage ("\x24""Could not connect to MySQL database.");
- return (false);
- }
-
- return (setlongvalue ((long) 0, vreturned));
-
-} // mysqlselectdatabaseverb
-
-boolean mysqlgetsqlstateverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
- MYSQL *dbid; // the MySQL object handle
- const char *mysqlStatus; // pointer to the status message
- Handle returnH = nil; // The handle being returned back to Frontier
-
- flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
-
- if (!getlongvalue (hparam1, 1, (long *) &dbid)) /* Get the long value, which becomes the db pointer */
- return (false);
-
- // Check that server's still alive
- if (mysql_ping(dbid) != 0) {
- langerrormessage ("\x20""Lost connection to MySQL server.");
- return (false);
- }
-
- /* Process the SQLite sequence */
- mysqlStatus = mysql_sqlstate(dbid);
-
- /* Exit the verb, converting errMsg back to Frontier handle */
- if(!newfilledhandle ((ptrvoid) mysqlStatus, strlen (mysqlStatus), &returnH))
- return false; /* Allocation failed */
-
- return (setheapvalue (returnH, stringvaluetype, vreturned));
-
-} /* mysqlgetsqlstateverb */
-
-boolean mysqlescapestringverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
- MYSQL *dbid; // the MySQL object handle
- Handle fromstring;
- Handle tostring;
- unsigned long size;
- unsigned long encodedSize;
- Handle returnH = nil; // The handle being returned back to Frontier
-
- /*
- sqlite.getColumnInt(queryid, columnNumber)
-
- Action: Retrieve the value of the specified integer-type column
- Params: a query id and the number of the column (1 base)
- Returns: an SQLite result code
- Notes: do not pass the opened database ID across threads.
-
- SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_column_int.
- */
-
- if (!getlongvalue (hparam1, 1, (long *) &dbid)) /* Get the long value, which becomes the pline pointer */
- return (false);
-
- flnextparamislast = true; /* makes sure Frontier throws an error */
-
- if (!gettextvalue (hparam1, 2, &fromstring)) /* get the from param */
- return (false);
-
- // Null terminate strings
- if (!pushcharhandle (0x00, fromstring))
- return (false);
-
- size = strlen(*fromstring);
-
- if(!newhandle (size*2+1, &tostring)) {
- return false;
- }
-
- encodedSize = mysql_real_escape_string(dbid, *tostring, *fromstring, size);
-
- /* Exit the verb, converting the allocated string back to Frontier handle */
- if(!newfilledhandle ((ptrvoid) *tostring, encodedSize, &returnH)) {
- return false; /* Allocation failed */
- }
-
- disposehandle(tostring);
-
- return (setheapvalue (returnH, stringvaluetype, vreturned));
-
-} /* mysqlescapestringverb */
-
-boolean mysqlisthreadsafeverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
- unsigned long returnCode; // The number being returned back to Frontier
-
- /*
- Frontier verb: sqlite.getErrorMessage(dbfile)
-
- Returns the error message for the most recent SQLite API call.
- Takes a database ID.
- Returns a string containing the error message.
- NOTE: do not pass the opened database ID across threads.
-
- SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_errmsg.
- */
-
- /* Process the MySQL call */
- returnCode = mysql_thread_safe();
-
- if (returnCode == 1)
- return(setbooleanvalue (true, vreturned));
- else
- return(setbooleanvalue (false, vreturned));
-
+ };
+
+ /*
+ mysql.init()
+
+ Action: initializes the mySQL library.
+ Params: none
+ Returns: a MySQL object handle or an error
+ Usage: call in a try statement, call before any other MySQL call
+
+ MySQL docs: http://dev.mysql.com/doc/refman/5.1/en/mysql-library-init.html
+ */
+
+ // Initialize the MySQL object
+ resultCode = mysql_library_init(-1, server_args, NULL); // -1 means don't start embedded server
+ if (resultCode != 0) {
+ langerrormessage ("\x1B""MySQL could not initialize.");
+ return (false);
+ }
+
+ return (setlongvalue ((long) resultCode, vreturned));
+
+} // mysqlinitverb
+
+boolean mysqlendverb ( hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror ) {
+
+ /*
+ mysql.end()
+
+ Action: closes out the MySQL library
+ Params: none
+ Returns: a MySQL object handle or an error
+ Usage: call in a try statement, call after any other MySQL call
+
+ MySQL docs: http://dev.mysql.com/doc/refman/5.1/en/mysql-library-end.html
+ */
+
+ // Close out the library
+ mysql_library_end();
+
+ return(setbooleanvalue (true, vreturned));
+
+} // mysqlendverb
+
+boolean mysqlconnectverb ( hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror ) {
+
+ MYSQL *dbid; // the MySQL object handle
+ Handle host; // hostname of the MySQL server
+ Handle user; // valid username on the MySQL server
+ Handle passwd; // password for user on MySQL server
+ Handle dbname; // existing database on MySQL server
+ long port; // TCP/IP port for the connection
+
+ /*
+ mysql.connect (host, user, password, database, port)
+
+ Action: connects to a MySQL server and database, initializing the mySQL connection object
+ Params: the hostname, user id, password, existing database name, and port
+ Returns: a MySQL object handle or an error
+ Usage: call in a try statement
+
+ MySQL docs: http://dev.mysql.com/doc/refman/5.1/en/mysql-real-connect.html
+
+ If problems are encountered connecting to a Windows-based MySQL server, see:
+ http://dev.mysql.com/doc/refman/5.1/en/can-not-connect-to-server.html#can-not-connect-to-server-on-windows
+ */
+
+ if (!gettextvalue (hparam1, 1, &host)) // get the host param
+ return (false);
+
+ if (!gettextvalue (hparam1, 2, &user)) // get the user param
+ return (false);
+
+ if (!gettextvalue (hparam1, 3, &passwd)) // get the passwd param
+ return (false);
+
+ if (!gettextvalue (hparam1, 4, &dbname)) // get the dbname param
+ return (false);
+
+ flnextparamislast = true; // makes sure Frontier throws an error if more than one param is passed
+
+ if (!getlongvalue (hparam1, 5, &port)) // get the port param
+ return (false);
+
+ // Null terminate strings
+ if (!pushcharhandle (0x00, host)) return (false);
+ if (!pushcharhandle (0x00, user)) return (false);
+ if (!pushcharhandle (0x00, passwd)) return (false);
+ if (!pushcharhandle (0x00, dbname)) return (false);
+
+ // Initialize the MySQL object
+ dbid = mysql_init((MYSQL*) 0);
+ if (dbid == NULL) {
+ langerrormessage ("\x2D""MySQL could not allocate a connection object.");
+ return (false);
+ }
+ // Attempt the connection
+ dbid = mysql_real_connect(dbid, *host, *user, *passwd, *dbname, (unsigned int) port, NULL, 0 );
+ if (dbid == NULL) {
+ langerrormessage ("\x22""Could not connect to MySQL server.");
+ return (false);
+ }
+
+ return (setlongvalue ((long) dbid, vreturned));
+
+} // mysqlconnectverb
+
+
+boolean mysqlcloseverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
+ MYSQL *dbid; // the MySQL object handle
+ int returnCode; // return code from close call
+
+ /*
+ mysql.close(dbid)
+
+ Action: close a MySQL session
+ Params: a database connection id, the MySQL object
+ Returns: nothing
+ Usage: there doesn't appear to be a way to check for success or failure
+
+ MySQL docs: http://dev.mysql.com/doc/refman/5.1/en/mysql-close.html
+ */
+
+ flnextparamislast = true; // makes sure Frontier throws an error if more than one param is passed
+
+ if (!getlongvalue (hparam1, 1, (long *) &dbid)) // Get the long value, which becomes the db pointer
+ return (false);
+
+ // Check that server's still alive
+ if (mysql_ping(dbid) != 0) {
+ langerrormessage ("\x20""Lost connection to MySQL server.");
+ return (false);
+ }
+
+ // Process the MySQL sequence
+ mysql_close(dbid);
+ returnCode = 0; // placeholder for debugging. mysql_close doesn't return anything.
+
+ return setlongvalue (returnCode, vreturned);
+
+} /* mysqlcloseverb */
+
+boolean mysqlcompilequeryverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
+ Handle query; // the SQL query passed to the MySQL server
+ MYSQL *dbid; // the MySQL object handle
+ MYSQL_RES *queryid; // the returned MySQL query id
+ int returnCode; // return code from MySQL query
+
+ /*
+ mysql.compileQuery(dbid, query)
+
+ Action: compile a MySQL query
+ Params: a database connection id and a query string
+ Returns: a query id
+ Usage: call in a try statement
+ Notes: there are a lot of possible approaches to queries in MySQL. We're using the
+ mysql_store_result version, which is more flexible, but which could have
+ some issues with large dataset returns.
+
+ MySQL docs: http://dev.mysql.com/doc/refman/5.1/en/mysql-query.html
+ http://dev.mysql.com/doc/refman/5.1/en/mysql-store-result.html
+ */
+
+ if (!getlongvalue (hparam1, 1, (long *) &dbid)) /* Get the long value, which becomes the db pointer */
+ return (false);
+
+ flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
+
+ if (!gettextvalue (hparam1, 2, &query)) // get the query param
+ return (false);
+
+ // Null terminate strings
+ if (!pushcharhandle (0x00, query))
+ return (false);
+
+ // Check that server's still alive
+ if (mysql_ping(dbid) != 0) {
+ langerrormessage ("\x20""Lost connection to MySQL server.");
+ return (false);
+ }
+
+ // Process the initial query sequence
+ returnCode = mysql_query(dbid, *query);
+ if(returnCode != 0) {
+ langerrormessage ("\x21""Could not initialize MySQL query.");
+ return (false);
+ }
+
+ queryid = mysql_store_result(dbid);
+ if(mysql_errno(dbid) != 0) {
+ langerrormessage ("\x21""Could initialize MySQL query.");
+ return (false);
+ }
+
+ if (mysql_field_count(dbid) == 0)
+ return (setlongvalue ((long) 0, vreturned)); // return 0 to the scripter
+ else
+ return (setlongvalue ((long) queryid, vreturned)); // return the db address to the scripter
+} /* mysqlcompilequeryverb */
+
+boolean mysqlclearqueryverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
+ MYSQL_RES *queryid; // the returned MySQL query id
+ int returnCode;
+
+ /*
+ mysql.clearQuery(queryid)
+
+ Action: clear a MySQL query
+ Params: a query id
+ Returns: 0 (MySQL doesn't return anything)
+
+ MySQL docs: http://dev.mysql.com/doc/refman/5.1/en/mysql-free-result.html
+ */
+
+ flnextparamislast = true; // makes sure Frontier throws an error if more than one param is passed
+
+ if (!getlongvalue (hparam1, 1, (long *) &queryid)) // Get the long value, which becomes the queryid pointer
+ return (false);
+
+ // Process the MySQL sequence
+ mysql_free_result(queryid);
+
+ returnCode = 0; // placeholder. mysql_free_result doesn't return anything.
+ return setlongvalue (returnCode, vreturned);
+
+} /* mysqlclearqueryverb */
+
+boolean mysqlgetrowverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
+ unsigned int fieldNumber; /* field number */
+ unsigned int fieldCount; /* number of fields */
+ MYSQL_RES *queryid; /* query id */
+ MYSQL_ROW row;
+ MYSQL_FIELD *field;
+ hdllistrecord hlist;
+ Handle returnH;
+ const unsigned char *column_text;
+ tyvaluerecord val;
+
+ /*
+ mysql.getRow(queryid)
+
+ Action: return the next row from the query result set
+ Params: a query id
+ Returns: 0 if no more rows, or a Frontier list containing data
+
+ MySQL docs: http://dev.mysql.com/doc/refman/5.1/en/mysql-fetch-row.html
+ http://dev.mysql.com/doc/refman/5.1/en/mysql-num-fields.html
+ http://dev.mysql.com/doc/refman/5.1/en/mysql-field-seek.html
+ http://dev.mysql.com/doc/refman/5.1/en/mysql-fetch-field.html
+
+ Notes:
+
+ MySQL might also return a 0 if there's an error. It's important to check
+ for an error if a zero value is returned to differentiate between end of
+ dataset and last row.
+
+ The MySQL fetch_row function is interesting, in that it looks like
+ each field returned is returned as a string. This is great for Frontier,
+ since Frontier can't handle some of MySQL's bigger number types (like double),
+ but it can handle strings. So everything that's supported is returned as
+ a string to Frontier. The Frontier programmer can then do whatever
+ coercing is necessary.
+
+ The only formats we explicitly don't support are:
+
+ MYSQL_TYPE_BIT
+ MYSQL_TYPE_BLOB
+ MYSQL_TYPE_SET
+ MYSQL_TYPE_ENUM
+ MYSQL_TYPE_GEOMETRY
+ MYSQL_TYPE_NULL
+
+ Formats supported and returned as s...
[truncated message content] |
|
From: <dav...@us...> - 2007-04-15 23:37:15
|
Revision: 1656
http://svn.sourceforge.net/frontierkernel/?rev=1656&view=rev
Author: davidgewirtz
Date: 2007-04-15 16:37:08 -0700 (Sun, 15 Apr 2007)
Log Message:
-----------
Full set of MySQL API functions implemented in Frontier.
Modified Paths:
--------------
Frontier/branches/mysql/Common/headers/langmysql.h
Frontier/branches/mysql/Common/resources/Mac/kernelverbs.r
Frontier/branches/mysql/Common/resources/Win32/kernelverbs.rc
Frontier/branches/mysql/Common/source/langmysql.c
Modified: Frontier/branches/mysql/Common/headers/langmysql.h
===================================================================
--- Frontier/branches/mysql/Common/headers/langmysql.h 2007-04-12 22:39:57 UTC (rev 1655)
+++ Frontier/branches/mysql/Common/headers/langmysql.h 2007-04-15 23:37:08 UTC (rev 1656)
@@ -29,6 +29,8 @@
extern boolean mysqlinitverb (hdltreenode, tyvaluerecord *, bigstring); /* 2007-04-08 gewirtz */
+extern boolean mysqlendverb (hdltreenode, tyvaluerecord *, bigstring); /* 2007-04-15 gewirtz */
+
extern boolean mysqlconnectverb (hdltreenode, tyvaluerecord *, bigstring); /* 2007-04-08 gewirtz */
extern boolean mysqlcompilequeryverb (hdltreenode, tyvaluerecord *, bigstring); /* 2007-04-09 gewirtz */
@@ -73,6 +75,10 @@
extern boolean mysqlgetsqlstateverb (hdltreenode, tyvaluerecord *, bigstring); /* 2007-04-12 gewirtz */
+extern boolean mysqlescapestringverb (hdltreenode, tyvaluerecord *, bigstring); /* 2007-04-15 gewirtz */
+
+extern boolean mysqlisthreadsafeverb (hdltreenode, tyvaluerecord *, bigstring); /* 2007-04-15 gewirtz */
+
extern boolean mysqlcloseverb (hdltreenode, tyvaluerecord *, bigstring); /* 2007-04-08 gewirtz */
Modified: Frontier/branches/mysql/Common/resources/Mac/kernelverbs.r
===================================================================
--- Frontier/branches/mysql/Common/resources/Mac/kernelverbs.r 2007-04-12 22:39:57 UTC (rev 1655)
+++ Frontier/branches/mysql/Common/resources/Mac/kernelverbs.r 2007-04-15 23:37:08 UTC (rev 1656)
@@ -1170,6 +1170,7 @@
{
"mysql", false, {
"init",
+ "end",
"connect",
"compileQuery",
"clearQuery",
@@ -1192,6 +1193,8 @@
"seekRow",
"selectDatabase",
"getSQLSTATE",
+ "escapeString",
+ "isThreadSafe",
"close"
}
}
Modified: Frontier/branches/mysql/Common/resources/Win32/kernelverbs.rc
===================================================================
--- Frontier/branches/mysql/Common/resources/Win32/kernelverbs.rc 2007-04-12 22:39:57 UTC (rev 1655)
+++ Frontier/branches/mysql/Common/resources/Win32/kernelverbs.rc 2007-04-15 23:37:08 UTC (rev 1656)
@@ -1106,8 +1106,9 @@
1, // Number of "blocks" in this resource
"mysql\0", // Function Processor name
false, // Window required
- 24, // Count of verbs
+ 27, // Count of verbs
"init\0",
+ "end\0",
"connect\0",
"compileQuery\0",
"clearQuery\0",
@@ -1130,5 +1131,7 @@
"seekRow\0",
"selectDatabase\0",
"getSQLSTATE\0",
+ "escapeString\0",
+ "isThreadSafe\0",
"close\0"
END
Modified: Frontier/branches/mysql/Common/source/langmysql.c
===================================================================
--- Frontier/branches/mysql/Common/source/langmysql.c 2007-04-12 22:39:57 UTC (rev 1655)
+++ Frontier/branches/mysql/Common/source/langmysql.c 2007-04-15 23:37:08 UTC (rev 1656)
@@ -74,6 +74,7 @@
typedef enum tymysqlverbtoken { /* verbs that are processed by langmysql.c */
initfunc,
+ endfunc,
connectfunc,
compilequeryfunc,
clearqueryfunc,
@@ -96,6 +97,8 @@
seekrowfunc,
selectdatabasefunc,
getsqlstatefunc,
+ escapestringfunc,
+ isthreadsafefunc,
closefunc,
ctmysqlverbs
} tymysqlverbtoken;
@@ -113,6 +116,9 @@
case initfunc: { /* 2007-04-08 gewirtz: initialize MySQL */
return (mysqlinitverb (hp1, v, bserror));
} /* initfunc */
+ case endfunc: { /* 2007-04-08 gewirtz: initialize MySQL */
+ return (mysqlendverb (hp1, v, bserror));
+ } /* endfunc */
case connectfunc: { /* 2007-04-08 gewirtz: initialize MySQL */
return (mysqlconnectverb (hp1, v, bserror));
} /* connectfunc */
@@ -179,6 +185,12 @@
case getsqlstatefunc: { /* 2007-04-11 gewirtz: choose a MySQL database as current */
return (mysqlgetsqlstateverb (hp1, v, bserror));
} /* getsqlstatefunc */
+ case escapestringfunc: { /* 2007-04-11 gewirtz: choose a MySQL database as current */
+ return (mysqlescapestringverb (hp1, v, bserror));
+ } /* escapestringfunc */
+ case isthreadsafefunc: { /* 2007-04-11 gewirtz: choose a MySQL database as current */
+ return (mysqlisthreadsafeverb (hp1, v, bserror));
+ } /* isthreadsafefunc */
case closefunc: { /* 2007-04-08 gewirtz: close a MySQL db */
return (mysqlcloseverb (hp1, v, bserror));
} /* closefunc */
@@ -195,7 +207,12 @@
} /* mysqlinitverbs */
boolean mysqlinitverb ( hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror ) {
- MYSQL *dbid; // the MySQL object handle
+ int resultCode;
+ static char *server_args[] = {
+ "this_program" // this string is not used
+ // "--datadir=.", // these arguments aren't, either, since we're not using
+ // "--key_buffer_size=32M" // the embedded server
+ };
//
// mysql.init()
@@ -209,16 +226,36 @@
//
// Initialize the MySQL object
- dbid = mysql_init((MYSQL*) 0);
- if (dbid == NULL) {
- langerrormessage ("\x23""MySQL did not initialize correctly.");
+ resultCode = mysql_library_init(-1, server_args, NULL); // -1 means don't start embedded server
+ if (resultCode != 0) {
+ langerrormessage ("\x1B""MySQL could not initialize.");
return (false);
}
- return (setlongvalue ((long) dbid, vreturned));
+ return (setlongvalue ((long) resultCode, vreturned));
} // mysqlinitverb
+boolean mysqlendverb ( hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror ) {
+
+ //
+ // mysql.init()
+ //
+ // Action: initializes the mySQL connection object
+ // Params: none
+ // Returns: a MySQL object handle or an error
+ // Usage: call in a try statement, call before any other MySQL call
+ //
+ // MySQL docs: http://dev.mysql.com/doc/refman/5.1/en/mysql-init.html
+ //
+
+ // Close out the library
+ mysql_library_end();
+
+ return(setbooleanvalue (true, vreturned));
+
+} // mysqlendverb
+
boolean mysqlconnectverb ( hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror ) {
MYSQL *dbid; // the MySQL object handle
@@ -242,24 +279,21 @@
// http://dev.mysql.com/doc/refman/5.1/en/can-not-connect-to-server.html#can-not-connect-to-server-on-windows
//
- if (!getlongvalue (hparam1, 1, (long *) &dbid)) /* Get the long value, which becomes the db pointer */
+ if (!gettextvalue (hparam1, 1, &host)) /* get the host param */
return (false);
- if (!gettextvalue (hparam1, 2, &host)) /* get the host param */
+ if (!gettextvalue (hparam1, 2, &user)) /* get the user param */
return (false);
- if (!gettextvalue (hparam1, 3, &user)) /* get the user param */
+ if (!gettextvalue (hparam1, 3, &passwd)) /* get the passwd param */
return (false);
- if (!gettextvalue (hparam1, 4, &passwd)) /* get the passwd param */
+ if (!gettextvalue (hparam1, 4, &dbname)) /* get the dbname param */
return (false);
- if (!gettextvalue (hparam1, 5, &dbname)) /* get the dbname param */
- return (false);
-
flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
- if (!getlongvalue (hparam1, 6, &port)) /* get the port param */
+ if (!getlongvalue (hparam1, 5, &port)) /* get the port param */
return (false);
// Null terminate strings
@@ -268,6 +302,12 @@
if (!pushcharhandle (0x00, passwd)) return (false);
if (!pushcharhandle (0x00, dbname)) return (false);
+ // Initialize the MySQL object
+ dbid = mysql_init((MYSQL*) 0);
+ if (dbid == NULL) {
+ langerrormessage ("\x2D""MySQL could not allocate a connection object.");
+ return (false);
+ }
// Attempt the connection
dbid = mysql_real_connect(dbid, *host, *user, *passwd, *dbname, (unsigned int) port, NULL, 0 );
if (dbid == NULL) {
@@ -1141,4 +1181,78 @@
return (setheapvalue (returnH, stringvaluetype, vreturned));
-} /* mysqlgetsqlstateverb */
\ No newline at end of file
+} /* mysqlgetsqlstateverb */
+
+boolean mysqlescapestringverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
+ MYSQL *dbid; // the MySQL object handle
+ Handle fromstring;
+ Handle tostring;
+ unsigned long size;
+ unsigned long encodedSize;
+ Handle returnH = nil; // The handle being returned back to Frontier
+
+ /*
+ sqlite.getColumnInt(queryid, columnNumber)
+
+ Action: Retrieve the value of the specified integer-type column
+ Params: a query id and the number of the column (1 base)
+ Returns: an SQLite result code
+ Notes: do not pass the opened database ID across threads.
+
+ SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_column_int.
+ */
+
+ if (!getlongvalue (hparam1, 1, (long *) &dbid)) /* Get the long value, which becomes the pline pointer */
+ return (false);
+
+ flnextparamislast = true; /* makes sure Frontier throws an error */
+
+ if (!gettextvalue (hparam1, 2, &fromstring)) /* get the from param */
+ return (false);
+
+ // Null terminate strings
+ if (!pushcharhandle (0x00, fromstring))
+ return (false);
+
+ size = strlen(*fromstring);
+
+ if(!newhandle (size*2+1, &tostring)) {
+ return false;
+ }
+
+ encodedSize = mysql_real_escape_string(dbid, *tostring, *fromstring, size);
+
+ /* Exit the verb, converting the allocated string back to Frontier handle */
+ if(!newfilledhandle ((ptrvoid) *tostring, encodedSize, &returnH)) {
+ return false; /* Allocation failed */
+ }
+
+ disposehandle(tostring);
+
+ return (setheapvalue (returnH, stringvaluetype, vreturned));
+
+} /* mysqlescapestringverb */
+
+boolean mysqlisthreadsafeverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
+ unsigned long returnCode; // The number being returned back to Frontier
+
+ /*
+ Frontier verb: sqlite.getErrorMessage(dbfile)
+
+ Returns the error message for the most recent SQLite API call.
+ Takes a database ID.
+ Returns a string containing the error message.
+ NOTE: do not pass the opened database ID across threads.
+
+ SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_errmsg.
+ */
+
+ /* Process the MySQL call */
+ returnCode = mysql_thread_safe();
+
+ if (returnCode == 1)
+ return(setbooleanvalue (true, vreturned));
+ else
+ return(setbooleanvalue (false, vreturned));
+
+} /* mysqlisthreadsafeverb */
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dav...@us...> - 2007-04-12 22:40:02
|
Revision: 1655
http://svn.sourceforge.net/frontierkernel/?rev=1655&view=rev
Author: davidgewirtz
Date: 2007-04-12 15:39:57 -0700 (Thu, 12 Apr 2007)
Log Message:
-----------
Yet more MySQL verbs.
Modified Paths:
--------------
Frontier/branches/mysql/Common/headers/langmysql.h
Frontier/branches/mysql/Common/resources/Mac/kernelverbs.r
Frontier/branches/mysql/Common/resources/Win32/kernelverbs.rc
Frontier/branches/mysql/Common/source/langmysql.c
Modified: Frontier/branches/mysql/Common/headers/langmysql.h
===================================================================
--- Frontier/branches/mysql/Common/headers/langmysql.h 2007-04-11 04:22:15 UTC (rev 1654)
+++ Frontier/branches/mysql/Common/headers/langmysql.h 2007-04-12 22:39:57 UTC (rev 1655)
@@ -55,6 +55,24 @@
extern boolean mysqlgetqueryinfoverb (hdltreenode, tyvaluerecord *, bigstring); /* 2007-04-10 gewirtz */
+extern boolean mysqlgetaffectedrowcountverb (hdltreenode, tyvaluerecord *, bigstring); /* 2007-04-11 gewirtz */
+
+extern boolean mysqlgetselectedrowcountverb (hdltreenode, tyvaluerecord *, bigstring); /* 2007-04-11 gewirtz */
+
+extern boolean mysqlgetcolumncountverb (hdltreenode, tyvaluerecord *, bigstring); /* 2007-04-11 gewirtz */
+
+extern boolean mysqlgetserverstatusverb (hdltreenode, tyvaluerecord *, bigstring); /* 2007-04-11 gewirtz */
+
+extern boolean mysqlgetquerywarningcountverb (hdltreenode, tyvaluerecord *, bigstring); /* 2007-04-11 gewirtz */
+
+extern boolean mysqlpingserververb (hdltreenode, tyvaluerecord *, bigstring); /* 2007-04-11 gewirtz */
+
+extern boolean mysqlseekrowverb (hdltreenode, tyvaluerecord *, bigstring); /* 2007-04-11 gewirtz */
+
+extern boolean mysqlselectdatabaseverb (hdltreenode, tyvaluerecord *, bigstring); /* 2007-04-11 gewirtz */
+
+extern boolean mysqlgetsqlstateverb (hdltreenode, tyvaluerecord *, bigstring); /* 2007-04-12 gewirtz */
+
extern boolean mysqlcloseverb (hdltreenode, tyvaluerecord *, bigstring); /* 2007-04-08 gewirtz */
Modified: Frontier/branches/mysql/Common/resources/Mac/kernelverbs.r
===================================================================
--- Frontier/branches/mysql/Common/resources/Mac/kernelverbs.r 2007-04-11 04:22:15 UTC (rev 1654)
+++ Frontier/branches/mysql/Common/resources/Mac/kernelverbs.r 2007-04-12 22:39:57 UTC (rev 1655)
@@ -1183,6 +1183,15 @@
"getProtocolInfo",
"getServerInfo",
"getQueryInfo",
+ "getAffectedRowCount",
+ "getSelectedRowCount",
+ "getColumnCount",
+ "getServerStatus",
+ "getQueryWarningCount",
+ "pingServer",
+ "seekRow",
+ "selectDatabase",
+ "getSQLSTATE",
"close"
}
}
Modified: Frontier/branches/mysql/Common/resources/Win32/kernelverbs.rc
===================================================================
--- Frontier/branches/mysql/Common/resources/Win32/kernelverbs.rc 2007-04-11 04:22:15 UTC (rev 1654)
+++ Frontier/branches/mysql/Common/resources/Win32/kernelverbs.rc 2007-04-12 22:39:57 UTC (rev 1655)
@@ -1106,7 +1106,7 @@
1, // Number of "blocks" in this resource
"mysql\0", // Function Processor name
false, // Window required
- 15, // Count of verbs
+ 24, // Count of verbs
"init\0",
"connect\0",
"compileQuery\0",
@@ -1120,6 +1120,15 @@
"getServerVersion\0",
"getProtocolInfo\0",
"getServerInfo\0",
- "getQueryInfo\0",
+ "getQueryInfo\0",
+ "getAffectedRowCount\0",
+ "getSelectedRowCount\0",
+ "getColumnCount\0",
+ "getServerStatus\0",
+ "getQueryWarningCount\0",
+ "pingServer\0",
+ "seekRow\0",
+ "selectDatabase\0",
+ "getSQLSTATE\0",
"close\0"
END
Modified: Frontier/branches/mysql/Common/source/langmysql.c
===================================================================
--- Frontier/branches/mysql/Common/source/langmysql.c 2007-04-11 04:22:15 UTC (rev 1654)
+++ Frontier/branches/mysql/Common/source/langmysql.c 2007-04-12 22:39:57 UTC (rev 1655)
@@ -80,13 +80,22 @@
getrowfunc,
geterrornumberfunc,
geterrormessagefunc,
- getclientinfofunc,
- getclientversionfunc,
- gethostinfofunc,
- getserverversionfunc,
- getprotocolinfofunc,
- getserverinfofunc,
+ getclientinfofunc,
+ getclientversionfunc,
+ gethostinfofunc,
+ getserverversionfunc,
+ getprotocolinfofunc,
+ getserverinfofunc,
getqueryinfofunc,
+ getaffectedrowcountfunc,
+ getselectedrowcountfunc,
+ getcolumncountfunc,
+ getserverstatusfunc,
+ getquerywarningcountfunc,
+ pingserverfunc,
+ seekrowfunc,
+ selectdatabasefunc,
+ getsqlstatefunc,
closefunc,
ctmysqlverbs
} tymysqlverbtoken;
@@ -143,6 +152,33 @@
case getqueryinfofunc: { /* 2007-04-10 gewirtz: get the results messages from the last query */
return (mysqlgetqueryinfoverb (hp1, v, bserror));
} /* getqueryinfofunc */
+ case getaffectedrowcountfunc: { /* 2007-04-11 gewirtz: get the rows added, deleted, updated */
+ return (mysqlgetaffectedrowcountverb (hp1, v, bserror));
+ } /* getaffectedrowcountfunc */
+ case getselectedrowcountfunc: { /* 2007-04-11 gewirtz: get the rows selected in last query */
+ return (mysqlgetselectedrowcountverb (hp1, v, bserror));
+ } /* getselectedrowcountfunc */
+ case getcolumncountfunc: { /* 2007-04-11 gewirtz: get the columns returned in last query */
+ return (mysqlgetcolumncountverb (hp1, v, bserror));
+ } /* getcolumncountfunc */
+ case getserverstatusfunc: { /* 2007-04-11 gewirtz: get the MySQL server status */
+ return (mysqlgetserverstatusverb (hp1, v, bserror));
+ } /* getserverstatusfunc */
+ case getquerywarningcountfunc: { /* 2007-04-11 gewirtz: get the number of warnings returned by the last query */
+ return (mysqlgetquerywarningcountverb (hp1, v, bserror));
+ } /* getquerywarningcountfunc */
+ case pingserverfunc: { /* 2007-04-11 gewirtz: check to see if there's still a connection with the server */
+ return (mysqlpingserververb (hp1, v, bserror));
+ } /* pingserverfunc */
+ case seekrowfunc: { /* 2007-04-11 gewirtz: move to specific row in query result set */
+ return (mysqlseekrowverb (hp1, v, bserror));
+ } /* seekrowfunc */
+ case selectdatabasefunc: { /* 2007-04-11 gewirtz: choose a MySQL database as current */
+ return (mysqlselectdatabaseverb (hp1, v, bserror));
+ } /* selectdatabasefunc */
+ case getsqlstatefunc: { /* 2007-04-11 gewirtz: choose a MySQL database as current */
+ return (mysqlgetsqlstateverb (hp1, v, bserror));
+ } /* getsqlstatefunc */
case closefunc: { /* 2007-04-08 gewirtz: close a MySQL db */
return (mysqlcloseverb (hp1, v, bserror));
} /* closefunc */
@@ -209,16 +245,16 @@
if (!getlongvalue (hparam1, 1, (long *) &dbid)) /* Get the long value, which becomes the db pointer */
return (false);
- if (!getreadonlytextvalue (hparam1, 2, &host)) /* get the host param */
+ if (!gettextvalue (hparam1, 2, &host)) /* get the host param */
return (false);
- if (!getreadonlytextvalue (hparam1, 3, &user)) /* get the user param */
+ if (!gettextvalue (hparam1, 3, &user)) /* get the user param */
return (false);
- if (!getreadonlytextvalue (hparam1, 4, &passwd)) /* get the passwd param */
+ if (!gettextvalue (hparam1, 4, &passwd)) /* get the passwd param */
return (false);
- if (!getreadonlytextvalue (hparam1, 5, &dbname)) /* get the dbname param */
+ if (!gettextvalue (hparam1, 5, &dbname)) /* get the dbname param */
return (false);
flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
@@ -227,10 +263,10 @@
return (false);
// Null terminate strings
- pushcharhandle (0x00, host);
- pushcharhandle (0x00, user);
- pushcharhandle (0x00, passwd);
- pushcharhandle (0x00, dbname);
+ if (!pushcharhandle (0x00, host)) return (false);
+ if (!pushcharhandle (0x00, user)) return (false);
+ if (!pushcharhandle (0x00, passwd)) return (false);
+ if (!pushcharhandle (0x00, dbname)) return (false);
// Attempt the connection
dbid = mysql_real_connect(dbid, *host, *user, *passwd, *dbname, (unsigned int) port, NULL, 0 );
@@ -264,6 +300,12 @@
if (!getlongvalue (hparam1, 1, (long *) &dbid)) /* Get the long value, which becomes the db pointer */
return (false);
+ // Check that server's still alive
+ if (mysql_ping(dbid) != 0) {
+ langerrormessage ("\x20""Lost connection to MySQL server.");
+ return (false);
+ }
+
/* Process the SQLite sequence */
mysql_close(dbid);
returnCode = 0; // placeholder for debugging. mysql_close doesn't return anything.
@@ -277,7 +319,6 @@
MYSQL *dbid; // the MySQL object handle
MYSQL_RES *queryid; // the returned MySQL query id
int returnCode; // return code from MySQL query
- const char *mysqlMsg; // pointer to the message DEBUG
/*
sqlite.compileQuery(dbid, query)
@@ -299,12 +340,19 @@
flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
- if (!getreadonlytextvalue (hparam1, 2, &query)) /* get the query param */
+ if (!gettextvalue (hparam1, 2, &query)) /* get the query param */
return (false);
// Null terminate strings
- pushcharhandle (0x00, query);
+ if (!pushcharhandle (0x00, query))
+ return (false);
+ // Check that server's still alive
+ if (mysql_ping(dbid) != 0) {
+ langerrormessage ("\x20""Lost connection to MySQL server.");
+ return (false);
+ }
+
/* Process the initial query sequence */
returnCode = mysql_query(dbid, *query);
if(returnCode != 0) {
@@ -312,16 +360,12 @@
return (false);
}
- mysqlMsg = mysql_info(dbid); // DEBUG
-
queryid = mysql_store_result(dbid);
if(mysql_errno(dbid) != 0) {
langerrormessage ("\x21""Could initialize MySQL query.");
return (false);
}
- mysqlMsg = mysql_info(dbid); // DEBUG
-
if (mysql_field_count(dbid) == 0)
return (setlongvalue ((long) 0, vreturned)); /* return 0 to the scripter */
else
@@ -387,12 +431,14 @@
// **** NOTE THIS COULD ALSO MEAN AN ERROR, MIGHT BE GOOD TO CHECK
return (setlongvalue ((long) 0, vreturned));
}
+
fieldCount = mysql_num_fields(queryid);
if (fieldCount == 0) {
langerrormessage ("\x2D""MySQL.getRow requires a minimum of one field.");
return (false);
}
+
mysql_field_seek(queryid, 0); // restart gathering field data from the first field
if (!opnewlist (&hlist, false)) /* fail out if we can't create the list */
@@ -508,6 +554,12 @@
if (!getlongvalue (hparam1, 1, (long *) &dbid)) /* Get the long value, which becomes the pline pointer */
return (false);
+ // Check that server's still alive
+ if (mysql_ping(dbid) != 0) {
+ langerrormessage ("\x20""Lost connection to MySQL server.");
+ return (false);
+ }
+
/* Process the MySQL call */
returnCode = mysql_errno(dbid);
@@ -536,6 +588,12 @@
if (!getlongvalue (hparam1, 1, (long *) &dbid)) /* Get the long value, which becomes the db pointer */
return (false);
+ // Check that server's still alive
+ if (mysql_ping(dbid) != 0) {
+ langerrormessage ("\x20""Lost connection to MySQL server.");
+ return (false);
+ }
+
/* Process the SQLite sequence */
mysqlError = mysql_error(dbid);
@@ -615,6 +673,12 @@
if (!getlongvalue (hparam1, 1, (long *) &dbid)) /* Get the long value, which becomes the db pointer */
return (false);
+ // Check that server's still alive
+ if (mysql_ping(dbid) != 0) {
+ langerrormessage ("\x20""Lost connection to MySQL server.");
+ return (false);
+ }
+
/* Process the SQLite sequence */
mysqlMsg = mysql_get_host_info(dbid);
@@ -647,6 +711,12 @@
if (!getlongvalue (hparam1, 1, (long *) &dbid)) /* Get the long value, which becomes the db pointer */
return (false);
+ // Check that server's still alive
+ if (mysql_ping(dbid) != 0) {
+ langerrormessage ("\x20""Lost connection to MySQL server.");
+ return (false);
+ }
+
/* Process the SQLite sequence */
returnCode = mysql_get_server_version(dbid);
@@ -676,6 +746,12 @@
if (!getlongvalue (hparam1, 1, (long *) &dbid)) /* Get the long value, which becomes the db pointer */
return (false);
+ // Check that server's still alive
+ if (mysql_ping(dbid) != 0) {
+ langerrormessage ("\x20""Lost connection to MySQL server.");
+ return (false);
+ }
+
/* Process the SQLite sequence */
returnCode = mysql_get_proto_info(dbid);
@@ -705,6 +781,12 @@
if (!getlongvalue (hparam1, 1, (long *) &dbid)) /* Get the long value, which becomes the db pointer */
return (false);
+ // Check that server's still alive
+ if (mysql_ping(dbid) != 0) {
+ langerrormessage ("\x20""Lost connection to MySQL server.");
+ return (false);
+ }
+
/* Process the SQLite sequence */
mysqlMsg = mysql_get_server_info(dbid);
@@ -737,6 +819,12 @@
if (!getlongvalue (hparam1, 1, (long *) &dbid)) /* Get the long value, which becomes the db pointer */
return (false);
+ // Check that server's still alive
+ if (mysql_ping(dbid) != 0) {
+ langerrormessage ("\x20""Lost connection to MySQL server.");
+ return (false);
+ }
+
/* Process the SQLite sequence */
mysqlMsg = mysql_info(dbid);
@@ -752,4 +840,305 @@
return (setheapvalue (returnH, stringvaluetype, vreturned));
-} /* mysqlgetqueryinfoverb */
\ No newline at end of file
+} /* mysqlgetqueryinfoverb */
+
+boolean mysqlgetaffectedrowcountverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
+ MYSQL *dbid; // the MySQL object handle
+ my_ulonglong rowCount; // this datastructure is too big for Frontier
+
+ /*
+ sqlite.getColumnInt(queryid, columnNumber)
+
+ Action: Retrieve the value of the specified integer-type column
+ Params: a query id and the number of the column (1 base)
+ Returns: an SQLite result code
+ Notes: do not pass the opened database ID across threads.
+
+ SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_column_int.
+ */
+
+ flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
+
+ if (!getlongvalue (hparam1, 1, (long *) &dbid)) /* Get the long value, which becomes the pointer */
+ return (false);
+
+ // Check that server's still alive
+ if (mysql_ping(dbid) != 0) {
+ langerrormessage ("\x20""Lost connection to MySQL server.");
+ return (false);
+ }
+
+ /* Process the MySQL call */
+ rowCount = mysql_affected_rows(dbid);
+
+ return (setdoublevalue ((double) rowCount, vreturned));
+
+} /* mysqlgetaffectedrowcountverb */
+
+boolean mysqlgetselectedrowcountverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
+ MYSQL_RES *queryid; // query id
+ my_ulonglong rowCount; // this datastructure is too big for Frontier
+
+ /*
+ sqlite.getColumnInt(queryid, columnNumber)
+
+ Action: Retrieve the value of the specified integer-type column
+ Params: a query id and the number of the column (1 base)
+ Returns: an SQLite result code
+ Notes: do not pass the opened database ID across threads.
+
+ SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_column_int.
+ */
+
+ flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
+
+ if (!getlongvalue (hparam1, 1, (long *) &queryid)) /* Get the long value, which becomes the pointer */
+ return (false);
+
+ /* Process the MySQL call */
+ rowCount = mysql_num_rows(queryid);
+
+ return (setdoublevalue ((double) rowCount, vreturned));
+
+} /* mysqlgetselectedrowcountverb */
+
+boolean mysqlgetcolumncountverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
+ MYSQL *dbid; // the MySQL object handle
+ unsigned int returnCode; // return code from MySQL call
+
+ /*
+ sqlite.getColumnInt(queryid, columnNumber)
+
+ Action: Retrieve the value of the specified integer-type column
+ Params: a query id and the number of the column (1 base)
+ Returns: an SQLite result code
+ Notes: do not pass the opened database ID across threads.
+
+ SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_column_int.
+ */
+
+ flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
+
+ if (!getlongvalue (hparam1, 1, (long *) &dbid)) /* Get the long value, which becomes the pline pointer */
+ return (false);
+
+ // Check that server's still alive
+ if (mysql_ping(dbid) != 0) {
+ langerrormessage ("\x20""Lost connection to MySQL server.");
+ return (false);
+ }
+
+ /* Process the MySQL call */
+ returnCode = mysql_field_count(dbid);
+
+ return (setlongvalue ((long) returnCode, vreturned));
+
+} /* mysqlgetcolumncountverb */
+
+boolean mysqlgetserverstatusverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
+ MYSQL *dbid; // the MySQL object handle
+ const char *mysqlStatus; // pointer to the status message
+ Handle returnH = nil; // The handle being returned back to Frontier
+
+ /*
+ Status will fail/crash if mysql.connect hasn't previously succeeded
+ */
+
+ flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
+
+ if (!getlongvalue (hparam1, 1, (long *) &dbid)) /* Get the long value, which becomes the db pointer */
+ return (false);
+
+ // Check that server's still alive
+ if (mysql_ping(dbid) != 0) {
+ langerrormessage ("\x20""Lost connection to MySQL server.");
+ return (false);
+ }
+
+ /* Process the SQLite sequence */
+ mysqlStatus = mysql_stat(dbid);
+
+ if (mysqlStatus == NULL) {
+ return (setlongvalue ((long) 0, vreturned));
+ }
+ else {
+ /* Exit the verb, converting errMsg back to Frontier handle */
+ if(!newfilledhandle ((ptrvoid) mysqlStatus, strlen (mysqlStatus), &returnH))
+ return false; /* Allocation failed */
+ }
+
+ return (setheapvalue (returnH, stringvaluetype, vreturned));
+
+} /* mysqlgetserverstatusverb */
+
+boolean mysqlgetquerywarningcountverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
+ MYSQL *dbid; // the MySQL object handle
+ unsigned int returnCode; // return code from MySQL call
+
+ /*
+ sqlite.getColumnInt(queryid, columnNumber)
+
+ Action: Retrieve the value of the specified integer-type column
+ Params: a query id and the number of the column (1 base)
+ Returns: an SQLite result code
+ Notes: do not pass the opened database ID across threads.
+
+ SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_column_int.
+ */
+
+ flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
+
+ if (!getlongvalue (hparam1, 1, (long *) &dbid)) /* Get the long value, which becomes the pline pointer */
+ return (false);
+
+ // Check that server's still alive
+ if (mysql_ping(dbid) != 0) {
+ langerrormessage ("\x20""Lost connection to MySQL server.");
+ return (false);
+ }
+
+ /* Process the MySQL call */
+ returnCode = mysql_warning_count(dbid);
+
+ return (setlongvalue ((long) returnCode, vreturned));
+
+} /* mysqlgetquerywarningcountverb */
+
+boolean mysqlpingserververb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
+ MYSQL *dbid; // the MySQL object handle
+ unsigned int returnCode; // return code from MySQL call
+
+ /*
+ sqlite.getColumnInt(queryid, columnNumber)
+
+ Action: Retrieve the value of the specified integer-type column
+ Params: a query id and the number of the column (1 base)
+ Returns: an SQLite result code
+ Notes: do not pass the opened database ID across threads.
+
+ SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_column_int.
+ */
+
+ flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
+
+ if (!getlongvalue (hparam1, 1, (long *) &dbid)) /* Get the long value, which becomes the pline pointer */
+ return (false);
+
+ /* Process the MySQL call */
+ returnCode = mysql_ping(dbid);
+
+ return (setlongvalue ((long) returnCode, vreturned));
+
+} /* mysqlpingserververb */
+
+boolean mysqlseekrowverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
+ MYSQL_RES *queryid; // the returned MySQL query id
+ tyvaluerecord v1;
+ double row; // row to seek
+
+ /*
+ sqlite.compileQuery(dbid, query)
+
+ Action: compile an SQLite query
+ Params: a database id and a query string
+ Returns: a query id
+ Usage: call in a try statement
+ Notes: do not pass the opened database ID across threads.
+
+ SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_prepare.
+
+ Code that is a good example of prepare in use:
+ http://souptonuts.sourceforge.net/code/eatblob.c.html
+ */
+
+ if (!getlongvalue (hparam1, 1, (long *) &queryid)) /* Get the long value, which becomes the query pointer */
+ return (false);
+
+ flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
+
+ if (!getdoubleparam (hparam1, 2, &v1)) /* get the seek row */
+ return (false);
+
+ row = **v1.data.doublevalue;
+
+ mysql_data_seek(queryid, (my_ulonglong) row);
+
+ return (setlongvalue ((long) 0, vreturned));
+
+} /* mysqlseekrowverb */
+
+boolean mysqlselectdatabaseverb ( hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror ) {
+
+ MYSQL *dbid; // the MySQL object handle
+ int resultCode; // result code
+ Handle dbname; // existing database on MySQL server
+
+ //
+ // mysql.connect (dbid, host, user, password, database, port)
+ //
+ // Action: connects to a MySQL server and database, initializing the mySQL connection object
+ // Params: dbid (the MySQL object) the hostname, user id, password, existing database name, and port
+ // Returns: a MySQL object handle or an error
+ // Usage: call in a try statement
+ //
+ // MySQL docs: http://dev.mysql.com/doc/refman/5.1/en/mysql-real-connect.html
+ //
+ // If problems are encountered connecting to a Windows-based MySQL server, see:
+ // http://dev.mysql.com/doc/refman/5.1/en/can-not-connect-to-server.html#can-not-connect-to-server-on-windows
+ //
+
+ if (!getlongvalue (hparam1, 1, (long *) &dbid)) /* Get the long value, which becomes the db pointer */
+ return (false);
+
+ flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
+
+ if (!gettextvalue (hparam1, 2, &dbname)) /* get the dbname param */
+ return (false);
+
+ // Null terminate strings
+ if (!pushcharhandle (0x00, dbname))
+ return (false);
+
+ // Check that server's still alive
+ if (mysql_ping(dbid) != 0) {
+ langerrormessage ("\x20""Lost connection to MySQL server.");
+ return (false);
+ }
+
+ // Process the MySQL request
+ resultCode = mysql_select_db(dbid, *dbname);
+ if (resultCode != 0) {
+ langerrormessage ("\x24""Could not connect to MySQL database.");
+ return (false);
+ }
+
+ return (setlongvalue ((long) 0, vreturned));
+
+} // mysqlselectdatabaseverb
+
+boolean mysqlgetsqlstateverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
+ MYSQL *dbid; // the MySQL object handle
+ const char *mysqlStatus; // pointer to the status message
+ Handle returnH = nil; // The handle being returned back to Frontier
+
+ flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
+
+ if (!getlongvalue (hparam1, 1, (long *) &dbid)) /* Get the long value, which becomes the db pointer */
+ return (false);
+
+ // Check that server's still alive
+ if (mysql_ping(dbid) != 0) {
+ langerrormessage ("\x20""Lost connection to MySQL server.");
+ return (false);
+ }
+
+ /* Process the SQLite sequence */
+ mysqlStatus = mysql_sqlstate(dbid);
+
+ /* Exit the verb, converting errMsg back to Frontier handle */
+ if(!newfilledhandle ((ptrvoid) mysqlStatus, strlen (mysqlStatus), &returnH))
+ return false; /* Allocation failed */
+
+ return (setheapvalue (returnH, stringvaluetype, vreturned));
+
+} /* mysqlgetsqlstateverb */
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dav...@us...> - 2007-04-11 04:22:15
|
Revision: 1654
http://svn.sourceforge.net/frontierkernel/?rev=1654&view=rev
Author: davidgewirtz
Date: 2007-04-10 21:22:15 -0700 (Tue, 10 Apr 2007)
Log Message:
-----------
More functions written.
Modified Paths:
--------------
Frontier/branches/mysql/Common/headers/langmysql.h
Frontier/branches/mysql/Common/resources/Mac/kernelverbs.r
Frontier/branches/mysql/Common/resources/Win32/kernelverbs.rc
Frontier/branches/mysql/Common/source/langmysql.c
Modified: Frontier/branches/mysql/Common/headers/langmysql.h
===================================================================
--- Frontier/branches/mysql/Common/headers/langmysql.h 2007-04-10 21:25:09 UTC (rev 1653)
+++ Frontier/branches/mysql/Common/headers/langmysql.h 2007-04-11 04:22:15 UTC (rev 1654)
@@ -41,6 +41,20 @@
extern boolean mysqlgeterrormessageverb (hdltreenode, tyvaluerecord *, bigstring); /* 2007-04-10 gewirtz */
+extern boolean mysqlgetclientinfoverb (hdltreenode, tyvaluerecord *, bigstring); /* 2007-04-10 gewirtz */
+
+extern boolean mysqlgetclientversionverb (hdltreenode, tyvaluerecord *, bigstring); /* 2007-04-10 gewirtz */
+
+extern boolean mysqlgethostinfoverb (hdltreenode, tyvaluerecord *, bigstring); /* 2007-04-10 gewirtz */
+
+extern boolean mysqlgetserverversionverb (hdltreenode, tyvaluerecord *, bigstring); /* 2007-04-10 gewirtz */
+
+extern boolean mysqlgetprotocolinfoverb (hdltreenode, tyvaluerecord *, bigstring); /* 2007-04-10 gewirtz */
+
+extern boolean mysqlgetserverinfoverb (hdltreenode, tyvaluerecord *, bigstring); /* 2007-04-10 gewirtz */
+
+extern boolean mysqlgetqueryinfoverb (hdltreenode, tyvaluerecord *, bigstring); /* 2007-04-10 gewirtz */
+
extern boolean mysqlcloseverb (hdltreenode, tyvaluerecord *, bigstring); /* 2007-04-08 gewirtz */
Modified: Frontier/branches/mysql/Common/resources/Mac/kernelverbs.r
===================================================================
--- Frontier/branches/mysql/Common/resources/Mac/kernelverbs.r 2007-04-10 21:25:09 UTC (rev 1653)
+++ Frontier/branches/mysql/Common/resources/Mac/kernelverbs.r 2007-04-11 04:22:15 UTC (rev 1654)
@@ -1169,15 +1169,21 @@
resource 'EFP#' (idmysqlverbs, "mysql") { /* 2007-04-09 gewirtz mysql verbs */
{
"mysql", false, {
-
- "init",
- "connect",
- "compileQuery",
- "clearQuery",
- "getRow",
- "getErrorNumber",
- "getErrorMessage",
- "close"
+ "init",
+ "connect",
+ "compileQuery",
+ "clearQuery",
+ "getRow",
+ "getErrorNumber",
+ "getErrorMessage",
+ "getClientInfo",
+ "getClientVersion",
+ "getHostInfo",
+ "getServerVersion",
+ "getProtocolInfo",
+ "getServerInfo",
+ "getQueryInfo",
+ "close"
}
}
};
Modified: Frontier/branches/mysql/Common/resources/Win32/kernelverbs.rc
===================================================================
--- Frontier/branches/mysql/Common/resources/Win32/kernelverbs.rc 2007-04-10 21:25:09 UTC (rev 1653)
+++ Frontier/branches/mysql/Common/resources/Win32/kernelverbs.rc 2007-04-11 04:22:15 UTC (rev 1654)
@@ -1106,13 +1106,20 @@
1, // Number of "blocks" in this resource
"mysql\0", // Function Processor name
false, // Window required
- 8, // Count of verbs
- "init\0",
- "connect\0",
- "compileQuery\0",
- "clearQuery\0",
- "getRow\0",
- "getErrorNumber\0",
- "getErrorMessage\0",
- "close\0"
+ 15, // Count of verbs
+ "init\0",
+ "connect\0",
+ "compileQuery\0",
+ "clearQuery\0",
+ "getRow\0",
+ "getErrorNumber\0",
+ "getErrorMessage\0",
+ "getClientInfo\0",
+ "getClientVersion\0",
+ "getHostInfo\0",
+ "getServerVersion\0",
+ "getProtocolInfo\0",
+ "getServerInfo\0",
+ "getQueryInfo\0",
+ "close\0"
END
Modified: Frontier/branches/mysql/Common/source/langmysql.c
===================================================================
--- Frontier/branches/mysql/Common/source/langmysql.c 2007-04-10 21:25:09 UTC (rev 1653)
+++ Frontier/branches/mysql/Common/source/langmysql.c 2007-04-11 04:22:15 UTC (rev 1654)
@@ -80,6 +80,13 @@
getrowfunc,
geterrornumberfunc,
geterrormessagefunc,
+ getclientinfofunc,
+ getclientversionfunc,
+ gethostinfofunc,
+ getserverversionfunc,
+ getprotocolinfofunc,
+ getserverinfofunc,
+ getqueryinfofunc,
closefunc,
ctmysqlverbs
} tymysqlverbtoken;
@@ -94,49 +101,53 @@
switch (token) {
- case initfunc: { /* 2007-04-08 gewirtz: initialize MySQL */
-
+ case initfunc: { /* 2007-04-08 gewirtz: initialize MySQL */
return (mysqlinitverb (hp1, v, bserror));
} /* initfunc */
-
- case connectfunc: { /* 2007-04-08 gewirtz: initialize MySQL */
-
+ case connectfunc: { /* 2007-04-08 gewirtz: initialize MySQL */
return (mysqlconnectverb (hp1, v, bserror));
} /* connectfunc */
-
- case compilequeryfunc: { /* 2007-04-09 gewirtz: prepare a MySQL query */
-
+ case compilequeryfunc: { /* 2007-04-09 gewirtz: prepare a MySQL query */
return (mysqlcompilequeryverb (hp1, v, bserror));
} /* compilequeryfunc */
-
- case clearqueryfunc: { /* 2007-04-09 gewirtz: clear a MySQL query from memory */
-
+ case clearqueryfunc: { /* 2007-04-09 gewirtz: clear a MySQL query from memory */
return (mysqlclearqueryverb (hp1, v, bserror));
} /* clearqueryfunc */
-
- case getrowfunc: { /* 2007-04-09 gewirtz: get a full row from a query */
-
+ case getrowfunc: { /* 2007-04-09 gewirtz: get a full row from a query */
return (mysqlgetrowverb (hp1, v, bserror));
} /* getrowfunc */
-
- case geterrornumberfunc: { /* 2007-04-09 gewirtz: get the error number from the most recent call */
-
+ case geterrornumberfunc: { /* 2007-04-10 gewirtz: get the error number from the most recent call */
return (mysqlgeterrornumberverb (hp1, v, bserror));
} /* geterrornumberfunc */
-
- case geterrormessagefunc: { /* 2007-04-09 gewirtz: get the error message from the most recent call */
-
+ case geterrormessagefunc: { /* 2007-04-10 gewirtz: get the error message from the most recent call */
return (mysqlgeterrormessageverb (hp1, v, bserror));
} /* geterrormessagefunc */
-
- case closefunc: { /* 2007-04-08 gewirtz: close a MySQL db */
-
+ case getclientinfofunc: { /* 2007-04-10 gewirtz: get the MySQL client info */
+ return (mysqlgetclientinfoverb (hp1, v, bserror));
+ } /* getclientinfofunc */
+ case getclientversionfunc: { /* 2007-04-10 gewirtz: get the MySQL client version */
+ return (mysqlgetclientversionverb (hp1, v, bserror));
+ } /* getclientversionfunc */
+ case gethostinfofunc: { /* 2007-04-10 gewirtz: get the MySQL host info */
+ return (mysqlgethostinfoverb (hp1, v, bserror));
+ } /* gethostinfofunc */
+ case getserverversionfunc: { /* 2007-04-10 gewirtz: get the MySQL server version */
+ return (mysqlgetserverversionverb (hp1, v, bserror));
+ } /* getserverversionfunc */
+ case getprotocolinfofunc: { /* 2007-04-10 gewirtz: get the MySQL protocol info */
+ return (mysqlgetprotocolinfoverb (hp1, v, bserror));
+ } /* getprotocolinfofunc */
+ case getserverinfofunc: { /* 2007-04-10 gewirtz: get the MySQL server info */
+ return (mysqlgetserverinfoverb (hp1, v, bserror));
+ } /* getserverinfofunc */
+ case getqueryinfofunc: { /* 2007-04-10 gewirtz: get the results messages from the last query */
+ return (mysqlgetqueryinfoverb (hp1, v, bserror));
+ } /* getqueryinfofunc */
+ case closefunc: { /* 2007-04-08 gewirtz: close a MySQL db */
return (mysqlcloseverb (hp1, v, bserror));
} /* closefunc */
-
default:
getstringlist (langerrorlist, unimplementedverberror, bserror);
-
return (false);
} /* switch */
} /* mysqlfunctionvalue */
@@ -148,7 +159,6 @@
} /* mysqlinitverbs */
boolean mysqlinitverb ( hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror ) {
-
MYSQL *dbid; // the MySQL object handle
//
@@ -267,6 +277,7 @@
MYSQL *dbid; // the MySQL object handle
MYSQL_RES *queryid; // the returned MySQL query id
int returnCode; // return code from MySQL query
+ const char *mysqlMsg; // pointer to the message DEBUG
/*
sqlite.compileQuery(dbid, query)
@@ -301,15 +312,20 @@
return (false);
}
+ mysqlMsg = mysql_info(dbid); // DEBUG
+
queryid = mysql_store_result(dbid);
if(mysql_errno(dbid) != 0) {
langerrormessage ("\x21""Could initialize MySQL query.");
return (false);
}
- return (setlongvalue ((long) queryid, vreturned)); /* return the db address to the scripter */
+ mysqlMsg = mysql_info(dbid); // DEBUG
-
+ if (mysql_field_count(dbid) == 0)
+ return (setlongvalue ((long) 0, vreturned)); /* return 0 to the scripter */
+ else
+ return (setlongvalue ((long) queryid, vreturned)); /* return the db address to the scripter */
} /* mysqlcompilequeryverb */
boolean mysqlclearqueryverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
@@ -529,4 +545,211 @@
return (setheapvalue (returnH, stringvaluetype, vreturned));
-} /* mysqlgeterrormessageverb */
\ No newline at end of file
+} /* mysqlgeterrormessageverb */
+
+boolean mysqlgetclientinfoverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
+ const char *mysqlMsg; // pointer to the message
+ Handle returnH = nil; // The handle being returned back to Frontier
+
+ /*
+ Frontier verb: sqlite.getErrorMessage(dbfile)
+
+ Returns the error message for the most recent SQLite API call.
+ Takes a database ID.
+ Returns a string containing the error message.
+ NOTE: do not pass the opened database ID across threads.
+
+ SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_errmsg.
+ */
+
+ /* Process the SQLite sequence */
+ mysqlMsg = mysql_get_client_info();
+
+ /* Exit the verb, converting errMsg back to Frontier handle */
+ if(!newfilledhandle ((ptrvoid) mysqlMsg, strlen (mysqlMsg), &returnH))
+ return false; /* Allocation failed */
+
+ return (setheapvalue (returnH, stringvaluetype, vreturned));
+
+} /* mysqlgetclientinfoverb */
+
+boolean mysqlgetclientversionverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
+ unsigned long returnCode; // The number being returned back to Frontier
+
+ /*
+ Frontier verb: sqlite.getErrorMessage(dbfile)
+
+ Returns the error message for the most recent SQLite API call.
+ Takes a database ID.
+ Returns a string containing the error message.
+ NOTE: do not pass the opened database ID across threads.
+
+ SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_errmsg.
+ */
+
+ /* Process the MySQL call */
+ returnCode = mysql_get_client_version();
+
+ return (setlongvalue ((long) returnCode, vreturned));
+
+} /* mysqlgetclientversionverb */
+
+boolean mysqlgethostinfoverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
+ MYSQL *dbid; // the MySQL object handle
+ const char *mysqlMsg; // pointer to the message
+ Handle returnH = nil; // The handle being returned back to Frontier
+
+ /*
+ Frontier verb: sqlite.getErrorMessage(dbfile)
+
+ Returns the error message for the most recent SQLite API call.
+ Takes a database ID.
+ Returns a string containing the error message.
+ NOTE: do not pass the opened database ID across threads.
+
+ SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_errmsg.
+ */
+
+ flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
+
+ if (!getlongvalue (hparam1, 1, (long *) &dbid)) /* Get the long value, which becomes the db pointer */
+ return (false);
+
+ /* Process the SQLite sequence */
+ mysqlMsg = mysql_get_host_info(dbid);
+
+ /* Exit the verb, converting errMsg back to Frontier handle */
+ if(!newfilledhandle ((ptrvoid) mysqlMsg, strlen (mysqlMsg), &returnH))
+ return false; /* Allocation failed */
+
+ return (setheapvalue (returnH, stringvaluetype, vreturned));
+
+} /* mysqlgethostinfoverb */
+
+boolean mysqlgetserverversionverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
+ MYSQL *dbid; // the MySQL object handle
+ unsigned long returnCode; // the return code
+ Handle returnH = nil; // The handle being returned back to Frontier
+
+ /*
+ Frontier verb: sqlite.getErrorMessage(dbfile)
+
+ Returns the error message for the most recent SQLite API call.
+ Takes a database ID.
+ Returns a string containing the error message.
+ NOTE: do not pass the opened database ID across threads.
+
+ SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_errmsg.
+ */
+
+ flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
+
+ if (!getlongvalue (hparam1, 1, (long *) &dbid)) /* Get the long value, which becomes the db pointer */
+ return (false);
+
+ /* Process the SQLite sequence */
+ returnCode = mysql_get_server_version(dbid);
+
+ /* Exit the verb, converting errMsg back to Frontier handle */
+ return (setlongvalue ((long) returnCode, vreturned));
+
+} /* mysqlgetserverversionverb */
+
+boolean mysqlgetprotocolinfoverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
+ MYSQL *dbid; // the MySQL object handle
+ unsigned int returnCode; // the return code
+ Handle returnH = nil; // The handle being returned back to Frontier
+
+ /*
+ Frontier verb: sqlite.getErrorMessage(dbfile)
+
+ Returns the error message for the most recent SQLite API call.
+ Takes a database ID.
+ Returns a string containing the error message.
+ NOTE: do not pass the opened database ID across threads.
+
+ SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_errmsg.
+ */
+
+ flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
+
+ if (!getlongvalue (hparam1, 1, (long *) &dbid)) /* Get the long value, which becomes the db pointer */
+ return (false);
+
+ /* Process the SQLite sequence */
+ returnCode = mysql_get_proto_info(dbid);
+
+ /* Exit the verb, converting errMsg back to Frontier handle */
+ return (setlongvalue ((long) returnCode, vreturned));
+
+} /* mysqlgetprotocolinfoverb */
+
+boolean mysqlgetserverinfoverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
+ MYSQL *dbid; // the MySQL object handle
+ const char *mysqlMsg; // pointer to the message
+ Handle returnH = nil; // The handle being returned back to Frontier
+
+ /*
+ Frontier verb: sqlite.getErrorMessage(dbfile)
+
+ Returns the error message for the most recent SQLite API call.
+ Takes a database ID.
+ Returns a string containing the error message.
+ NOTE: do not pass the opened database ID across threads.
+
+ SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_errmsg.
+ */
+
+ flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
+
+ if (!getlongvalue (hparam1, 1, (long *) &dbid)) /* Get the long value, which becomes the db pointer */
+ return (false);
+
+ /* Process the SQLite sequence */
+ mysqlMsg = mysql_get_server_info(dbid);
+
+ /* Exit the verb, converting errMsg back to Frontier handle */
+ if(!newfilledhandle ((ptrvoid) mysqlMsg, strlen (mysqlMsg), &returnH))
+ return false; /* Allocation failed */
+
+ return (setheapvalue (returnH, stringvaluetype, vreturned));
+
+} /* mysqlgetserverinfoverb */
+
+boolean mysqlgetqueryinfoverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
+ MYSQL *dbid; // the MySQL object handle
+ const char *mysqlMsg; // pointer to the message
+ Handle returnH = nil; // The handle being returned back to Frontier
+
+ /*
+ Frontier verb: sqlite.getErrorMessage(dbfile)
+
+ Returns the error message for the most recent SQLite API call.
+ Takes a database ID.
+ Returns a string containing the error message.
+ NOTE: do not pass the opened database ID across threads.
+
+ SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_errmsg.
+ */
+
+ flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
+
+ if (!getlongvalue (hparam1, 1, (long *) &dbid)) /* Get the long value, which becomes the db pointer */
+ return (false);
+
+ /* Process the SQLite sequence */
+ mysqlMsg = mysql_info(dbid);
+
+ if (mysqlMsg == NULL) {
+ /* Exit the verb, converting errMsg back to Frontier handle */
+ if(!newfilledhandle ((ptrvoid) "", 0, &returnH))
+ return false; /* Allocation failed */
+ } else {
+ /* Exit the verb, converting errMsg back to Frontier handle */
+ if(!newfilledhandle ((ptrvoid) mysqlMsg, strlen (mysqlMsg), &returnH))
+ return false; /* Allocation failed */
+ }
+
+ return (setheapvalue (returnH, stringvaluetype, vreturned));
+
+} /* mysqlgetqueryinfoverb */
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dav...@us...> - 2007-04-10 21:25:13
|
Revision: 1653
http://svn.sourceforge.net/frontierkernel/?rev=1653&view=rev
Author: davidgewirtz
Date: 2007-04-10 14:25:09 -0700 (Tue, 10 Apr 2007)
Log Message:
-----------
Added getErrorNumber and getErrorMessage verbs.
Modified Paths:
--------------
Frontier/branches/mysql/Common/headers/langmysql.h
Frontier/branches/mysql/Common/resources/Mac/kernelverbs.r
Frontier/branches/mysql/Common/resources/Win32/kernelverbs.rc
Frontier/branches/mysql/Common/source/langmysql.c
Modified: Frontier/branches/mysql/Common/headers/langmysql.h
===================================================================
--- Frontier/branches/mysql/Common/headers/langmysql.h 2007-04-10 15:17:15 UTC (rev 1652)
+++ Frontier/branches/mysql/Common/headers/langmysql.h 2007-04-10 21:25:09 UTC (rev 1653)
@@ -27,20 +27,24 @@
/* prototypes */
-extern boolean mysqlinitverb (hdltreenode, tyvaluerecord *, bigstring); /* 2007-04-08 gewirtz */
+extern boolean mysqlinitverb (hdltreenode, tyvaluerecord *, bigstring); /* 2007-04-08 gewirtz */
-extern boolean mysqlconnectverb (hdltreenode, tyvaluerecord *, bigstring); /* 2007-04-08 gewirtz */
+extern boolean mysqlconnectverb (hdltreenode, tyvaluerecord *, bigstring); /* 2007-04-08 gewirtz */
-extern boolean mysqlcompilequeryverb (hdltreenode, tyvaluerecord *, bigstring); /* 2007-04-09 gewirtz */
+extern boolean mysqlcompilequeryverb (hdltreenode, tyvaluerecord *, bigstring); /* 2007-04-09 gewirtz */
-extern boolean mysqlclearqueryverb (hdltreenode, tyvaluerecord *, bigstring); /* 2007-04-09 gewirtz */
+extern boolean mysqlclearqueryverb (hdltreenode, tyvaluerecord *, bigstring); /* 2007-04-09 gewirtz */
-extern boolean mysqlfetchrowverb (hdltreenode, tyvaluerecord *, bigstring); /* 2007-04-09 gewirtz */
+extern boolean mysqlgetrowverb (hdltreenode, tyvaluerecord *, bigstring); /* 2007-04-09 gewirtz */
-extern boolean mysqlcloseverb (hdltreenode, tyvaluerecord *, bigstring); /* 2007-04-08 gewirtz */
+extern boolean mysqlgeterrornumberverb (hdltreenode, tyvaluerecord *, bigstring); /* 2007-04-10 gewirtz */
+extern boolean mysqlgeterrormessageverb (hdltreenode, tyvaluerecord *, bigstring); /* 2007-04-10 gewirtz */
+extern boolean mysqlcloseverb (hdltreenode, tyvaluerecord *, bigstring); /* 2007-04-08 gewirtz */
+
+
extern boolean mysqlinitverbs (void); /* 2007-04-08 gewirtz */
/* boolean hmacmd5 (unsigned char *, int, unsigned char *, int, unsigned char *);*/ /* 2006-03-05 creedon */
Modified: Frontier/branches/mysql/Common/resources/Mac/kernelverbs.r
===================================================================
--- Frontier/branches/mysql/Common/resources/Mac/kernelverbs.r 2007-04-10 15:17:15 UTC (rev 1652)
+++ Frontier/branches/mysql/Common/resources/Mac/kernelverbs.r 2007-04-10 21:25:09 UTC (rev 1653)
@@ -1174,7 +1174,9 @@
"connect",
"compileQuery",
"clearQuery",
- "fetchRow",
+ "getRow",
+ "getErrorNumber",
+ "getErrorMessage",
"close"
}
}
Modified: Frontier/branches/mysql/Common/resources/Win32/kernelverbs.rc
===================================================================
--- Frontier/branches/mysql/Common/resources/Win32/kernelverbs.rc 2007-04-10 15:17:15 UTC (rev 1652)
+++ Frontier/branches/mysql/Common/resources/Win32/kernelverbs.rc 2007-04-10 21:25:09 UTC (rev 1653)
@@ -1106,11 +1106,13 @@
1, // Number of "blocks" in this resource
"mysql\0", // Function Processor name
false, // Window required
- 6, // Count of verbs
+ 8, // Count of verbs
"init\0",
"connect\0",
"compileQuery\0",
"clearQuery\0",
- "fetchRow\0",
+ "getRow\0",
+ "getErrorNumber\0",
+ "getErrorMessage\0",
"close\0"
END
Modified: Frontier/branches/mysql/Common/source/langmysql.c
===================================================================
--- Frontier/branches/mysql/Common/source/langmysql.c 2007-04-10 15:17:15 UTC (rev 1652)
+++ Frontier/branches/mysql/Common/source/langmysql.c 2007-04-10 21:25:09 UTC (rev 1653)
@@ -77,7 +77,9 @@
connectfunc,
compilequeryfunc,
clearqueryfunc,
- fetchrowfunc,
+ getrowfunc,
+ geterrornumberfunc,
+ geterrormessagefunc,
closefunc,
ctmysqlverbs
} tymysqlverbtoken;
@@ -112,11 +114,21 @@
return (mysqlclearqueryverb (hp1, v, bserror));
} /* clearqueryfunc */
- case fetchrowfunc: { /* 2007-04-09 gewirtz: get a full row from a query */
+ case getrowfunc: { /* 2007-04-09 gewirtz: get a full row from a query */
- return (mysqlfetchrowverb (hp1, v, bserror));
- } /* fetchrowfunc */
+ return (mysqlgetrowverb (hp1, v, bserror));
+ } /* getrowfunc */
+ case geterrornumberfunc: { /* 2007-04-09 gewirtz: get the error number from the most recent call */
+
+ return (mysqlgeterrornumberverb (hp1, v, bserror));
+ } /* geterrornumberfunc */
+
+ case geterrormessagefunc: { /* 2007-04-09 gewirtz: get the error message from the most recent call */
+
+ return (mysqlgeterrormessageverb (hp1, v, bserror));
+ } /* geterrormessagefunc */
+
case closefunc: { /* 2007-04-08 gewirtz: close a MySQL db */
return (mysqlcloseverb (hp1, v, bserror));
@@ -180,6 +192,9 @@
//
// MySQL docs: http://dev.mysql.com/doc/refman/5.1/en/mysql-real-connect.html
//
+ // If problems are encountered connecting to a Windows-based MySQL server, see:
+ // http://dev.mysql.com/doc/refman/5.1/en/can-not-connect-to-server.html#can-not-connect-to-server-on-windows
+ //
if (!getlongvalue (hparam1, 1, (long *) &dbid)) /* Get the long value, which becomes the db pointer */
return (false);
@@ -287,9 +302,9 @@
}
queryid = mysql_store_result(dbid);
- if(mysql_errno(dbid) != 0) {
+ if(mysql_errno(dbid) != 0) {
langerrormessage ("\x21""Could initialize MySQL query.");
- return (false);
+ return (false);
}
return (setlongvalue ((long) queryid, vreturned)); /* return the db address to the scripter */
@@ -325,17 +340,15 @@
} /* mysqlclearqueryverb */
-boolean mysqlfetchrowverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
- long fieldNumber; /* field number */
+boolean mysqlgetrowverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
+ unsigned int fieldNumber; /* field number */
unsigned int fieldCount; /* number of fields */
- MYSQL_RES *queryid; /* query id */
+ MYSQL_RES *queryid; /* query id */
MYSQL_ROW row;
MYSQL_FIELD *field;
hdllistrecord hlist;
- int returnCode; /* return code from SQLite call */
- double returnDouble; /* double value returned from SQLite call */
Handle returnH;
const unsigned char *column_text;
@@ -360,40 +373,40 @@
}
fieldCount = mysql_num_fields(queryid);
- if (fieldCount == 0) {
- langerrormessage ("\x2F""MySQL.fetchRow requires a minimum of one field.");
- return (false);
- }
- mysql_field_seek(queryid, 0); // restart gathering field data from the first field
-
- if (!opnewlist (&hlist, false)) /* fail out if we can't create the list */
- return (false);
-
- for (fieldNumber=0; fieldNumber<fieldCount; ++fieldNumber) {
-
- field = mysql_fetch_field(queryid);
-
- switch(field->type) {
-
- /*
- The MySQL fetch_row function is interesting, in that it looks like
- each field returned is returned as a string. This is great for Frontier,
- since Frontier can't handle some of MySQL's bigger number types (like double),
- but it can handle strings. So everything that's supported is returned as
- a string to Frontier. The Frontier programmer can then do whatever
- coercing is necessary.
-
- The only formats we explicitly don't support are:
-
- MYSQL_TYPE_BIT
+ if (fieldCount == 0) {
+ langerrormessage ("\x2D""MySQL.getRow requires a minimum of one field.");
+ return (false);
+ }
+ mysql_field_seek(queryid, 0); // restart gathering field data from the first field
+
+ if (!opnewlist (&hlist, false)) /* fail out if we can't create the list */
+ return (false);
+
+ for (fieldNumber=0; fieldNumber<fieldCount; ++fieldNumber) {
+
+ field = mysql_fetch_field(queryid);
+
+ switch(field->type) {
+
+ /*
+ The MySQL fetch_row function is interesting, in that it looks like
+ each field returned is returned as a string. This is great for Frontier,
+ since Frontier can't handle some of MySQL's bigger number types (like double),
+ but it can handle strings. So everything that's supported is returned as
+ a string to Frontier. The Frontier programmer can then do whatever
+ coercing is necessary.
+
+ The only formats we explicitly don't support are:
+
+ MYSQL_TYPE_BIT
MYSQL_TYPE_BLOB
MYSQL_TYPE_SET
MYSQL_TYPE_ENUM
MYSQL_TYPE_GEOMETRY
MYSQL_TYPE_NULL
-
- Formats supported and returned as string:
-
+
+ Formats supported and returned as string:
+
MYSQL_TYPE_TINY
MYSQL_TYPE_SHORT
MYSQL_TYPE_LONG
@@ -410,51 +423,110 @@
MYSQL_TYPE_YEAR
MYSQL_TYPE_STRING
MYSQL_TYPE_VAR_STRING
- */
-
- case MYSQL_TYPE_TINY:
- case MYSQL_TYPE_SHORT:
- case MYSQL_TYPE_LONG:
- case MYSQL_TYPE_INT24:
- case MYSQL_TYPE_LONGLONG:
- case MYSQL_TYPE_DECIMAL:
- case MYSQL_TYPE_NEWDECIMAL:
- case MYSQL_TYPE_FLOAT:
- case MYSQL_TYPE_DOUBLE:
- case MYSQL_TYPE_TIMESTAMP:
- case MYSQL_TYPE_DATE:
- case MYSQL_TYPE_TIME:
- case MYSQL_TYPE_DATETIME:
- case MYSQL_TYPE_YEAR:
- case MYSQL_TYPE_STRING:
- case MYSQL_TYPE_VAR_STRING:
- {
- column_text = row[fieldNumber];
-
- /* Exit the verb, converting column_name back to Frontier handle */
- if (!newfilledhandle ((ptrvoid) column_text, strlen (column_text), &returnH))
- return false; /* Allocation failed */
- if (!setheapvalue (returnH, stringvaluetype, &val)) /* convert handle to value */
- goto error;
- if (!langpushlistval (hlist, nil, &val))
- goto error;
- break;
- }
- default: {
- /* SQLite spec says sqlite3_column_type only returns the above 5 types. But,
- just in case it lied, this time we return a 0, so the rest of the fields
- can be read properly. */
- if (!langpushlistlong (hlist, (long) 0))
- goto error;
- }
- } /* switch */
- } /* for */
-
- return (setheapvalue ((Handle) hlist, listvaluetype, vreturned));
-
- error: {
- opdisposelist (hlist);
- return (false);
+ */
+
+ case MYSQL_TYPE_TINY:
+ case MYSQL_TYPE_SHORT:
+ case MYSQL_TYPE_LONG:
+ case MYSQL_TYPE_INT24:
+ case MYSQL_TYPE_LONGLONG:
+ case MYSQL_TYPE_DECIMAL:
+ case MYSQL_TYPE_NEWDECIMAL:
+ case MYSQL_TYPE_FLOAT:
+ case MYSQL_TYPE_DOUBLE:
+ case MYSQL_TYPE_TIMESTAMP:
+ case MYSQL_TYPE_DATE:
+ case MYSQL_TYPE_TIME:
+ case MYSQL_TYPE_DATETIME:
+ case MYSQL_TYPE_YEAR:
+ case MYSQL_TYPE_STRING:
+ case MYSQL_TYPE_VAR_STRING:
+ {
+ column_text = row[fieldNumber];
+
+ /* Exit the verb, converting column_name back to Frontier handle */
+ if (!newfilledhandle ((ptrvoid) column_text, strlen (column_text), &returnH))
+ return false; /* Allocation failed */
+ if (!setheapvalue (returnH, stringvaluetype, &val)) /* convert handle to value */
+ goto error;
+ if (!langpushlistval (hlist, nil, &val))
+ goto error;
+ break;
+ }
+ default: {
+ /* SQLite spec says sqlite3_column_type only returns the above 5 types. But,
+ just in case it lied, this time we return a 0, so the rest of the fields
+ can be read properly. */
+ if (!langpushlistlong (hlist, (long) 0))
+ goto error;
+ }
+ } /* switch */
+ } /* for */
+
+ return (setheapvalue ((Handle) hlist, listvaluetype, vreturned));
+
+ error: {
+ opdisposelist (hlist);
+ return (false);
}
-} /* mysqlfetchrow */
\ No newline at end of file
+} /* mysqlgetrow */
+
+boolean mysqlgeterrornumberverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
+ MYSQL *dbid; // the MySQL object handle
+ unsigned int returnCode; // return code from MySQL call
+
+ /*
+ sqlite.getColumnInt(queryid, columnNumber)
+
+ Action: Retrieve the value of the specified integer-type column
+ Params: a query id and the number of the column (1 base)
+ Returns: an SQLite result code
+ Notes: do not pass the opened database ID across threads.
+
+ SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_column_int.
+ */
+
+ flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
+
+ if (!getlongvalue (hparam1, 1, (long *) &dbid)) /* Get the long value, which becomes the pline pointer */
+ return (false);
+
+ /* Process the MySQL call */
+ returnCode = mysql_errno(dbid);
+
+ return (setlongvalue ((long) returnCode, vreturned));
+
+} /* mysqlgeterrornumberverb */
+
+boolean mysqlgeterrormessageverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
+ MYSQL *dbid; // the MySQL object handle
+ const char *mysqlError; // pointer to the error message
+ Handle returnH = nil; // The handle being returned back to Frontier
+
+ /*
+ Frontier verb: sqlite.getErrorMessage(dbfile)
+
+ Returns the error message for the most recent SQLite API call.
+ Takes a database ID.
+ Returns a string containing the error message.
+ NOTE: do not pass the opened database ID across threads.
+
+ SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_errmsg.
+ */
+
+ flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
+
+ if (!getlongvalue (hparam1, 1, (long *) &dbid)) /* Get the long value, which becomes the db pointer */
+ return (false);
+
+ /* Process the SQLite sequence */
+ mysqlError = mysql_error(dbid);
+
+ /* Exit the verb, converting errMsg back to Frontier handle */
+ if(!newfilledhandle ((ptrvoid) mysqlError, strlen (mysqlError), &returnH))
+ return false; /* Allocation failed */
+
+ return (setheapvalue (returnH, stringvaluetype, vreturned));
+
+} /* mysqlgeterrormessageverb */
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kar...@us...> - 2007-04-10 15:17:15
|
Revision: 1652
http://svn.sourceforge.net/frontierkernel/?rev=1652&view=rev
Author: karstenw
Date: 2007-04-10 08:17:15 -0700 (Tue, 10 Apr 2007)
Log Message:
-----------
Made XCode project compile the OPML editor again.
Modified Paths:
--------------
Frontier/trunk/build_Xcode/Frontier Universal Binary.xcodeproj/project.pbxproj
Modified: Frontier/trunk/build_Xcode/Frontier Universal Binary.xcodeproj/project.pbxproj
===================================================================
--- Frontier/trunk/build_Xcode/Frontier Universal Binary.xcodeproj/project.pbxproj 2007-04-10 01:58:10 UTC (rev 1651)
+++ Frontier/trunk/build_Xcode/Frontier Universal Binary.xcodeproj/project.pbxproj 2007-04-10 15:17:15 UTC (rev 1652)
@@ -1055,28 +1055,25 @@
65F9C22309C4CD9800DCC29E /* sha.h in Headers */ = {isa = PBXBuildFile; fileRef = 65F9C21F09C4CD9700DCC29E /* sha.h */; };
65F9C22709C4CDDE00DCC29E /* sha1dgst.c in Sources */ = {isa = PBXBuildFile; fileRef = 65F9C22609C4CDDE00DCC29E /* sha1dgst.c */; };
65F9C22809C4CDDE00DCC29E /* sha1dgst.c in Sources */ = {isa = PBXBuildFile; fileRef = 65F9C22609C4CDDE00DCC29E /* sha1dgst.c */; };
+ 839E50AA0BCBD3C2005C9D69 /* FSCopyObject.c in Sources */ = {isa = PBXBuildFile; fileRef = 5D0D91000ADEDFA80000E67B /* FSCopyObject.c */; };
+ 839E50AB0BCBD3C3005C9D69 /* FSCopyObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 5D0D91010ADEDFA80000E67B /* FSCopyObject.h */; };
+ 839E50AC0BCBD3C4005C9D69 /* GenLinkedList.c in Sources */ = {isa = PBXBuildFile; fileRef = 5D0D91020ADEDFA80000E67B /* GenLinkedList.c */; };
+ 839E50AD0BCBD3C4005C9D69 /* GenLinkedList.h in Headers */ = {isa = PBXBuildFile; fileRef = 5D0D91030ADEDFA80000E67B /* GenLinkedList.h */; };
+ 839E50B50BCBD5D0005C9D69 /* langsqlite.c in Sources */ = {isa = PBXBuildFile; fileRef = 5D4E1E470AAA17E900DF6890 /* langsqlite.c */; };
+ 839E50E50BCBD774005C9D69 /* libSQLite3.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BB37A29C0AB826540077C6A1 /* libSQLite3.a */; };
+ 839E50EC0BCBD881005C9D69 /* langsqlite.h in Headers */ = {isa = PBXBuildFile; fileRef = 5D4E1E480AAA17E900DF6890 /* langsqlite.h */; };
BB37A31B0AB828010077C6A1 /* libSQLite3.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BB37A29C0AB826540077C6A1 /* libSQLite3.a */; };
DEA58AB407435A9500BAB271 /* Frontier.icns in Resources */ = {isa = PBXBuildFile; fileRef = DEA58AB307435A9500BAB271 /* Frontier.icns */; };
/* End PBXBuildFile section */
-/* Begin PBXBuildStyle section */
- 5D18A7BB0AD3AB5B00613FDB /* Development */ = {
- isa = PBXBuildStyle;
- buildSettings = {
- COPY_PHASE_STRIP = NO;
- };
- name = Development;
+/* Begin PBXContainerItemProxy section */
+ 839E50B10BCBD3F3005C9D69 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 65152560072BFC6500411831 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = BB37A29B0AB826540077C6A1;
+ remoteInfo = SQLite3;
};
- 5D18A7BC0AD3AB5B00613FDB /* Deployment */ = {
- isa = PBXBuildStyle;
- buildSettings = {
- COPY_PHASE_STRIP = YES;
- };
- name = Deployment;
- };
-/* End PBXBuildStyle section */
-
-/* Begin PBXContainerItemProxy section */
BB37A3170AB827EA0077C6A1 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 65152560072BFC6500411831 /* Project object */;
@@ -1664,6 +1661,7 @@
65059B3909968C1400410571 /* ApplicationServices.framework in Frameworks */,
65059B3A09968C1400410571 /* QuickTime.framework in Frameworks */,
5DCA3B0D0AF552C700D6155D /* libpaigefat.a in Frameworks */,
+ 839E50E50BCBD774005C9D69 /* libSQLite3.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -2809,6 +2807,9 @@
65F9C22209C4CD9800DCC29E /* sha_locl.h in Headers */,
65F9C22309C4CD9800DCC29E /* sha.h in Headers */,
655A983709E929CC009EFFEA /* byteorder.h in Headers */,
+ 839E50AB0BCBD3C3005C9D69 /* FSCopyObject.h in Headers */,
+ 839E50AD0BCBD3C4005C9D69 /* GenLinkedList.h in Headers */,
+ 839E50EC0BCBD881005C9D69 /* langsqlite.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -3080,6 +3081,7 @@
buildRules = (
);
dependencies = (
+ 839E50B20BCBD3F3005C9D69 /* PBXTargetDependency */,
);
name = OPML;
productName = "Frontier OSX MachO Debug";
@@ -3131,12 +3133,6 @@
65152560072BFC6500411831 /* Project object */ = {
isa = PBXProject;
buildConfigurationList = 5D4E1D460AAA0B1400DF6890 /* Build configuration list for PBXProject "Frontier Universal Binary" */;
- buildSettings = {
- };
- buildStyles = (
- 5D18A7BB0AD3AB5B00613FDB /* Development */,
- 5D18A7BC0AD3AB5B00613FDB /* Deployment */,
- );
hasScannedForEncodings = 1;
mainGroup = 6515255C072BFC6500411831;
productRefGroup = 6515255C072BFC6500411831;
@@ -3267,7 +3263,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "#set -x\ncp -f \"${SRCROOT}/../Common/Paige/libpaigefat.a\" \"${SRCROOT}/tools/libpaigefat.a\"\nranlib \"${SRCROOT}/tools/libpaigemacho.a\"";
+ shellScript = "#set -x\ncp -f \"${SRCROOT}/../Common/Paige/libpaigefat.a\" \"${SRCROOT}/tools/libpaigefat.a\"\nranlib \"${SRCROOT}/tools/libpaigefat.a\"";
};
DEA58A9E074359BA00BAB271 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
@@ -3543,6 +3539,9 @@
6599180809C494EA00F6F58C /* whirlpool.c in Sources */,
6599181509C4950300F6F58C /* langcrypt.c in Sources */,
65F9C22809C4CDDE00DCC29E /* sha1dgst.c in Sources */,
+ 839E50AA0BCBD3C2005C9D69 /* FSCopyObject.c in Sources */,
+ 839E50AC0BCBD3C4005C9D69 /* GenLinkedList.c in Sources */,
+ 839E50B50BCBD5D0005C9D69 /* langsqlite.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -3860,6 +3859,11 @@
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
+ 839E50B20BCBD3F3005C9D69 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = BB37A29B0AB826540077C6A1 /* SQLite3 */;
+ targetProxy = 839E50B10BCBD3F3005C9D69 /* PBXContainerItemProxy */;
+ };
BB37A3180AB827EA0077C6A1 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = BB37A29B0AB826540077C6A1 /* SQLite3 */;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dav...@us...> - 2007-04-10 01:58:11
|
Revision: 1651
http://svn.sourceforge.net/frontierkernel/?rev=1651&view=rev
Author: davidgewirtz
Date: 2007-04-09 18:58:10 -0700 (Mon, 09 Apr 2007)
Log Message:
-----------
Added basic query verbs: compileQuery, clearQuery, fetchRow. Can successfully perform a query into a MySQL database.
Modified Paths:
--------------
Frontier/branches/mysql/Common/headers/langmysql.h
Frontier/branches/mysql/Common/resources/Mac/kernelverbs.r
Frontier/branches/mysql/Common/resources/Win32/kernelverbs.rc
Frontier/branches/mysql/Common/source/langmysql.c
Modified: Frontier/branches/mysql/Common/headers/langmysql.h
===================================================================
--- Frontier/branches/mysql/Common/headers/langmysql.h 2007-04-09 03:48:44 UTC (rev 1650)
+++ Frontier/branches/mysql/Common/headers/langmysql.h 2007-04-10 01:58:10 UTC (rev 1651)
@@ -27,14 +27,20 @@
/* prototypes */
-extern boolean mysqlinitverb (hdltreenode, tyvaluerecord *, bigstring); /* 2007-04-08 gewirtz */
+extern boolean mysqlinitverb (hdltreenode, tyvaluerecord *, bigstring); /* 2007-04-08 gewirtz */
-extern boolean mysqlconnectverb (hdltreenode, tyvaluerecord *, bigstring); /* 2007-04-08 gewirtz */
+extern boolean mysqlconnectverb (hdltreenode, tyvaluerecord *, bigstring); /* 2007-04-08 gewirtz */
-extern boolean mysqlcloseverb (hdltreenode, tyvaluerecord *, bigstring); /* 2007-04-08 gewirtz */
+extern boolean mysqlcompilequeryverb (hdltreenode, tyvaluerecord *, bigstring); /* 2007-04-09 gewirtz */
+extern boolean mysqlclearqueryverb (hdltreenode, tyvaluerecord *, bigstring); /* 2007-04-09 gewirtz */
+extern boolean mysqlfetchrowverb (hdltreenode, tyvaluerecord *, bigstring); /* 2007-04-09 gewirtz */
+extern boolean mysqlcloseverb (hdltreenode, tyvaluerecord *, bigstring); /* 2007-04-08 gewirtz */
+
+
+
extern boolean mysqlinitverbs (void); /* 2007-04-08 gewirtz */
/* boolean hmacmd5 (unsigned char *, int, unsigned char *, int, unsigned char *);*/ /* 2006-03-05 creedon */
Modified: Frontier/branches/mysql/Common/resources/Mac/kernelverbs.r
===================================================================
--- Frontier/branches/mysql/Common/resources/Mac/kernelverbs.r 2007-04-09 03:48:44 UTC (rev 1650)
+++ Frontier/branches/mysql/Common/resources/Mac/kernelverbs.r 2007-04-10 01:58:10 UTC (rev 1651)
@@ -1172,6 +1172,9 @@
"init",
"connect",
+ "compileQuery",
+ "clearQuery",
+ "fetchRow",
"close"
}
}
Modified: Frontier/branches/mysql/Common/resources/Win32/kernelverbs.rc
===================================================================
--- Frontier/branches/mysql/Common/resources/Win32/kernelverbs.rc 2007-04-09 03:48:44 UTC (rev 1650)
+++ Frontier/branches/mysql/Common/resources/Win32/kernelverbs.rc 2007-04-10 01:58:10 UTC (rev 1651)
@@ -1106,8 +1106,11 @@
1, // Number of "blocks" in this resource
"mysql\0", // Function Processor name
false, // Window required
- 3, // Count of verbs
+ 6, // Count of verbs
"init\0",
"connect\0",
+ "compileQuery\0",
+ "clearQuery\0",
+ "fetchRow\0",
"close\0"
END
Modified: Frontier/branches/mysql/Common/source/langmysql.c
===================================================================
--- Frontier/branches/mysql/Common/source/langmysql.c 2007-04-09 03:48:44 UTC (rev 1650)
+++ Frontier/branches/mysql/Common/source/langmysql.c 2007-04-10 01:58:10 UTC (rev 1651)
@@ -75,6 +75,9 @@
initfunc,
connectfunc,
+ compilequeryfunc,
+ clearqueryfunc,
+ fetchrowfunc,
closefunc,
ctmysqlverbs
} tymysqlverbtoken;
@@ -99,6 +102,21 @@
return (mysqlconnectverb (hp1, v, bserror));
} /* connectfunc */
+ case compilequeryfunc: { /* 2007-04-09 gewirtz: prepare a MySQL query */
+
+ return (mysqlcompilequeryverb (hp1, v, bserror));
+ } /* compilequeryfunc */
+
+ case clearqueryfunc: { /* 2007-04-09 gewirtz: clear a MySQL query from memory */
+
+ return (mysqlclearqueryverb (hp1, v, bserror));
+ } /* clearqueryfunc */
+
+ case fetchrowfunc: { /* 2007-04-09 gewirtz: get a full row from a query */
+
+ return (mysqlfetchrowverb (hp1, v, bserror));
+ } /* fetchrowfunc */
+
case closefunc: { /* 2007-04-08 gewirtz: close a MySQL db */
return (mysqlcloseverb (hp1, v, bserror));
@@ -153,10 +171,10 @@
long port; // TCP/IP port for the connection
//
- // mysql.connect (host, user, password, database, port)
+ // mysql.connect (dbid, host, user, password, database, port)
//
// Action: connects to a MySQL server and database, initializing the mySQL connection object
- // Params: the hostname, user id, password, existing database name, and port
+ // Params: dbid (the MySQL object) the hostname, user id, password, existing database name, and port
// Returns: a MySQL object handle or an error
// Usage: call in a try statement
//
@@ -203,30 +221,240 @@
boolean mysqlcloseverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
MYSQL *dbid; // the MySQL object handle
- int returnCode; /* return code from SQLite call */
+ int returnCode; // return code from close call
+ //
+ // mysql.close(dbid)
+ //
+ // Action: close a MySQL session
+ // Params: dbid, the MySQL object
+ // Returns: nothing
+ // Usage: there doesn't appear to be a way to check for success or failure
+ //
+ // MySQL docs: http://dev.mysql.com/doc/refman/5.1/en/mysql-close.html
+ //
+
+ flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
+
+ if (!getlongvalue (hparam1, 1, (long *) &dbid)) /* Get the long value, which becomes the db pointer */
+ return (false);
+
+ /* Process the SQLite sequence */
+ mysql_close(dbid);
+ returnCode = 0; // placeholder for debugging. mysql_close doesn't return anything.
+
+ return setlongvalue (returnCode, vreturned);
+
+} /* mysqlcloseverb */
+
+boolean mysqlcompilequeryverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
+ Handle query; // the SQL query passed to the MySQL server
+ MYSQL *dbid; // the MySQL object handle
+ MYSQL_RES *queryid; // the returned MySQL query id
+ int returnCode; // return code from MySQL query
+
/*
- sqlite.close(dbid)
+ sqlite.compileQuery(dbid, query)
- Action: close an SQLite database
- Params: a database id
+ Action: compile an SQLite query
+ Params: a database id and a query string
+ Returns: a query id
+ Usage: call in a try statement
+ Notes: do not pass the opened database ID across threads.
+
+ SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_prepare.
+
+ Code that is a good example of prepare in use:
+ http://souptonuts.sourceforge.net/code/eatblob.c.html
+ */
+
+ if (!getlongvalue (hparam1, 1, (long *) &dbid)) /* Get the long value, which becomes the db pointer */
+ return (false);
+
+ flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
+
+ if (!getreadonlytextvalue (hparam1, 2, &query)) /* get the query param */
+ return (false);
+
+ // Null terminate strings
+ pushcharhandle (0x00, query);
+
+ /* Process the initial query sequence */
+ returnCode = mysql_query(dbid, *query);
+ if(returnCode != 0) {
+ langerrormessage ("\x21""Could not initialize MySQL query.");
+ return (false);
+ }
+
+ queryid = mysql_store_result(dbid);
+ if(mysql_errno(dbid) != 0) {
+ langerrormessage ("\x21""Could initialize MySQL query.");
+ return (false);
+ }
+
+ return (setlongvalue ((long) queryid, vreturned)); /* return the db address to the scripter */
+
+
+} /* mysqlcompilequeryverb */
+
+boolean mysqlclearqueryverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
+ MYSQL_RES *queryid; // the returned MySQL query id
+ int returnCode;
+
+ /*
+ sqlite.clearQuery(queryid)
+
+ Action: clear an SQLite query
+ Params: a query id
Returns: an SQLite result code
- Usage: check result code for success or failure
Notes: do not pass the opened database ID across threads.
- SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_close.
+ SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_finalize.
*/
flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
- if (!getlongvalue (hparam1, 1, (long *) &dbid)) /* Get the long value, which becomes the db pointer */
+ if (!getlongvalue (hparam1, 1, (long *) &queryid)) /* Get the long value, which becomes the queryid pointer */
return (false);
- /* Process the SQLite sequence */
- mysql_close(dbid);
- returnCode = 0; // placeholder for debugging. mysql_close doesn't return anything.
+ /* Process the MySQL sequence */
+ mysql_free_result(queryid);
+ returnCode = 0; // placeholder for debugging. mysql_free_result doesn't return anything.
return setlongvalue (returnCode, vreturned);
-} /* mysqlcloseverb */
+} /* mysqlclearqueryverb */
+boolean mysqlfetchrowverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
+ long fieldNumber; /* field number */
+ unsigned int fieldCount; /* number of fields */
+ MYSQL_RES *queryid; /* query id */
+ MYSQL_ROW row;
+ MYSQL_FIELD *field;
+
+ hdllistrecord hlist;
+
+ int returnCode; /* return code from SQLite call */
+ double returnDouble; /* double value returned from SQLite call */
+ Handle returnH;
+ const unsigned char *column_text;
+
+ tyvaluerecord val;
+
+
+ /*
+ http://dev.mysql.com/doc/refman/5.1/en/c-api-datatypes.html
+
+ */
+
+ flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
+
+ if (!getlongvalue (hparam1, 1, (long *) &queryid)) /* Get the long value, which becomes the queryid pointer */
+ return (false);
+
+ row = mysql_fetch_row(queryid);
+ if (row == NULL) {
+ // return 0, meaning no more rows
+ // **** NOTE THIS COULD ALSO MEAN AN ERROR, MIGHT BE GOOD TO CHECK
+ return (setlongvalue ((long) 0, vreturned));
+ }
+ fieldCount = mysql_num_fields(queryid);
+
+ if (fieldCount == 0) {
+ langerrormessage ("\x2F""MySQL.fetchRow requires a minimum of one field.");
+ return (false);
+ }
+ mysql_field_seek(queryid, 0); // restart gathering field data from the first field
+
+ if (!opnewlist (&hlist, false)) /* fail out if we can't create the list */
+ return (false);
+
+ for (fieldNumber=0; fieldNumber<fieldCount; ++fieldNumber) {
+
+ field = mysql_fetch_field(queryid);
+
+ switch(field->type) {
+
+ /*
+ The MySQL fetch_row function is interesting, in that it looks like
+ each field returned is returned as a string. This is great for Frontier,
+ since Frontier can't handle some of MySQL's bigger number types (like double),
+ but it can handle strings. So everything that's supported is returned as
+ a string to Frontier. The Frontier programmer can then do whatever
+ coercing is necessary.
+
+ The only formats we explicitly don't support are:
+
+ MYSQL_TYPE_BIT
+ MYSQL_TYPE_BLOB
+ MYSQL_TYPE_SET
+ MYSQL_TYPE_ENUM
+ MYSQL_TYPE_GEOMETRY
+ MYSQL_TYPE_NULL
+
+ Formats supported and returned as string:
+
+ MYSQL_TYPE_TINY
+ MYSQL_TYPE_SHORT
+ MYSQL_TYPE_LONG
+ MYSQL_TYPE_INT24
+ MYSQL_TYPE_LONGLONG
+ MYSQL_TYPE_DECIMAL
+ MYSQL_TYPE_NEWDECIMAL
+ MYSQL_TYPE_FLOAT
+ MYSQL_TYPE_DOUBLE
+ MYSQL_TYPE_TIMESTAMP
+ MYSQL_TYPE_DATE
+ MYSQL_TYPE_TIME
+ MYSQL_TYPE_DATETIME
+ MYSQL_TYPE_YEAR
+ MYSQL_TYPE_STRING
+ MYSQL_TYPE_VAR_STRING
+ */
+
+ case MYSQL_TYPE_TINY:
+ case MYSQL_TYPE_SHORT:
+ case MYSQL_TYPE_LONG:
+ case MYSQL_TYPE_INT24:
+ case MYSQL_TYPE_LONGLONG:
+ case MYSQL_TYPE_DECIMAL:
+ case MYSQL_TYPE_NEWDECIMAL:
+ case MYSQL_TYPE_FLOAT:
+ case MYSQL_TYPE_DOUBLE:
+ case MYSQL_TYPE_TIMESTAMP:
+ case MYSQL_TYPE_DATE:
+ case MYSQL_TYPE_TIME:
+ case MYSQL_TYPE_DATETIME:
+ case MYSQL_TYPE_YEAR:
+ case MYSQL_TYPE_STRING:
+ case MYSQL_TYPE_VAR_STRING:
+ {
+ column_text = row[fieldNumber];
+
+ /* Exit the verb, converting column_name back to Frontier handle */
+ if (!newfilledhandle ((ptrvoid) column_text, strlen (column_text), &returnH))
+ return false; /* Allocation failed */
+ if (!setheapvalue (returnH, stringvaluetype, &val)) /* convert handle to value */
+ goto error;
+ if (!langpushlistval (hlist, nil, &val))
+ goto error;
+ break;
+ }
+ default: {
+ /* SQLite spec says sqlite3_column_type only returns the above 5 types. But,
+ just in case it lied, this time we return a 0, so the rest of the fields
+ can be read properly. */
+ if (!langpushlistlong (hlist, (long) 0))
+ goto error;
+ }
+ } /* switch */
+ } /* for */
+
+ return (setheapvalue ((Handle) hlist, listvaluetype, vreturned));
+
+ error: {
+ opdisposelist (hlist);
+ return (false);
+ }
+
+} /* mysqlfetchrow */
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dav...@us...> - 2007-04-09 03:48:45
|
Revision: 1650
http://svn.sourceforge.net/frontierkernel/?rev=1650&view=rev
Author: davidgewirtz
Date: 2007-04-08 20:48:44 -0700 (Sun, 08 Apr 2007)
Log Message:
-----------
Successfully connecting to MySQL database, added verbs mysql.init, mysql.connect, mysql.close.
Modified Paths:
--------------
Frontier/branches/mysql/Common/headers/langmysql.h
Frontier/branches/mysql/Common/resources/Mac/kernelverbs.r
Frontier/branches/mysql/Common/resources/Win32/kernelverbs.rc
Frontier/branches/mysql/Common/source/langmysql.c
Modified: Frontier/branches/mysql/Common/headers/langmysql.h
===================================================================
--- Frontier/branches/mysql/Common/headers/langmysql.h 2007-04-08 23:09:35 UTC (rev 1649)
+++ Frontier/branches/mysql/Common/headers/langmysql.h 2007-04-09 03:48:44 UTC (rev 1650)
@@ -29,6 +29,8 @@
extern boolean mysqlinitverb (hdltreenode, tyvaluerecord *, bigstring); /* 2007-04-08 gewirtz */
+extern boolean mysqlconnectverb (hdltreenode, tyvaluerecord *, bigstring); /* 2007-04-08 gewirtz */
+
extern boolean mysqlcloseverb (hdltreenode, tyvaluerecord *, bigstring); /* 2007-04-08 gewirtz */
Modified: Frontier/branches/mysql/Common/resources/Mac/kernelverbs.r
===================================================================
--- Frontier/branches/mysql/Common/resources/Mac/kernelverbs.r 2007-04-08 23:09:35 UTC (rev 1649)
+++ Frontier/branches/mysql/Common/resources/Mac/kernelverbs.r 2007-04-09 03:48:44 UTC (rev 1650)
@@ -1171,6 +1171,7 @@
"mysql", false, {
"init",
+ "connect",
"close"
}
}
Modified: Frontier/branches/mysql/Common/resources/Win32/kernelverbs.rc
===================================================================
--- Frontier/branches/mysql/Common/resources/Win32/kernelverbs.rc 2007-04-08 23:09:35 UTC (rev 1649)
+++ Frontier/branches/mysql/Common/resources/Win32/kernelverbs.rc 2007-04-09 03:48:44 UTC (rev 1650)
@@ -1106,7 +1106,8 @@
1, // Number of "blocks" in this resource
"mysql\0", // Function Processor name
false, // Window required
- 2, // Count of verbs
+ 3, // Count of verbs
"init\0",
+ "connect\0",
"close\0"
END
Modified: Frontier/branches/mysql/Common/source/langmysql.c
===================================================================
--- Frontier/branches/mysql/Common/source/langmysql.c 2007-04-08 23:09:35 UTC (rev 1649)
+++ Frontier/branches/mysql/Common/source/langmysql.c 2007-04-09 03:48:44 UTC (rev 1650)
@@ -74,6 +74,7 @@
typedef enum tymysqlverbtoken { /* verbs that are processed by langmysql.c */
initfunc,
+ connectfunc,
closefunc,
ctmysqlverbs
} tymysqlverbtoken;
@@ -93,6 +94,11 @@
return (mysqlinitverb (hp1, v, bserror));
} /* initfunc */
+ case connectfunc: { /* 2007-04-08 gewirtz: initialize MySQL */
+
+ return (mysqlconnectverb (hp1, v, bserror));
+ } /* connectfunc */
+
case closefunc: { /* 2007-04-08 gewirtz: close a MySQL db */
return (mysqlcloseverb (hp1, v, bserror));
@@ -113,56 +119,86 @@
boolean mysqlinitverb ( hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror ) {
- Handle dbfile; // path to database file
MYSQL *dbid; // the MySQL object handle
- int returnCode; // return code from SQLite call
- tyfilespec fs; // file specification
-
+
//
- // 2007-04-08 DG: hacked up from sqlite for mysql
- // 2006-11-06 creedon: use filespec as parameter, convert dbfile to UTF-8 for sqlite3_open
+ // mysql.init()
+ //
+ // Action: initializes the mySQL connection object
+ // Params: none
+ // Returns: a MySQL object handle or an error
+ // Usage: call in a try statement, call before any other MySQL call
+ //
+ // MySQL docs: http://dev.mysql.com/doc/refman/5.1/en/mysql-init.html
//
- // 2006-10-08 DG: created
- //
- #ifdef WIN95VERSION
+ // Initialize the MySQL object
+ dbid = mysql_init((MYSQL*) 0);
+ if (dbid == NULL) {
+ langerrormessage ("\x23""MySQL did not initialize correctly.");
+ return (false);
+ }
+
+ return (setlongvalue ((long) dbid, vreturned));
- bigstring bs;
- Handle handletext;
-
- #endif // WIN95VERSION
-
+} // mysqlinitverb
+
+boolean mysqlconnectverb ( hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror ) {
+
+ MYSQL *dbid; // the MySQL object handle
+ Handle host; // hostname of the MySQL server
+ Handle user; // valid username on the MySQL server
+ Handle passwd; // password for user on MySQL server
+ Handle dbname; // existing database on MySQL server
+ long port; // TCP/IP port for the connection
+
//
- // sqlite.open ( dbfile )
+ // mysql.connect (host, user, password, database, port)
//
- // Action: opens a SQLite database
- // Params: a file path to the database file
- // Returns: a value that corresponds to the opened database ID
+ // Action: connects to a MySQL server and database, initializing the mySQL connection object
+ // Params: the hostname, user id, password, existing database name, and port
+ // Returns: a MySQL object handle or an error
// Usage: call in a try statement
- // Notes: do not pass the opened database ID across threads
//
- // SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_open
+ // MySQL docs: http://dev.mysql.com/doc/refman/5.1/en/mysql-real-connect.html
//
- flnextparamislast = true; // makes sure Frontier throws an error if more than one param is passed
+ if (!getlongvalue (hparam1, 1, (long *) &dbid)) /* Get the long value, which becomes the db pointer */
+ return (false);
+
+ if (!getreadonlytextvalue (hparam1, 2, &host)) /* get the host param */
+ return (false);
+
+ if (!getreadonlytextvalue (hparam1, 3, &user)) /* get the user param */
+ return (false);
+
+ if (!getreadonlytextvalue (hparam1, 4, &passwd)) /* get the passwd param */
+ return (false);
+
+ if (!getreadonlytextvalue (hparam1, 5, &dbname)) /* get the dbname param */
+ return (false);
+
+ flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
+
+ if (!getlongvalue (hparam1, 6, &port)) /* get the port param */
+ return (false);
+
+ // Null terminate strings
+ pushcharhandle (0x00, host);
+ pushcharhandle (0x00, user);
+ pushcharhandle (0x00, passwd);
+ pushcharhandle (0x00, dbname);
+
+ // Attempt the connection
+ dbid = mysql_real_connect(dbid, *host, *user, *passwd, *dbname, (unsigned int) port, NULL, 0 );
+ if (dbid == NULL) {
+ langerrormessage ("\x22""Could not connect to MySQL server.");
+ return (false);
+ }
- // Process the SQLite sequence
-
- dbid = mysql_init((MYSQL*) 0);
-
-// if(returnCode) {
-// sqliteOpenError(sqlite3_errmsg(dbid), bserror); // send database open error
-// sqlite3_close(dbid);
-// return (false);
-// }
-
- // return the db address to the scripter
- // return (setheapvalue ((Handle) dbid, longvaluetype, vreturned));
- // 2006-09-06 - kw - simply return a long
-
return (setlongvalue ((long) dbid, vreturned));
- } // mysqlinitverb
+} // mysqlconnectverb
boolean mysqlcloseverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dav...@us...> - 2007-04-08 23:09:38
|
Revision: 1649
http://svn.sourceforge.net/frontierkernel/?rev=1649&view=rev
Author: davidgewirtz
Date: 2007-04-08 16:09:35 -0700 (Sun, 08 Apr 2007)
Log Message:
-----------
Frontier successfully links and inits MySQL. Two verbs, init and close work successfully calling libmysql.lib.
Modified Paths:
--------------
Frontier/branches/mysql/Common/headers/langmysql.h
Frontier/branches/mysql/Common/source/langmysql.c
Frontier/branches/mysql/build_VC2K5/Frontier.vcproj
Modified: Frontier/branches/mysql/Common/headers/langmysql.h
===================================================================
--- Frontier/branches/mysql/Common/headers/langmysql.h 2007-04-08 22:21:08 UTC (rev 1648)
+++ Frontier/branches/mysql/Common/headers/langmysql.h 2007-04-08 23:09:35 UTC (rev 1649)
@@ -1,5 +1,5 @@
-/* $Id: langsqlite.h,v 1.1.2.1 2006/03/24 01:31:35 davidgewirtz Exp $ */
+/* $Id: langmysql.h,v 1.1.2.1 2007/04/09 18:30:00 davidgewirtz Exp $ */
/******************************************************************************
@@ -27,43 +27,19 @@
/* prototypes */
-extern boolean sqliteopenverb (hdltreenode, tyvaluerecord *, bigstring); /* 2006-03-15 gewirtz */
+extern boolean mysqlinitverb (hdltreenode, tyvaluerecord *, bigstring); /* 2007-04-08 gewirtz */
-extern boolean sqlitecloseverb (hdltreenode, tyvaluerecord *, bigstring); /* 2006-03-17 gewirtz */
+extern boolean mysqlcloseverb (hdltreenode, tyvaluerecord *, bigstring); /* 2007-04-08 gewirtz */
-extern boolean sqlitecompilequeryverb (hdltreenode, tyvaluerecord *, bigstring); /* 2006-04-18 gewirtz */
-extern boolean sqliteclearqueryverb (hdltreenode, tyvaluerecord *, bigstring); /* 2006-04-18 gewirtz */
-extern boolean sqliteresetqueryverb (hdltreenode, tyvaluerecord *, bigstring); /* 2006-08-31 gewirtz */
+extern boolean mysqlinitverbs (void); /* 2007-04-08 gewirtz */
-extern boolean sqlitestepqueryverb (hdltreenode, tyvaluerecord *, bigstring); /* 2006-08-31 gewirtz */
-
-extern boolean sqlitegetcolumncountverb (hdltreenode, tyvaluerecord *, bigstring); /* 2006-04-18 gewirtz */
-
-extern boolean sqlitegetcolumntypeverb (hdltreenode, tyvaluerecord *, bigstring); /* 2006-04-18 gewirtz */
-
-extern boolean sqlitegetcolumnintverb (hdltreenode, tyvaluerecord *, bigstring); /* 2006-04-18 gewirtz */
-
-extern boolean sqlitegetcolumndoubleverb (hdltreenode, tyvaluerecord *, bigstring); /* 2006-04-18 gewirtz */
-
-extern boolean sqlitegetcolumntextverb (hdltreenode, tyvaluerecord *, bigstring); /* 2006-04-18 gewirtz */
-
-extern boolean sqlitegetcolumnnameverb (hdltreenode, tyvaluerecord *, bigstring); /* 2006-04-18 gewirtz */
-
-extern boolean sqlitegetcolumnverb (hdltreenode, tyvaluerecord *, bigstring); /* 2006-04-20 gewirtz */
-
-extern boolean sqlitegetrowverb (hdltreenode, tyvaluerecord *, bigstring); /* 2006-08-31 gewirtz */
-
-extern boolean sqlitegeterrormessageverb (hdltreenode, tyvaluerecord *, bigstring); /* 2006-04-20 gewirtz */
-
-extern boolean sqliteinitverbs (void); /* 2006-03-15 gewirtz */
-
/* boolean hmacmd5 (unsigned char *, int, unsigned char *, int, unsigned char *);*/ /* 2006-03-05 creedon */
/* boolean hmacsha1 (unsigned char *, int, unsigned char *, int, unsigned char *);*/ /* 2006-03-12 creedon */
/* SQLITE MESSAGES */
-#define SQLITE_COLUMN_ERROR_0 "\xe9""SQLite column error. Frontier uses a base-1 index. Columns must be specified with 1 indicating the first column. This is different from the SQLite API, which requires that columns must be specified with 0 indicating the first column."
-#define SQLITE_COLUMN_ERROR_MAX "\x50""SQLite column error. An attempt was made to access a column that does not exist."
-#define SQLITE_COLUMN_ERROR_UNDEFINED "\x29""SQLite returned an undefined column type."
\ No newline at end of file
+// #define SQLITE_COLUMN_ERROR_0 "\xe9""SQLite column error. Frontier uses a base-1 index. Columns must be specified with 1 indicating the first column. This is different from the SQLite API, which requires that columns must be specified with 0 indicating the first column."
+// #define SQLITE_COLUMN_ERROR_MAX "\x50""SQLite column error. An attempt was made to access a column that does not exist."
+// #define SQLITE_COLUMN_ERROR_UNDEFINED "\x29""SQLite returned an undefined column type."
\ No newline at end of file
Modified: Frontier/branches/mysql/Common/source/langmysql.c
===================================================================
--- Frontier/branches/mysql/Common/source/langmysql.c 2007-04-08 22:21:08 UTC (rev 1648)
+++ Frontier/branches/mysql/Common/source/langmysql.c 2007-04-08 23:09:35 UTC (rev 1649)
@@ -1,5 +1,5 @@
-/* $Id: langsqlite.c,v 1.1.2.1 2006/03/24 01:32:31 davidgewirtz Exp $ */
+/* $Id: langmysql.c,v 2007/04/08 18:32:00 davidgewirtz Exp $ */
/******************************************************************************
@@ -43,8 +43,8 @@
#include "langsystem7.h"
#include "langexternal.h"
-#include "langsqlite.h"
-#include <sqlite3.h>
+#include "langmysql.h"
+#include <mysql.h>
#ifdef MACVERSION
@@ -61,56 +61,26 @@
#endif // WIN95VERSION
-/* Building SQLite into Frontier
+/* Building MySQL into Frontier
-The SQLite source distribution is compiled into the Frontier code as part of this
-module. A key goal in this implementation was to avoid touching any of the SQLite
-source files. SQLite is pretty complex in its coding, and I didn't want to take a
-chance that any changes to the original SQLite code would muck up the database
-functionality.
+See the Frontier Lab Notebook article:
-To include the latest SQLite distribution (we're implementing SQLite 3 here),
-download the SQLite source code from http://www.sqlite.org/download.html.
+http://manila.zatz.com/frontierkernel/stories/storyReader$33
-Move all the SQLite source files into the \Common\sqlite3 folder. If you need to
-include new files in the SQLite project, be sure that shell.c and tclsqlite.c are
-NOT included in the Frontier project.
-
-That's it. For further tips, see the Frontier Lab Notebook article:
-
-http://manila.zatz.com/frontierkernel/stories/storyReader$29
-
-- DG
*/
-typedef enum tysqliteverbtoken { /* verbs that are processed by langsqlite.c */
+typedef enum tymysqlverbtoken { /* verbs that are processed by langmysql.c */
- openfunc,
- compilequeryfunc,
- clearqueryfunc,
- resetqueryfunc,
- stepqueryfunc,
- getcolumncountfunc,
- getcolumntypefunc,
- getcolumnintfunc,
- getcolumndoublefunc,
- getcolumntextfunc,
- getcolumnnamefunc,
- getcolumnfunc,
- getrowfunc,
- geterrormessagefunc,
+ initfunc,
closefunc,
- ctsqliteverbs
- } tysqliteverbtoken;
+ ctmysqlverbs
+ } tymysqlverbtoken;
-static boolean sqlitefunctionvalue (short token, hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
+static boolean mysqlfunctionvalue (short token, hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
- /*
- 2006-03-15 gewirtz: created, cribbed from langcrypt, itself cribbed from htmlfunctionvalue
- */
-
hdltreenode hp1 = hparam1;
tyvaluerecord *v = vreturned;
@@ -118,79 +88,14 @@
switch (token) {
- case openfunc: { /* 2006-03-14 gewirtz: open an SQLite db */
+ case initfunc: { /* 2007-04-08 gewirtz: initialize MySQL */
- return (sqliteopenverb (hp1, v, bserror));
- } /* openfunc */
+ return (mysqlinitverb (hp1, v, bserror));
+ } /* initfunc */
- case compilequeryfunc: { /* 2006-04-18 gewirtz: prepare an SQLite statement */
-
- return (sqlitecompilequeryverb (hp1, v, bserror));
- } /* compilequeryfunc */
-
- case clearqueryfunc: { /* 2006-04-18 gewirtz: finalize an SQLite statement */
-
- return (sqliteclearqueryverb (hp1, v, bserror));
- } /* clearqueryfunc */
-
- case resetqueryfunc: { /* 2006-08-31 gewirtz: reset an SQLite query statement */
-
- return (sqliteresetqueryverb (hp1, v, bserror));
- } /* resetqueryfunc */
-
- case stepqueryfunc: { /* 2006-08-31 gewirtz: move the cursor one step after the query */
-
- return (sqlitestepqueryverb (hp1, v, bserror));
- } /* stepqueryfunc */
-
- case getcolumncountfunc: { /* 2006-04-18 gewirtz: get the number of columns */
-
- return (sqlitegetcolumncountverb (hp1, v, bserror));
- } /* getcolumncountfunc */
-
- case getcolumntypefunc: { /* 2006-04-18 gewirtz: get the type of the referenced column */
- /* this version returns Frontier strings */
- return (sqlitegetcolumntypeverb (hp1, v, bserror));
- } /* getcolumntypefunc */
-
- case getcolumnintfunc: { /* 2006-04-18 gewirtz: get an int value from the column */
-
- return (sqlitegetcolumnintverb (hp1, v, bserror));
- } /* getcolumnintfunc */
-
- case getcolumndoublefunc: { /* 2006-04-18 gewirtz: get a double value from the column */
-
- return (sqlitegetcolumndoubleverb (hp1, v, bserror));
- } /* getcolumndoublefunc */
-
- case getcolumntextfunc: { /* 2006-04-18 gewirtz: get a text value from the column */
-
- return (sqlitegetcolumntextverb (hp1, v, bserror));
- } /* getcolumntextfunc */
-
- case getcolumnnamefunc: { /* 2006-04-18 gewirtz: get the field name of the column */
-
- return (sqlitegetcolumnnameverb (hp1, v, bserror));
- } /* getcolumnnamefunc */
-
- case getcolumnfunc: { /* 2006-04-20 gewirtz: get the value of the column */
-
- return (sqlitegetcolumnverb (hp1, v, bserror));
- } /* getcolumnfunc */
-
- case getrowfunc: { /* 2006-08-31 gewirtz: get the values in a row */
-
- return (sqlitegetrowverb (hp1, v, bserror));
- } /* getrowfunc */
-
- case geterrormessagefunc: { /* 2006-04-20 gewirtz: get the SQLite error message */
-
- return (sqlitegeterrormessageverb (hp1, v, bserror));
- } /* geterrormessagefunc */
-
- case closefunc: { /* 2006-03-15 gewirtz: close an SQLite db */
+ case closefunc: { /* 2007-04-08 gewirtz: close a MySQL db */
- return (sqlitecloseverb (hp1, v, bserror));
+ return (mysqlcloseverb (hp1, v, bserror));
} /* closefunc */
default:
@@ -198,58 +103,23 @@
return (false);
} /* switch */
- } /* sqlitefunctionvalue */
+ } /* mysqlfunctionvalue */
-boolean sqliteinitverbs (void) {
+boolean mysqlinitverbs (void) {
- /* 2006-03-15 gewirtz: created, cribbed from cryptinitverbs */
-
- return (loadfunctionprocessor (idsqliteverbs, &sqlitefunctionvalue));
- } /* sqliteinitverbs */
+ return (loadfunctionprocessor (idmysqlverbs, &mysqlfunctionvalue));
+ } /* mysqlinitverbs */
+boolean mysqlinitverb ( hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror ) {
-static void sqliteOpenError (const char *errmsg, bigstring bserror) {
- bigstring bserrmsg;
-
- copyctopstring (errmsg, bserrmsg); /* This creates a pstring at bserrmsg */
- getstringlist (langerrorlist, sqliteopenerror, bserror);
- parsedialogstring (bserror, bserrmsg, nil, nil, nil, bserror);
-
- return;
- } /*sqliteOpenError*/
-
-
-static void sqliteDatabaseError (const char *errmsg, bigstring bserror) {
- bigstring bserrmsg;
-
- copyctopstring (errmsg, bserrmsg); /* This creates a pstring at bserrmsg */
- getstringlist (langerrorlist, sqlitedberror, bserror);
- parsedialogstring (bserror, bserrmsg, nil, nil, nil, bserror);
-
- return;
- } /*sqliteDatabaseError*/
-
-
-static void sqliteScriptError (const char *errmsg, bigstring bserror) {
- bigstring bserrmsg;
-
- copyctopstring (errmsg, bserrmsg); /* This creates a pstring at bserrmsg */
- getstringlist (langerrorlist, notfunctionerror, bserror);
- parsedialogstring (bserror, bserrmsg, nil, nil, nil, bserror);
-
- return;
- } /*sqliteScriptError*/
-
-
-boolean sqliteopenverb ( hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror ) {
-
Handle dbfile; // path to database file
- sqlite3 *dbid; // the SQLite database handle
+ MYSQL *dbid; // the MySQL object handle
int returnCode; // return code from SQLite call
- tyfilespec fs; // file specification
+ tyfilespec fs; // file specification
//
+ // 2007-04-08 DG: hacked up from sqlite for mysql
// 2006-11-06 creedon: use filespec as parameter, convert dbfile to UTF-8 for sqlite3_open
//
// 2006-10-08 DG: created
@@ -274,64 +144,17 @@
// SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_open
//
- newhandle ( MAXPATHLEN, &dbfile );
-
flnextparamislast = true; // makes sure Frontier throws an error if more than one param is passed
- if ( ! getfilespecvalue ( hparam1, 1, &fs ) ) // fs holds the file path
- return ( false );
-
- #ifdef MACVERSION
-
- boolean fl;
- OSStatus status;
- long len;
-
- fl = extendfilespec ( &fs, &fs );
-
- status = FSRefMakePath ( &fs.fsref, *dbfile, MAXPATHLEN ); // dbfile encoded in UTF-8
-
- len = strlen ( *dbfile );
-
- sethandlesize ( dbfile, len );
-
- if ( fs.path != NULL ) {
-
- Handle path;
-
- len = CFStringGetMaximumSizeForEncoding ( CFStringGetLength ( fs.path ), kCFStringEncodingUTF8 );
-
- newhandle ( ++len, &path );
-
- fl = CFStringGetCString ( fs.path, *path, len, kCFStringEncodingUTF8 );
-
- pushcharhandle ( '/', dbfile );
-
- pushhandle ( path, dbfile );
-
- }
-
- #endif // MACVERSION
-
- #ifdef WIN95VERSION
-
- filespectopath ( &fs, bs );
-
- newtexthandle ( bs, &handletext );
-
- convertCharset ( handletext, dbfile, BIGSTRING ( "\x0C" "Windows-1252" ), BIGSTRING ( "\x05" "utf-8" ) );
-
- #endif // WIN95VERSION
-
// Process the SQLite sequence
- returnCode = sqlite3_open ( *dbfile, &dbid );
+ dbid = mysql_init((MYSQL*) 0);
- if(returnCode) {
- sqliteOpenError(sqlite3_errmsg(dbid), bserror); // send database open error
- sqlite3_close(dbid);
- return (false);
- }
+// if(returnCode) {
+// sqliteOpenError(sqlite3_errmsg(dbid), bserror); // send database open error
+// sqlite3_close(dbid);
+// return (false);
+// }
// return the db address to the scripter
// return (setheapvalue ((Handle) dbid, longvaluetype, vreturned));
@@ -339,11 +162,11 @@
return (setlongvalue ((long) dbid, vreturned));
- } // sqliteopenverb
+ } // mysqlinitverb
-boolean sqlitecloseverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
- sqlite3 *dbid; /* the SQLite database handle */
+boolean mysqlcloseverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
+ MYSQL *dbid; // the MySQL object handle
int returnCode; /* return code from SQLite call */
/*
@@ -364,650 +187,10 @@
return (false);
/* Process the SQLite sequence */
- returnCode = sqlite3_close(dbid);
+ mysql_close(dbid);
+ returnCode = 0; // placeholder for debugging. mysql_close doesn't return anything.
return setlongvalue (returnCode, vreturned);
-} /* sqlitecloseverb */
+} /* mysqlcloseverb */
-
-boolean sqlitecompilequeryverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
- Handle query; /* the SQL query passed to the SQLite engine */
- sqlite3 *dbid; /* the SQLite database handle */
- sqlite3_stmt *queryid = 0; /* the compiled query */
- int returnCode; /* return code from SQLite call */
-
- /*
- sqlite.compileQuery(dbid, query)
-
- Action: compile an SQLite query
- Params: a database id and a query string
- Returns: a query id
- Usage: call in a try statement
- Notes: do not pass the opened database ID across threads.
-
- SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_prepare.
-
- Code that is a good example of prepare in use:
- http://souptonuts.sourceforge.net/code/eatblob.c.html
- */
-
- if (!getlongvalue (hparam1, 1, (long *) &dbid)) /* Get the long value, which becomes the db pointer */
- return (false);
-
- flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
-
- if (!getreadonlytextvalue (hparam1, 2, &query)) /* get the query param */
- return (false);
-
- /* Process the SQLite sequence */
- returnCode = sqlite3_prepare(dbid, *query, gethandlesize(query), &queryid, 0);
- if(returnCode != SQLITE_OK || queryid == NULL) {
- sqliteDatabaseError(sqlite3_errmsg(dbid), bserror); /* send database error */
- return (false);
- }
-
- return (setlongvalue ((long) queryid, vreturned)); /* return the db address to the scripter */
-
-
-} /* sqlitecompilequeryverb */
-
-boolean sqliteclearqueryverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
- sqlite3_stmt *queryid; /* query id */
- int returnCode; /* return code from SQLite call */
-
- /*
- sqlite.clearQuery(queryid)
-
- Action: clear an SQLite query
- Params: a query id
- Returns: an SQLite result code
- Notes: do not pass the opened database ID across threads.
-
- SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_finalize.
- */
-
- flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
-
- if (!getlongvalue (hparam1, 1, (long *) &queryid)) /* Get the long value, which becomes the queryid pointer */
- return (false);
-
- /* Process the SQLite sequence */
- returnCode = sqlite3_finalize(queryid);
-
- return setlongvalue (returnCode, vreturned);
-
-} /* sqliteclearqueryverb */
-
-
-boolean sqliteresetqueryverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
- sqlite3_stmt *queryid; /* query id */
- int returnCode; /* return code from SQLite call */
-
- /*
- sqlite.resetQuery(queryid)
-
- Action: reset an SQLite query, so you can scan again from the beginning
- Params: a query id
- Returns: an SQLite result code
- Notes: do not pass the opened database ID across threads.
-
- SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_reset.
- */
-
- flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
-
- if (!getlongvalue (hparam1, 1, (long *) &queryid)) /* Get the long value, which becomes the queryid pointer */
- return (false);
-
- /* Process the SQLite sequence */
- returnCode = sqlite3_reset(queryid);
-
- return setlongvalue (returnCode, vreturned);
-
-} /* sqliteresetqueryverb */
-
-
-boolean sqlitestepqueryverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
- sqlite3_stmt *queryid; /* query id */
- int returnCode; /* return code from SQLite call */
-
- /*
- sqlite.stepQuery(queryid)
-
- Action: perform the query, moving the query cursor to the next row of results
- Params: a query id
- Returns: an SQLite result code
- Notes: do not pass the opened database ID across threads.
-
- SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_step.
- */
-
- flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
-
- if (!getlongvalue (hparam1, 1, (long *) &queryid)) /* Get the long value, which becomes the pline pointer */
- return (false);
-
- /* Process the SQLite sequence */
- returnCode = sqlite3_step(queryid);
-
- return setlongvalue (returnCode, vreturned);
-
-} /* sqlitestepqueryverb */
-
-
-boolean sqlitegetcolumntypeverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
- long columnNumber; /* column number */
- sqlite3_stmt *queryid; /* query id */
- int returnCode; /* return code from SQLite call */
- int columnCount;
-
- /*
- sqlite.getColumnType(queryid, columnNumber)
-
- Action: Retrieve the type of the specified column
- Params: a query id and the number of the column (1 base)
- Returns: an SQLite result code
- Notes: do not pass the opened database ID across threads.
-
- SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_column_type.
- */
-
- if (!getlongvalue (hparam1, 1, (long *) &queryid)) /* Get the long value, which becomes the queryid pointer */
- return (false);
-
- flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
-
- /* Enter the verb, convert the param to null-terminated string */
- if (!getlongvalue (hparam1, 2, &columnNumber))
- return (false);
-
- /* Validate the column number */
- if (columnNumber < 1) {
- langerrormessage (SQLITE_COLUMN_ERROR_0);
- return (false);
- }
- columnCount = sqlite3_column_count(queryid);
- if (columnNumber > columnCount) {
- langerrormessage (SQLITE_COLUMN_ERROR_MAX);
- return (false);
- }
-
- /* Process the SQLite sequence */
- --columnNumber; /* Frontier uses base 1, but SQLite uses a base of 0 for its column numbering */
- returnCode = sqlite3_column_type(queryid, (int) columnNumber);
-
- switch(returnCode) {
-
- case SQLITE_INTEGER: {
- return setostypevalue (langgettypeid (longvaluetype), vreturned);
- }
- case SQLITE_FLOAT: {
- return setostypevalue (langgettypeid (doublevaluetype), vreturned);
- }
- case SQLITE_TEXT: {
- return setostypevalue (langgettypeid (stringvaluetype), vreturned);
- }
- case SQLITE_BLOB: {
- return setostypevalue (langgettypeid (binaryvaluetype), vreturned);
- }
- case SQLITE_NULL: {
- return setostypevalue (langgettypeid (novaluetype), vreturned);
- }
- default: {
- /* SQLite spec says sqlite3_column_type only returns the above 5 types. But,
- just in case it lied, we'll return an error type to help Frontier avoid
- getting a case of return value indigestion. */
- langerrormessage (SQLITE_COLUMN_ERROR_UNDEFINED);
- return (false);
- }
- } /* switch */
-
-} /* sqlitegetcolumntypeverb */
-
-
-boolean sqlitegetcolumnnameverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
- long columnNumber; /* column number */
- Handle returnH;
- const char *column_name;
- sqlite3_stmt *queryid;
- int columnCount;
-
- /*
- sqlite.getColumnName(queryid, columnNumber)
-
- Action: Retrieve the name of the specified column
- Params: a query id and the number of the column (1 base)
- Returns: an SQLite result code
- Notes: do not pass the opened database ID across threads.
-
- SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_column_name.
- */
-
- if (!getlongvalue (hparam1, 1, (long *) &queryid)) /* Get the long value, which becomes the pline pointer */
- return (false);
-
- flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
-
- /* Enter the verb, convert the param to null-terminated string */
- if (!getlongvalue (hparam1, 2, &columnNumber))
- return (false);
-
- /* Validate the column number */
- if (columnNumber < 1) {
- langerrormessage (SQLITE_COLUMN_ERROR_0);
- return (false);
- }
- columnCount = sqlite3_column_count(queryid);
- if (columnNumber > columnCount) {
- langerrormessage (SQLITE_COLUMN_ERROR_MAX);
- return (false);
- }
-
- /* Process the SQLite sequence */
- --columnNumber; /* Frontier uses base 1, but SQLite uses a base of 0 for its column numbering */
- column_name = sqlite3_column_name(queryid, (int) columnNumber);
-
- /* Exit the verb, converting column_name back to Frontier handle */
- if (!newfilledhandle ((ptrvoid) column_name, strlen (column_name), &returnH))
- return false; /* Allocation failed */
-
- return (setheapvalue (returnH, stringvaluetype, vreturned));
-
-} /* sqlitegetcolumnnameverb */
-
-
-boolean sqlitegetcolumncountverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
- sqlite3_stmt *queryid;
- int returnCode; /* return code from SQLite call */
-
- /*
- sqlite.getColumnCount(queryid)
-
- Action: Retrieve number of columns returned in a query
- Params: a query id
- Returns: the number of columns in the result set returned by the prepared SQL statement.
- Notes: do not pass the opened database ID across threads.
- returns 0 if pStmt is an SQL statement that does not return data (for example an UPDATE).
-
- SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_column_count.
- */
- flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
-
- if (!getlongvalue (hparam1, 1, (long *) &queryid)) /* Get the long value, which becomes the pline pointer */
- return (false);
-
- /* Process the SQLite sequence */
- returnCode = sqlite3_column_count(queryid);
-
- return setlongvalue (returnCode, vreturned);
-
-} /* sqlitegetcolumncountverb */
-
-
-boolean sqlitegetcolumnintverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
- long columnNumber;
- sqlite3_stmt *queryid;
- long returnCode; /* return code from SQLite call */
- int columnCount;
-
- /*
- sqlite.getColumnInt(queryid, columnNumber)
-
- Action: Retrieve the value of the specified integer-type column
- Params: a query id and the number of the column (1 base)
- Returns: an SQLite result code
- Notes: do not pass the opened database ID across threads.
-
- SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_column_int.
- */
-
- if (!getlongvalue (hparam1, 1, (long *) &queryid)) /* Get the long value, which becomes the pline pointer */
- return (false);
-
- flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
-
- /* Enter the verb, convert the param to null-terminated string */
- if (!getlongvalue (hparam1, 2, &columnNumber))
- return (false);
-
- /* Validate the column number */
- if (columnNumber < 1) {
- langerrormessage (SQLITE_COLUMN_ERROR_0);
- return (false);
- }
- columnCount = sqlite3_column_count(queryid);
- if (columnNumber > columnCount) {
- langerrormessage (SQLITE_COLUMN_ERROR_MAX);
- return (false);
- }
-
- /* Process the SQLite sequence */
- --columnNumber; /* Frontier uses base 1, but SQLite uses a base of 0 for its column numbering */
- returnCode = sqlite3_column_int(queryid, (int) columnNumber);
-
- return (setlongvalue ((long) returnCode, vreturned));
-
-} /* sqlitegetcolumnintverb */
-
-
-boolean sqlitegetcolumndoubleverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
- long columnNumber;
- sqlite3_stmt *queryid;
- double returnDouble; /* double value returned from SQLite call */
- int columnCount;
-
- /*
- sqlite.getColumnDouble(queryid, columnNumber)
-
- Action: Retrieve the value of the specified double-type column
- Params: a query id and the number of the column (1 base)
- Returns: an SQLite result code
- Notes: do not pass the opened database ID across threads.
-
- SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_column_double.
- */
-
- if (!getlongvalue (hparam1, 1, (long *) &queryid)) /* Get the long value, which becomes the pline pointer */
- return (false);
-
- flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
-
- /* Enter the verb, convert the param to null-terminated string */
- if (!getlongvalue (hparam1, 2, &columnNumber))
- return (false);
-
- /* Validate the column number */
- if (columnNumber < 1) {
- langerrormessage (SQLITE_COLUMN_ERROR_0);
- return (false);
- }
- columnCount = sqlite3_column_count(queryid);
- if (columnNumber > columnCount) {
- langerrormessage (SQLITE_COLUMN_ERROR_MAX);
- return (false);
- }
-
- /* Process the SQLite sequence */
- --columnNumber; /* Frontier uses base 1, but SQLite uses a base of 0 for its column numbering */
- returnDouble = sqlite3_column_double(queryid, (int) columnNumber);
-
- return (setdoublevalue (returnDouble, vreturned));
-
-} /* sqlitegetcolumndoubleverb */
-
-
-boolean sqlitegetcolumntextverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
- long columnNumber;
- sqlite3_stmt *queryid;
- Handle returnH;
- const unsigned char *column_text;
- int columnCount;
-
- /*
- sqlite.getColumnText(queryid, columnNumber)
-
- Action: Retrieve the value of the specified text-type column
- Params: a query id and the number of the column (1 base)
- Returns: an SQLite result code
- Notes: do not pass the opened database ID across threads.
-
- SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_column_text.
- */
-
- if (!getlongvalue (hparam1, 1, (long *) &queryid)) /* Get the long value, which becomes the pline pointer */
- return (false);
-
- flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
-
- /* Enter the verb, convert the param to null-terminated string */
- if (!getlongvalue (hparam1, 2, &columnNumber))
- return (false);
-
- /* Validate the column number */
- if (columnNumber < 1) {
- langerrormessage (SQLITE_COLUMN_ERROR_0);
- return (false);
- }
- columnCount = sqlite3_column_count(queryid);
- if (columnNumber > columnCount) {
- langerrormessage (SQLITE_COLUMN_ERROR_MAX);
- return (false);
- }
-
- /* Process the SQLite sequence */
- --columnNumber; /* Frontier uses base 1, but SQLite uses a base of 0 for its column numbering */
- column_text = sqlite3_column_text(queryid, (int) columnNumber);
-
- /* Exit the verb, converting column_name back to Frontier handle */
- if (!newfilledhandle ((ptrvoid) column_text, strlen (column_text), &returnH))
- return false; /* Allocation failed */
-
- return (setheapvalue (returnH, stringvaluetype, vreturned));
-
-} /* sqlitegetcolumntextverb */
-
-
-boolean sqlitegetcolumnverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
- long columnNumber; /* column number */
- sqlite3_stmt *queryid; /* query id */
- int returnCode; /* return code from SQLite call */
- double returnDouble; /* double value returned from SQLite call */
- Handle returnH;
- int columnCount;
- const unsigned char *column_text;
- /* const unsigned char *column_blob; */
-
- /*
- sqlite.getColumn(queryid, columnNumber)
-
- Action: Retrieve the value of the specified column element
- Params: a query id and the number of the column (1 base)
- Returns: an SQLite result code
- Notes: do not pass the opened database ID across threads.
- this implementation does not support blobs. If a blob column is requested, 0 is returned.
- */
-
- if (!getlongvalue (hparam1, 1, (long *) &queryid)) /* Get the long value, which becomes the queryid pointer */
- return (false);
-
- flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
-
- /* Enter the verb, convert the param to null-terminated string */
- if (!getlongvalue (hparam1, 2, &columnNumber))
- return (false);
-
- /* Validate the column number */
- if (columnNumber < 1) {
- langerrormessage (SQLITE_COLUMN_ERROR_0);
- return (false);
- }
- columnCount = sqlite3_column_count(queryid);
- if (columnNumber > columnCount) {
- langerrormessage (SQLITE_COLUMN_ERROR_MAX);
- return (false);
- }
-
- /* Process the SQLite sequence */
- --columnNumber; /* Frontier uses base 1, but SQLite uses a base of 0 for its column numbering */
- returnCode = sqlite3_column_type(queryid, (int) columnNumber);
-
- switch(returnCode) {
-
- case SQLITE_INTEGER: {
- returnCode = sqlite3_column_int(queryid, (int) columnNumber);
- return (setlongvalue ((long) returnCode, vreturned));
- }
- case SQLITE_FLOAT: {
- returnDouble = sqlite3_column_double(queryid, (int) columnNumber);
- return (setdoublevalue (returnDouble, vreturned));
- }
- case SQLITE_TEXT: {
- column_text = sqlite3_column_text(queryid, (int) columnNumber);
-
- /* Exit the verb, converting column_name back to Frontier handle */
- if (!newfilledhandle ((ptrvoid) column_text, strlen (column_text), &returnH))
- return false; /* Allocation failed */
- return (setheapvalue (returnH, stringvaluetype, vreturned));
- }
- case SQLITE_BLOB: {
- return (setlongvalue ((long) 0, vreturned));
-
- /* The following code is ignored. Andre suggested returning actual binary
- data to Frontier, but I'm concerned about reliability, moving that data
- back and forth, so in this implementation, I'm explicitly making blob
- data not supported -- DG */
-
- // column_blob = sqlite3_column_blob(queryid, (int) columnNumber);
-
- /* Exit the verb, converting column_name back to Frontier handle */
- //if (!newfilledhandle ((ptrvoid) column_blob, strlen (column_blob), &returnH))
- // return false; /* Allocation failed */
- //return (setbinaryvalue (returnH, '\?\?\?\?', vreturned));
- }
- case SQLITE_NULL: {
- return (setlongvalue ((long) 0, vreturned));
- }
- default: {
- /* SQLite spec says sqlite3_column_type only returns the above 5 types. But,
- just in case it lied, we'll return an error type to help Frontier avoid
- getting a case of return value indigestion. */
- langerrormessage ("\x29""SQLite returned an undefined column type.");
- return (false);
- }
- } /* switch */
-
-} /* sqlitegetcolumn */
-
-
-boolean sqlitegetrowverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
- long columnNumber; /* column number */
- int columnCount; /* number of columns */
- sqlite3_stmt *queryid; /* query id */
- int returnCode; /* return code from SQLite call */
- double returnDouble; /* double value returned from SQLite call */
- Handle returnH;
- const unsigned char *column_text;
- hdllistrecord hlist;
- tyvaluerecord val;
-
- /*
- sqlite.getRow(queryid)
-
- Action: Retrieve a row as a list
- Params: a query id
- Returns: an SQLite result code
- Notes: do not pass the opened database ID across threads.
- this implementation does not support blobs. If a blob column is requested, 0 is returned.
- */
-
- flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
-
- if (!getlongvalue (hparam1, 1, (long *) &queryid)) /* Get the long value, which becomes the queryid pointer */
- return (false);
-
- /* Process the SQLite sequence */
- columnCount = sqlite3_column_count(queryid); /* first, figure out how many columns we've got */
-
- if (columnCount == 0) {
- langerrormessage ("\x2F""SQLite.getRow requires a minimum of one column.");
- return (false);
- }
-
- if (!opnewlist (&hlist, false)) /* fail out if we can't create the list */
- return (false);
-
- for (columnNumber = 0 ; columnNumber < columnCount ; ++columnNumber) {
-
- returnCode = sqlite3_column_type(queryid, (int) columnNumber);
-
- switch(returnCode) {
-
- case SQLITE_INTEGER: {
- returnCode = sqlite3_column_int(queryid, (int) columnNumber);
- if (!langpushlistlong (hlist, (long) returnCode))
- goto error;
- break;
- }
- case SQLITE_FLOAT: {
- returnDouble = sqlite3_column_double(queryid, (int) columnNumber);
- if (!setdoublevalue (returnDouble, &val))
- goto error;
- if (!langpushlistval (hlist, nil, &val))
- goto error;
- break;
- }
- case SQLITE_TEXT: {
- column_text = sqlite3_column_text(queryid, (int) columnNumber);
-
- /* Exit the verb, converting column_name back to Frontier handle */
- if (!newfilledhandle ((ptrvoid) column_text, strlen (column_text), &returnH))
- return false; /* Allocation failed */
- if (!setheapvalue (returnH, stringvaluetype, &val)) /* convert handle to value */
- goto error;
- if (!langpushlistval (hlist, nil, &val))
- goto error;
- break;
- }
- case SQLITE_BLOB: {
- if (!langpushlistlong (hlist, (long) 0))
- goto error;
- break;
- }
- case SQLITE_NULL: {
- if (!langpushlistlong (hlist, (long) 0))
- goto error;
- break;
- }
- default: {
- /* SQLite spec says sqlite3_column_type only returns the above 5 types. But,
- just in case it lied, this time we return a 0, so the rest of the fields
- can be read properly. */
- if (!langpushlistlong (hlist, (long) 0))
- goto error;
- }
- } /* switch */
- } /* for */
-
- return (setheapvalue ((Handle) hlist, listvaluetype, vreturned));
-
- error: {
- opdisposelist (hlist);
- return (false);
- }
-
-} /* sqlitegetrow */
-
-
-boolean sqlitegeterrormessageverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
- const char *sqliteError; /* pointer to the error message */
- sqlite3 *db; /* the SQLite database handle */
- Handle returnH = nil; /* The handle being returned back to Frontier */
-
- /*
- Frontier verb: sqlite.getErrorMessage(dbfile)
-
- Returns the error message for the most recent SQLite API call.
- Takes a database ID.
- Returns a string containing the error message.
- NOTE: do not pass the opened database ID across threads.
-
- SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_errmsg.
- */
-
- flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
-
- if (!getlongvalue (hparam1, 1, (long *) &db)) /* Get the long value, which becomes the db pointer */
- return (false);
-
- /* Process the SQLite sequence */
- sqliteError = sqlite3_errmsg(db);
-
- /* Exit the verb, converting errMsg back to Frontier handle */
- if(!newfilledhandle ((ptrvoid) sqliteError, strlen (sqliteError), &returnH))
- return false; /* Allocation failed */
-
- return (setheapvalue (returnH, stringvaluetype, vreturned));
-
-} /* sqlitegeterrormessageverb */
-
Modified: Frontier/branches/mysql/build_VC2K5/Frontier.vcproj
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dav...@us...> - 2007-04-08 22:21:28
|
Revision: 1648
http://svn.sourceforge.net/frontierkernel/?rev=1648&view=rev
Author: davidgewirtz
Date: 2007-04-08 15:21:08 -0700 (Sun, 08 Apr 2007)
Log Message:
-----------
Structural changes to Frontier project adding new MySQL verbs, libraries, kernelverbdefs, etc. This is before actual coding of MySQL verbs.
Modified Paths:
--------------
Frontier/branches/mysql/Common/headers/kernelverbdefs.h
Frontier/branches/mysql/Common/headers/kernelverbs.h
Frontier/branches/mysql/Common/resources/Mac/kernelverbs.r
Frontier/branches/mysql/Common/resources/Win32/kernelverbs.rc
Frontier/branches/mysql/Common/source/shell.c
Frontier/branches/mysql/build_VC2K5/Frontier.vcproj
Added Paths:
-----------
Frontier/branches/mysql/Common/headers/langmysql.h
Frontier/branches/mysql/Common/source/langmysql.c
Modified: Frontier/branches/mysql/Common/headers/kernelverbdefs.h
===================================================================
--- Frontier/branches/mysql/Common/headers/kernelverbdefs.h 2007-04-08 19:56:45 UTC (rev 1647)
+++ Frontier/branches/mysql/Common/headers/kernelverbdefs.h 2007-04-08 22:21:08 UTC (rev 1648)
@@ -52,3 +52,4 @@
#define idmathverbs 1024 /*2004-12-29 SMD: extended math verbs*/
#define idcryptverbs 1025 /* 2006-03-07 creedon: crypt verbs */
#define idsqliteverbs 1026 /* 2006-03-15 gewirtz sqlite verbs */
+#define idmysqlverbs 1027 /* 2007-04-08 gewirtz mysql verbs */
Modified: Frontier/branches/mysql/Common/headers/kernelverbs.h
===================================================================
--- Frontier/branches/mysql/Common/headers/kernelverbs.h 2007-04-08 19:56:45 UTC (rev 1647)
+++ Frontier/branches/mysql/Common/headers/kernelverbs.h 2007-04-08 22:21:08 UTC (rev 1648)
@@ -56,4 +56,6 @@
extern boolean cryptinitverbs (void); /* langcrypt.c */
-extern boolean sqliteinitverbs (void); /* langsqlite.c */
\ No newline at end of file
+extern boolean sqliteinitverbs (void); /* langsqlite.c */
+
+extern boolean mysqlinitverbs (void); /* langmysql.c */
\ No newline at end of file
Added: Frontier/branches/mysql/Common/headers/langmysql.h
===================================================================
--- Frontier/branches/mysql/Common/headers/langmysql.h (rev 0)
+++ Frontier/branches/mysql/Common/headers/langmysql.h 2007-04-08 22:21:08 UTC (rev 1648)
@@ -0,0 +1,69 @@
+
+/* $Id: langsqlite.h,v 1.1.2.1 2006/03/24 01:31:35 davidgewirtz Exp $ */
+
+/******************************************************************************
+
+ UserLand Frontier(tm) -- High performance Web content management,
+ object database, system-level and Internet scripting environment,
+ including source code editing and debugging.
+
+ Copyright (C) 1992-2004 UserLand Software, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+******************************************************************************/
+
+/* prototypes */
+
+extern boolean sqliteopenverb (hdltreenode, tyvaluerecord *, bigstring); /* 2006-03-15 gewirtz */
+
+extern boolean sqlitecloseverb (hdltreenode, tyvaluerecord *, bigstring); /* 2006-03-17 gewirtz */
+
+extern boolean sqlitecompilequeryverb (hdltreenode, tyvaluerecord *, bigstring); /* 2006-04-18 gewirtz */
+
+extern boolean sqliteclearqueryverb (hdltreenode, tyvaluerecord *, bigstring); /* 2006-04-18 gewirtz */
+
+extern boolean sqliteresetqueryverb (hdltreenode, tyvaluerecord *, bigstring); /* 2006-08-31 gewirtz */
+
+extern boolean sqlitestepqueryverb (hdltreenode, tyvaluerecord *, bigstring); /* 2006-08-31 gewirtz */
+
+extern boolean sqlitegetcolumncountverb (hdltreenode, tyvaluerecord *, bigstring); /* 2006-04-18 gewirtz */
+
+extern boolean sqlitegetcolumntypeverb (hdltreenode, tyvaluerecord *, bigstring); /* 2006-04-18 gewirtz */
+
+extern boolean sqlitegetcolumnintverb (hdltreenode, tyvaluerecord *, bigstring); /* 2006-04-18 gewirtz */
+
+extern boolean sqlitegetcolumndoubleverb (hdltreenode, tyvaluerecord *, bigstring); /* 2006-04-18 gewirtz */
+
+extern boolean sqlitegetcolumntextverb (hdltreenode, tyvaluerecord *, bigstring); /* 2006-04-18 gewirtz */
+
+extern boolean sqlitegetcolumnnameverb (hdltreenode, tyvaluerecord *, bigstring); /* 2006-04-18 gewirtz */
+
+extern boolean sqlitegetcolumnverb (hdltreenode, tyvaluerecord *, bigstring); /* 2006-04-20 gewirtz */
+
+extern boolean sqlitegetrowverb (hdltreenode, tyvaluerecord *, bigstring); /* 2006-08-31 gewirtz */
+
+extern boolean sqlitegeterrormessageverb (hdltreenode, tyvaluerecord *, bigstring); /* 2006-04-20 gewirtz */
+
+extern boolean sqliteinitverbs (void); /* 2006-03-15 gewirtz */
+
+/* boolean hmacmd5 (unsigned char *, int, unsigned char *, int, unsigned char *);*/ /* 2006-03-05 creedon */
+
+/* boolean hmacsha1 (unsigned char *, int, unsigned char *, int, unsigned char *);*/ /* 2006-03-12 creedon */
+
+/* SQLITE MESSAGES */
+#define SQLITE_COLUMN_ERROR_0 "\xe9""SQLite column error. Frontier uses a base-1 index. Columns must be specified with 1 indicating the first column. This is different from the SQLite API, which requires that columns must be specified with 0 indicating the first column."
+#define SQLITE_COLUMN_ERROR_MAX "\x50""SQLite column error. An attempt was made to access a column that does not exist."
+#define SQLITE_COLUMN_ERROR_UNDEFINED "\x29""SQLite returned an undefined column type."
\ No newline at end of file
Modified: Frontier/branches/mysql/Common/resources/Mac/kernelverbs.r
===================================================================
--- Frontier/branches/mysql/Common/resources/Mac/kernelverbs.r 2007-04-08 19:56:45 UTC (rev 1647)
+++ Frontier/branches/mysql/Common/resources/Mac/kernelverbs.r 2007-04-08 22:21:08 UTC (rev 1648)
@@ -1166,3 +1166,12 @@
}
};
+resource 'EFP#' (idmysqlverbs, "mysql") { /* 2007-04-09 gewirtz mysql verbs */
+ {
+ "mysql", false, {
+
+ "init",
+ "close"
+ }
+ }
+};
Modified: Frontier/branches/mysql/Common/resources/Win32/kernelverbs.rc
===================================================================
--- Frontier/branches/mysql/Common/resources/Win32/kernelverbs.rc 2007-04-08 19:56:45 UTC (rev 1647)
+++ Frontier/branches/mysql/Common/resources/Win32/kernelverbs.rc 2007-04-08 22:21:08 UTC (rev 1648)
@@ -1101,3 +1101,12 @@
"close\0"
END
+1027 /* mysqlverbs */ EFP DISCARDABLE
+ BEGIN
+ 1, // Number of "blocks" in this resource
+ "mysql\0", // Function Processor name
+ false, // Window required
+ 2, // Count of verbs
+ "init\0",
+ "close\0"
+ END
Added: Frontier/branches/mysql/Common/source/langmysql.c
===================================================================
--- Frontier/branches/mysql/Common/source/langmysql.c (rev 0)
+++ Frontier/branches/mysql/Common/source/langmysql.c 2007-04-08 22:21:08 UTC (rev 1648)
@@ -0,0 +1,1013 @@
+
+/* $Id: langsqlite.c,v 1.1.2.1 2006/03/24 01:32:31 davidgewirtz Exp $ */
+
+/******************************************************************************
+
+ UserLand Frontier(tm) -- High performance Web content management,
+ object database, system-level and Internet scripting environment,
+ including source code editing and debugging.
+
+ Copyright (C) 1992-2004 UserLand Software, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+******************************************************************************/
+
+#include "frontier.h"
+#include "standard.h"
+
+#include "frontierconfig.h"
+
+#include "error.h"
+#include "ops.h"
+#include "langinternal.h"
+#include "kernelverbs.h"
+#include "kernelverbdefs.h"
+#include "resources.h"
+#include "strings.h"
+#include "tablestructure.h"
+#include "lang.h"
+#include "oplist.h"
+#include "langsystem7.h"
+#include "langexternal.h"
+
+#include "langsqlite.h"
+#include <sqlite3.h>
+
+#ifdef MACVERSION
+
+ #include <sys/param.h>
+
+#endif // MACVERSION
+
+#include "file.h"
+
+#ifdef WIN95VERSION
+
+ #define MAXPATHLEN 1024
+
+#endif // WIN95VERSION
+
+
+/* Building SQLite into Frontier
+
+The SQLite source distribution is compiled into the Frontier code as part of this
+module. A key goal in this implementation was to avoid touching any of the SQLite
+source files. SQLite is pretty complex in its coding, and I didn't want to take a
+chance that any changes to the original SQLite code would muck up the database
+functionality.
+
+To include the latest SQLite distribution (we're implementing SQLite 3 here),
+download the SQLite source code from http://www.sqlite.org/download.html.
+
+Move all the SQLite source files into the \Common\sqlite3 folder. If you need to
+include new files in the SQLite project, be sure that shell.c and tclsqlite.c are
+NOT included in the Frontier project.
+
+That's it. For further tips, see the Frontier Lab Notebook article:
+
+http://manila.zatz.com/frontierkernel/stories/storyReader$29
+
+-- DG
+
+*/
+
+typedef enum tysqliteverbtoken { /* verbs that are processed by langsqlite.c */
+
+ openfunc,
+ compilequeryfunc,
+ clearqueryfunc,
+ resetqueryfunc,
+ stepqueryfunc,
+ getcolumncountfunc,
+ getcolumntypefunc,
+ getcolumnintfunc,
+ getcolumndoublefunc,
+ getcolumntextfunc,
+ getcolumnnamefunc,
+ getcolumnfunc,
+ getrowfunc,
+ geterrormessagefunc,
+ closefunc,
+ ctsqliteverbs
+ } tysqliteverbtoken;
+
+
+static boolean sqlitefunctionvalue (short token, hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
+
+ /*
+ 2006-03-15 gewirtz: created, cribbed from langcrypt, itself cribbed from htmlfunctionvalue
+ */
+
+ hdltreenode hp1 = hparam1;
+ tyvaluerecord *v = vreturned;
+
+ setbooleanvalue (false, v); /* by default, sqlite functions return false */
+
+ switch (token) {
+
+ case openfunc: { /* 2006-03-14 gewirtz: open an SQLite db */
+
+ return (sqliteopenverb (hp1, v, bserror));
+ } /* openfunc */
+
+ case compilequeryfunc: { /* 2006-04-18 gewirtz: prepare an SQLite statement */
+
+ return (sqlitecompilequeryverb (hp1, v, bserror));
+ } /* compilequeryfunc */
+
+ case clearqueryfunc: { /* 2006-04-18 gewirtz: finalize an SQLite statement */
+
+ return (sqliteclearqueryverb (hp1, v, bserror));
+ } /* clearqueryfunc */
+
+ case resetqueryfunc: { /* 2006-08-31 gewirtz: reset an SQLite query statement */
+
+ return (sqliteresetqueryverb (hp1, v, bserror));
+ } /* resetqueryfunc */
+
+ case stepqueryfunc: { /* 2006-08-31 gewirtz: move the cursor one step after the query */
+
+ return (sqlitestepqueryverb (hp1, v, bserror));
+ } /* stepqueryfunc */
+
+ case getcolumncountfunc: { /* 2006-04-18 gewirtz: get the number of columns */
+
+ return (sqlitegetcolumncountverb (hp1, v, bserror));
+ } /* getcolumncountfunc */
+
+ case getcolumntypefunc: { /* 2006-04-18 gewirtz: get the type of the referenced column */
+ /* this version returns Frontier strings */
+ return (sqlitegetcolumntypeverb (hp1, v, bserror));
+ } /* getcolumntypefunc */
+
+ case getcolumnintfunc: { /* 2006-04-18 gewirtz: get an int value from the column */
+
+ return (sqlitegetcolumnintverb (hp1, v, bserror));
+ } /* getcolumnintfunc */
+
+ case getcolumndoublefunc: { /* 2006-04-18 gewirtz: get a double value from the column */
+
+ return (sqlitegetcolumndoubleverb (hp1, v, bserror));
+ } /* getcolumndoublefunc */
+
+ case getcolumntextfunc: { /* 2006-04-18 gewirtz: get a text value from the column */
+
+ return (sqlitegetcolumntextverb (hp1, v, bserror));
+ } /* getcolumntextfunc */
+
+ case getcolumnnamefunc: { /* 2006-04-18 gewirtz: get the field name of the column */
+
+ return (sqlitegetcolumnnameverb (hp1, v, bserror));
+ } /* getcolumnnamefunc */
+
+ case getcolumnfunc: { /* 2006-04-20 gewirtz: get the value of the column */
+
+ return (sqlitegetcolumnverb (hp1, v, bserror));
+ } /* getcolumnfunc */
+
+ case getrowfunc: { /* 2006-08-31 gewirtz: get the values in a row */
+
+ return (sqlitegetrowverb (hp1, v, bserror));
+ } /* getrowfunc */
+
+ case geterrormessagefunc: { /* 2006-04-20 gewirtz: get the SQLite error message */
+
+ return (sqlitegeterrormessageverb (hp1, v, bserror));
+ } /* geterrormessagefunc */
+
+ case closefunc: { /* 2006-03-15 gewirtz: close an SQLite db */
+
+ return (sqlitecloseverb (hp1, v, bserror));
+ } /* closefunc */
+
+ default:
+ getstringlist (langerrorlist, unimplementedverberror, bserror);
+
+ return (false);
+ } /* switch */
+ } /* sqlitefunctionvalue */
+
+
+boolean sqliteinitverbs (void) {
+
+ /* 2006-03-15 gewirtz: created, cribbed from cryptinitverbs */
+
+ return (loadfunctionprocessor (idsqliteverbs, &sqlitefunctionvalue));
+ } /* sqliteinitverbs */
+
+
+static void sqliteOpenError (const char *errmsg, bigstring bserror) {
+ bigstring bserrmsg;
+
+ copyctopstring (errmsg, bserrmsg); /* This creates a pstring at bserrmsg */
+ getstringlist (langerrorlist, sqliteopenerror, bserror);
+ parsedialogstring (bserror, bserrmsg, nil, nil, nil, bserror);
+
+ return;
+ } /*sqliteOpenError*/
+
+
+static void sqliteDatabaseError (const char *errmsg, bigstring bserror) {
+ bigstring bserrmsg;
+
+ copyctopstring (errmsg, bserrmsg); /* This creates a pstring at bserrmsg */
+ getstringlist (langerrorlist, sqlitedberror, bserror);
+ parsedialogstring (bserror, bserrmsg, nil, nil, nil, bserror);
+
+ return;
+ } /*sqliteDatabaseError*/
+
+
+static void sqliteScriptError (const char *errmsg, bigstring bserror) {
+ bigstring bserrmsg;
+
+ copyctopstring (errmsg, bserrmsg); /* This creates a pstring at bserrmsg */
+ getstringlist (langerrorlist, notfunctionerror, bserror);
+ parsedialogstring (bserror, bserrmsg, nil, nil, nil, bserror);
+
+ return;
+ } /*sqliteScriptError*/
+
+
+boolean sqliteopenverb ( hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror ) {
+
+ Handle dbfile; // path to database file
+ sqlite3 *dbid; // the SQLite database handle
+ int returnCode; // return code from SQLite call
+ tyfilespec fs; // file specification
+
+ //
+ // 2006-11-06 creedon: use filespec as parameter, convert dbfile to UTF-8 for sqlite3_open
+ //
+ // 2006-10-08 DG: created
+ //
+
+ #ifdef WIN95VERSION
+
+ bigstring bs;
+ Handle handletext;
+
+ #endif // WIN95VERSION
+
+ //
+ // sqlite.open ( dbfile )
+ //
+ // Action: opens a SQLite database
+ // Params: a file path to the database file
+ // Returns: a value that corresponds to the opened database ID
+ // Usage: call in a try statement
+ // Notes: do not pass the opened database ID across threads
+ //
+ // SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_open
+ //
+
+ newhandle ( MAXPATHLEN, &dbfile );
+
+ flnextparamislast = true; // makes sure Frontier throws an error if more than one param is passed
+
+ if ( ! getfilespecvalue ( hparam1, 1, &fs ) ) // fs holds the file path
+ return ( false );
+
+ #ifdef MACVERSION
+
+ boolean fl;
+ OSStatus status;
+ long len;
+
+ fl = extendfilespec ( &fs, &fs );
+
+ status = FSRefMakePath ( &fs.fsref, *dbfile, MAXPATHLEN ); // dbfile encoded in UTF-8
+
+ len = strlen ( *dbfile );
+
+ sethandlesize ( dbfile, len );
+
+ if ( fs.path != NULL ) {
+
+ Handle path;
+
+ len = CFStringGetMaximumSizeForEncoding ( CFStringGetLength ( fs.path ), kCFStringEncodingUTF8 );
+
+ newhandle ( ++len, &path );
+
+ fl = CFStringGetCString ( fs.path, *path, len, kCFStringEncodingUTF8 );
+
+ pushcharhandle ( '/', dbfile );
+
+ pushhandle ( path, dbfile );
+
+ }
+
+ #endif // MACVERSION
+
+ #ifdef WIN95VERSION
+
+ filespectopath ( &fs, bs );
+
+ newtexthandle ( bs, &handletext );
+
+ convertCharset ( handletext, dbfile, BIGSTRING ( "\x0C" "Windows-1252" ), BIGSTRING ( "\x05" "utf-8" ) );
+
+ #endif // WIN95VERSION
+
+ // Process the SQLite sequence
+
+ returnCode = sqlite3_open ( *dbfile, &dbid );
+
+ if(returnCode) {
+ sqliteOpenError(sqlite3_errmsg(dbid), bserror); // send database open error
+ sqlite3_close(dbid);
+ return (false);
+ }
+
+ // return the db address to the scripter
+ // return (setheapvalue ((Handle) dbid, longvaluetype, vreturned));
+ // 2006-09-06 - kw - simply return a long
+
+ return (setlongvalue ((long) dbid, vreturned));
+
+ } // sqliteopenverb
+
+
+boolean sqlitecloseverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
+ sqlite3 *dbid; /* the SQLite database handle */
+ int returnCode; /* return code from SQLite call */
+
+ /*
+ sqlite.close(dbid)
+
+ Action: close an SQLite database
+ Params: a database id
+ Returns: an SQLite result code
+ Usage: check result code for success or failure
+ Notes: do not pass the opened database ID across threads.
+
+ SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_close.
+ */
+
+ flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
+
+ if (!getlongvalue (hparam1, 1, (long *) &dbid)) /* Get the long value, which becomes the db pointer */
+ return (false);
+
+ /* Process the SQLite sequence */
+ returnCode = sqlite3_close(dbid);
+
+ return setlongvalue (returnCode, vreturned);
+
+} /* sqlitecloseverb */
+
+
+boolean sqlitecompilequeryverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
+ Handle query; /* the SQL query passed to the SQLite engine */
+ sqlite3 *dbid; /* the SQLite database handle */
+ sqlite3_stmt *queryid = 0; /* the compiled query */
+ int returnCode; /* return code from SQLite call */
+
+ /*
+ sqlite.compileQuery(dbid, query)
+
+ Action: compile an SQLite query
+ Params: a database id and a query string
+ Returns: a query id
+ Usage: call in a try statement
+ Notes: do not pass the opened database ID across threads.
+
+ SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_prepare.
+
+ Code that is a good example of prepare in use:
+ http://souptonuts.sourceforge.net/code/eatblob.c.html
+ */
+
+ if (!getlongvalue (hparam1, 1, (long *) &dbid)) /* Get the long value, which becomes the db pointer */
+ return (false);
+
+ flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
+
+ if (!getreadonlytextvalue (hparam1, 2, &query)) /* get the query param */
+ return (false);
+
+ /* Process the SQLite sequence */
+ returnCode = sqlite3_prepare(dbid, *query, gethandlesize(query), &queryid, 0);
+ if(returnCode != SQLITE_OK || queryid == NULL) {
+ sqliteDatabaseError(sqlite3_errmsg(dbid), bserror); /* send database error */
+ return (false);
+ }
+
+ return (setlongvalue ((long) queryid, vreturned)); /* return the db address to the scripter */
+
+
+} /* sqlitecompilequeryverb */
+
+boolean sqliteclearqueryverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
+ sqlite3_stmt *queryid; /* query id */
+ int returnCode; /* return code from SQLite call */
+
+ /*
+ sqlite.clearQuery(queryid)
+
+ Action: clear an SQLite query
+ Params: a query id
+ Returns: an SQLite result code
+ Notes: do not pass the opened database ID across threads.
+
+ SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_finalize.
+ */
+
+ flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
+
+ if (!getlongvalue (hparam1, 1, (long *) &queryid)) /* Get the long value, which becomes the queryid pointer */
+ return (false);
+
+ /* Process the SQLite sequence */
+ returnCode = sqlite3_finalize(queryid);
+
+ return setlongvalue (returnCode, vreturned);
+
+} /* sqliteclearqueryverb */
+
+
+boolean sqliteresetqueryverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
+ sqlite3_stmt *queryid; /* query id */
+ int returnCode; /* return code from SQLite call */
+
+ /*
+ sqlite.resetQuery(queryid)
+
+ Action: reset an SQLite query, so you can scan again from the beginning
+ Params: a query id
+ Returns: an SQLite result code
+ Notes: do not pass the opened database ID across threads.
+
+ SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_reset.
+ */
+
+ flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
+
+ if (!getlongvalue (hparam1, 1, (long *) &queryid)) /* Get the long value, which becomes the queryid pointer */
+ return (false);
+
+ /* Process the SQLite sequence */
+ returnCode = sqlite3_reset(queryid);
+
+ return setlongvalue (returnCode, vreturned);
+
+} /* sqliteresetqueryverb */
+
+
+boolean sqlitestepqueryverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
+ sqlite3_stmt *queryid; /* query id */
+ int returnCode; /* return code from SQLite call */
+
+ /*
+ sqlite.stepQuery(queryid)
+
+ Action: perform the query, moving the query cursor to the next row of results
+ Params: a query id
+ Returns: an SQLite result code
+ Notes: do not pass the opened database ID across threads.
+
+ SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_step.
+ */
+
+ flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
+
+ if (!getlongvalue (hparam1, 1, (long *) &queryid)) /* Get the long value, which becomes the pline pointer */
+ return (false);
+
+ /* Process the SQLite sequence */
+ returnCode = sqlite3_step(queryid);
+
+ return setlongvalue (returnCode, vreturned);
+
+} /* sqlitestepqueryverb */
+
+
+boolean sqlitegetcolumntypeverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
+ long columnNumber; /* column number */
+ sqlite3_stmt *queryid; /* query id */
+ int returnCode; /* return code from SQLite call */
+ int columnCount;
+
+ /*
+ sqlite.getColumnType(queryid, columnNumber)
+
+ Action: Retrieve the type of the specified column
+ Params: a query id and the number of the column (1 base)
+ Returns: an SQLite result code
+ Notes: do not pass the opened database ID across threads.
+
+ SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_column_type.
+ */
+
+ if (!getlongvalue (hparam1, 1, (long *) &queryid)) /* Get the long value, which becomes the queryid pointer */
+ return (false);
+
+ flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
+
+ /* Enter the verb, convert the param to null-terminated string */
+ if (!getlongvalue (hparam1, 2, &columnNumber))
+ return (false);
+
+ /* Validate the column number */
+ if (columnNumber < 1) {
+ langerrormessage (SQLITE_COLUMN_ERROR_0);
+ return (false);
+ }
+ columnCount = sqlite3_column_count(queryid);
+ if (columnNumber > columnCount) {
+ langerrormessage (SQLITE_COLUMN_ERROR_MAX);
+ return (false);
+ }
+
+ /* Process the SQLite sequence */
+ --columnNumber; /* Frontier uses base 1, but SQLite uses a base of 0 for its column numbering */
+ returnCode = sqlite3_column_type(queryid, (int) columnNumber);
+
+ switch(returnCode) {
+
+ case SQLITE_INTEGER: {
+ return setostypevalue (langgettypeid (longvaluetype), vreturned);
+ }
+ case SQLITE_FLOAT: {
+ return setostypevalue (langgettypeid (doublevaluetype), vreturned);
+ }
+ case SQLITE_TEXT: {
+ return setostypevalue (langgettypeid (stringvaluetype), vreturned);
+ }
+ case SQLITE_BLOB: {
+ return setostypevalue (langgettypeid (binaryvaluetype), vreturned);
+ }
+ case SQLITE_NULL: {
+ return setostypevalue (langgettypeid (novaluetype), vreturned);
+ }
+ default: {
+ /* SQLite spec says sqlite3_column_type only returns the above 5 types. But,
+ just in case it lied, we'll return an error type to help Frontier avoid
+ getting a case of return value indigestion. */
+ langerrormessage (SQLITE_COLUMN_ERROR_UNDEFINED);
+ return (false);
+ }
+ } /* switch */
+
+} /* sqlitegetcolumntypeverb */
+
+
+boolean sqlitegetcolumnnameverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
+ long columnNumber; /* column number */
+ Handle returnH;
+ const char *column_name;
+ sqlite3_stmt *queryid;
+ int columnCount;
+
+ /*
+ sqlite.getColumnName(queryid, columnNumber)
+
+ Action: Retrieve the name of the specified column
+ Params: a query id and the number of the column (1 base)
+ Returns: an SQLite result code
+ Notes: do not pass the opened database ID across threads.
+
+ SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_column_name.
+ */
+
+ if (!getlongvalue (hparam1, 1, (long *) &queryid)) /* Get the long value, which becomes the pline pointer */
+ return (false);
+
+ flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
+
+ /* Enter the verb, convert the param to null-terminated string */
+ if (!getlongvalue (hparam1, 2, &columnNumber))
+ return (false);
+
+ /* Validate the column number */
+ if (columnNumber < 1) {
+ langerrormessage (SQLITE_COLUMN_ERROR_0);
+ return (false);
+ }
+ columnCount = sqlite3_column_count(queryid);
+ if (columnNumber > columnCount) {
+ langerrormessage (SQLITE_COLUMN_ERROR_MAX);
+ return (false);
+ }
+
+ /* Process the SQLite sequence */
+ --columnNumber; /* Frontier uses base 1, but SQLite uses a base of 0 for its column numbering */
+ column_name = sqlite3_column_name(queryid, (int) columnNumber);
+
+ /* Exit the verb, converting column_name back to Frontier handle */
+ if (!newfilledhandle ((ptrvoid) column_name, strlen (column_name), &returnH))
+ return false; /* Allocation failed */
+
+ return (setheapvalue (returnH, stringvaluetype, vreturned));
+
+} /* sqlitegetcolumnnameverb */
+
+
+boolean sqlitegetcolumncountverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
+ sqlite3_stmt *queryid;
+ int returnCode; /* return code from SQLite call */
+
+ /*
+ sqlite.getColumnCount(queryid)
+
+ Action: Retrieve number of columns returned in a query
+ Params: a query id
+ Returns: the number of columns in the result set returned by the prepared SQL statement.
+ Notes: do not pass the opened database ID across threads.
+ returns 0 if pStmt is an SQL statement that does not return data (for example an UPDATE).
+
+ SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_column_count.
+ */
+ flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
+
+ if (!getlongvalue (hparam1, 1, (long *) &queryid)) /* Get the long value, which becomes the pline pointer */
+ return (false);
+
+ /* Process the SQLite sequence */
+ returnCode = sqlite3_column_count(queryid);
+
+ return setlongvalue (returnCode, vreturned);
+
+} /* sqlitegetcolumncountverb */
+
+
+boolean sqlitegetcolumnintverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
+ long columnNumber;
+ sqlite3_stmt *queryid;
+ long returnCode; /* return code from SQLite call */
+ int columnCount;
+
+ /*
+ sqlite.getColumnInt(queryid, columnNumber)
+
+ Action: Retrieve the value of the specified integer-type column
+ Params: a query id and the number of the column (1 base)
+ Returns: an SQLite result code
+ Notes: do not pass the opened database ID across threads.
+
+ SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_column_int.
+ */
+
+ if (!getlongvalue (hparam1, 1, (long *) &queryid)) /* Get the long value, which becomes the pline pointer */
+ return (false);
+
+ flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
+
+ /* Enter the verb, convert the param to null-terminated string */
+ if (!getlongvalue (hparam1, 2, &columnNumber))
+ return (false);
+
+ /* Validate the column number */
+ if (columnNumber < 1) {
+ langerrormessage (SQLITE_COLUMN_ERROR_0);
+ return (false);
+ }
+ columnCount = sqlite3_column_count(queryid);
+ if (columnNumber > columnCount) {
+ langerrormessage (SQLITE_COLUMN_ERROR_MAX);
+ return (false);
+ }
+
+ /* Process the SQLite sequence */
+ --columnNumber; /* Frontier uses base 1, but SQLite uses a base of 0 for its column numbering */
+ returnCode = sqlite3_column_int(queryid, (int) columnNumber);
+
+ return (setlongvalue ((long) returnCode, vreturned));
+
+} /* sqlitegetcolumnintverb */
+
+
+boolean sqlitegetcolumndoubleverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
+ long columnNumber;
+ sqlite3_stmt *queryid;
+ double returnDouble; /* double value returned from SQLite call */
+ int columnCount;
+
+ /*
+ sqlite.getColumnDouble(queryid, columnNumber)
+
+ Action: Retrieve the value of the specified double-type column
+ Params: a query id and the number of the column (1 base)
+ Returns: an SQLite result code
+ Notes: do not pass the opened database ID across threads.
+
+ SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_column_double.
+ */
+
+ if (!getlongvalue (hparam1, 1, (long *) &queryid)) /* Get the long value, which becomes the pline pointer */
+ return (false);
+
+ flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
+
+ /* Enter the verb, convert the param to null-terminated string */
+ if (!getlongvalue (hparam1, 2, &columnNumber))
+ return (false);
+
+ /* Validate the column number */
+ if (columnNumber < 1) {
+ langerrormessage (SQLITE_COLUMN_ERROR_0);
+ return (false);
+ }
+ columnCount = sqlite3_column_count(queryid);
+ if (columnNumber > columnCount) {
+ langerrormessage (SQLITE_COLUMN_ERROR_MAX);
+ return (false);
+ }
+
+ /* Process the SQLite sequence */
+ --columnNumber; /* Frontier uses base 1, but SQLite uses a base of 0 for its column numbering */
+ returnDouble = sqlite3_column_double(queryid, (int) columnNumber);
+
+ return (setdoublevalue (returnDouble, vreturned));
+
+} /* sqlitegetcolumndoubleverb */
+
+
+boolean sqlitegetcolumntextverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
+ long columnNumber;
+ sqlite3_stmt *queryid;
+ Handle returnH;
+ const unsigned char *column_text;
+ int columnCount;
+
+ /*
+ sqlite.getColumnText(queryid, columnNumber)
+
+ Action: Retrieve the value of the specified text-type column
+ Params: a query id and the number of the column (1 base)
+ Returns: an SQLite result code
+ Notes: do not pass the opened database ID across threads.
+
+ SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_column_text.
+ */
+
+ if (!getlongvalue (hparam1, 1, (long *) &queryid)) /* Get the long value, which becomes the pline pointer */
+ return (false);
+
+ flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
+
+ /* Enter the verb, convert the param to null-terminated string */
+ if (!getlongvalue (hparam1, 2, &columnNumber))
+ return (false);
+
+ /* Validate the column number */
+ if (columnNumber < 1) {
+ langerrormessage (SQLITE_COLUMN_ERROR_0);
+ return (false);
+ }
+ columnCount = sqlite3_column_count(queryid);
+ if (columnNumber > columnCount) {
+ langerrormessage (SQLITE_COLUMN_ERROR_MAX);
+ return (false);
+ }
+
+ /* Process the SQLite sequence */
+ --columnNumber; /* Frontier uses base 1, but SQLite uses a base of 0 for its column numbering */
+ column_text = sqlite3_column_text(queryid, (int) columnNumber);
+
+ /* Exit the verb, converting column_name back to Frontier handle */
+ if (!newfilledhandle ((ptrvoid) column_text, strlen (column_text), &returnH))
+ return false; /* Allocation failed */
+
+ return (setheapvalue (returnH, stringvaluetype, vreturned));
+
+} /* sqlitegetcolumntextverb */
+
+
+boolean sqlitegetcolumnverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
+ long columnNumber; /* column number */
+ sqlite3_stmt *queryid; /* query id */
+ int returnCode; /* return code from SQLite call */
+ double returnDouble; /* double value returned from SQLite call */
+ Handle returnH;
+ int columnCount;
+ const unsigned char *column_text;
+ /* const unsigned char *column_blob; */
+
+ /*
+ sqlite.getColumn(queryid, columnNumber)
+
+ Action: Retrieve the value of the specified column element
+ Params: a query id and the number of the column (1 base)
+ Returns: an SQLite result code
+ Notes: do not pass the opened database ID across threads.
+ this implementation does not support blobs. If a blob column is requested, 0 is returned.
+ */
+
+ if (!getlongvalue (hparam1, 1, (long *) &queryid)) /* Get the long value, which becomes the queryid pointer */
+ return (false);
+
+ flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
+
+ /* Enter the verb, convert the param to null-terminated string */
+ if (!getlongvalue (hparam1, 2, &columnNumber))
+ return (false);
+
+ /* Validate the column number */
+ if (columnNumber < 1) {
+ langerrormessage (SQLITE_COLUMN_ERROR_0);
+ return (false);
+ }
+ columnCount = sqlite3_column_count(queryid);
+ if (columnNumber > columnCount) {
+ langerrormessage (SQLITE_COLUMN_ERROR_MAX);
+ return (false);
+ }
+
+ /* Process the SQLite sequence */
+ --columnNumber; /* Frontier uses base 1, but SQLite uses a base of 0 for its column numbering */
+ returnCode = sqlite3_column_type(queryid, (int) columnNumber);
+
+ switch(returnCode) {
+
+ case SQLITE_INTEGER: {
+ returnCode = sqlite3_column_int(queryid, (int) columnNumber);
+ return (setlongvalue ((long) returnCode, vreturned));
+ }
+ case SQLITE_FLOAT: {
+ returnDouble = sqlite3_column_double(queryid, (int) columnNumber);
+ return (setdoublevalue (returnDouble, vreturned));
+ }
+ case SQLITE_TEXT: {
+ column_text = sqlite3_column_text(queryid, (int) columnNumber);
+
+ /* Exit the verb, converting column_name back to Frontier handle */
+ if (!newfilledhandle ((ptrvoid) column_text, strlen (column_text), &returnH))
+ return false; /* Allocation failed */
+ return (setheapvalue (returnH, stringvaluetype, vreturned));
+ }
+ case SQLITE_BLOB: {
+ return (setlongvalue ((long) 0, vreturned));
+
+ /* The following code is ignored. Andre suggested returning actual binary
+ data to Frontier, but I'm concerned about reliability, moving that data
+ back and forth, so in this implementation, I'm explicitly making blob
+ data not supported -- DG */
+
+ // column_blob = sqlite3_column_blob(queryid, (int) columnNumber);
+
+ /* Exit the verb, converting column_name back to Frontier handle */
+ //if (!newfilledhandle ((ptrvoid) column_blob, strlen (column_blob), &returnH))
+ // return false; /* Allocation failed */
+ //return (setbinaryvalue (returnH, '\?\?\?\?', vreturned));
+ }
+ case SQLITE_NULL: {
+ return (setlongvalue ((long) 0, vreturned));
+ }
+ default: {
+ /* SQLite spec says sqlite3_column_type only returns the above 5 types. But,
+ just in case it lied, we'll return an error type to help Frontier avoid
+ getting a case of return value indigestion. */
+ langerrormessage ("\x29""SQLite returned an undefined column type.");
+ return (false);
+ }
+ } /* switch */
+
+} /* sqlitegetcolumn */
+
+
+boolean sqlitegetrowverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
+ long columnNumber; /* column number */
+ int columnCount; /* number of columns */
+ sqlite3_stmt *queryid; /* query id */
+ int returnCode; /* return code from SQLite call */
+ double returnDouble; /* double value returned from SQLite call */
+ Handle returnH;
+ const unsigned char *column_text;
+ hdllistrecord hlist;
+ tyvaluerecord val;
+
+ /*
+ sqlite.getRow(queryid)
+
+ Action: Retrieve a row as a list
+ Params: a query id
+ Returns: an SQLite result code
+ Notes: do not pass the opened database ID across threads.
+ this implementation does not support blobs. If a blob column is requested, 0 is returned.
+ */
+
+ flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
+
+ if (!getlongvalue (hparam1, 1, (long *) &queryid)) /* Get the long value, which becomes the queryid pointer */
+ return (false);
+
+ /* Process the SQLite sequence */
+ columnCount = sqlite3_column_count(queryid); /* first, figure out how many columns we've got */
+
+ if (columnCount == 0) {
+ langerrormessage ("\x2F""SQLite.getRow requires a minimum of one column.");
+ return (false);
+ }
+
+ if (!opnewlist (&hlist, false)) /* fail out if we can't create the list */
+ return (false);
+
+ for (columnNumber = 0 ; columnNumber < columnCount ; ++columnNumber) {
+
+ returnCode = sqlite3_column_type(queryid, (int) columnNumber);
+
+ switch(returnCode) {
+
+ case SQLITE_INTEGER: {
+ returnCode = sqlite3_column_int(queryid, (int) columnNumber);
+ if (!langpushlistlong (hlist, (long) returnCode))
+ goto error;
+ break;
+ }
+ case SQLITE_FLOAT: {
+ returnDouble = sqlite3_column_double(queryid, (int) columnNumber);
+ if (!setdoublevalue (returnDouble, &val))
+ goto error;
+ if (!langpushlistval (hlist, nil, &val))
+ goto error;
+ break;
+ }
+ case SQLITE_TEXT: {
+ column_text = sqlite3_column_text(queryid, (int) columnNumber);
+
+ /* Exit the verb, converting column_name back to Frontier handle */
+ if (!newfilledhandle ((ptrvoid) column_text, strlen (column_text), &returnH))
+ return false; /* Allocation failed */
+ if (!setheapvalue (returnH, stringvaluetype, &val)) /* convert handle to value */
+ goto error;
+ if (!langpushlistval (hlist, nil, &val))
+ goto error;
+ break;
+ }
+ case SQLITE_BLOB: {
+ if (!langpushlistlong (hlist, (long) 0))
+ goto error;
+ break;
+ }
+ case SQLITE_NULL: {
+ if (!langpushlistlong (hlist, (long) 0))
+ goto error;
+ break;
+ }
+ default: {
+ /* SQLite spec says sqlite3_column_type only returns the above 5 types. But,
+ just in case it lied, this time we return a 0, so the rest of the fields
+ can be read properly. */
+ if (!langpushlistlong (hlist, (long) 0))
+ goto error;
+ }
+ } /* switch */
+ } /* for */
+
+ return (setheapvalue ((Handle) hlist, listvaluetype, vreturned));
+
+ error: {
+ opdisposelist (hlist);
+ return (false);
+ }
+
+} /* sqlitegetrow */
+
+
+boolean sqlitegeterrormessageverb (hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) {
+ const char *sqliteError; /* pointer to the error message */
+ sqlite3 *db; /* the SQLite database handle */
+ Handle returnH = nil; /* The handle being returned back to Frontier */
+
+ /*
+ Frontier verb: sqlite.getErrorMessage(dbfile)
+
+ Returns the error message for the most recent SQLite API call.
+ Takes a database ID.
+ Returns a string containing the error message.
+ NOTE: do not pass the opened database ID across threads.
+
+ SQLite docs: http://www.sqlite.org/capi3ref.html#sqlite3_errmsg.
+ */
+
+ flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */
+
+ if (!getlongvalue (hparam1, 1, (long *) &db)) /* Get the long value, which becomes the db pointer */
+ return (false);
+
+ /* Process the SQLite sequence */
+ sqliteError = sqlite3_errmsg(db);
+
+ /* Exit the verb, converting errMsg back to Frontier handle */
+ if(!newfilledhandle ((ptrvoid) sqliteError, strlen (sqliteError), &returnH))
+ return false; /* Allocation failed */
+
+ return (setheapvalue (returnH, stringvaluetype, vreturned));
+
+} /* sqlitegeterrormessageverb */
+
Modified: Frontier/branches/mysql/Common/source/shell.c
===================================================================
--- Frontier/branches/mysql/Common/source/shell.c 2007-04-08 19:56:45 UTC (rev 1647)
+++ Frontier/branches/mysql/Common/source/shell.c 2007-04-08 22:21:08 UTC (rev 1648)
@@ -1315,6 +1315,8 @@
htmlinitverbs ();
sqliteinitverbs (); /* 2006-03-15 gewirtz: langsqlite.c */
+
+ mysqlinitverbs (); /* 2007-04-08 gewirtz: langmysql.c */
#ifdef flregexpverbs
regexpinitverbs (); /* 2003-04-23 AR: langregexp.c */
Modified: Frontier/branches/mysql/build_VC2K5/Frontier.vcproj
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dav...@us...> - 2007-04-08 19:56:45
|
Revision: 1647
http://svn.sourceforge.net/frontierkernel/?rev=1647&view=rev
Author: davidgewirtz
Date: 2007-04-08 12:56:45 -0700 (Sun, 08 Apr 2007)
Log Message:
-----------
Checking in MySQL library structure. MySQL 5.0.37 downloaded from http://dev.mysql.com/downloads/mysql/5.0.html#win32.
Added Paths:
-----------
Frontier/branches/mysql/Common/MySQL/
Frontier/branches/mysql/Common/MySQL/include/
Frontier/branches/mysql/Common/MySQL/include/config-netware.h
Frontier/branches/mysql/Common/MySQL/include/config-win.h
Frontier/branches/mysql/Common/MySQL/include/errmsg.h
Frontier/branches/mysql/Common/MySQL/include/libmysql.def
Frontier/branches/mysql/Common/MySQL/include/m_ctype.h
Frontier/branches/mysql/Common/MySQL/include/m_string.h
Frontier/branches/mysql/Common/MySQL/include/my_alloc.h
Frontier/branches/mysql/Common/MySQL/include/my_dbug.h
Frontier/branches/mysql/Common/MySQL/include/my_getopt.h
Frontier/branches/mysql/Common/MySQL/include/my_global.h
Frontier/branches/mysql/Common/MySQL/include/my_list.h
Frontier/branches/mysql/Common/MySQL/include/my_pthread.h
Frontier/branches/mysql/Common/MySQL/include/my_sys.h
Frontier/branches/mysql/Common/MySQL/include/mysql.h
Frontier/branches/mysql/Common/MySQL/include/mysql_com.h
Frontier/branches/mysql/Common/MySQL/include/mysql_embed.h
Frontier/branches/mysql/Common/MySQL/include/mysql_time.h
Frontier/branches/mysql/Common/MySQL/include/mysql_version.h
Frontier/branches/mysql/Common/MySQL/include/mysqld_ername.h
Frontier/branches/mysql/Common/MySQL/include/mysqld_error.h
Frontier/branches/mysql/Common/MySQL/include/raid.h
Frontier/branches/mysql/Common/MySQL/include/typelib.h
Frontier/branches/mysql/Common/MySQL/lib/
Frontier/branches/mysql/Common/MySQL/lib/debug/
Frontier/branches/mysql/Common/MySQL/lib/debug/libmysql.dll
Frontier/branches/mysql/Common/MySQL/lib/debug/libmysql.lib
Frontier/branches/mysql/Common/MySQL/lib/debug/mysqlclient.lib
Frontier/branches/mysql/Common/MySQL/lib/debug/mysys.lib
Frontier/branches/mysql/Common/MySQL/lib/debug/regex.lib
Frontier/branches/mysql/Common/MySQL/lib/debug/strings.lib
Frontier/branches/mysql/Common/MySQL/lib/debug/zlib.lib
Frontier/branches/mysql/Common/MySQL/lib/opt/
Frontier/branches/mysql/Common/MySQL/lib/opt/libmysql.dll
Frontier/branches/mysql/Common/MySQL/lib/opt/libmysql.lib
Frontier/branches/mysql/Common/MySQL/lib/opt/mysqlclient.lib
Frontier/branches/mysql/Common/MySQL/lib/opt/mysys-nt.lib
Frontier/branches/mysql/Common/MySQL/lib/opt/regex.lib
Frontier/branches/mysql/Common/MySQL/lib/opt/strings.lib
Frontier/branches/mysql/Common/MySQL/lib/opt/zlib.lib
Added: Frontier/branches/mysql/Common/MySQL/include/config-netware.h
===================================================================
--- Frontier/branches/mysql/Common/MySQL/include/config-netware.h (rev 0)
+++ Frontier/branches/mysql/Common/MySQL/include/config-netware.h 2007-04-08 19:56:45 UTC (rev 1647)
@@ -0,0 +1,141 @@
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+
+/* Header for NetWare compatible with MySQL */
+
+#ifndef _config_netware_h
+#define _config_netware_h
+
+/* required headers */
+#include <unistd.h>
+#include <stdio.h>
+#include <errno.h>
+#include <screen.h>
+#include <limits.h>
+#include <signal.h>
+#include <errno.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <time.h>
+#include <sys/time.h>
+#include <pthread.h>
+#include <termios.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* required adjustments */
+#undef HAVE_READDIR_R
+#undef HAVE_RWLOCK_INIT
+#undef HAVE_SCHED_H
+#undef HAVE_SYS_MMAN_H
+#undef HAVE_SYNCH_H
+#undef HAVE_MMAP
+#undef HAVE_RINT
+
+#define HAVE_PTHREAD_ATTR_SETSTACKSIZE 1
+#define HAVE_PTHREAD_SIGMASK 1
+#define HAVE_PTHREAD_YIELD_ZERO_ARG 1
+#define HAVE_BROKEN_REALPATH 1
+
+/* changes made to make use of LibC-June-2004 for building purpose */
+#undef HAVE_POSIX_SIGNALS
+#undef HAVE_PTHREAD_ATTR_SETSCOPE
+#undef HAVE_ALLOC_A
+#undef HAVE_FINITE
+#undef HAVE_GETPWNAM
+#undef HAVE_GETPWUID
+#undef HAVE_PTHREAD_SETSCHEDPARAM
+#undef HAVE_READLINK
+#undef HAVE_STPCPY
+/* changes end */
+
+/* no libc crypt() function */
+#ifdef HAVE_OPENSSL
+ #define HAVE_CRYPT 1
+#else
+ #undef HAVE_CRYPT
+#endif /* HAVE_OPENSSL */
+
+/* Netware has an ancient zlib */
+#undef HAVE_COMPRESS
+#define HAVE_COMPRESS
+#undef HAVE_ARCHIVE_DB
+
+/* include the old function apis */
+#define USE_OLD_FUNCTIONS 1
+
+/* no case sensitivity */
+#define FN_NO_CASE_SENCE 1
+
+/* the thread alarm is not used */
+#define DONT_USE_THR_ALARM 1
+
+/* signals do not interrupt sockets */
+#define SIGNALS_DONT_BREAK_READ 1
+
+/* signal by closing the sockets */
+#define SIGNAL_WITH_VIO_CLOSE 1
+
+/* On NetWare, stack grows towards lower address*/
+#define STACK_DIRECTION -1
+
+/* On NetWare, we need to set stack size for threads, otherwise default 16K is used */
+#define NW_THD_STACKSIZE 65536
+
+/* On NetWare, to fix the problem with the deletion of open files */
+#define CANT_DELETE_OPEN_FILES 1
+
+#define FN_LIBCHAR '\\'
+#define FN_ROOTDIR "\\"
+#define FN_DEVCHAR ':'
+
+/* default directory information */
+#define DEFAULT_MYSQL_HOME "sys:/mysql"
+#define PACKAGE "mysql"
+#define DEFAULT_BASEDIR "sys:/"
+#define SHAREDIR "share/"
+#define DEFAULT_CHARSET_HOME "sys:/mysql/"
+#define DATADIR "data/"
+
+/* 64-bit file system calls */
+#define SIZEOF_OFF_T 8
+#define off_t off64_t
+#define chsize chsize64
+#define ftruncate ftruncate64
+#define lseek lseek64
+#define pread pread64
+#define pwrite pwrite64
+#define tell tell64
+
+/* do not use the extended time in LibC sys\stat.h */
+#define _POSIX_SOURCE
+
+/* Some macros for portability */
+
+#define set_timespec(ABSTIME,SEC) { (ABSTIME).tv_sec=time(NULL)+(SEC); (ABSTIME).tv_nsec=0; }
+
+/* extra protection against CPU Hogs on NetWare */
+#define NETWARE_YIELD pthread_yield()
+/* Screen mode for help texts */
+#define NETWARE_SET_SCREEN_MODE(A) setscreenmode(A)
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _config_netware_h */
Added: Frontier/branches/mysql/Common/MySQL/include/config-win.h
===================================================================
--- Frontier/branches/mysql/Common/MySQL/include/config-win.h (rev 0)
+++ Frontier/branches/mysql/Common/MySQL/include/config-win.h 2007-04-08 19:56:45 UTC (rev 1647)
@@ -0,0 +1,473 @@
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+
+/* Defines for Win32 to make it compatible for MySQL */
+
+#ifdef __WIN2000__
+/* We have to do this define before including windows.h to get the AWE API
+functions */
+#define _WIN32_WINNT 0x0500
+#endif
+
+#if defined(_MSC_VER) && _MSC_VER >= 1400
+/* Avoid endless warnings about sprintf() etc. being unsafe. */
+#define _CRT_SECURE_NO_DEPRECATE 1
+#endif
+
+#include <sys/locking.h>
+#include <windows.h>
+#include <math.h> /* Because of rint() */
+#include <fcntl.h>
+#include <io.h>
+#include <malloc.h>
+
+#define HAVE_SMEM 1
+
+#if defined(_WIN64) || defined(WIN64)
+#define SYSTEM_TYPE "Win64"
+#elif defined(_WIN32) || defined(WIN32)
+#define SYSTEM_TYPE "Win32"
+#else
+#define SYSTEM_TYPE "Windows"
+#endif
+
+#if defined(_M_IA64)
+#define MACHINE_TYPE "ia64"
+#elif defined(_M_IX86)
+#define MACHINE_TYPE "ia32"
+#elif defined(_M_ALPHA)
+#define MACHINE_TYPE "axp"
+#else
+#define MACHINE_TYPE "unknown" /* Define to machine type name */
+#endif
+
+#if !(defined(_WIN64) || defined(WIN64))
+#ifndef _WIN32
+#define _WIN32 /* Compatible with old source */
+#endif
+#ifndef __WIN32__
+#define __WIN32__
+#endif
+#endif /* _WIN64 */
+#ifndef __WIN__
+#define __WIN__ /* To make it easier in VC++ */
+#endif
+
+#ifndef MAX_INDEXES
+#define MAX_INDEXES 64
+#endif
+
+/* File and lock constants */
+#define O_SHARE 0x1000 /* Open file in sharing mode */
+#ifdef __BORLANDC__
+#define F_RDLCK LK_NBLCK /* read lock */
+#define F_WRLCK LK_NBRLCK /* write lock */
+#define F_UNLCK LK_UNLCK /* remove lock(s) */
+#else
+#define F_RDLCK _LK_NBLCK /* read lock */
+#define F_WRLCK _LK_NBRLCK /* write lock */
+#define F_UNLCK _LK_UNLCK /* remove lock(s) */
+#endif
+
+#define F_EXCLUSIVE 1 /* We have only exclusive locking */
+#define F_TO_EOF (INT_MAX32/2) /* size for lock of all file */
+#define F_OK 0 /* parameter to access() */
+#define W_OK 2
+
+#define S_IROTH S_IREAD /* for my_lib */
+
+#ifdef __BORLANDC__
+#define FILE_BINARY O_BINARY /* my_fopen in binary mode */
+#define O_TEMPORARY 0
+#define O_SHORT_LIVED 0
+#define SH_DENYNO _SH_DENYNO
+#else
+#define O_BINARY _O_BINARY /* compability with MSDOS */
+#define FILE_BINARY _O_BINARY /* my_fopen in binary mode */
+#define O_TEMPORARY _O_TEMPORARY
+#define O_SHORT_LIVED _O_SHORT_LIVED
+#define SH_DENYNO _SH_DENYNO
+#endif
+#define NO_OPEN_3 /* For my_create() */
+
+#define SIGQUIT SIGTERM /* No SIGQUIT */
+
+#undef _REENTRANT /* Crashes something for win32 */
+#undef SAFE_MUTEX /* Can't be used on windows */
+
+#if defined(_MSC_VER) && _MSC_VER >= 1310
+#define LL(A) A##ll
+#define ULL(A) A##ull
+#else
+#define LL(A) ((__int64) A)
+#define ULL(A) ((unsigned __int64) A)
+#endif
+
+#define LONGLONG_MIN LL(0x8000000000000000)
+#define LONGLONG_MAX LL(0x7FFFFFFFFFFFFFFF)
+#define ULONGLONG_MAX ULL(0xFFFFFFFFFFFFFFFF)
+
+/* Type information */
+
+#if defined(__EMX__) || !defined(HAVE_UINT)
+#undef HAVE_UINT
+#define HAVE_UINT
+typedef unsigned short ushort;
+typedef unsigned int uint;
+#endif /* defined(__EMX__) || !defined(HAVE_UINT) */
+
+typedef unsigned __int64 ulonglong; /* Microsofts 64 bit types */
+typedef __int64 longlong;
+#ifndef HAVE_SIGSET_T
+typedef int sigset_t;
+#endif
+#define longlong_defined
+/*
+ off_t should not be __int64 because of conflicts in header files;
+ Use my_off_t or os_off_t instead
+*/
+#ifndef HAVE_OFF_T
+typedef long off_t;
+#endif
+typedef __int64 os_off_t;
+#ifdef _WIN64
+typedef UINT_PTR rf_SetTimer;
+#else
+#ifndef HAVE_SIZE_T
+typedef unsigned int size_t;
+#endif
+typedef uint rf_SetTimer;
+#endif
+
+#define Socket_defined
+#define my_socket SOCKET
+#define bool BOOL
+#define SIGPIPE SIGINT
+#define RETQSORTTYPE void
+#define QSORT_TYPE_IS_VOID
+#define RETSIGTYPE void
+#define SOCKET_SIZE_TYPE int
+#define my_socket_defined
+#define bool_defined
+#define byte_defined
+#define HUGE_PTR
+#define STDCALL __stdcall /* Used by libmysql.dll */
+#define isnan(X) _isnan(X)
+#define finite(X) _finite(X)
+
+#ifndef UNDEF_THREAD_HACK
+#define THREAD
+#endif
+#define VOID_SIGHANDLER
+#define SIZEOF_CHAR 1
+#define SIZEOF_LONG 4
+#define SIZEOF_LONG_LONG 8
+#define SIZEOF_OFF_T 8
+#ifdef _WIN64
+#define SIZEOF_CHARP 8
+#else
+#define SIZEOF_CHARP 4
+#endif
+#define HAVE_BROKEN_NETINET_INCLUDES
+#ifdef __NT__
+#define HAVE_NAMED_PIPE /* We can only create pipes on NT */
+#endif
+
+/* ERROR is defined in wingdi.h */
+#undef ERROR
+
+/* We need to close files to break connections on shutdown */
+#ifndef SIGNAL_WITH_VIO_CLOSE
+#define SIGNAL_WITH_VIO_CLOSE
+#endif
+
+/* Use all character sets in MySQL */
+#define USE_MB 1
+#define USE_MB_IDENT 1
+#define USE_STRCOLL 1
+
+/* All windows servers should support .sym files */
+#undef USE_SYMDIR
+#define USE_SYMDIR
+
+/* If LOAD DATA LOCAL INFILE should be enabled by default */
+#define ENABLED_LOCAL_INFILE 1
+
+/* If query profiling should be enabled by default */
+#define ENABLED_PROFILING 1
+
+/* Convert some simple functions to Posix */
+
+#define my_sigset(A,B) signal((A),(B))
+#define finite(A) _finite(A)
+#define sleep(A) Sleep((A)*1000)
+#define popen(A,B) _popen((A),(B))
+#define pclose(A) _pclose(A)
+
+#ifndef __BORLANDC__
+#define access(A,B) _access(A,B)
+#endif
+
+#if !defined(__cplusplus)
+#define inline __inline
+#endif /* __cplusplus */
+
+inline double rint(double nr)
+{
+ double f = floor(nr);
+ double c = ceil(nr);
+ return (((c-nr) >= (nr-f)) ? f :c);
+}
+
+#ifdef _WIN64
+#define ulonglong2double(A) ((double) (ulonglong) (A))
+#define my_off_t2double(A) ((double) (my_off_t) (A))
+
+#else
+inline double ulonglong2double(ulonglong value)
+{
+ longlong nr=(longlong) value;
+ if (nr >= 0)
+ return (double) nr;
+ return (18446744073709551616.0 + (double) nr);
+}
+#define my_off_t2double(A) ulonglong2double(A)
+#endif /* _WIN64 */
+
+#if SIZEOF_OFF_T > 4
+#define lseek(A,B,C) _lseeki64((A),(longlong) (B),(C))
+#define tell(A) _telli64(A)
+#endif
+
+
+#define STACK_DIRECTION -1
+
+/* Optimized store functions for Intel x86 */
+
+#ifndef _WIN64
+#define sint2korr(A) (*((int16 *) (A)))
+#define sint3korr(A) ((int32) ((((uchar) (A)[2]) & 128) ? \
+ (((uint32) 255L << 24) | \
+ (((uint32) (uchar) (A)[2]) << 16) |\
+ (((uint32) (uchar) (A)[1]) << 8) | \
+ ((uint32) (uchar) (A)[0])) : \
+ (((uint32) (uchar) (A)[2]) << 16) |\
+ (((uint32) (uchar) (A)[1]) << 8) | \
+ ((uint32) (uchar) (A)[0])))
+#define sint4korr(A) (*((long *) (A)))
+#define uint2korr(A) (*((uint16 *) (A)))
+/*
+ ATTENTION !
+
+ Please, note, uint3korr reads 4 bytes (not 3) !
+ It means, that you have to provide enough allocated space !
+*/
+#define uint3korr(A) (long) (*((unsigned int *) (A)) & 0xFFFFFF)
+#define uint4korr(A) (*((unsigned long *) (A)))
+#define uint5korr(A) ((ulonglong)(((uint32) ((uchar) (A)[0])) +\
+ (((uint32) ((uchar) (A)[1])) << 8) +\
+ (((uint32) ((uchar) (A)[2])) << 16) +\
+ (((uint32) ((uchar) (A)[3])) << 24)) +\
+ (((ulonglong) ((uchar) (A)[4])) << 32))
+#define uint8korr(A) (*((ulonglong *) (A)))
+#define sint8korr(A) (*((longlong *) (A)))
+#define int2store(T,A) *((uint16*) (T))= (uint16) (A)
+#define int3store(T,A) { *(T)= (uchar) ((A));\
+ *(T+1)=(uchar) (((uint) (A) >> 8));\
+ *(T+2)=(uchar) (((A) >> 16)); }
+#define int4store(T,A) *((long *) (T))= (long) (A)
+#define int5store(T,A) { *(T)= (uchar)((A));\
+ *((T)+1)=(uchar) (((A) >> 8));\
+ *((T)+2)=(uchar) (((A) >> 16));\
+ *((T)+3)=(uchar) (((A) >> 24)); \
+ *((T)+4)=(uchar) (((A) >> 32)); }
+#define int8store(T,A) *((ulonglong *) (T))= (ulonglong) (A)
+
+#define doubleget(V,M) do { *((long *) &V) = *((long*) M); \
+ *(((long *) &V)+1) = *(((long*) M)+1); } while(0)
+#define doublestore(T,V) do { *((long *) T) = *((long*) &V); \
+ *(((long *) T)+1) = *(((long*) &V)+1); } while(0)
+#define float4get(V,M) { *((long *) &(V)) = *((long*) (M)); }
+#define floatstore(T,V) memcpy((byte*)(T), (byte*)(&V), sizeof(float))
+#define floatget(V,M) memcpy((byte*)(&V), (byte*)(M), sizeof(float))
+#define float8get(V,M) doubleget((V),(M))
+#define float4store(V,M) memcpy((byte*) V,(byte*) (&M),sizeof(float))
+#define float8store(V,M) doublestore((V),(M))
+#endif /* _WIN64 */
+
+#define HAVE_PERROR
+#define HAVE_VFPRINT
+#define HAVE_RENAME /* Have rename() as function */
+#define HAVE_BINARY_STREAMS /* Have "b" flag in streams */
+#define HAVE_LONG_JMP /* Have long jump function */
+#define HAVE_LOCKING /* have locking() call */
+#define HAVE_ERRNO_AS_DEFINE /* errno is a define */
+#define HAVE_STDLIB /* everything is include in this file */
+#define HAVE_MEMCPY
+#define HAVE_MEMMOVE
+#define HAVE_GETCWD
+#define HAVE_TELL
+#define HAVE_TZNAME
+#define HAVE_PUTENV
+#define HAVE_SELECT
+#define HAVE_SETLOCALE
+#define HAVE_SOCKET /* Giangi */
+#define HAVE_FLOAT_H
+#define HAVE_LIMITS_H
+#define HAVE_STDDEF_H
+#define HAVE_RINT /* defined in this file */
+#define NO_FCNTL_NONBLOCK /* No FCNTL */
+#define HAVE_ALLOCA
+#define HAVE_STRPBRK
+#define HAVE_STRSTR
+#define HAVE_COMPRESS
+#define HAVE_CREATESEMAPHORE
+#define HAVE_ISNAN
+#define HAVE_FINITE
+#define HAVE_QUERY_CACHE
+#define SPRINTF_RETURNS_INT
+#define HAVE_SETFILEPOINTER
+#define HAVE_VIO_READ_BUFF
+#define HAVE_STRNLEN
+
+#ifndef __NT__
+#undef FILE_SHARE_DELETE
+#define FILE_SHARE_DELETE 0 /* Not implemented on Win 98/ME */
+#endif
+
+#ifdef NOT_USED
+#define HAVE_SNPRINTF /* Gave link error */
+#define _snprintf snprintf
+#endif
+
+#ifdef _MSC_VER
+#define HAVE_LDIV /* The optimizer breaks in zortech for ldiv */
+#define HAVE_ANSI_INCLUDE
+#define HAVE_SYS_UTIME_H
+#define HAVE_STRTOUL
+#endif
+#define my_reinterpret_cast(A) reinterpret_cast <A>
+#define my_const_cast(A) const_cast<A>
+
+
+/* MYSQL OPTIONS */
+
+#ifdef _CUSTOMCONFIG_
+#include <custom_conf.h>
+#else
+#define DEFAULT_MYSQL_HOME "c:\\mysql"
+#define DATADIR "c:\\mysql\\data"
+#define PACKAGE "mysql"
+#define DEFAULT_BASEDIR "C:\\"
+#define SHAREDIR "share"
+#define DEFAULT_CHARSET_HOME "C:/mysql/"
+#endif
+#ifndef DEFAULT_HOME_ENV
+#define DEFAULT_HOME_ENV MYSQL_HOME
+#endif
+#ifndef DEFAULT_GROUP_SUFFIX_ENV
+#define DEFAULT_GROUP_SUFFIX_ENV MYSQL_GROUP_SUFFIX
+#endif
+
+/* File name handling */
+
+#define FN_LIBCHAR '\\'
+#define FN_ROOTDIR "\\"
+#define FN_DEVCHAR ':'
+#define FN_NETWORK_DRIVES /* Uses \\ to indicate network drives */
+#define FN_NO_CASE_SENCE /* Files are not case-sensitive */
+#define OS_FILE_LIMIT 2048
+
+#define DO_NOT_REMOVE_THREAD_WRAPPERS
+#define thread_safe_increment(V,L) InterlockedIncrement((long*) &(V))
+#define thread_safe_decrement(V,L) InterlockedDecrement((long*) &(V))
+/* The following is only used for statistics, so it should be good enough */
+#ifdef __NT__ /* This should also work on Win98 but .. */
+#define thread_safe_add(V,C,L) InterlockedExchangeAdd((long*) &(V),(C))
+#define thread_safe_sub(V,C,L) InterlockedExchangeAdd((long*) &(V),-(long) (C))
+#define statistic_add(V,C,L) thread_safe_add((V),(C),(L))
+#else
+#define thread_safe_add(V,C,L) \
+ pthread_mutex_lock((L)); (V)+=(C); pthread_mutex_unlock((L));
+#define thread_safe_sub(V,C,L) \
+ pthread_mutex_lock((L)); (V)-=(C); pthread_mutex_unlock((L));
+#define statistic_add(V,C,L) (V)+=(C)
+#endif
+#define statistic_increment(V,L) thread_safe_increment((V),(L))
+#define statistic_decrement(V,L) thread_safe_decrement((V),(L))
+
+#define shared_memory_buffer_length 16000
+#define default_shared_memory_base_name "MYSQL"
+
+#ifdef CYBOZU
+#define MYSQL_DEFAULT_CHARSET_NAME "utf8"
+#define MYSQL_DEFAULT_COLLATION_NAME "utf8_general_cs"
+#define HAVE_UTF8_GENERAL_CS 1
+#else
+#define MYSQL_DEFAULT_CHARSET_NAME "latin1"
+#define MYSQL_DEFAULT_COLLATION_NAME "latin1_swedish_ci"
+#endif
+
+#define HAVE_SPATIAL 1
+#define HAVE_RTREE_KEYS 1
+
+#define HAVE_OPENSSL 1
+#define HAVE_YASSL 1
+
+/* Define charsets you want */
+/* #undef HAVE_CHARSET_armscii8 */
+/* #undef HAVE_CHARSET_ascii */
+#ifndef CYBOZU
+#define HAVE_CHARSET_big5 1
+#define HAVE_CHARSET_cp1250 1
+#endif
+/* #undef HAVE_CHARSET_cp1251 */
+/* #undef HAVE_CHARSET_cp1256 */
+/* #undef HAVE_CHARSET_cp1257 */
+/* #undef HAVE_CHARSET_cp850 */
+/* #undef HAVE_CHARSET_cp852 */
+/* #undef HAVE_CHARSET_cp866 */
+#define HAVE_CHARSET_cp932 1
+/* #undef HAVE_CHARSET_dec8 */
+#ifndef CYBOZU
+#define HAVE_CHARSET_eucjpms 1
+#define HAVE_CHARSET_euckr 1
+#define HAVE_CHARSET_gb2312 1
+#define HAVE_CHARSET_gbk 1
+#endif
+/* #undef HAVE_CHARSET_greek */
+/* #undef HAVE_CHARSET_hebrew */
+/* #undef HAVE_CHARSET_hp8 */
+/* #undef HAVE_CHARSET_keybcs2 */
+/* #undef HAVE_CHARSET_koi8r */
+/* #undef HAVE_CHARSET_koi8u */
+#ifndef CYBOZU
+#define HAVE_CHARSET_latin1 1
+#define HAVE_CHARSET_latin2 1
+#endif
+/* #undef HAVE_CHARSET_latin5 */
+/* #undef HAVE_CHARSET_latin7 */
+/* #undef HAVE_CHARSET_macce */
+/* #undef HAVE_CHARSET_macroman */
+#define HAVE_CHARSET_sjis 1
+/* #undef HAVE_CHARSET_swe7 */
+#ifndef CYBOZU
+#define HAVE_CHARSET_tis620 1
+#define HAVE_CHARSET_ucs2 1
+#define HAVE_CHARSET_ujis 1
+#endif
+#define HAVE_CHARSET_utf8 1
+#define HAVE_UCA_COLLATIONS 1
+
Added: Frontier/branches/mysql/Common/MySQL/include/errmsg.h
===================================================================
--- Frontier/branches/mysql/Common/MySQL/include/errmsg.h (rev 0)
+++ Frontier/branches/mysql/Common/MySQL/include/errmsg.h 2007-04-08 19:56:45 UTC (rev 1647)
@@ -0,0 +1,102 @@
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+
+/* Error messages for MySQL clients */
+/* (Error messages for the daemon are in share/language/errmsg.sys) */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+void init_client_errs(void);
+void finish_client_errs(void);
+extern const char *client_errors[]; /* Error messages */
+#ifdef __cplusplus
+}
+#endif
+
+#define CR_MIN_ERROR 2000 /* For easier client code */
+#define CR_MAX_ERROR 2999
+#if defined(OS2) && defined(MYSQL_SERVER)
+#define CER(X) client_errors[(X)-CR_MIN_ERROR]
+#elif !defined(ER)
+#define ER(X) client_errors[(X)-CR_MIN_ERROR]
+#endif
+#define CLIENT_ERRMAP 2 /* Errormap used by my_error() */
+
+/* Do not add error numbers before CR_ERROR_FIRST. */
+/* If necessary to add lower numbers, change CR_ERROR_FIRST accordingly. */
+#define CR_ERROR_FIRST 2000 /*Copy first error nr.*/
+#define CR_UNKNOWN_ERROR 2000
+#define CR_SOCKET_CREATE_ERROR 2001
+#define CR_CONNECTION_ERROR 2002
+#define CR_CONN_HOST_ERROR 2003
+#define CR_IPSOCK_ERROR 2004
+#define CR_UNKNOWN_HOST 2005
+#define CR_SERVER_GONE_ERROR 2006
+#define CR_VERSION_ERROR 2007
+#define CR_OUT_OF_MEMORY 2008
+#define CR_WRONG_HOST_INFO 2009
+#define CR_LOCALHOST_CONNECTION 2010
+#define CR_TCP_CONNECTION 2011
+#define CR_SERVER_HANDSHAKE_ERR 2012
+#define CR_SERVER_LOST 2013
+#define CR_COMMANDS_OUT_OF_SYNC 2014
+#define CR_NAMEDPIPE_CONNECTION 2015
+#define CR_NAMEDPIPEWAIT_ERROR 2016
+#define CR_NAMEDPIPEOPEN_ERROR 2017
+#define CR_NAMEDPIPESETSTATE_ERROR 2018
+#define CR_CANT_READ_CHARSET 2019
+#define CR_NET_PACKET_TOO_LARGE 2020
+#define CR_EMBEDDED_CONNECTION 2021
+#define CR_PROBE_SLAVE_STATUS 2022
+#define CR_PROBE_SLAVE_HOSTS 2023
+#define CR_PROBE_SLAVE_CONNECT 2024
+#define CR_PROBE_MASTER_CONNECT 2025
+#define CR_SSL_CONNECTION_ERROR 2026
+#define CR_MALFORMED_PACKET 2027
+#define CR_WRONG_LICENSE 2028
+
+/* new 4.1 error codes */
+#define CR_NULL_POINTER 2029
+#define CR_NO_PREPARE_STMT 2030
+#define CR_PARAMS_NOT_BOUND 2031
+#define CR_DATA_TRUNCATED 2032
+#define CR_NO_PARAMETERS_EXISTS 2033
+#define CR_INVALID_PARAMETER_NO 2034
+#define CR_INVALID_BUFFER_USE 2035
+#define CR_UNSUPPORTED_PARAM_TYPE 2036
+
+#define CR_SHARED_MEMORY_CONNECTION 2037
+#define CR_SHARED_MEMORY_CONNECT_REQUEST_ERROR 2038
+#define CR_SHARED_MEMORY_CONNECT_ANSWER_ERROR 2039
+#define CR_SHARED_MEMORY_CONNECT_FILE_MAP_ERROR 2040
+#define CR_SHARED_MEMORY_CONNECT_MAP_ERROR 2041
+#define CR_SHARED_MEMORY_FILE_MAP_ERROR 2042
+#define CR_SHARED_MEMORY_MAP_ERROR 2043
+#define CR_SHARED_MEMORY_EVENT_ERROR 2044
+#define CR_SHARED_MEMORY_CONNECT_ABANDONED_ERROR 2045
+#define CR_SHARED_MEMORY_CONNECT_SET_ERROR 2046
+#define CR_CONN_UNKNOW_PROTOCOL 2047
+#define CR_INVALID_CONN_HANDLE 2048
+#define CR_SECURE_AUTH 2049
+#define CR_FETCH_CANCELED 2050
+#define CR_NO_DATA 2051
+#define CR_NO_STMT_METADATA 2052
+#define CR_NO_RESULT_SET 2053
+#define CR_NOT_IMPLEMENTED 2054
+#define CR_SERVER_LOST_EXTENDED 2055
+#define CR_ERROR_LAST /*Copy last error nr:*/ 2055
+/* Add error numbers before CR_ERROR_LAST and change it accordingly. */
+
Added: Frontier/branches/mysql/Common/MySQL/include/libmysql.def
===================================================================
--- Frontier/branches/mysql/Common/MySQL/include/libmysql.def (rev 0)
+++ Frontier/branches/mysql/Common/MySQL/include/libmysql.def 2007-04-08 19:56:45 UTC (rev 1647)
@@ -0,0 +1,155 @@
+LIBRARY LIBMYSQL
+DESCRIPTION 'MySQL 5.0 Client Library'
+VERSION 6.0
+EXPORTS
+ _dig_vec_lower
+ _dig_vec_upper
+ bmove_upp
+ delete_dynamic
+ free_defaults
+ getopt_compare_strings
+ getopt_ull_limit_value
+ handle_options
+ init_dynamic_array
+ insert_dynamic
+ int2str
+ is_prefix
+ list_add
+ list_delete
+ load_defaults
+ my_end
+ my_getopt_print_errors
+ my_init
+ my_malloc
+ my_memdup
+ my_no_flags_free
+ my_path
+ mysql_get_parameters
+ my_print_help
+ my_print_variables
+ my_realloc
+ my_strdup
+ mysql_thread_end
+ mysql_thread_init
+ myodbc_remove_escape
+ mysql_affected_rows
+ mysql_autocommit
+ mysql_stmt_bind_param
+ mysql_stmt_bind_result
+ mysql_change_user
+ mysql_character_set_name
+ mysql_close
+ mysql_commit
+ mysql_data_seek
+ mysql_debug
+ mysql_dump_debug_info
+ mysql_eof
+ mysql_errno
+ mysql_error
+ mysql_escape_string
+ mysql_hex_string
+ mysql_stmt_execute
+ mysql_stmt_fetch
+ mysql_stmt_fetch_column
+ mysql_fetch_field
+ mysql_fetch_field_direct
+ mysql_fetch_fields
+ mysql_fetch_lengths
+ mysql_fetch_row
+ mysql_field_count
+ mysql_field_seek
+ mysql_field_tell
+ mysql_free_result
+ mysql_get_client_info
+ mysql_get_host_info
+ mysql_get_proto_info
+ mysql_get_server_info
+ mysql_get_client_version
+ mysql_get_ssl_cipher
+ mysql_info
+ mysql_init
+ mysql_insert_id
+ mysql_kill
+ mysql_set_server_option
+ mysql_list_dbs
+ mysql_list_fields
+ mysql_list_processes
+ mysql_list_tables
+ mysql_more_results
+ mysql_next_result
+ mysql_num_fields
+ mysql_num_rows
+ mysql_odbc_escape_string
+ mysql_options
+ mysql_stmt_param_count
+ mysql_stmt_param_metadata
+ mysql_ping
+ mysql_stmt_result_metadata
+ mysql_query
+ mysql_read_query_result
+ mysql_real_connect
+ mysql_real_escape_string
+ mysql_real_query
+ mysql_refresh
+ mysql_rollback
+ mysql_row_seek
+ mysql_row_tell
+ mysql_select_db
+ mysql_stmt_send_long_data
+ mysql_send_query
+ mysql_shutdown
+ mysql_ssl_set
+ mysql_stat
+ mysql_stmt_affected_rows
+ mysql_stmt_close
+ mysql_stmt_reset
+ mysql_stmt_data_seek
+ mysql_stmt_errno
+ mysql_stmt_error
+ mysql_stmt_free_result
+ mysql_stmt_num_rows
+ mysql_stmt_row_seek
+ mysql_stmt_row_tell
+ mysql_stmt_store_result
+ mysql_store_result
+ mysql_thread_id
+ mysql_thread_safe
+ mysql_use_result
+ mysql_warning_count
+ mysql_stmt_sqlstate
+ mysql_sqlstate
+ mysql_get_server_version
+ set_dynamic
+ strcend
+ strcont
+ strdup_root
+ strfill
+ strinstr
+ strmake
+ strmov
+ strxmov
+ mysql_stmt_prepare
+ mysql_stmt_init
+ mysql_stmt_insert_id
+ mysql_stmt_attr_get
+ mysql_stmt_attr_set
+ mysql_stmt_field_count
+ client_errors
+ mysql_set_local_infile_default
+ mysql_set_local_infile_handler
+ mysql_disable_reads_from_master
+ mysql_disable_rpl_parse
+ mysql_enable_reads_from_master
+ mysql_enable_rpl_parse
+ mysql_master_query
+ mysql_rpl_parse_enabled
+ mysql_rpl_probe
+ mysql_rpl_query_type
+ mysql_slave_query
+ mysql_embedded
+ mysql_server_init
+ mysql_server_end
+ mysql_set_character_set
+ mysql_get_character_set_info
+ get_defaults_options
+ modify_defaults_file
Added: Frontier/branches/mysql/Common/MySQL/include/m_ctype.h
===================================================================
--- Frontier/branches/mysql/Common/MySQL/include/m_ctype.h (rev 0)
+++ Frontier/branches/mysql/Common/MySQL/include/m_ctype.h 2007-04-08 19:56:45 UTC (rev 1647)
@@ -0,0 +1,507 @@
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+
+/*
+ A better inplementation of the UNIX ctype(3) library.
+ Notes: my_global.h should be included before ctype.h
+*/
+
+#ifndef _m_ctype_h
+#define _m_ctype_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define MY_CS_NAME_SIZE 32
+#define MY_CS_CTYPE_TABLE_SIZE 257
+#define MY_CS_TO_LOWER_TABLE_SIZE 256
+#define MY_CS_TO_UPPER_TABLE_SIZE 256
+#define MY_CS_SORT_ORDER_TABLE_SIZE 256
+#define MY_CS_TO_UNI_TABLE_SIZE 256
+
+#define CHARSET_DIR "charsets/"
+
+#define my_wc_t ulong
+
+typedef struct unicase_info_st
+{
+ uint16 toupper;
+ uint16 tolower;
+ uint16 sort;
+} MY_UNICASE_INFO;
+
+
+extern MY_UNICASE_INFO *my_unicase_default[256];
+extern MY_UNICASE_INFO *my_unicase_turkish[256];
+
+
+/* wm_wc and wc_mb return codes */
+#define MY_CS_ILSEQ 0 /* Wrong by sequence: wb_wc */
+#define MY_CS_ILUNI 0 /* Cannot encode Unicode to charset: wc_mb */
+#define MY_CS_TOOSMALL -101 /* Need at least one byte: wc_mb and mb_wc */
+#define MY_CS_TOOSMALL2 -102 /* Need at least two bytes: wc_mb and mb_wc */
+#define MY_CS_TOOSMALL3 -103 /* Need at least three bytes: wc_mb and mb_wc */
+/* These following three are currently not really used */
+#define MY_CS_TOOSMALL4 -104 /* Need at least 4 bytes: wc_mb and mb_wc */
+#define MY_CS_TOOSMALL5 -105 /* Need at least 5 bytes: wc_mb and mb_wc */
+#define MY_CS_TOOSMALL6 -106 /* Need at least 6 bytes: wc_mb and mb_wc */
+/* A helper macros for "need at least n bytes" */
+#define MY_CS_TOOSMALLN(n) (-100-(n))
+
+#define MY_SEQ_INTTAIL 1
+#define MY_SEQ_SPACES 2
+
+ /* My charsets_list flags */
+#define MY_CS_COMPILED 1 /* compiled-in sets */
+#define MY_CS_CONFIG 2 /* sets that have a *.conf file */
+#define MY_CS_INDEX 4 /* sets listed in the Index file */
+#define MY_CS_LOADED 8 /* sets that are currently loaded */
+#define MY_CS_BINSORT 16 /* if binary sort order */
+#define MY_CS_PRIMARY 32 /* if primary collation */
+#define MY_CS_STRNXFRM 64 /* if strnxfrm is used for sort */
+#define MY_CS_UNICODE 128 /* is a charset is full unicode */
+#define MY_CS_READY 256 /* if a charset is initialized */
+#define MY_CS_AVAILABLE 512 /* If either compiled-in or loaded*/
+#define MY_CS_CSSORT 1024 /* if case sensitive sort order */
+#define MY_CHARSET_UNDEFINED 0
+
+
+typedef struct my_uni_idx_st
+{
+ uint16 from;
+ uint16 to;
+ uchar *tab;
+} MY_UNI_IDX;
+
+typedef struct
+{
+ uint beg;
+ uint end;
+ uint mblen;
+} my_match_t;
+
+enum my_lex_states
+{
+ MY_LEX_START, MY_LEX_CHAR, MY_LEX_IDENT,
+ MY_LEX_IDENT_SEP, MY_LEX_IDENT_START,
+ MY_LEX_REAL, MY_LEX_HEX_NUMBER, MY_LEX_BIN_NUMBER,
+ MY_LEX_CMP_OP, MY_LEX_LONG_CMP_OP, MY_LEX_STRING, MY_LEX_COMMENT, MY_LEX_END,
+ MY_LEX_OPERATOR_OR_IDENT, MY_LEX_NUMBER_IDENT, MY_LEX_INT_OR_REAL,
+ MY_LEX_REAL_OR_POINT, MY_LEX_BOOL, MY_LEX_EOL, MY_LEX_ESCAPE,
+ MY_LEX_LONG_COMMENT, MY_LEX_END_LONG_COMMENT, MY_LEX_SEMICOLON,
+ MY_LEX_SET_VAR, MY_LEX_USER_END, MY_LEX_HOSTNAME, MY_LEX_SKIP,
+ MY_LEX_USER_VARIABLE_DELIMITER, MY_LEX_SYSTEM_VAR,
+ MY_LEX_IDENT_OR_KEYWORD,
+ MY_LEX_IDENT_OR_HEX, MY_LEX_IDENT_OR_BIN, MY_LEX_IDENT_OR_NCHAR,
+ MY_LEX_STRING_OR_DELIMITER
+};
+
+struct charset_info_st;
+
+
+/* See strings/CHARSET_INFO.txt for information about this structure */
+typedef struct my_collation_handler_st
+{
+ my_bool (*init)(struct charset_info_st *, void *(*alloc)(uint));
+ /* Collation routines */
+ int (*strnncoll)(struct charset_info_st *,
+ const uchar *, uint, const uchar *, uint, my_bool);
+ int (*strnncollsp)(struct charset_info_st *,
+ const uchar *, uint, const uchar *, uint,
+ my_bool diff_if_only_endspace_difference);
+ int (*strnxfrm)(struct charset_info_st *,
+ uchar *, uint, const uchar *, uint);
+ uint (*strnxfrmlen)(struct charset_info_st *, uint);
+ my_bool (*like_range)(struct charset_info_st *,
+ const char *s, uint s_length,
+ pchar w_prefix, pchar w_one, pchar w_many,
+ uint res_length,
+ char *min_str, char *max_str,
+ uint *min_len, uint *max_len);
+ int (*wildcmp)(struct charset_info_st *,
+ const char *str,const char *str_end,
+ const char *wildstr,const char *wildend,
+ int escape,int w_one, int w_many);
+
+ int (*strcasecmp)(struct charset_info_st *, const char *, const char *);
+
+ uint (*instr)(struct charset_info_st *,
+ const char *b, uint b_length,
+ const char *s, uint s_length,
+ my_match_t *match, uint nmatch);
+
+ /* Hash calculation */
+ void (*hash_sort)(struct charset_info_st *cs, const uchar *key, uint len,
+ ulong *nr1, ulong *nr2);
+ my_bool (*propagate)(struct charset_info_st *cs, const uchar *str, uint len);
+} MY_COLLATION_HANDLER;
+
+extern MY_COLLATION_HANDLER my_collation_mb_bin_handler;
+extern MY_COLLATION_HANDLER my_collation_8bit_bin_handler;
+extern MY_COLLATION_HANDLER my_collation_8bit_simple_ci_handler;
+extern MY_COLLATION_HANDLER my_collation_ucs2_uca_handler;
+
+
+/* See strings/CHARSET_INFO.txt about information on this structure */
+typedef struct my_charset_handler_st
+{
+ my_bool (*init)(struct charset_info_st *, void *(*alloc)(uint));
+ /* Multibyte routines */
+ int (*ismbchar)(struct charset_info_st *, const char *, const char *);
+ int (*mbcharlen)(struct charset_info_st *, uint);
+ uint (*numchars)(struct charset_info_st *, const char *b, const char *e);
+ uint (*charpos)(struct charset_info_st *, const char *b, const char *e, uint pos);
+ uint (*well_formed_len)(struct charset_info_st *,
+ const char *b,const char *e,
+ uint nchars, int *error);
+ uint (*lengthsp)(struct charset_info_st *, const char *ptr, uint length);
+ uint (*numcells)(struct charset_info_st *, const char *b, const char *e);
+
+ /* Unicode convertion */
+ int (*mb_wc)(struct charset_info_st *cs,my_wc_t *wc,
+ const unsigned char *s,const unsigned char *e);
+ int (*wc_mb)(struct charset_info_st *cs,my_wc_t wc,
+ unsigned char *s,unsigned char *e);
+
+ /* Functions for case and sort convertion */
+ uint (*caseup_str)(struct charset_info_st *, char *);
+ uint (*casedn_str)(struct charset_info_st *, char *);
+ uint (*caseup)(struct charset_info_st *, char *src, uint srclen,
+ char *dst, uint dstlen);
+ uint (*casedn)(struct charset_info_st *, char *src, uint srclen,
+ char *dst, uint dstlen);
+
+ /* Charset dependant snprintf() */
+ int (*snprintf)(struct charset_info_st *, char *to, uint n, const char *fmt,
+ ...) ATTRIBUTE_FORMAT_FPTR(printf, 4, 5);
+ int (*long10_to_str)(struct charset_info_st *, char *to, uint n, int radix,
+ long int val);
+ int (*longlong10_to_str)(struct charset_info_st *, char *to, uint n,
+ int radix, longlong val);
+
+ void (*fill)(struct charset_info_st *, char *to, uint len, int fill);
+
+ /* String-to-number convertion routines */
+ long (*strntol)(struct charset_info_st *, const char *s, uint l,
+ int base, char **e, int *err);
+ ulong (*strntoul)(struct charset_info_st *, const char *s, uint l,
+ int base, char **e, int *err);
+ longlong (*strntoll)(struct charset_info_st *, const char *s, uint l,
+ int base, char **e, int *err);
+ ulonglong (*strntoull)(struct charset_info_st *, const char *s, uint l,
+ int base, char **e, int *err);
+ double (*strntod)(struct charset_info_st *, char *s, uint l, char **e,
+ int *err);
+ longlong (*strtoll10)(struct charset_info_st *cs,
+ const char *nptr, char **endptr, int *error);
+ ulonglong (*strntoull10rnd)(struct charset_info_st *cs,
+ const char *str, uint length, int unsigned_fl,
+ char **endptr, int *error);
+ ulong (*scan)(struct charset_info_st *, const char *b, const char *e,
+ int sq);
+} MY_CHARSET_HANDLER;
+
+extern MY_CHARSET_HANDLER my_charset_8bit_handler;
+extern MY_CHARSET_HANDLER my_charset_ucs2_handler;
+
+
+/* See strings/CHARSET_INFO.txt about information on this structure */
+typedef struct charset_info_st
+{
+ uint number;
+ uint primary_number;
+ uint binary_number;
+ uint state;
+ const char *csname;
+ const char *name;
+ const char *comment;
+ const char *tailoring;
+ uchar *ctype;
+ uchar *to_lower;
+ uchar *to_upper;
+ uchar *sort_order;
+ uint16 *contractions;
+ uint16 **sort_order_big;
+ uint16 *tab_to_uni;
+ MY_UNI_IDX *tab_from_uni;
+ MY_UNICASE_INFO **caseinfo;
+ uchar *state_map;
+ uchar *ident_map;
+ uint strxfrm_multiply;
+ uchar caseup_multiply;
+ uchar casedn_multiply;
+ uint mbminlen;
+ uint mbmaxlen;
+ uint16 min_sort_char;
+ uint16 max_sort_char; /* For LIKE optimization */
+ uchar pad_char;
+ my_bool escape_with_backslash_is_dangerous;
+
+ MY_CHARSET_HANDLER *cset;
+ MY_COLLATION_HANDLER *coll;
+
+} CHARSET_INFO;
+
+
+extern CHARSET_INFO my_charset_bin;
+extern CHARSET_INFO my_charset_big5_chinese_ci;
+extern CHARSET_INFO my_charset_big5_bin;
+extern CHARSET_INFO my_charset_cp932_japanese_ci;
+extern CHARSET_INFO my_charset_cp932_bin;
+extern CHARSET_INFO my_charset_eucjpms_japanese_ci;
+extern CHARSET_INFO my_charset_eucjpms_bin;
+extern CHARSET_INFO my_charset_euckr_korean_ci;
+extern CHARSET_INFO my_charset_euckr_bin;
+extern CHARSET_INFO my_charset_gb2312_chinese_ci;
+extern CHARSET_INFO my_charset_gb2312_bin;
+extern CHARSET_INFO my_charset_gbk_chinese_ci;
+extern CHARSET_INFO my_charset_gbk_bin;
+extern CHARSET_INFO my_charset_latin1;
+extern CHARSET_INFO my_charset_latin1_german2_ci;
+extern CHARSET_INFO my_charset_latin1_bin;
+extern CHARSET_INFO my_charset_latin2_czech_ci;
+extern CHARSET_INFO my_charset_sjis_japanese_ci;
+extern CHARSET_INFO my_charset_sjis_bin;
+extern CHARSET_INFO my_charset_tis620_thai_ci;
+extern CHARSET_INFO my_charset_tis620_bin;
+extern CHARSET_INFO my_charset_ucs2_general_ci;
+extern CHARSET_INFO my_charset_ucs2_bin;
+extern CHARSET_INFO my_charset_ucs2_general_uca;
+extern CHARSET_INFO my_charset_ujis_japanese_ci;
+extern CHARSET_INFO my_charset_ujis_bin;
+extern CHARSET_INFO my_charset_utf8_general_ci;
+extern CHARSET_INFO my_charset_utf8_bin;
+extern CHARSET_INFO my_charset_cp1250_czech_ci;
+
+/* declarations for simple charsets */
+extern int my_strnxfrm_simple(CHARSET_INFO *, uchar *, uint, const uchar *,
+ uint);
+uint my_strnxfrmlen_simple(CHARSET_INFO *, uint);
+extern int my_strnncoll_simple(CHARSET_INFO *, const uchar *, uint,
+ const uchar *, uint, my_bool);
+
+extern int my_strnncollsp_simple(CHARSET_INFO *, const uchar *, uint,
+ const uchar *, uint,
+ my_bool diff_if_only_endspace_difference);
+
+extern void my_hash_sort_simple(CHARSET_INFO *cs,
+ const uchar *key, uint len,
+ ulong *nr1, ulong *nr2);
+
+extern uint my_lengthsp_8bit(CHARSET_INFO *cs, const char *ptr, uint length);
+
+extern uint my_instr_simple(struct charset_info_st *,
+ const char *b, uint b_length,
+ const char *s, uint s_length,
+ my_match_t *match, uint nmatch);
+
+
+/* Functions for 8bit */
+extern uint my_caseup_str_8bit(CHARSET_INFO *, char *);
+extern uint my_casedn_str_8bit(CHARSET_INFO *, char *);
+extern uint my_caseup_8bit(CHARSET_INFO *, char *src, uint srclen,
+ char *dst, uint dstlen);
+extern uint my_casedn_8bit(CHARSET_INFO *, char *src, uint srclen,
+ char *dst, uint dstlen);
+
+extern int my_strcasecmp_8bit(CHARSET_INFO * cs, const char *, const char *);
+
+int my_mb_wc_8bit(CHARSET_INFO *cs,my_wc_t *wc, const uchar *s,const uchar *e);
+int my_wc_mb_8bit(CHARSET_INFO *cs,my_wc_t wc, uchar *s, uchar *e);
+
+ulong my_scan_8bit(CHARSET_INFO *cs, const char *b, const char *e, int sq);
+
+int my_snprintf_8bit(struct charset_info_st *, char *to, uint n,
+ const char *fmt, ...)
+ ATTRIBUTE_FORMAT(printf, 4, 5);
+
+long my_strntol_8bit(CHARSET_INFO *, const char *s, uint l, int base,
+ char **e, int *err);
+ulong my_strntoul_8bit(CHARSET_INFO *, const char *s, uint l, int base,
+ char **e, int *err);
+longlong my_strntoll_8bit(CHARSET_INFO *, const char *s, uint l, int base,
+ char **e, int *err);
+ulonglong my_strntoull_8bit(CHARSET_INFO *, const char *s, uint l, int base,
+ char **e, int *err);
+double my_strntod_8bit(CHARSET_INFO *, char *s, uint l,char **e,
+ int *err);
+int my_long10_to_str_8bit(CHARSET_INFO *, char *to, uint l, int radix,
+ long int val);
+int my_longlong10_to_str_8bit(CHARSET_INFO *, char *to, uint l, int radix,
+ longlong val);
+
+longlong my_strtoll10_8bit(CHARSET_INFO *cs,
+ const char *nptr, char **endptr, int *error);
+longlong my_strtoll10_ucs2(CHARSET_INFO *cs,
+ const char *nptr, char **endptr, int *error);
+
+ulonglong my_strntoull10rnd_8bit(CHARSET_INFO *cs,
+ const char *str, uint length, int unsigned_fl,
+ char **endptr, int *error);
+ulonglong my_strntoull10rnd_ucs2(CHARSET_INFO *cs,
+ const char *str, uint length, int unsigned_fl,
+ char **endptr, int *error);
+
+void my_fill_8bit(CHARSET_INFO *cs, char* to, uint l, int fill);
+
+my_bool my_like_range_simple(CHARSET_INFO *cs,
+ const char *ptr, uint ptr_length,
+ pbool escape, pbool w_one, pbool w_many,
+ uint res_length,
+ char *min_str, char *max_str,
+ uint *min_length, uint *max_length);
+
+my_bool my_like_range_mb(CHARSET_INFO *cs,
+ const char *ptr, uint ptr_length,
+ pbool escape, pbool w_one, pbool w_many,
+ uint res_length,
+ char *min_str, char *max_str,
+ uint *min_length, uint *max_length);
+
+my_bool my_like_range_ucs2(CHARSET_INFO *cs,
+ const char *ptr, uint ptr_length,
+ pbool escape, pbool w_one, pbool w_many,
+ uint res_length,
+ char *min_str, char *max_str,
+ uint *min_length, uint *max_length);
+
+
+int my_wildcmp_8bit(CHARSET_INFO *,
+ const char *str,const char *str_end,
+ const char *wildstr,const char *wildend,
+ int escape, int w_one, int w_many);
+
+int my_wildcmp_bin(CHARSET_INFO *,
+ const char *str,const char *str_end,
+ const char *wildstr,const char *wildend,
+ int escape, int w_one, int w_many);
+
+uint my_numchars_8bit(CHARSET_INFO *, const char *b, const char *e);
+uint my_numcells_8bit(CHARSET_INFO *, const char *b, const char *e);
+uint my_charpos_8bit(CHARSET_INFO *, const char *b, const char *e, uint pos);
+uint my_well_formed_len_8bit(CHARSET_INFO *, const char *b, const char *e,
+ uint pos, int *error);
+int my_mbcharlen_8bit(CHARSET_INFO *, uint c);
+
+
+/* Functions for multibyte charsets */
+extern uint my_caseup_str_mb(CHARSET_INFO *, char *);
+extern uint my_casedn_str_mb(CHARSET_INFO *, char *);
+extern uint my_caseup_mb(CHARSET_INFO *, char *src, uint srclen,
+ char *dst, uint dstlen);
+extern uint my_casedn_mb(CHARSET_INFO *, char *src, uint srclen,
+ char *dst, uint dstlen);
+extern int my_strcasecmp_mb(CHARSET_INFO * cs,const char *, const char *);
+
+int my_wildcmp_mb(CHARSET_INFO *,
+ const char *str,const char *str_end,
+ const char *wildstr,const char *wildend,
+ int escape, int w_one, int w_many);
+uint my_numchars_mb(CHARSET_INFO *, const char *b, const char *e);
+uint my_numcells_mb(CHARSET_INFO *, const char *b, const char *e);
+uint my_charpos_mb(CHARSET_INFO *, const char *b, const char *e, uint pos);
+uint my_well_formed_len_mb(CHARSET_INFO *, const char *b, const char *e,
+ uint pos, int *error);
+uint my_instr_mb(struct charset_info_st *,
+ const char *b, uint b_length,
+ const char *s, uint s_length,
+ my_match_t *match, uint nmatch);
+
+int my_wildcmp_unicode(CHARSET_INFO *cs,
+ const char *str, const char *str_end,
+ const char *wildstr, const char *wildend,
+ int escape, int w_one, int w_many,
+ MY_UNICASE_INFO **weights);
+
+extern my_bool my_parse_charset_xml(const char *bug, uint len,
+ int (*add)(CHARSET_INFO *cs));
+
+my_bool my_propagate_simple(CHARSET_INFO *cs, const uchar *str, uint len);
+my_bool my_propagate_complex(CHARSET_INFO *cs, const uchar *str, uint len);
+
+
+#define _MY_U 01 /* Upper case */
+#define _MY_L 02 /* Lower case */
+#define _MY_NMR 04 /* Numeral (digit) */
+#define _MY_SPC 010 /* Spacing character */
+#define _MY_PNT 020 /* Punctuation */
+#define _MY_CTR 040 /* Control character */
+#define _MY_B 0100 /* Blank */
+#define _MY_X 0200 /* heXadecimal digit */
+
+
+#define my_isascii(c) (!((c) & ~0177))
+#define my_toascii(c) ((c) & 0177)
+#define my_tocntrl(c) ((c) & 31)
+#define my_toprint(c) ((c) | 64)
+#define my_toupper(s,c) (char) ((s)->to_upper[(uchar) (c)])
+#define my_tolower(s,c) (char) ((s)->to_lower[(uchar) (c)])
+#define my_isalpha(s, c) (((s)->ctype+1)[(uchar) (c)] & (_MY_U | _MY_L))
+#define my_isupper(s, c) (((s)->ctype+1)[(uchar) (c)] & _MY_U)
+#define my_islower(s, c) (((s)->ctype+1)[(uchar) (c)] & _MY_L)
+#define my_isdigit(s, c) (((s)->ctype+1)[(uchar) (c)] & _MY_NMR)
+#define my_isxdigit(s, c) (((s)->ctype+1)[(uchar) (c)] & _MY_X)
+#define my_isalnum(s, c) (((s)->ctype+1)[(uchar) (c)] & (_MY_U | _MY_L | _MY_NMR))
+#define my_isspace(s, c) (((s)->ctype+1)[(uchar) (c)] & _MY_SPC)
+#define my_ispunct(s, c) (((s)->ctype+1)[(uchar) (c)] & _MY_PNT)
+#define my_isprint(s, c) (((s)->ctype+1)[(uchar) (c)] & (_MY_PNT | _MY_U | _MY_L | _MY_NMR | _MY_B))
+#define my_isgraph(s, c) (((s)->ctype+1)[(uchar) (c)] & (_MY_PNT | _MY_U | _MY_L | _MY_NMR))
+#define my_iscntrl(s, c) (((s)->ctype+1)[(uchar) (c)] & _MY_CTR)
+
+/* Some macros that should be cleaned up a little */
+#define my_isvar(s,c) (my_isalnum(s,c) || (c) == '_')
+#define my_isvar_start(s,c) (my_isalpha(s,c) || (c) == '_')
+
+#define my_binary_compare(s) ((s)->state & MY_CS_BINSORT)
+#define use_strnxfrm(s) ((s)->state & MY_CS_STRNXFRM)
+#define my_strnxfrm(s, a, b, c, d) ((s)->coll->strnxfrm((s), (a), (b), (c), (d)))
+#define my_strnncoll(s, a, b, c, d) ((s)->coll->strnncoll((s), (a), (b), (c), (d), 0))
+#define my_like_range(s, a, b, c, d, e, f, g, h, i, j) \
+ ((s)->coll->like_range((s), (a), (b), (c), (d), (e), (f), (g), (h), (i), (j)))
+#define my_wildcmp(cs,s,se,w,we,e,o,m) ((cs)->coll->wildcmp((cs),(s),(se),(w),(we),(e),(o),(m)))
+#define my_strcasecmp(s, a, b) ((s)->coll->strcasecmp((s), (a), (b)))
+#define my_charpos(cs, b, e, num) (cs)->cset->charpos((cs), (const char*) (b), (const char *)(e), (num))
+
+
+#define use_mb(s) ((s)->cset->ismbchar != NULL)
+#define my_ismbchar(s, a, b) ((s)->cset->ismbchar((s), (a), (b)))
+#ifdef USE_MB
+#define my_mbcharlen(s, a) ((s)->cset->mbcharlen((s),(a)))
+#else
+#define my_mbcharlen(s, a) 1
+#endif
+
+#define my_caseup_str(s, a) ((s)->cset->caseup_str((s), (a)))
+#define my_casedn_str(s, a) ((s)->cset->casedn_str((s), (a)))
+#define my_strntol(s, a, b, c, d, e) ((s)->cset->strntol((s),(a),(b),(c),(d),(e)))
+#define my_strntoul(s, a, b, c, d, e) ((s)->cset->strntoul((s),(a),(b),(c),(d),(e)))
+#define my_strntoll(s, a, b, c, d, e) ((s)->cset->strntoll((s),(a),(b),(c),(d),(e)))
+#define my_strntoull(s, a, b, c,d, e) ((s)->cset->strntoull((s),(a),(b),(c),(d),(e)))
+#define my_strntod(s, a, b, c, d) ((s)->cset->strntod((s),(a),(b),(c),(d)))
+
+
+/* XXX: still need to take care of this one */
+#ifdef MY_CHARSET_TIS620
+#error The TIS620 charset is broken at the moment. Tell tim to fix it.
+#define USE_TIS620
+#include "t_ctype.h"
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _m_ctype_h */
Added: Frontier/branches/mysql/Common/MySQL/include/m_string.h
===================================================================
--- Frontier/branches/mysql/Common/MySQL/include/m_string.h (rev 0)
+++ Frontier/branches/mysql/Common/MySQL/include/m_string.h 2007-04-08 19:56:45 UTC (rev 1647)
@@ -0,0 +1,262 @@
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+
+/* There may be prolems include all of theese. Try to test in
+ configure with ones are needed? */
+
+/* This is needed for the definitions of strchr... on solaris */
+
+#ifndef _m_string_h
+#define _m_string_h
+#ifndef __USE_GNU
+#define __USE_GNU /* We want to use stpcpy */
+#endif
+#if defined(HAVE_STRINGS_H)
+#include <strings.h>
+#endif
+#if defined(HAVE_STRING_H)
+#include <string.h>
+#endif
+
+/* need by my_vsnprintf */
+#include <stdarg.h>
+
+/* Correct some things for UNIXWARE7 */
+#ifdef HAVE_UNIXWARE7_THREADS
+#undef HAVE_STRINGS_H
+#undef HAVE_MEMORY_H
+#define HAVE_MEMCPY
+#ifndef HAVE_MEMMOVE
+#define HAVE_MEMMOVE
+#endif
+#undef HAVE_BCMP
+#undef bcopy
+#undef bcmp
+#undef bzero
+#endif /* HAVE_UNIXWARE7_THREADS */
+#ifdef _AIX
+#undef HAVE_BCMP
+#endif
+
+/* This is needed for the definitions of bzero... on solaris */
+#if defined(HAVE_STRINGS_H) && !defined(HAVE_mit_thread)
+#include <strings.h>
+#endif
+
+/* This is needed for the definitions of memcpy... on solaris */
+#if defined(HAVE_MEMORY_H) && !defined(__cplusplus)
+#include <memory.h>
+#endif
+
+#if !defined(HAVE_MEMCPY) && !defined(HAVE_MEMMOVE)
+# define memcpy(d, s, n) bcopy ((s), (d), (n))
+# define memset(A,C,B) bfill((A),(B),(C))
+# define memmove(d, s, n) bmove ((d), (s), (n))
+#elif defined(HAVE_MEMMOVE)
+# define bmove(d, s, n) memmove((d), (s), (n))
+#else
+# define memmove(d, s, n) bmove((d), (s), (n)) /* our bmove */
+#endif
+
+/* Unixware 7 */
+#if !defined(HAVE_BFILL)
+# define bfill(A,B,C) memset((A),(C),(B))
+# define bmove_align(A,B,C) memcpy((A),(B),(C))
+#endif
+
+#if !defined(HAVE_BCMP)
+# define bcopy(s, d, n) memcpy((d), (s), (n))
+# define bcmp(A,B,C) memcmp((A),(B),(C))
+# define bzero(A,B) memset((A),0,(B))
+# define bmove_align(A,B,C) memcpy((A),(B),(C))
+#endif
+
+#if defined(__cplusplus) && !defined(OS2)
+extern "C" {
+#endif
+
+/*
+ my_str_malloc() and my_str_free() are assigned to implementations in
+ strings/alloc.c, but can be overridden in the calling program.
+ */
+extern void *(*my_str_malloc)(size_t);
+extern void (*my_str_free)(void *);
+
+#if defined(HAVE_STPCPY) && !defined(HAVE_mit_thread)
+#define strmov(A,B) stpcpy((A),(B))
+#ifndef stpcpy
+extern char *stpcpy(char *, const char *); /* For AIX with gcc 2.95.3 */
+#endif
+#endif
+
+/* Declared in int2str() */
+extern char NEAR _dig_vec_upper[];
+extern char NEAR _dig_vec_lower[];
+
+#ifdef BAD_STRING_COMPILER
+#define strmov(A,B) (memccpy(A,B,0,INT_MAX)-1)
+#else
+#define strmov_overlapp(A,B) strmov(A,B)
+#define strmake_overlapp(A,B,C) strmake(A,B,C)
+#endif
+
+#ifdef BAD_MEMCPY /* Problem with gcc on Alpha */
+#define memcpy_fixed(A,B,C) bmove((A),(B),(C))
+#else
+#define memcpy_fixed(A,B,C) memcpy((A),(B),(C))
+#endif
+
+#ifdef MSDOS
+#undef bmove_align
+#define bmove512(A,B,C) bmove_align(A,B,C)
+extern void bmove_align(gptr dst,const gptr src,uint len);
+#endif
+
+#if (!defined(USE_BMOVE512) || defined(HAVE_purify)) && !defined(bmove512)
+#define bmove512(A,B,C) memcpy(A,B,C)
+#endif
+
+ /* Prototypes for string functions */
+
+#if !defined(bfill) && !defined(HAVE_BFILL)
+extern void bfill(gptr dst,uint len,pchar fill);
+#endif
+
+#if !defined(bzero) && !defined(HAVE_BZERO)
+extern void bzero(gptr dst,uint len);
+#endif
+
+#if !defined(bcmp) && !defined(HAVE_BCMP)
+extern int bcmp(const char *s1,const char *s2,uint len);
+#endif
+#ifdef HAVE_purify
+extern int my_bcmp(const char *s1,const char *s2,uint len);
+#undef bcmp
+#define bcmp(A,B,C) my_bcmp((A),(B),(C))
+#endif
+
+#ifndef bmove512
+extern void bmove512(gptr dst,const gptr src,uint len);
+#endif
+
+#if !defined(HAVE_BMOVE) && !defined(bmove)
+extern void bmove(char *dst, const char *src,uint len);
+#endif
+
+extern void bmove_upp(char *dst,const char *src,uint len);
+extern void bchange(char *dst,uint old_len,const char *src,
+ uint new_len,uint tot_len);
+extern void strappend(char *s,uint len,pchar fill);
+extern char *strend(const char *s);
+extern char *strcend(const char *, pchar);
+extern char *strfield(char *src,int fields,int chars,int blanks,
+ int tabch);
+extern char *strfill(my_string s,uint len,pchar fill);
+extern uint strinstr(const char *str,const char *search);
+extern uint r_strinstr(reg1 my_string str,int from, reg4 my_string search);
+extern char *strkey(char *dst,char *head,char *tail,char *flags);
+extern char *strmake(char *dst,const char *src,uint length);
+#ifndef strmake_overlapp
+extern char *strmake_overlapp(char *dst,const char *src, uint length);
+#endif
+
+#ifndef strmov
+extern char *strmov(char *dst,const char *src);
+#endif
+extern char *strnmov(char *dst,const char *src,uint n);
+extern char *strsuff(const char *src,const char *suffix);
+extern char *strcont(const char *src,const char *set);
+extern char *strxcat _VARARGS((char *dst,const char *src, ...));
+extern char *strxmov _VARARGS((char *dst,const char *src, ...));
+extern char *strxcpy _VARARGS((char *dst,const char *src, ...));
+extern char *strxncat _VARARGS((char *dst,uint len, const char *src, ...));
+extern char *strxnmov _VARARGS((char *dst,uint len, const char *src, ...));
+extern char *strxncpy _VARARGS((char *dst,uint len, const char *src, ...));
+
+/* Prototypes of normal stringfunctions (with may ours) */
+
+#ifdef WANT_STRING_PROTOTYPES
+extern char *strcat(char *, const char *);
+extern char *strchr(const char *, pchar);
+extern char *strrchr(const char *, pchar);
+extern char *strcpy(char *, const char *);
+extern int strcmp(const char *, const char *);
+#ifndef __GNUC__
+extern size_t strlen(const char *);
+#endif
+#endif
+#ifndef HAVE_STRNLEN
+extern uint strnlen(const char *s, uint n);
+#endif
+
+#if !defined(__cplusplus)
+#ifndef HAVE_STRPBRK
+extern char *strpbrk(const char *, const char *);
+#endif
+#ifndef HAVE_STRSTR
+extern char *strstr(const char *, const char *);
+#endif
+#endif
+extern int is_prefix(const char *, const char *);
+
+/* Conversion routines */
+double my_strtod(const char *str, char **end, int *error);
+double my_atof(const char *nptr);
+
+extern char *llstr(longlong value,char *buff);
+#ifndef HAVE_STRTOUL
+extern long strtol(const char *str, char **ptr, int base);
+extern ulong strtoul(const char *str, char **ptr, int base);
+#endif
+
+extern char *int2str(long val, char *dst, int radix, int upcase);
+extern char *int10_to_str(long val,char *dst,int radix);
+extern char *str2int(const char *src,int radix,long lower,long upper,
+ long *val);
+longlong my_strtoll10(const char *nptr, char **endptr, int *error);
+#if SIZEOF_LONG == SIZEOF_LONG_LONG
+#define longlong2str(A,B,C) int2str((A),(B),(C),1)
+#define longlong10_to_str(A,B,C) int10_to_str((A),(B),(C))
+#undef strtoll
+#define strtoll(A,B,C) strtol((A),(B),(C))
+#define strtoull(A,B,C) strtoul((A),(B),(C))
+#ifndef HAVE_STRTOULL
+#define HAVE_STRTOULL
+#endif
+#ifndef HAVE_STRTOLL
+#define HAVE_STRTOLL
+#endif
+#else
+#ifdef HAVE_LONG_LONG
+extern char *longlong2str(longlong val,char *dst,int radix);
+extern char *longlong10_to_str(longlong val,char *dst,int radix);
+#if (!defined(HAVE_STRTOULL) || defined(HAVE_mit_thread)) || defined(NO_STRTOLL_PROTO)
+extern longlong strtoll(const char *str, char **ptr, int base);
+extern ulonglong strtoull(const char *str, char **ptr, int base);
+#endif
+#endif
+#endif
+
+/* my_vsnprintf.c */
+
+extern int my_vsnprintf( char *str, size_t n,
+ const char *format, va_list ap );
+extern int my_snprintf(char *to, size_t n, const char *fmt, ...)
+ ATTRIBUTE_FORMAT(printf, 3, 4);
+
+#if defined(__cplusplus) && !defined(OS2)
+}
+#endif
+#endif
Added: Frontier/branches/mysql/Common/MySQL/include/my_alloc.h
===================================================================
--- Frontier/branches/mysql/Common/MySQL/include/my_alloc.h (rev 0)
+++ Frontier/branches/mysql/Common/MySQL/include/my_alloc.h 2007-04-08 19:56:45 UTC (rev 1647)
@@ -0,0 +1,51 @@
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+
+/*
+ Data structures for mysys/my_alloc.c (root memory allocator)
+*/
+
+#ifndef _my_alloc_h
+#define _my_alloc_h
+
+#define ALLOC_MAX_BLOCK_TO_DROP 4096
+#define ALLOC_MAX_BLOCK_USAGE_BEFORE_DROP 10
+
+typedef struct st_used_mem
+{ /* struct for once_alloc (block) */
+ struct st_used_mem *next; /* Next block in use */
+ unsigned int left; /* memory left in block */
+ unsigned int size; /* size of block */
+} USED_MEM;
+
+
+typede...
[truncated message content] |
|
From: <dav...@us...> - 2007-04-08 18:57:25
|
Revision: 1646
http://svn.sourceforge.net/frontierkernel/?rev=1646&view=rev
Author: davidgewirtz
Date: 2007-04-08 11:55:28 -0700 (Sun, 08 Apr 2007)
Log Message:
-----------
Sandbox for exploring MySQL integration
Added Paths:
-----------
Frontier/branches/mysql/
Copied: Frontier/branches/mysql (from rev 1645, Frontier/trunk)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dav...@us...> - 2007-04-06 01:45:09
|
Revision: 1645
http://svn.sourceforge.net/frontierkernel/?rev=1645&view=rev
Author: davidgewirtz
Date: 2007-04-05 18:45:04 -0700 (Thu, 05 Apr 2007)
Log Message:
-----------
Modified Paths:
--------------
Frontier/trunk/Common/source/langsqlite.c
Modified: Frontier/trunk/Common/source/langsqlite.c
===================================================================
--- Frontier/trunk/Common/source/langsqlite.c 2007-04-04 22:19:35 UTC (rev 1644)
+++ Frontier/trunk/Common/source/langsqlite.c 2007-04-06 01:45:04 UTC (rev 1645)
@@ -76,7 +76,7 @@
include new files in the SQLite project, be sure that shell.c and tclsqlite.c are
NOT included in the Frontier project.
-That's it. For further tips, see the Frontier Lab Notebook article at:
+That's it. For further tips, see the Frontier Lab Notebook article:
http://manila.zatz.com/frontierkernel/stories/storyReader$29
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cre...@us...> - 2007-04-04 22:19:34
|
Revision: 1644
http://svn.sourceforge.net/frontierkernel/?rev=1644&view=rev
Author: creecode
Date: 2007-04-04 15:19:35 -0700 (Wed, 04 Apr 2007)
Log Message:
-----------
bumped version number and till copyright year
Modified Paths:
--------------
Frontier/trunk/Common/headers/versions.h
Modified: Frontier/trunk/Common/headers/versions.h
===================================================================
--- Frontier/trunk/Common/headers/versions.h 2007-04-04 22:18:14 UTC (rev 1643)
+++ Frontier/trunk/Common/headers/versions.h 2007-04-04 22:19:35 UTC (rev 1644)
@@ -43,7 +43,7 @@
/* common strings for all targets */
#define APP_COPYRIGHT_FROM "2004"
-#define APP_COPYRIGHT_TILL "2006"
+#define APP_COPYRIGHT_TILL "2007"
/* target-specific strings and version info */
@@ -54,25 +54,25 @@
/* version info for RADIO targets (formerly known as PIKE) */
#define APPNAME "Radio"
- #define APP_COPYRIGHT_HOLDER "UserLand Software, Inc"
+ #define APP_COPYRIGHT_HOLDER "UserLand Software, Inc"
#define bs_APP_NAME BIGSTRING ("\x05" "Radio")
#define bs_APP_SLOGAN BIGSTRING ("\x2b" "The power of Web publishing on your desktop")
#define bs_APP_COPYRIGHT BIGSTRING ("\x23" "\xA9 " APP_COPYRIGHT_FROM "-" APP_COPYRIGHT_TILL " UserLand Software, Inc.")
- #define bs_APP_URL BIGSTRING ("\x26" "http://frontierkernel.sourceforge.net/")
+ #define bs_APP_URL BIGSTRING ("\x26" "http://frontierkernel.sourceforge.net/")
#define APP_MAJOR_VERSION 10
- #define APP_MAJOR_VERSION_BCD 0x10 /* major version in BCD notation */
+ #define APP_MAJOR_VERSION_BCD 0x10 /* major version in BCD notation */
- #define APP_SUB_VERSION 1
+ #define APP_SUB_VERSION 1
#define APP_MINOR_VERSION 0
- #define APP_SUBMINOR_VERSION_BCD 0x10 /* sub and minor version in BCD notation */
-
+ #define APP_SUBMINOR_VERSION_BCD 0x10 /* sub and minor version in BCD notation */
+
#define APP_STAGE_CODE 0x40 /* dev = 0x20, alpha = 0x40, beta = 0x60, final = 0x80 */
- #define APP_REVISION_LEVEL 12 /* for non-final releases only */
- #define APP_BUILD_NUMBER 12 /* increment by one for every release, final or not */
+ #define APP_REVISION_LEVEL 13 /* for non-final releases only */
+ #define APP_BUILD_NUMBER 13 /* increment by one for every release, final or not */
- #define APP_VERSION_STRING "10.1a12"
+ #define APP_VERSION_STRING "10.1a13"
#else
@@ -80,52 +80,52 @@
#define APPNAME "OPML"
- #define APP_COPYRIGHT_HOLDER "Scripting News, Inc"
+ #define APP_COPYRIGHT_HOLDER "Scripting News, Inc"
#define bs_APP_NAME BIGSTRING ("\x04" "OPML")
#define bs_APP_SLOGAN BIGSTRING ("\x25" "Powerful OPML editing on your desktop")
#define bs_APP_COPYRIGHT BIGSTRING ("\x20" "\xA9 " APP_COPYRIGHT_FROM "-" APP_COPYRIGHT_TILL " Scripting News, Inc.")
- #define bs_APP_URL BIGSTRING ("\x18" "http://support.opml.org/")
+ #define bs_APP_URL BIGSTRING ("\x18" "http://support.opml.org/")
#define APP_MAJOR_VERSION 10
- #define APP_MAJOR_VERSION_BCD 0x10 /* major version in BCD notation */
+ #define APP_MAJOR_VERSION_BCD 0x10 /* major version in BCD notation */
- #define APP_SUB_VERSION 1
+ #define APP_SUB_VERSION 1
#define APP_MINOR_VERSION 0
- #define APP_SUBMINOR_VERSION_BCD 0x10 /* sub and minor version in BCD notation */
+ #define APP_SUBMINOR_VERSION_BCD 0x10 /* sub and minor version in BCD notation */
#define APP_STAGE_CODE 0x40 /* dev = 0x20, alpha = 0x40, beta = 0x60, final = 0x80 */
- #define APP_REVISION_LEVEL 12 /* for non-final releases only */
- #define APP_BUILD_NUMBER 12 /* increment by one for every release, final or not */
+ #define APP_REVISION_LEVEL 13 /* for non-final releases only */
+ #define APP_BUILD_NUMBER 13 /* increment by one for every release, final or not */
- #define APP_VERSION_STRING "10.1a12"
-
+ #define APP_VERSION_STRING "10.1a13"
+
#endif
#else
/* version info for FRONTIER targets */
#define APPNAME "Frontier"
- #define APP_COPYRIGHT_HOLDER "Frontier Kernel Project"
+ #define APP_COPYRIGHT_HOLDER "Frontier Kernel Project"
#define bs_APP_NAME BIGSTRING ("\x08" "Frontier")
#define bs_APP_SLOGAN BIGSTRING ("\x25" "Powerful cross-platform web scripting")
#define bs_APP_COPYRIGHT BIGSTRING ("\x23" "\xA9 " APP_COPYRIGHT_FROM "-" APP_COPYRIGHT_TILL " Frontier Kernel Project")
- #define bs_APP_URL BIGSTRING ("\x26" "http://frontierkernel.sourceforge.net/")
+ #define bs_APP_URL BIGSTRING ("\x26" "http://frontierkernel.sourceforge.net/")
#define APP_MAJOR_VERSION 10
- #define APP_MAJOR_VERSION_BCD 0x10 /* major version in BCD notation */
+ #define APP_MAJOR_VERSION_BCD 0x10 /* major version in BCD notation */
- #define APP_SUB_VERSION 1
+ #define APP_SUB_VERSION 1
#define APP_MINOR_VERSION 0
- #define APP_SUBMINOR_VERSION_BCD 0x10 /* sub and minor version in BCD notation */
+ #define APP_SUBMINOR_VERSION_BCD 0x10 /* sub and minor version in BCD notation */
#define APP_STAGE_CODE 0x40 /* dev = 0x20, alpha = 0x40, beta = 0x60, final = 0x80 */
- #define APP_REVISION_LEVEL 12 /* for non-final releases only */
- #define APP_BUILD_NUMBER 12 /* increment by one for every release, final or not */
+ #define APP_REVISION_LEVEL 13 /* for non-final releases only */
+ #define APP_BUILD_NUMBER 13 /* increment by one for every release, final or not */
- #define APP_VERSION_STRING "10.1a12"
-
+ #define APP_VERSION_STRING "10.1a13"
+
#endif
#define bs_APP_COPYRIGHT2 BIGSTRING ("\x22" "\xA9 1992-2004 UserLand Software, Inc")
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|