[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnet/ilfind Makefile.am,1.3,1.4 ilfind.c,1.5
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnet/ilfind Makefile.am,1.3,1.4 ilfind.c,1.5,1.6 |
Date: |
Sat, 14 Dec 2002 17:56:58 -0500 |
Update of /cvsroot/dotgnu-pnet/pnet/ilfind
In directory subversions:/tmp/cvs-serv408/ilfind
Modified Files:
Makefile.am ilfind.c
Log Message:
Modify csant and ilfind to use the builtin pnet regex routines.
Index: Makefile.am
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/ilfind/Makefile.am,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** Makefile.am 4 Jul 2002 04:59:12 -0000 1.3
--- Makefile.am 14 Dec 2002 22:56:56 -0000 1.4
***************
*** 3,7 ****
EXTRA_DIST = $(man_MANS)
ilfind_SOURCES = ilfind.c
! ilfind_LDADD = ../image/libILImage.a ../support/libILSupport.a $(REGEXLIBS)
AM_CFLAGS = -I$(top_srcdir)/include
--- 3,7 ----
EXTRA_DIST = $(man_MANS)
ilfind_SOURCES = ilfind.c
! ilfind_LDADD = ../image/libILImage.a ../support/libILSupport.a
AM_CFLAGS = -I$(top_srcdir)/include
Index: ilfind.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/ilfind/ilfind.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** ilfind.c 19 Apr 2002 07:13:33 -0000 1.5
--- ilfind.c 14 Dec 2002 22:56:56 -0000 1.6
***************
*** 23,32 ****
#include "il_program.h"
#include "il_utils.h"
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
- #ifdef HAVE_REGEX_H
- #include <regex.h>
- #endif
#ifdef __cplusplus
--- 23,30 ----
#include "il_program.h"
#include "il_utils.h"
+ #include "il_regex.h"
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef __cplusplus
***************
*** 456,462 ****
}
- #ifdef HAVE_REGCOMP
static regex_t RegexState;
- #endif
/*
--- 454,458 ----
***************
*** 602,626 ****
/* Compile the regular expression */
! #ifdef HAVE_REGCOMP
! /* POSIX-style regular expression library */
! if(regcomp(&RegexState, regexp, REG_EXTENDED | REG_NOSUB |
!
(libIgnoreCase ? REG_ICASE : 0)) != 0)
! {
! fprintf(stderr, "Invalid regular expression\n");
! exit(1);
! }
! #else
! #ifdef HAVE_RE_COMP
! /* BSD-style regular expression library */
! if(re_comp(regexp) != 0)
{
fprintf(stderr, "Invalid regular expression\n");
exit(1);
}
- #else
- fprintf(stderr, "Regular expression library not present - aborting\n");
- exit(1);
- #endif
- #endif
}
--- 598,607 ----
/* Compile the regular expression */
! if(IL_regcomp(&RegexState, regexp, REG_EXTENDED | REG_NOSUB |
!
(libIgnoreCase ? REG_ICASE : 0)) != 0)
{
fprintf(stderr, "Invalid regular expression\n");
exit(1);
}
}
***************
*** 630,644 ****
static int MatchRegex(const char *string)
{
! #ifdef HAVE_REGCOMP
! /* POSIX-style regular expression library */
! return (regexec(&RegexState, string, 0, 0, 0) == 0);
! #else
! #ifdef HAVE_RE_COMP
! /* BSD-style regular expression library */
! return re_exec((char *)string);
! #else
! return 0;
! #endif
! #endif
}
--- 611,615 ----
static int MatchRegex(const char *string)
{
! return (IL_regexec(&RegexState, string, 0, 0, 0) == 0);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnet/ilfind Makefile.am,1.3,1.4 ilfind.c,1.5,1.6,
Rhys Weatherley <address@hidden> <=
- Prev by Date:
[Dotgnu-pnet-commits] CVS: pnet ChangeLog,1.1987,1.1988
- Next by Date:
[Dotgnu-pnet-commits] CVS: pnet/csant Makefile.am,1.4,1.5 csant_dir.c,1.3,1.4 csant_fileset.c,1.12,1.13
- Previous by thread:
[Dotgnu-pnet-commits] CVS: pnet ChangeLog,1.1987,1.1988
- Next by thread:
[Dotgnu-pnet-commits] CVS: pnet/csant Makefile.am,1.4,1.5 csant_dir.c,1.3,1.4 csant_fileset.c,1.12,1.13
- Index(es):