[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnet/engine Makefile.am,1.52,1.53 lib_regexp
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnet/engine Makefile.am,1.52,1.53 lib_regexp.c,1.2,1.3 |
Date: |
Sat, 14 Dec 2002 18:24:41 -0500 |
Update of /cvsroot/dotgnu-pnet/pnet/engine
In directory subversions:/tmp/cvs-serv20326/engine
Modified Files:
Makefile.am lib_regexp.c
Log Message:
Use the builtin pnet regex routines in "lib_regexp.c"; remove
all references to the system regex library from the build system.
Index: Makefile.am
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/Makefile.am,v
retrieving revision 1.52
retrieving revision 1.53
diff -C2 -r1.52 -r1.53
*** Makefile.am 13 Dec 2002 11:24:46 -0000 1.52
--- Makefile.am 14 Dec 2002 23:24:39 -0000 1.53
***************
*** 57,66 ****
ilrun_LDADD = libILEngine.a ../dumpasm/libILDumpAsm.a \
../image/libILImage.a ../support/libILSupport.a \
! $(PACKAGE_LIBS) $(REGEXLIBS)
ilverify_SOURCES = ilverify.c
ilverify_LDADD = libILEngine.a ../dumpasm/libILDumpAsm.a \
../image/libILImage.a ../support/libILSupport.a \
! $(PACKAGE_LIBS) $(REGEXLIBS)
## We need "-fno-gcse" to stop gcc being overeager when it compiles
--- 57,66 ----
ilrun_LDADD = libILEngine.a ../dumpasm/libILDumpAsm.a \
../image/libILImage.a ../support/libILSupport.a \
! $(PACKAGE_LIBS)
ilverify_SOURCES = ilverify.c
ilverify_LDADD = libILEngine.a ../dumpasm/libILDumpAsm.a \
../image/libILImage.a ../support/libILSupport.a \
! $(PACKAGE_LIBS)
## We need "-fno-gcse" to stop gcc being overeager when it compiles
Index: lib_regexp.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/lib_regexp.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** lib_regexp.c 13 Dec 2002 04:43:43 -0000 1.2
--- lib_regexp.c 14 Dec 2002 23:24:39 -0000 1.3
***************
*** 3,8 ****
*
* Copyright (C) 2002 Free Software Foundation, Inc.
*
! * Contributed by Gopal V
*
* This program is free software; you can redistribute it and/or modify
--- 3,9 ----
*
* Copyright (C) 2002 Free Software Foundation, Inc.
+ * Copyright (C) 2002 Southern Storm Software, Pty Ltd.
*
! * Contributions by Gopal V, Rhys Weatherley
*
* This program is free software; you can redistribute it and/or modify
***************
*** 24,27 ****
--- 25,29 ----
#include "lib_defs.h"
#include "il_utils.h"
+ #include "il_regex.h"
#ifdef __cplusplus
***************
*** 34,38 ****
char *pat;
int error;
! ILRegexpHandle result;
pat=ILStringToAnsi(_thread,pattern);
if(!pat)
--- 36,40 ----
char *pat;
int error;
! regex_t *result;
pat=ILStringToAnsi(_thread,pattern);
if(!pat)
***************
*** 41,45 ****
return 0;
}
! result=ILRegexpCompile(pat,flags,&(error));
if(!result)
{
--- 43,47 ----
return 0;
}
! result=ILCalloc(1,sizeof(regex_t));
if(!result)
{
***************
*** 47,56 ****
return 0;
}
if(error)
{
! pat=ILRegexpError(error,result);
! /* TODO: throw correct exception here */
ILExecThreadThrowSystem(_thread, "System.ArgumentException",0);
! ILRegexpFree(result);
return 0;
}
--- 49,58 ----
return 0;
}
+ error=IL_regcomp(result,pat,flags);
if(error)
{
! /* TODO: use regerror to add a descriptive message to the
exception */
ILExecThreadThrowSystem(_thread, "System.ArgumentException",0);
! ILFree(result);
return 0;
}
***************
*** 59,66 ****
ILInt32 _IL_RegexpMethods_ExecInternal(ILExecThread * _thread,
! ILNativeInt compiled, ILString
* input, ILInt32 flags)
{
char *pat;
- ILRegexpMatch *match;
pat= ILStringToAnsi(_thread,input);
if(!pat)
--- 61,68 ----
ILInt32 _IL_RegexpMethods_ExecInternal(ILExecThread * _thread,
!
ILNativeInt compiled,
!
ILString * input, ILInt32 flags)
{
char *pat;
pat= ILStringToAnsi(_thread,input);
if(!pat)
***************
*** 69,80 ****
return -1;
}
! return ILRegexpExec((ILRegexpHandle)compiled,pat,flags,&match);
}
void _IL_RegexpMethods_FreeInternal(ILExecThread * _thread,
!
ILNativeInt compiled)
{
! ILRegexpFree((ILRegexpHandle)compiled);
! return;
}
#ifdef __cplusplus
--- 71,85 ----
return -1;
}
! return IL_regexec((regex_t*)compiled,pat,flags,0,0);
}
void _IL_RegexpMethods_FreeInternal(ILExecThread * _thread,
!
ILNativeInt compiled)
{
! if(compiled)
! {
! IL_regfree((regex_t*)compiled);
! ILFree((void*)compiled);
! }
}
#ifdef __cplusplus
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnet/engine Makefile.am,1.52,1.53 lib_regexp.c,1.2,1.3,
Rhys Weatherley <address@hidden> <=
- Prev by Date:
[Dotgnu-pnet-commits] CVS: pnet/ilnative Makefile.am,1.9,1.10
- Next by Date:
[Dotgnu-pnet-commits] CVS: pnet/support Makefile.am,1.42,1.43 regexp.c,1.4,NONE
- Previous by thread:
[Dotgnu-pnet-commits] CVS: pnet/ilnative Makefile.am,1.9,1.10
- Next by thread:
[Dotgnu-pnet-commits] CVS: pnet/support Makefile.am,1.42,1.43 regexp.c,1.4,NONE
- Index(es):