mirror of
https://github.com/vgmstream/vgmstream.git
synced 2025-01-17 23:36:41 +01:00
Removed old, unused STREAMFILE test
This commit is contained in:
parent
46d7fcfe80
commit
767444f58c
@ -1,38 +0,0 @@
|
||||
#include <stdio.h>
|
||||
#include "streamfile.h"
|
||||
|
||||
char buf[0x1002];
|
||||
|
||||
int main(void) {
|
||||
STREAMFILE * infile;
|
||||
FILE * outfile;
|
||||
size_t filesize,i;
|
||||
|
||||
infile = open_streamfile("bob.bin");
|
||||
if (!infile) {
|
||||
printf("failed to open\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
outfile = fopen("fred.bin","wb");
|
||||
|
||||
filesize = get_streamfile_size(infile);
|
||||
|
||||
for (i=0;i<filesize;i+=0x1002) {
|
||||
size_t bytes_read = read_streamfile(buf,i,0x1002,infile);
|
||||
|
||||
fwrite(buf,1,bytes_read,outfile);
|
||||
|
||||
if (bytes_read != 0x1002) {
|
||||
if (bytes_read+i==filesize) break;
|
||||
printf("error, short read\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
fclose(outfile);
|
||||
|
||||
close_streamfile(infile);
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user