Path: blob/master/libmupen64plus/mupen64plus-video-glide64/src/compiletex.c
2 views
/*1* Glide64 - Glide video plugin for Nintendo 64 emulators.2* Copyright (c) 2002 Dave20013*4* This program is free software; you can redistribute it and/or modify5* it under the terms of the GNU General Public License as published by6* the Free Software Foundation; either version 2 of the License, or7* any later version.8*9* This program is distributed in the hope that it will be useful,10* but WITHOUT ANY WARRANTY; without even the implied warranty of11* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the12* GNU General Public License for more details.13*14* You should have received a copy of the GNU General Public15* Licence along with this program; if not, write to the Free16* Software Foundation, Inc., 51 Franklin Street, Fifth Floor,17* Boston, MA 02110-1301, USA18*/1920#include <stdio.h>2122int main(int argc, char **argv)23{24FILE *src, *dest;25unsigned char a;2627src = fopen(argv[1], "rb");28dest = fopen(argv[2], "wb");2930fprintf(dest, "unsigned char %s[] = {", argv[3]);3132while(fread(&a, 1, 1, src))33{34fprintf(dest, "%d,\n", a);35}36fprintf(dest, "0};\n");37fclose(src);38fclose(dest);3940return 0;41}42434445