testparse.c
author icculus
Mon, 11 Feb 2008 22:37:34 -0500
branchtrunk
changeset 9 aea1b254e6a5
parent 7 18bf77bb8c07
child 14 7075b6e31471
permissions -rw-r--r--
[svn] Patched to compile.

#include <stdio.h>
#include <stdlib.h>
#include "d3d2glsl.h"

int main(int argc, char **argv)
{
    if (argv[1] != NULL)
    {
        FILE *io = fopen(argv[1], "rb");
        if (io != NULL)
        {
            unsigned char *buf = (unsigned char *) malloc(1000000);
            int rc = fread(buf, 1, 1000000, io);
            fclose(io);
            D3D2GLSL_parse(buf, rc);
            free(buf);
        } // if
    } // if

    return 0;
} // main

// end of testparse.c ...