added the Mmgr class and modifiled related classes
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
|
||||
AM_CFLAGS = -I$(top_builddir)/include
|
||||
AM_CPPFLAGS = -I$(top_builddir)/include
|
||||
|
||||
lib_LTLIBRARIES = libqsesed.la
|
||||
libqsesed_la_SOURCES = sed.c sed.h
|
||||
@ -8,7 +8,7 @@ libqsesed_la_LIBADD = -lqsecmn -lqseutl
|
||||
|
||||
if ENABLE_CXX
|
||||
lib_LTLIBRARIES += libqsesed++.la
|
||||
libqsesed___la_SOURCES = Sed.cpp
|
||||
libqsesed___la_SOURCES = Sed.cpp StdSed.cpp
|
||||
libqsesed___la_LDFLAGS = -L. -L../cmn -L../utl -version-info 1:0:0 -no-undefined
|
||||
libqsesed___la_LIBADD = -lqsesed -lqsecmn -lqseutl
|
||||
endif
|
||||
|
@ -52,8 +52,8 @@ am__installdirs = "$(DESTDIR)$(libdir)"
|
||||
libLTLIBRARIES_INSTALL = $(INSTALL)
|
||||
LTLIBRARIES = $(lib_LTLIBRARIES)
|
||||
libqsesed___la_DEPENDENCIES =
|
||||
am__libqsesed___la_SOURCES_DIST = Sed.cpp
|
||||
@ENABLE_CXX_TRUE@am_libqsesed___la_OBJECTS = Sed.lo
|
||||
am__libqsesed___la_SOURCES_DIST = Sed.cpp StdSed.cpp
|
||||
@ENABLE_CXX_TRUE@am_libqsesed___la_OBJECTS = Sed.lo StdSed.lo
|
||||
libqsesed___la_OBJECTS = $(am_libqsesed___la_OBJECTS)
|
||||
libqsesed___la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
|
||||
@ -217,12 +217,12 @@ target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
AM_CFLAGS = -I$(top_builddir)/include
|
||||
AM_CPPFLAGS = -I$(top_builddir)/include
|
||||
lib_LTLIBRARIES = libqsesed.la $(am__append_1)
|
||||
libqsesed_la_SOURCES = sed.c sed.h
|
||||
libqsesed_la_LDFLAGS = -version-info 1:0:0 -no-undefined -L../cmn -L../utl
|
||||
libqsesed_la_LIBADD = -lqsecmn -lqseutl
|
||||
@ENABLE_CXX_TRUE@libqsesed___la_SOURCES = Sed.cpp
|
||||
@ENABLE_CXX_TRUE@libqsesed___la_SOURCES = Sed.cpp StdSed.cpp
|
||||
@ENABLE_CXX_TRUE@libqsesed___la_LDFLAGS = -L. -L../cmn -L../utl -version-info 1:0:0 -no-undefined
|
||||
@ENABLE_CXX_TRUE@libqsesed___la_LIBADD = -lqsesed -lqsecmn -lqseutl
|
||||
all: all-am
|
||||
@ -297,6 +297,7 @@ distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Sed.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/StdSed.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sed.Plo@am__quote@
|
||||
|
||||
.c.o:
|
||||
|
@ -17,22 +17,26 @@
|
||||
*/
|
||||
|
||||
#include <qse/sed/Sed.hpp>
|
||||
#include "sed.h"
|
||||
|
||||
#include <qse/utl/stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
/////////////////////////////////
|
||||
QSE_BEGIN_NAMESPACE(QSE)
|
||||
/////////////////////////////////
|
||||
|
||||
Sed::Sed () throw () : sed (QSE_NULL)
|
||||
int Sed::open () throw ()
|
||||
{
|
||||
}
|
||||
sed = qse_sed_open (this, QSE_SIZEOF(Sed*));
|
||||
if (sed == QSE_NULL)
|
||||
{
|
||||
// TODO: set error...
|
||||
return -1;
|
||||
}
|
||||
|
||||
Sed::~Sed () throw ()
|
||||
{
|
||||
close ();
|
||||
}
|
||||
|
||||
int Sed::open () throw()
|
||||
{
|
||||
*(Sed**)QSE_XTN(sed) = this;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void Sed::close () throw()
|
||||
@ -44,8 +48,17 @@ void Sed::close () throw()
|
||||
}
|
||||
}
|
||||
|
||||
int Sed::compile () throw ()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int Sed::execute () throw ()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/////////////////////////////////
|
||||
QSE_BEGIN_NAMESPACE(QSE)
|
||||
QSE_END_NAMESPACE(QSE)
|
||||
/////////////////////////////////
|
||||
|
||||
|
44
qse/lib/sed/StdSed.cpp
Normal file
44
qse/lib/sed/StdSed.cpp
Normal file
@ -0,0 +1,44 @@
|
||||
/*
|
||||
* $Id: Sed.hpp 127 2009-05-07 13:15:04Z baconevi $
|
||||
*
|
||||
Copyright 2006-2009 Chung, Hyung-Hwan.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
#include <qse/sed/StdSed.hpp>
|
||||
#include <stdlib.h>
|
||||
|
||||
/////////////////////////////////
|
||||
QSE_BEGIN_NAMESPACE(QSE)
|
||||
/////////////////////////////////
|
||||
|
||||
void* StdSed::allocMem (qse_size_t n) throw ()
|
||||
{
|
||||
return ::malloc (n);
|
||||
}
|
||||
|
||||
void* StdSed::reallocMem (void* ptr, qse_size_t n) throw ()
|
||||
{
|
||||
return ::realloc (ptr, n);
|
||||
}
|
||||
|
||||
void StdSed::freeMem (void* ptr) throw ()
|
||||
{
|
||||
::free (ptr);
|
||||
}
|
||||
|
||||
/////////////////////////////////
|
||||
QSE_END_NAMESPACE(QSE)
|
||||
/////////////////////////////////
|
||||
|
Reference in New Issue
Block a user