<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<font face="Courier New, monospace" size="4">
<div>I have a project that includes files from a vendor that are used to build a library. I put those files into a directory called “vendlib”. I have been using a manifest to find the .c files in that directory and compile them into the library.</div>
<div> </div>
<div>That’s been working well but now I need to break it. We’re now receiving files from the vendor that have names like “scan_16.c” and “scan_32.c” and “scan_64.c”. I don’t want to compile the *_32.c files but want the *_16 and *_64.c files.</div>
<div> </div>
<div>I can hardwire the bit in the cook file that builds the manifest to ignore those files. I tried something like:</div>
<div> manifest = [filter_out %0%_32.c</div>
<div> [stripdot</div>
<div> [collect find . –type f –name ‘*.c’ print]]];</div>
<div> </div>
<div>It works but I’m trying to keep that part of the cook file generic since it’s included in many projects. I would like something like</div>
<div> </div>
<div> if [filterFile] then</div>
<div> manifest = [filter_out [filterFile]</div>
<div> [stripdot</div>
<div> [collect find . –type f –name ‘*.c’ print]]];</div>
<div> else</div>
<div> manifest = [stripdot</div>
<div> [collect find . –type f –name ‘*.c’ print]];</div>
<div><font face="Calibri, sans-serif" size="2"> </font></div>
<div>So, now that that’s working, I’m wondering “so what to do when I need to filter out *_32.c and *_16.c”? I don’t see a way to pass two patterns to filter on without going through a loop</div>
<div> </div>
<div> manifest [stripdot [collect find . –type f –name ‘*.c’ print]];</div>
<div> loop local aFilter = [filterFile] {</div>
<div> manifest = [filter_out [aFile] [manifest]];</div>
<div> }</div>
<div><font face="Calibri, sans-serif" size="2"> </font></div>
<div>Is there a better way to handle that?</div>
<div> </div>
<div>Thanks,</div>
<div style="margin-bottom: 10pt; "><font face="Palatino Linotype, serif" size="4">Michael D Henderson</font></div>
<div style="margin-bottom: 8pt; "><font face="Arial Narrow, sans-serif" size="2"> no problem is too big if you don't have to solve all of it</font></div>
<div style="margin-bottom: 10pt; "><font face="Calibri, sans-serif" size="2"> </font></div>
<div><font face="Calibri, sans-serif" size="2"> </font></div>
<div><font face="Calibri, sans-serif" size="2"> </font></div>
</font>
</body>
</html>