[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnet/csant csant_defs.h,1.5,1.6 csant_dir.c,
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnet/csant csant_defs.h,1.5,1.6 csant_dir.c,1.2,1.3 csant_fileset.c,1.11,1.12 |
Date: |
Fri, 13 Dec 2002 06:24:49 -0500 |
Update of /cvsroot/dotgnu-pnet/pnet/csant
In directory subversions:/tmp/cvs-serv9148/csant
Modified Files:
csant_defs.h csant_dir.c csant_fileset.c
Log Message:
Apply changes to compile in non-cygwin modes under Win32.
Index: csant_defs.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/csant/csant_defs.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** csant_defs.h 22 Jul 2002 09:00:33 -0000 1.5
--- csant_defs.h 13 Dec 2002 11:24:46 -0000 1.6
***************
*** 25,28 ****
--- 25,29 ----
#include "il_system.h"
#include "il_utils.h"
+ #include "il_sysio.h"
#include "il_xml.h"
#include "csant_dir.h"
Index: csant_dir.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/csant/csant_dir.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** csant_dir.c 28 Sep 2002 02:13:56 -0000 1.2
--- csant_dir.c 13 Dec 2002 11:24:46 -0000 1.3
***************
*** 40,45 ****
struct _tagCSAntDir
{
! DIR *dirInfo;
int useRegex;
#ifdef HAVE_REGCOMP
regex_t regexState;
--- 40,46 ----
struct _tagCSAntDir
{
! ILDir *dirInfo;
int useRegex;
+ char *name;
#ifdef HAVE_REGCOMP
regex_t regexState;
***************
*** 49,53 ****
CSAntDir *CSAntDirOpen(const char *pathname, const char *fileRegex)
{
! DIR *dirInfo;
CSAntDir *dir;
char *regex;
--- 50,54 ----
CSAntDir *CSAntDirOpen(const char *pathname, const char *fileRegex)
{
! ILDir *dirInfo;
CSAntDir *dir;
char *regex;
***************
*** 58,62 ****
/* Attempt to open the directory, after normalizing the path */
newPathname = CSAntDirCombine(pathname, 0);
! dirInfo = opendir(newPathname);
ILFree(newPathname);
if(!dirInfo)
--- 59,63 ----
/* Attempt to open the directory, after normalizing the path */
newPathname = CSAntDirCombine(pathname, 0);
! dirInfo = ILOpenDir(newPathname);
ILFree(newPathname);
if(!dirInfo)
***************
*** 72,75 ****
--- 73,77 ----
}
dir->dirInfo = dirInfo;
+ dir->name = 0;
/* Convert the regular expression from file form into grep form */
***************
*** 165,169 ****
void CSAntDirClose(CSAntDir *dir)
{
! closedir(dir->dirInfo);
#ifdef HAVE_REGCOMP
if(dir->useRegex)
--- 167,175 ----
void CSAntDirClose(CSAntDir *dir)
{
! ILCloseDir(dir->dirInfo);
! if(dir->name)
! {
! ILFree(dir->name);
! }
#ifdef HAVE_REGCOMP
if(dir->useRegex)
***************
*** 177,185 ****
const char *CSAntDirNext(CSAntDir *dir)
{
! struct dirent *entry;
for(;;)
{
/* Read the next raw entry from the operating system */
! entry = readdir(dir->dirInfo);
if(!entry)
{
--- 183,193 ----
const char *CSAntDirNext(CSAntDir *dir)
{
! ILDirEnt *entry;
! const char *name;
!
for(;;)
{
/* Read the next raw entry from the operating system */
! entry = ILReadDir(dir->dirInfo);
if(!entry)
{
***************
*** 188,193 ****
/* Always ignore "." and ".." */
! if(!strcmp(entry->d_name, ".") || !strcmp(entry->d_name, ".."))
{
continue;
}
--- 196,203 ----
/* Always ignore "." and ".." */
! name = ILDirEntName(entry);
! if(!strcmp(name, ".") || !strcmp(name, ".."))
{
+ ILFree(entry);
continue;
}
***************
*** 197,208 ****
{
#ifdef HAVE_REGCOMP
! if(regexec(&(dir->regexState), entry->d_name, 0, 0, 0)
!= 0)
{
continue;
}
#else
#ifdef HAVE_RE_COMP
! if(!re_exec(entry->d_name))
{
continue;
}
--- 207,220 ----
{
#ifdef HAVE_REGCOMP
! if(regexec(&(dir->regexState), name, 0, 0, 0) != 0)
{
+ ILFree(entry);
continue;
}
#else
#ifdef HAVE_RE_COMP
! if(!re_exec(name))
{
+ ILFree(entry);
continue;
}
***************
*** 212,216 ****
/* We have a match */
! return entry->d_name;
}
return 0;
--- 224,234 ----
/* We have a match */
! if(dir->name)
! {
! ILFree(dir->name);
! }
! dir->name = ILDupString(name);
! ILFree(entry);
! return dir->name;
}
return 0;
***************
*** 249,253 ****
if(*temp == '/' || *temp == '\\')
{
! #ifdef IL_NATIVE_WIN32
*temp = '\\';
#else
--- 267,271 ----
if(*temp == '/' || *temp == '\\')
{
! #ifdef IL_WIN32_NATIVE
*temp = '\\';
#else
Index: csant_fileset.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/csant/csant_fileset.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** csant_fileset.c 22 Jul 2002 10:21:50 -0000 1.11
--- csant_fileset.c 13 Dec 2002 11:24:46 -0000 1.12
***************
*** 132,136 ****
REGEX_CHAR('.');
REGEX_CHAR('*');
! #ifdef IL_NATIVE_WIN32
REGEX_CHAR('\\');
REGEX_CHAR('\\');
--- 132,136 ----
REGEX_CHAR('.');
REGEX_CHAR('*');
! #ifdef IL_WIN32_NATIVE
REGEX_CHAR('\\');
REGEX_CHAR('\\');
***************
*** 156,160 ****
REGEX_CHAR('[');
REGEX_CHAR('^');
! #ifdef IL_NATIVE_WIN32
REGEX_CHAR('\\');
REGEX_CHAR('\\');
--- 156,160 ----
REGEX_CHAR('[');
REGEX_CHAR('^');
! #ifdef IL_WIN32_NATIVE
REGEX_CHAR('\\');
REGEX_CHAR('\\');
***************
*** 174,178 ****
/* Match a directory separator */
recursive = 1;
! #ifdef IL_NATIVE_WIN32
REGEX_CHAR('\\');
REGEX_CHAR('\\');
--- 174,178 ----
/* Match a directory separator */
recursive = 1;
! #ifdef IL_WIN32_NATIVE
REGEX_CHAR('\\');
REGEX_CHAR('\\');
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnet/csant csant_defs.h,1.5,1.6 csant_dir.c,1.2,1.3 csant_fileset.c,1.11,1.12,
Rhys Weatherley <address@hidden> <=
- Prev by Date:
[Dotgnu-pnet-commits] CVS: pnet/include il_values.h,1.14,1.15
- Next by Date:
[Dotgnu-pnet-commits] CVS: pnet/csdoc doc_html.c,1.8,1.9 doc_stub.c,1.3,1.4
- Previous by thread:
[Dotgnu-pnet-commits] CVS: pnet/include il_values.h,1.14,1.15
- Next by thread:
[Dotgnu-pnet-commits] CVS: pnet/csdoc doc_html.c,1.8,1.9 doc_stub.c,1.3,1.4
- Index(es):