00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #include "lwoInputFile.h"
00020 #include "lwoChunk.h"
00021 #include "config_lwo.h"
00022
00023 int
00024 main(int argc, char *argv[]) {
00025 init_liblwo();
00026 if (argc != 2) {
00027 nout << "test_lwo file.lwo\n";
00028 exit(1);
00029 }
00030
00031 LwoInputFile in;
00032 if (!in.open_read(argv[1])) {
00033 nout << "Unable to open " << argv[1] << "\n";
00034 exit(1);
00035 }
00036
00037 PT(IffChunk) chunk = in.get_chunk();
00038 while (chunk != (IffChunk *)NULL) {
00039 nout << "Got chunk type " << chunk->get_type() << ":\n";
00040 chunk->write(nout, 2);
00041 chunk = in.get_chunk();
00042 }
00043
00044 nout << "EOF = " << in.is_eof() << "\n";
00045
00046 return (0);
00047 }