|
From: David G. <dav...@us...> - 2005-04-01 11:55:52
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv329/Common/source Modified Files: Tag: mysql-embedded-experimental-branch shell.c Added Files: Tag: mysql-embedded-experimental-branch langmysql.c Log Message: First cut at mysql code, simply adding verb stubs. Index: shell.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/shell.c,v retrieving revision 1.11 retrieving revision 1.11.2.1 diff -C2 -d -r1.11 -r1.11.2.1 *** shell.c 14 Jan 2005 20:16:17 -0000 1.11 --- shell.c 1 Apr 2005 11:55:44 -0000 1.11.2.1 *************** *** 81,84 **** --- 81,88 ---- #include "langdll.h" /*2004-11-29 aradke: for dllinitverbs*/ + #ifdef FRONTIER_MYSQL + #include "langmysql.h" + #endif + #ifdef flcomponent #include <uisharing.h> *************** *** 1328,1331 **** --- 1332,1339 ---- #endif + #ifdef FRONTIER_MYSQL + mysqlinitverbs(); + #endif + mathinitverbs (); /*2004-12-30 smd: langmath.c*/ --- NEW FILE: langmysql.c --- /* $Id: langmysql.c,v 1.1.2.1 2005/04/01 11:55:44 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 "strings.h" #include "resources.h" #include "shell.h" #include "lang.h" #include "kernelverbs.h" #include "scripts.h" #include "tablestructure.h" #include "frontierdebug.h" /*6.2b7 AR*/ #include "kernelverbdefs.h" #include "langmysql.h" #ifdef FRONTIER_MYSQL typedef enum tymysqlverbtoken { /*verbs that are processed by langmysql.c*/ testfunc, ctmysqlverbs } tymysqlverbtoken; static boolean mysqlfunctionvalue (short token, hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) { /* DG: This will support the embedded mysql verbs */ hdltreenode hp1 = hparam1; tyvaluerecord *v = vreturned; short langerrorlist=0, unimplementedverberror=0; setbooleanvalue (false, v); /*by default, string functions return false*/ switch (token) { case testfunc: return (testverb (hp1, v)); default: getstringlist (langerrorlist, unimplementedverberror, bserror); return (false); } /*switch*/ } /*mysqlfunctionvalue*/ boolean mysqlinitverbs (void) { return (loadfunctionprocessor (idmysqlverbs, &mysqlfunctionvalue)); } /*htmlinitverbs*/ static boolean testverb (hdltreenode hparam1, tyvaluerecord *vreturned) { Handle h = nil; flnextparamislast = true; /* makes sure Frontier throws an error if more than one param is passed */ if (!getexempttextvalue (hparam1, 1, &h)) return (false); return (setheapvalue (h, stringvaluetype, vreturned)); /*exit: Do we need this?*/ disposehandle (h); return (false); } /*testverb*/ #endif FRONTIER_MYSQL |