diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2016-02-22 06:41:00 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2016-02-22 06:41:00 +0000 |
commit | 553ae4df24322a4fb019c63b81e98093f2b1a6a2 (patch) | |
tree | 4d12a0e51045a061e650c7b5484822703c8d2904 /Build/source/libs/zziplib/zziplib-0.13.62/SDL/SDL_rwops_zzcat.c | |
parent | 7e3d9b4d0fea3356761f420fccbce2bb4aa30442 (diff) |
libs/zziplib: New convention
git-svn-id: svn://tug.org/texlive/trunk@39816 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/zziplib/zziplib-0.13.62/SDL/SDL_rwops_zzcat.c')
-rw-r--r-- | Build/source/libs/zziplib/zziplib-0.13.62/SDL/SDL_rwops_zzcat.c | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/Build/source/libs/zziplib/zziplib-0.13.62/SDL/SDL_rwops_zzcat.c b/Build/source/libs/zziplib/zziplib-0.13.62/SDL/SDL_rwops_zzcat.c deleted file mode 100644 index d8706b1da29..00000000000 --- a/Build/source/libs/zziplib/zziplib-0.13.62/SDL/SDL_rwops_zzcat.c +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) 2001 Guido Draheim <guidod@gmx.de> - * Use freely under the restrictions of the ZLIB License - * - * (this example uses errno which might not be multithreaded everywhere) - */ - -#include <SDL_rwops_zzip.h> -#include <stdlib.h> /* exit */ - -/* mostly a copy from zzcat.c */ - -int main (int argc, char** argv) -{ - static const char usage[] = - " zzcat <file>... \n" - " - prints the file to stdout. the file can be a normal file\n" - " or an inflated part of a zip-archive \n" - ; - - int argn; - if (argc <= 1) - { - printf (usage); - exit (0); - } - - for (argn=1; argn < argc; argn++) - { - SDL_RWops* rwops; - - rwops = SDL_RWFromZZIP (argv[argn], "rb"); - if (! rwops) - { - perror (argv[argn]); - continue; - }else{ - char buf[17]; - int n; - - /* read chunks of 16 bytes into buf and print them to stdout */ - while (0 < (n = SDL_RWread(rwops, buf, 1, 16))) - { - buf[n] = '\0'; -# ifdef STDOUT_FILENO - write (STDOUT_FILENO, buf, n); -# else - fwrite (buf, 1, n, stdout); -# endif - } - - if (n == -1) - perror (argv[argn]); - - SDL_RWclose (rwops); - } - } - - return 0; -} - - - |