714dd74636
git-svn-id: svn://10.65.10.50/trunk@5350 c028cbd2-c16b-5b4b-a496-9718f37d4682
65 lines
1.8 KiB
C++
Executable File
65 lines
1.8 KiB
C++
Executable File
//
|
|
// EX00CON.CPP
|
|
//
|
|
// C++/DOS Example program for ArchiveLib 2.0
|
|
//
|
|
// Copyright (c) Greenleaf Software, Inc. 1994 - 1996
|
|
// All Rights Reserved
|
|
//
|
|
// MEMBERS/FUNCTIONS DEMONSTRATED
|
|
//
|
|
// ALArchiveBase::Create()
|
|
// ALArchive::ALArchive()
|
|
// ALArchive::~ALArchive()
|
|
// ALArchive::AddWildCardFiles()
|
|
// ALEntryList::ALEntryList()
|
|
// ALEntryList::~ALEntryList()
|
|
// ALBarGraph::ALBarGraph()
|
|
//
|
|
// DESCRIPTION
|
|
//
|
|
// This example program creates an archive and adds files to it, while
|
|
// using an ALBarGraph monitor. It doesn't pay any attention to the
|
|
// command line, it just adds INPUT*.DAT and *.BAK to DOS00.GAL. Any
|
|
// existing DOS00.GAL gets obliterated.
|
|
//
|
|
// REVISION HISTORY
|
|
//
|
|
// February 1, 1996 2.0A : Second release
|
|
//
|
|
|
|
#include <conio.h>
|
|
|
|
#include "arclib.h"
|
|
#include "bargraph.h"
|
|
#include "pkarc.h"
|
|
#include "glarc.h"
|
|
#include "pkengn.h"
|
|
|
|
main( int, char *[] )
|
|
{
|
|
cout << "Archive Library 2.0\nEX00CON.CPP\n\n";
|
|
cout << "This example program creates an archive and adds files to it, while\n";
|
|
cout << "using an ALBarGraph monitor. It doesn't pay any attention to the\n";
|
|
cout << "command line, it just adds INPUT*.DAT and *.BAK to dos00.gal. Any\n";
|
|
cout << "existing dos00.gal gets obliterated.\n";
|
|
getch();
|
|
|
|
ALBarGraph monitor( AL_MONITOR_OBJECTS, cout );
|
|
#if defined( ZIP )
|
|
ALPkArchive archive( "dos00.zip" );
|
|
ALEntryList list( &monitor, PkCompressTools() );
|
|
#else
|
|
ALGlArchive archive( "dos00.gal" );
|
|
ALEntryList list( &monitor, GlCompressTools() );
|
|
#endif
|
|
cout << "\nAdding input*.dat and *.bak to "
|
|
<< archive.GetStorageObject()->mName.GetSafeName()
|
|
<< " using an ALBarGraph\n\n";
|
|
|
|
list.AddWildCardFiles( "input*.dat, *.bak" );
|
|
archive.Create( list );
|
|
cout << archive.mStatus << "\n";
|
|
return archive.mStatus;
|
|
}
|