campo-sirio/al/examples/ex06con.c
alex 714dd74636 Archive Library versione 2.00
git-svn-id: svn://10.65.10.50/trunk@5350 c028cbd2-c16b-5b4b-a496-9718f37d4682
1997-10-09 16:09:54 +00:00

64 lines
2.0 KiB
C
Executable File

/*
* 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 <stdio.h>
#include <conio.h>
#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 );
}