714dd74636
git-svn-id: svn://10.65.10.50/trunk@5350 c028cbd2-c16b-5b4b-a496-9718f37d4682
48 lines
1.0 KiB
C++
Executable File
48 lines
1.0 KiB
C++
Executable File
#include "arclib.h"
|
|
#if !defined( AL_IBM )
|
|
#pragma hdrstop
|
|
#endif
|
|
|
|
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
#if defined( AL_BORLAND )
|
|
#include <dir.h>
|
|
#else
|
|
#include <direct.h>
|
|
#endif
|
|
#include "alsimple.h"
|
|
|
|
void my_callback( const char AL_DLL_FAR *name,
|
|
int object_ratio,
|
|
int job_ratio )
|
|
{
|
|
if ( name )
|
|
cout << "\n" << name << " ";
|
|
if ( object_ratio >= 0 ) {
|
|
char buf[ 24 ];
|
|
sprintf( buf, "%d%% %d%%", object_ratio, job_ratio );
|
|
cout << " \b\b\b\b\b\b\b\b\b\b" << buf;
|
|
for ( int i = 0 ; i < (int) strlen( buf ) ; i++ )
|
|
cout << '\b';
|
|
}
|
|
}
|
|
|
|
main()
|
|
{
|
|
int i;
|
|
struct ALZipDir *z;
|
|
int count;
|
|
|
|
z = ALReadDir( "libs.zip", &count, 0 );
|
|
if ( z != 0 ) {
|
|
for ( i = 0 ; i < count ; i++ )
|
|
if ( i % 2 )
|
|
z[ i ].mark = 0;
|
|
ALDelete( z, my_callback );
|
|
ALFreeDir( z );
|
|
} else
|
|
cout << "Error reading zip file directory\n";
|
|
return 0;
|
|
}
|
|
|