Skip to content

Latest commit

 

History

History
24 lines (20 loc) · 491 Bytes

testparse.c

File metadata and controls

24 lines (20 loc) · 491 Bytes
 
2
#include <stdlib.h>
3
4
5
6
7
8
9
10
11
#include "d3d2glsl.h"
int main(int argc, char **argv)
{
if (argv[1] != NULL)
{
FILE *io = fopen(argv[1], "rb");
if (io != NULL)
{
12
unsigned char *buf = (unsigned char *) malloc(1000000);
13
14
int rc = fread(buf, 1, 1000000, io);
fclose(io);
15
D3D2GLSL_parse("d3d", buf, rc);
16
17
18
19
20
21
22
23
free(buf);
} // if
} // if
return 0;
} // main
// end of testparse.c ...