campo-sirio/al/examples/ex02con.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

62 lines
1.6 KiB
C
Executable File

/*
* EX02CON.C
*
* C/DOS Example program for ArchiveLib 2.0
*
* Copyright (c) Greenleaf Software, Inc. 1994 - 1996
* All Rights Reserved
*
* MEMBERS/FUNCTIONS DEMONSTRATED
*
* ALArchiveAppend()
*
* DESCRIPTION
*
* This example program adds all *.CPP files to the existing dos00.gal
* archive. If you haven't already created dos00.gal, you can do so
* easily by executing EX00CON or EX01CON.
*
* REVISION HISTORY
*
* February 1, 1996 2.0A : Second release
*
*/
#include <stdio.h>
#include <conio.h>
#include "arclib.h"
#include "pkarc.h"
#include "glarc.h"
#include "spinner.h"
int main()
{
hALArchive archive;
hALMonitor monitor;
hALEntryList list;
int status;
printf( "Archive Library 2.0\nEX02CON.C\n\n" );
printf( "This example program adds all *.CPP files to the existing dos00.gal\n" );
printf( "archive. If you haven't already created dos00.gal, you can do so\n" );
printf( "easily by executing EX00CON or EX01CON.\n" );
getch();
monitor = newALSpinner( AL_MONITOR_OBJECTS );
#if defined( ZIP )
printf( "\nAppending all *.cpp files to dos00.zip.\n\n" );
archive = newALPkArchive( "dos00.zip" );
list = newALListPkCompressFileTools( monitor, 9, 13, 6 );
#else
printf( "\nAppending all *.cpp files to dos00.gal.\n\n" );
archive = newALGlArchive( "dos00.gal" );
list = newALListGlCompressFileTools( monitor, AL_GREENLEAF_LEVEL_1 );
#endif
ALEntryListAddWildCardFiles( list, "*.CPP", 0 );
status = ALArchiveAppend( archive, list );
printf( "Result of append operation is %d\n", status );
return status;
}