[darwinbuild-changes] [285] trunk/darwinxref/DBDataStore.c
source_changes at macosforge.org
source_changes at macosforge.org
Wed Oct 4 02:02:19 PDT 2006
Revision: 285
http://trac.macosforge.org/projects/darwinbuild/changeset/285
Author: kevin
Date: 2006-10-04 02:02:19 -0700 (Wed, 04 Oct 2006)
Log Message:
-----------
- only show aliases that point to something in the current build
Modified Paths:
--------------
trunk/darwinxref/DBDataStore.c
Modified: trunk/darwinxref/DBDataStore.c
===================================================================
--- trunk/darwinxref/DBDataStore.c 2005-09-29 23:51:27 UTC (rev 284)
+++ trunk/darwinxref/DBDataStore.c 2006-10-04 09:02:19 UTC (rev 285)
@@ -273,13 +273,15 @@
}
CFArrayRef DBCopyOneProjectNames(CFStringRef build) {
- char* cbuild = strdup_cfstr(build);
+ char* origbuild = strdup_cfstr(build);
- CFMutableArrayRef projects = (CFMutableArrayRef)SQL_CFARRAY("SELECT DISTINCT project FROM properties WHERE build=%Q", cbuild);
+ CFMutableArrayRef projects = (CFMutableArrayRef)SQL_CFARRAY("SELECT DISTINCT project FROM properties WHERE build=%Q", origbuild);
+ char* cbuild = origbuild;
+
// also include any build aliases for these projects
do {
- CFArrayRef res = SQL_CFARRAY("SELECT DISTINCT project FROM properties WHERE build=%Q AND property='original'", cbuild);
+ CFArrayRef res = SQL_CFARRAY("SELECT DISTINCT project FROM properties WHERE build=%Q AND property='original' AND value IN (SELECT DISTINCT project FROM properties WHERE build=%Q)", cbuild, origbuild);
free(cbuild);
arrayAppendArrayDistinct(projects, res);
@@ -291,7 +293,7 @@
CFArraySortValues(projects, CFRangeMake(0, CFArrayGetCount(projects)), (CFComparatorFunction)CFStringCompare, 0);
- free(cbuild);
+ free(origbuild);
return projects;
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/darwinbuild-changes/attachments/20061004/ef99b8d4/attachment-0001.html
More information about the darwinbuild-changes
mailing list