Navigation
Home
gpl
sqlmeta
v1.1b
sqlmeta.cpp








































sqlmeta.cpp
   
   /*
    * SQLMeta.cpp
    * Part of SQLMeta, a language to use sql-queries in html pages.
    *
    * Copyright (C) 2001  Daan Vreeken
    *
    * 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 "sqlmeta.h"
   
   
   
   SQLMeta::SQLMeta(void)
   {
   	Cgi=NULL;
   }
   
   
   
   void SQLMeta::Parse(char *FileName)
   {
   	MetaParser	*Parser = (MetaParser *)new MetaParser(this);
   
   	if (Parser==NULL)
   		return Error(ErrMalloc,"SQLMeta::Parse");
   
   	Parser->Input=InputStream;
   	Parser->DB=(DBInfo *)new DBInfo(Parser);
   	if (Parser->DB==NULL)
   		return Error(ErrMalloc,"SQLMeta::Parse");
   	Parser->DBIsMine=1;
   	Parser->FileName=FileName;
   
   	Parser->Parse();
   
   	delete Parser;
   }
   
   
   
   void SQLMeta::Print(char *Str, ...)
   {
   	va_list		List;
   
   	va_start(List,Str);
   	vfprintf(OutputStream,Str,List);
   	va_end(List);
   }
   
   
   
   void SQLMeta::Error(char *Str, ...)
   {
   	va_list		List;
   
   	va_start(List,Str);
   	vfprintf(ErrorStream,Str,List);
   	va_end(List);
   
   	fprintf(ErrorStream,"\n");
   }
   
   
   

syntax highlighted by Code2HTML, v. 0.9.1


Email me with questions/comments : Daan <Danovitsch @ Vitsch . net>