diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /support/dktools/testlzws.c |
Initial commit
Diffstat (limited to 'support/dktools/testlzws.c')
-rw-r--r-- | support/dktools/testlzws.c | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/support/dktools/testlzws.c b/support/dktools/testlzws.c new file mode 100644 index 0000000000..39a05948f6 --- /dev/null +++ b/support/dktools/testlzws.c @@ -0,0 +1,73 @@ +/* + WARNING: This file was generated by dkct. + Changes you make here will be lost if dkct is run again! + You should modify the original source and run dkct on it. + Original source: testlzws.ctr +*/ + +/** @file testlzws.c The testlzws module. +*/ + + +#line 1 "testlzws.ctr" + +#include <stdio.h> + +#include "dk4conf.h" +#include "dk4lzwe.h" +#include "dk4edstm.h" +#include "dk4strmf.h" +#include "dk4strmco.h" + + + +#line 11 "testlzws.ctr" + + +static const unsigned char teststr[] = { + 45, 45, 45, 45, 45, 65, 45, 45, 45, 66 +}; + + + +int main(int argc, char *argv[]) +{ + dk4_stream_t *strm_stdout; + dk4_stream_t *strm_lzw; + + + +#line 25 "testlzws.ctr" + + +#line 26 "testlzws.ctr" + strm_stdout = dk4stream_open_for_file( + stdout, DK4_STREAM_WRITE, 0, 4096, NULL + ); + if (NULL != strm_stdout) { + strm_lzw = dk4strmco_open( + strm_stdout, + DK4_STRMCO_PP_NONE, DK4_STRMCO_CO_LZW, DK4_STRMCO_OE_HEX, + (DK4_STRMCO_FL_EOD_OE | DK4_STRMCO_FL_NL_OE), NULL + ); + if (NULL != strm_lzw) { + dk4stream_write( + strm_lzw, teststr, sizeof(teststr), NULL + ); + dk4stream_close(strm_lzw, NULL); + } + dk4stream_close(strm_stdout, NULL); + } + + +#line 44 "testlzws.ctr" + + +#line 45 "testlzws.ctr" + return 0; +} + + + +/* vim: set ai sw=4 ts=4 : */ + |