/* * EX06CON.C * * C/DOS Example program for ArchiveLib 2.0 * * Copyright (c) Greenleaf Software, Inc. 1994 - 1996 * All Rights Reserved * * MEMBERS/FUNCTIONS DEMONSTRATED * * * DESCRIPTION * * This example program creates a list of files using the ability of * ALWildCardExpander to traverse subdirectories when expanding wild * card file specifications. Of course, you might not have any * subdirectories when you run this. If not, try creating some and * putting *.CPP and *.OBJ files in some of them. Or even better, * change the file spec to "C:\\*.CPP" to get lots-o-files. * * REVISION HISTORY * * February 1, 1996 2.0A : Second release * */ #include #include #include "arclib.h" #include "bargraph.h" #include "wildcard.h" #include "glarc.h" #include "pkarc.h" int main() { hALArchive archive; hALMonitor monitor; hALEntryList list; printf( "Archive Library 2.0\nEX06CON.C\n\n" ); printf( "This example program creates a list of files using the ability of\n" ); printf( "ALWildCardExpander to traverse subdirectories when expanding wild\n" ); printf( "card file specifications. Of course, you might not have any\n" ); printf( "subdirectories when you run this. If not, try creating some and\n" ); printf( "putting *.CPP and *.OBJ files in some of them. Or even better,\n" ); printf( "change the file spec to 'C:\\*.CPP' to get lots-o-files.\n" ); getch(); monitor = newALBarGraph( AL_MONITOR_OBJECTS ); #if defined( ZIP ) printf( "\nRecursively adding *.cpp and *.obj to dos00.zip\n" ); archive = newALPkArchive( "dos00.zip" ); list = newALListPkTools( monitor, AL_DEFAULT, AL_DEFAULT, AL_DEFAULT ); #else printf( "\nRecursively adding *.cpp and *.obj to dos00.gal\n" ); archive = newALGlArchive( "dos00.gal" ); list = newALListGlTools( monitor, AL_DEFAULT ); #endif ALEntryListAddWildCardFiles( list, "*.cpp, *.obj", 1 ); return ALArchiveCreate( archive, list ); }