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:
meep-eep
2005-02-19 00:38:46 +00:00
parent 440fec6289
commit e7eabd46b9
51 changed files with 10988 additions and 0 deletions
+38
View File
@@ -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);
}