Old tools that got removed a long time ago.
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1545 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
#include <stdio.h>
|
||||
#include "compiler.h"
|
||||
|
||||
main (argc, argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
{
|
||||
FILE *infp, *outfp;
|
||||
COUNT bytes_read;
|
||||
DWORD filelen;
|
||||
static char buf[512];
|
||||
|
||||
outfp = fopen (argv[1], "wb");
|
||||
|
||||
infp = fopen (argv[2], BUFFERED_BINREAD);
|
||||
ffilelength (infp, &filelen);
|
||||
while (filelen)
|
||||
{
|
||||
bytes_read = filelen >= sizeof (buf) ?
|
||||
sizeof (buf) : (COUNT)filelen;
|
||||
fwrite (buf, 1, fread (buf, 1, bytes_read, infp), outfp);
|
||||
filelen -= bytes_read;
|
||||
}
|
||||
fclose (infp);
|
||||
|
||||
infp = fopen (argv[3], BUFFERED_BINREAD);
|
||||
ffilelength (infp, &filelen);
|
||||
while (filelen)
|
||||
{
|
||||
bytes_read = filelen >= sizeof (buf) ?
|
||||
sizeof (buf) : (COUNT)filelen;
|
||||
fwrite (buf, 1, fread (buf, 1, bytes_read, infp), outfp);
|
||||
filelen -= bytes_read;
|
||||
}
|
||||
fclose (infp);
|
||||
|
||||
fclose (outfp);
|
||||
}
|
||||
Reference in New Issue
Block a user