[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] pnet/csant csant_cscc.c, 1.20, 1.21 csant_defs.h,
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] pnet/csant csant_cscc.c, 1.20, 1.21 csant_defs.h, 1.8, 1.9 csant_parse.c, 1.5, 1.6 |
Date: |
Sun, 09 Nov 2003 21:29:04 +0000 |
Update of /cvsroot/dotgnu-pnet/pnet/csant
In directory subversions:/tmp/cvs-serv19187/csant
Modified Files:
csant_cscc.c csant_defs.h csant_parse.c
Log Message:
Preserve the full profile values, not just true/false, so that
non-boolean values can be defined.
Index: csant_parse.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/csant/csant_parse.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** csant_parse.c 4 Jan 2003 08:43:25 -0000 1.5
--- csant_parse.c 9 Nov 2003 21:29:01 -0000 1.6
***************
*** 32,35 ****
--- 32,36 ----
CSAntTarget *CSAntTargetList = 0;
char **CSAntProfileDefines = 0;
+ char **CSAntProfileValues = 0;
int CSAntNumProfileDefines = 0;
***************
*** 387,403 ****
}
! const char* CSAntGetProfileValue(const char* name,int len)
{
! int i=0;
! if(!name)return 0;
! if(!CSAntProfileDefines || !CSAntNumProfileDefines)
{
return 0;
}
! for(i=0;i<CSAntNumProfileDefines;i++)
{
! if(!strncmp(name,CSAntProfileDefines[i],len))
{
! return "true";
}
}
--- 388,404 ----
}
! const char *CSAntGetProfileValue(const char *name, int len)
{
! int index;
! if(!name)
{
return 0;
}
! for(index = 0; index < CSAntNumProfileDefines; index++)
{
! if(!strncmp(name, CSAntProfileDefines[index], len) &&
! CSAntProfileDefines[index][len] == '\0')
{
! return CSAntProfileValues[index];
}
}
***************
*** 503,506 ****
--- 504,508 ----
const char *value;
char **newDefines;
+ char **newValues;
/* Read the first item, which should be the top-level "profile" tag */
***************
*** 524,528 ****
name = ILXMLGetParam(reader, "name");
value = ILXMLGetParam(reader, "value");
! if(name && value && !ILStrICmp(value, "true"))
{
newDefines = (char **)ILRealloc
--- 526,530 ----
name = ILXMLGetParam(reader, "name");
value = ILXMLGetParam(reader, "value");
! if(name && value)
{
newDefines = (char **)ILRealloc
***************
*** 539,542 ****
--- 541,557 ----
}
CSAntProfileDefines = newDefines;
+ newValues = (char **)ILRealloc
+ (CSAntProfileValues,
+ (CSAntNumProfileDefines + 1) *
sizeof(char *));
+ if(!newValues)
+ {
+ CSAntOutOfMemory();
+ }
+ if((newValues[CSAntNumProfileDefines] =
+ ILDupString(value)) ==
0)
+ {
+ CSAntOutOfMemory();
+ }
+ CSAntProfileValues = newValues;
++CSAntNumProfileDefines;
}
Index: csant_defs.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/csant/csant_defs.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** csant_defs.h 27 Feb 2003 07:27:27 -0000 1.8
--- csant_defs.h 9 Nov 2003 21:29:01 -0000 1.9
***************
*** 87,90 ****
--- 87,91 ----
*/
extern char **CSAntProfileDefines;
+ extern char **CSAntProfileValues;
extern int CSAntNumProfileDefines;
Index: csant_cscc.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/csant/csant_cscc.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** csant_cscc.c 10 Oct 2003 04:17:37 -0000 1.20
--- csant_cscc.c 9 Nov 2003 21:29:01 -0000 1.21
***************
*** 455,461 ****
for(index = 0; index < CSAntNumProfileDefines; ++index)
{
! AddUnique(&(args->defines), &(args->numDefines),
! CSAntProfileDefines[index],
! strlen(CSAntProfileDefines[index]));
}
--- 455,464 ----
for(index = 0; index < CSAntNumProfileDefines; ++index)
{
! if(!ILStrICmp(CSAntProfileValues[index], "true"))
! {
! AddUnique(&(args->defines), &(args->numDefines),
! CSAntProfileDefines[index],
! strlen(CSAntProfileDefines[index]));
! }
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] pnet/csant csant_cscc.c, 1.20, 1.21 csant_defs.h, 1.8, 1.9 csant_parse.c, 1.5, 1.6,
Rhys Weatherley <address@hidden> <=