mirror of https://github.com/madler/zlib.git
parent
9712272c78
commit
10daf0d4d7
55 changed files with 1004 additions and 522 deletions
@ -0,0 +1,110 @@ |
|||||||
|
/******************************************************************************/ |
||||||
|
/* */ |
||||||
|
/* ZLIB */ |
||||||
|
/* */ |
||||||
|
/* Compile sources into modules and link them into a service program. */ |
||||||
|
/* */ |
||||||
|
/******************************************************************************/ |
||||||
|
|
||||||
|
PGM |
||||||
|
|
||||||
|
/* Configuration adjustable parameters. */ |
||||||
|
|
||||||
|
DCL VAR(&SRCLIB) TYPE(*CHAR) LEN(10) + |
||||||
|
VALUE('ZLIB') /* Source library. */ |
||||||
|
DCL VAR(&SRCFILE) TYPE(*CHAR) LEN(10) + |
||||||
|
VALUE('SOURCES') /* Source member file. */ |
||||||
|
DCL VAR(&CTLFILE) TYPE(*CHAR) LEN(10) + |
||||||
|
VALUE('TOOLS') /* Control member file. */ |
||||||
|
|
||||||
|
DCL VAR(&MODLIB) TYPE(*CHAR) LEN(10) + |
||||||
|
VALUE('ZLIB') /* Module library. */ |
||||||
|
|
||||||
|
DCL VAR(&SRVLIB) TYPE(*CHAR) LEN(10) + |
||||||
|
VALUE('LGPL') /* Service program library. */ |
||||||
|
|
||||||
|
DCL VAR(&CFLAGS) TYPE(*CHAR) + |
||||||
|
VALUE('OPTIMIZE(40)') /* Compile options. */ |
||||||
|
|
||||||
|
DCL VAR(&TGTRLS) TYPE(*CHAR) + |
||||||
|
VALUE('V5R3M0') /* Target release. */ |
||||||
|
|
||||||
|
|
||||||
|
/* Working storage. */ |
||||||
|
|
||||||
|
DCL VAR(&CMDLEN) TYPE(*DEC) LEN(15 5) VALUE(300) /* Command length. */ |
||||||
|
DCL VAR(&CMD) TYPE(*CHAR) LEN(512) |
||||||
|
DCL VAR(&FIXDCMD) TYPE(*CHAR) LEN(512) |
||||||
|
|
||||||
|
|
||||||
|
/* Compile sources into modules. */ |
||||||
|
|
||||||
|
CHGVAR VAR(&FIXDCMD) VALUE('CRTCMOD' *BCAT &CFLAGS *BCAT + |
||||||
|
'SYSIFCOPT(*IFS64IO)' *BCAT + |
||||||
|
'DEFINE(''_LARGEFILE64_SOURCE''' *BCAT + |
||||||
|
'''_LFS64_LARGEFILE=1'') TGTRLS(' *TCAT &TGTRLS *TCAT + |
||||||
|
') SRCFILE(' *TCAT &SRCLIB *TCAT '/' *TCAT + |
||||||
|
&SRCFILE *TCAT ') MODULE(' *TCAT &MODLIB *TCAT '/') |
||||||
|
|
||||||
|
|
||||||
|
CHGVAR VAR(&CMD) VALUE(&FIXDCMD *TCAT 'ADLER32)') |
||||||
|
CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN) |
||||||
|
|
||||||
|
CHGVAR VAR(&CMD) VALUE(&FIXDCMD *TCAT 'COMPRESS)') |
||||||
|
CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN) |
||||||
|
|
||||||
|
CHGVAR VAR(&CMD) VALUE(&FIXDCMD *TCAT 'CRC32)') |
||||||
|
CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN) |
||||||
|
|
||||||
|
CHGVAR VAR(&CMD) VALUE(&FIXDCMD *TCAT 'DEFLATE)') |
||||||
|
CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN) |
||||||
|
|
||||||
|
CHGVAR VAR(&CMD) VALUE(&FIXDCMD *TCAT 'GZCLOSE)') |
||||||
|
CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN) |
||||||
|
|
||||||
|
CHGVAR VAR(&CMD) VALUE(&FIXDCMD *TCAT 'GZLIB)') |
||||||
|
CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN) |
||||||
|
|
||||||
|
CHGVAR VAR(&CMD) VALUE(&FIXDCMD *TCAT 'GZREAD)') |
||||||
|
CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN) |
||||||
|
|
||||||
|
CHGVAR VAR(&CMD) VALUE(&FIXDCMD *TCAT 'GZWRITE)') |
||||||
|
CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN) |
||||||
|
|
||||||
|
CHGVAR VAR(&CMD) VALUE(&FIXDCMD *TCAT 'INFBACK)') |
||||||
|
CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN) |
||||||
|
|
||||||
|
CHGVAR VAR(&CMD) VALUE(&FIXDCMD *TCAT 'INFFAST)') |
||||||
|
CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN) |
||||||
|
|
||||||
|
CHGVAR VAR(&CMD) VALUE(&FIXDCMD *TCAT 'INFLATE)') |
||||||
|
CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN) |
||||||
|
|
||||||
|
CHGVAR VAR(&CMD) VALUE(&FIXDCMD *TCAT 'INFTREES)') |
||||||
|
CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN) |
||||||
|
|
||||||
|
CHGVAR VAR(&CMD) VALUE(&FIXDCMD *TCAT 'TREES)') |
||||||
|
CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN) |
||||||
|
|
||||||
|
CHGVAR VAR(&CMD) VALUE(&FIXDCMD *TCAT 'UNCOMPR)') |
||||||
|
CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN) |
||||||
|
|
||||||
|
CHGVAR VAR(&CMD) VALUE(&FIXDCMD *TCAT 'ZUTIL)') |
||||||
|
CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN) |
||||||
|
|
||||||
|
|
||||||
|
/* Link modules into a service program. */ |
||||||
|
|
||||||
|
CRTSRVPGM SRVPGM(&SRVLIB/ZLIB) + |
||||||
|
MODULE(&MODLIB/ADLER32 &MODLIB/COMPRESS + |
||||||
|
&MODLIB/CRC32 &MODLIB/DEFLATE + |
||||||
|
&MODLIB/GZCLOSE &MODLIB/GZLIB + |
||||||
|
&MODLIB/GZREAD &MODLIB/GZWRITE + |
||||||
|
&MODLIB/INFBACK &MODLIB/INFFAST + |
||||||
|
&MODLIB/INFLATE &MODLIB/INFTREES + |
||||||
|
&MODLIB/TREES &MODLIB/UNCOMPR + |
||||||
|
&MODLIB/ZUTIL) + |
||||||
|
SRCFILE(&SRCLIB/&CTLFILE) SRCMBR(BNDSRC) + |
||||||
|
TEXT('ZLIB 1.2.5.1') TGTRLS(&TGTRLS) |
||||||
|
|
||||||
|
ENDPGM |
@ -1,8 +1,42 @@ |
|||||||
puff: puff.c puff.h |
CFLAGS=-O
|
||||||
cc -DTEST -o puff puff.c
|
|
||||||
|
puff: puff.o pufftest.o |
||||||
|
|
||||||
|
puff.o: puff.h |
||||||
|
|
||||||
|
pufftest.o: puff.h |
||||||
|
|
||||||
test: puff |
test: puff |
||||||
puff zeros.raw
|
puff zeros.raw
|
||||||
|
|
||||||
|
puft: puff.c puff.h pufftest.o |
||||||
|
cc -fprofile-arcs -ftest-coverage -o puft puff.c pufftest.o
|
||||||
|
|
||||||
|
# puff full coverage test (should say 100%)
|
||||||
|
cov: puft |
||||||
|
@rm -f *.gcov *.gcda
|
||||||
|
@puft -w zeros.raw 2>&1 | cat > /dev/null
|
||||||
|
@echo '04' | xxd -r -p | puft 2> /dev/null || test $$? -eq 2
|
||||||
|
@echo '00' | xxd -r -p | puft 2> /dev/null || test $$? -eq 2
|
||||||
|
@echo '00 00 00 00 00' | xxd -r -p | puft 2> /dev/null || test $$? -eq 254
|
||||||
|
@echo '00 01 00 fe ff' | xxd -r -p | puft 2> /dev/null || test $$? -eq 2
|
||||||
|
@echo '01 01 00 fe ff 0a' | xxd -r -p | puft -f 2>&1 | cat > /dev/null
|
||||||
|
@echo '02 7e ff ff' | xxd -r -p | puft 2> /dev/null || test $$? -eq 246
|
||||||
|
@echo '02' | xxd -r -p | puft 2> /dev/null || test $$? -eq 2
|
||||||
|
@echo '04 80 49 92 24 49 92 24 0f b4 ff ff c3 04' | xxd -r -p | puft 2> /dev/null || test $$? -eq 2
|
||||||
|
@echo '04 80 49 92 24 49 92 24 71 ff ff 93 11 00' | xxd -r -p | puft 2> /dev/null || test $$? -eq 249
|
||||||
|
@echo '04 c0 81 08 00 00 00 00 20 7f eb 0b 00 00' | xxd -r -p | puft 2> /dev/null || test $$? -eq 246
|
||||||
|
@echo '0b 00 00' | xxd -r -p | puft -f 2>&1 | cat > /dev/null
|
||||||
|
@echo '1a 07' | xxd -r -p | puft 2> /dev/null || test $$? -eq 246
|
||||||
|
@echo '0c c0 81 00 00 00 00 00 90 ff 6b 04' | xxd -r -p | puft 2> /dev/null || test $$? -eq 245
|
||||||
|
@puft -f zeros.raw 2>&1 | cat > /dev/null
|
||||||
|
@echo 'fc 00 00' | xxd -r -p | puft 2> /dev/null || test $$? -eq 253
|
||||||
|
@echo '04 00 fe ff' | xxd -r -p | puft 2> /dev/null || test $$? -eq 252
|
||||||
|
@echo '04 00 24 49' | xxd -r -p | puft 2> /dev/null || test $$? -eq 251
|
||||||
|
@echo '04 80 49 92 24 49 92 24 0f b4 ff ff c3 84' | xxd -r -p | puft 2> /dev/null || test $$? -eq 248
|
||||||
|
@echo '04 00 24 e9 ff ff' | xxd -r -p | puft 2> /dev/null || test $$? -eq 250
|
||||||
|
@echo '04 00 24 e9 ff 6d' | xxd -r -p | puft 2> /dev/null || test $$? -eq 247
|
||||||
|
@gcov -n puff.c
|
||||||
|
|
||||||
clean: |
clean: |
||||||
rm -f puff puff.o
|
rm -f puff puft *.o *.gc*
|
||||||
|
@ -0,0 +1,165 @@ |
|||||||
|
/*
|
||||||
|
* pufftest.c |
||||||
|
* Copyright (C) 2002-2010 Mark Adler |
||||||
|
* For conditions of distribution and use, see copyright notice in puff.h |
||||||
|
* version 2.2, 25 Apr 2010 |
||||||
|
*/ |
||||||
|
|
||||||
|
/* Example of how to use puff().
|
||||||
|
|
||||||
|
Usage: puff [-w] [-f] [-nnn] file |
||||||
|
... | puff [-w] [-f] [-nnn] |
||||||
|
|
||||||
|
where file is the input file with deflate data, nnn is the number of bytes |
||||||
|
of input to skip before inflating (e.g. to skip a zlib or gzip header), and |
||||||
|
-w is used to write the decompressed data to stdout. -f is for coverage |
||||||
|
testing, and causes pufftest to fail with not enough output space (-f does |
||||||
|
a write like -w, so -w is not required). */ |
||||||
|
|
||||||
|
#include <stdio.h> |
||||||
|
#include <stdlib.h> |
||||||
|
#include "puff.h" |
||||||
|
|
||||||
|
#if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(__CYGWIN__) |
||||||
|
# include <fcntl.h> |
||||||
|
# include <io.h> |
||||||
|
# define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY) |
||||||
|
#else |
||||||
|
# define SET_BINARY_MODE(file) |
||||||
|
#endif |
||||||
|
|
||||||
|
#define local static |
||||||
|
|
||||||
|
/* Return size times approximately the cube root of 2, keeping the result as 1,
|
||||||
|
3, or 5 times a power of 2 -- the result is always > size, until the result |
||||||
|
is the maximum value of an unsigned long, where it remains. This is useful |
||||||
|
to keep reallocations less than ~33% over the actual data. */ |
||||||
|
local size_t bythirds(size_t size) |
||||||
|
{ |
||||||
|
int n; |
||||||
|
size_t m; |
||||||
|
|
||||||
|
m = size; |
||||||
|
for (n = 0; m; n++) |
||||||
|
m >>= 1; |
||||||
|
if (n < 3) |
||||||
|
return size + 1; |
||||||
|
n -= 3; |
||||||
|
m = size >> n; |
||||||
|
m += m == 6 ? 2 : 1; |
||||||
|
m <<= n; |
||||||
|
return m > size ? m : (size_t)(-1); |
||||||
|
} |
||||||
|
|
||||||
|
/* Read the input file *name, or stdin if name is NULL, into allocated memory.
|
||||||
|
Reallocate to larger buffers until the entire file is read in. Return a |
||||||
|
pointer to the allocated data, or NULL if there was a memory allocation |
||||||
|
failure. *len is the number of bytes of data read from the input file (even |
||||||
|
if load() returns NULL). If the input file was empty or could not be opened |
||||||
|
or read, *len is zero. */ |
||||||
|
local void *load(const char *name, size_t *len) |
||||||
|
{ |
||||||
|
size_t size; |
||||||
|
void *buf, *swap; |
||||||
|
FILE *in; |
||||||
|
|
||||||
|
*len = 0; |
||||||
|
buf = malloc(size = 4096); |
||||||
|
if (buf == NULL) |
||||||
|
return NULL; |
||||||
|
in = name == NULL ? stdin : fopen(name, "rb"); |
||||||
|
if (in != NULL) { |
||||||
|
for (;;) { |
||||||
|
*len += fread((char *)buf + *len, 1, size - *len, in); |
||||||
|
if (*len < size) break; |
||||||
|
size = bythirds(size); |
||||||
|
if (size == *len || (swap = realloc(buf, size)) == NULL) { |
||||||
|
free(buf); |
||||||
|
buf = NULL; |
||||||
|
break; |
||||||
|
} |
||||||
|
buf = swap; |
||||||
|
} |
||||||
|
fclose(in); |
||||||
|
} |
||||||
|
return buf; |
||||||
|
} |
||||||
|
|
||||||
|
int main(int argc, char **argv) |
||||||
|
{ |
||||||
|
int ret, put = 0, fail = 0; |
||||||
|
unsigned skip = 0; |
||||||
|
char *arg, *name = NULL; |
||||||
|
unsigned char *source = NULL, *dest; |
||||||
|
size_t len = 0; |
||||||
|
unsigned long sourcelen, destlen; |
||||||
|
|
||||||
|
/* process arguments */ |
||||||
|
while (arg = *++argv, --argc) |
||||||
|
if (arg[0] == '-') { |
||||||
|
if (arg[1] == 'w' && arg[2] == 0) |
||||||
|
put = 1; |
||||||
|
else if (arg[1] == 'f' && arg[2] == 0) |
||||||
|
fail = 1, put = 1; |
||||||
|
else if (arg[1] >= '0' && arg[1] <= '9') |
||||||
|
skip = (unsigned)atoi(arg + 1); |
||||||
|
else { |
||||||
|
fprintf(stderr, "invalid option %s\n", arg); |
||||||
|
return 3; |
||||||
|
} |
||||||
|
} |
||||||
|
else if (name != NULL) { |
||||||
|
fprintf(stderr, "only one file name allowed\n"); |
||||||
|
return 3; |
||||||
|
} |
||||||
|
else |
||||||
|
name = arg; |
||||||
|
source = load(name, &len); |
||||||
|
if (source == NULL) { |
||||||
|
fprintf(stderr, "memory allocation failure\n"); |
||||||
|
return 4; |
||||||
|
} |
||||||
|
if (len == 0) { |
||||||
|
fprintf(stderr, "could not read %s, or it was empty\n", |
||||||
|
name == NULL ? "<stdin>" : name); |
||||||
|
free(source); |
||||||
|
return 3; |
||||||
|
} |
||||||
|
if (skip >= len) { |
||||||
|
fprintf(stderr, "skip request of %d leaves no input\n", skip); |
||||||
|
free(source); |
||||||
|
return 3; |
||||||
|
} |
||||||
|
|
||||||
|
/* test inflate data with offset skip */ |
||||||
|
len -= skip; |
||||||
|
sourcelen = (unsigned long)len; |
||||||
|
ret = puff(NIL, &destlen, source + skip, &sourcelen); |
||||||
|
if (ret) |
||||||
|
fprintf(stderr, "puff() failed with return code %d\n", ret); |
||||||
|
else { |
||||||
|
fprintf(stderr, "puff() succeeded uncompressing %lu bytes\n", destlen); |
||||||
|
if (sourcelen < len) fprintf(stderr, "%lu compressed bytes unused\n", |
||||||
|
len - sourcelen); |
||||||
|
} |
||||||
|
|
||||||
|
/* if requested, inflate again and write decompressd data to stdout */ |
||||||
|
if (put && ret == 0) { |
||||||
|
if (fail) |
||||||
|
destlen >>= 1; |
||||||
|
dest = malloc(destlen); |
||||||
|
if (dest == NULL) { |
||||||
|
fprintf(stderr, "memory allocation failure\n"); |
||||||
|
free(source); |
||||||
|
return 4; |
||||||
|
} |
||||||
|
puff(dest, &destlen, source + skip, &sourcelen); |
||||||
|
SET_BINARY_MODE(stdout); |
||||||
|
fwrite(dest, 1, destlen, stdout); |
||||||
|
free(dest); |
||||||
|
} |
||||||
|
|
||||||
|
/* clean up */ |
||||||
|
free(source); |
||||||
|
return ret; |
||||||
|
} |
Binary file not shown.
@ -1,123 +0,0 @@ |
|||||||
/******************************************************************************/ |
|
||||||
/* */ |
|
||||||
/* ZLIB */ |
|
||||||
/* */ |
|
||||||
/* Compile sources into modules and link them into a service program. */ |
|
||||||
/* */ |
|
||||||
/******************************************************************************/ |
|
||||||
|
|
||||||
PGM |
|
||||||
|
|
||||||
/* Configuration adjustable parameters. */ |
|
||||||
|
|
||||||
DCL VAR(&SRCLIB) TYPE(*CHAR) LEN(10) + |
|
||||||
VALUE('ZLIB') /* Source library. */ |
|
||||||
DCL VAR(&SRCFILE) TYPE(*CHAR) LEN(10) + |
|
||||||
VALUE('SOURCES') /* Source member file. */ |
|
||||||
DCL VAR(&CTLFILE) TYPE(*CHAR) LEN(10) + |
|
||||||
VALUE('TOOLS') /* Control member file. */ |
|
||||||
|
|
||||||
DCL VAR(&MODLIB) TYPE(*CHAR) LEN(10) + |
|
||||||
VALUE('ZLIB') /* Module library. */ |
|
||||||
|
|
||||||
DCL VAR(&SRVLIB) TYPE(*CHAR) LEN(10) + |
|
||||||
VALUE('LGPL') /* Service program library. */ |
|
||||||
|
|
||||||
DCL VAR(&CFLAGS) TYPE(*CHAR) + |
|
||||||
VALUE('OPTIMIZE(40)') /* Compile options. */ |
|
||||||
|
|
||||||
|
|
||||||
/* Working storage. */ |
|
||||||
|
|
||||||
DCL VAR(&CMDLEN) TYPE(*DEC) LEN(15 5) VALUE(300) /* Command length. */ |
|
||||||
DCL VAR(&CMD) TYPE(*CHAR) LEN(512) |
|
||||||
|
|
||||||
|
|
||||||
/* Compile sources into modules. */ |
|
||||||
|
|
||||||
CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT + |
|
||||||
'/ADLER32) SRCFILE(' *TCAT + |
|
||||||
&SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT + |
|
||||||
') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS) |
|
||||||
CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN) |
|
||||||
|
|
||||||
CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT + |
|
||||||
'/COMPRESS) SRCFILE(' *TCAT + |
|
||||||
&SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT + |
|
||||||
') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS) |
|
||||||
CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN) |
|
||||||
|
|
||||||
CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT + |
|
||||||
'/CRC32) SRCFILE(' *TCAT + |
|
||||||
&SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT + |
|
||||||
') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS) |
|
||||||
CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN) |
|
||||||
|
|
||||||
CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT + |
|
||||||
'/DEFLATE) SRCFILE(' *TCAT + |
|
||||||
&SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT + |
|
||||||
') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS) |
|
||||||
CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN) |
|
||||||
|
|
||||||
CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT + |
|
||||||
'/GZIO) SRCFILE(' *TCAT + |
|
||||||
&SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT + |
|
||||||
') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS) |
|
||||||
CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN) |
|
||||||
|
|
||||||
CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT + |
|
||||||
'/INFBACK) SRCFILE(' *TCAT + |
|
||||||
&SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT + |
|
||||||
') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS) |
|
||||||
CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN) |
|
||||||
|
|
||||||
CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT + |
|
||||||
'/INFFAST) SRCFILE(' *TCAT + |
|
||||||
&SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT + |
|
||||||
') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS) |
|
||||||
CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN) |
|
||||||
|
|
||||||
CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT + |
|
||||||
'/INFLATE) SRCFILE(' *TCAT + |
|
||||||
&SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT + |
|
||||||
') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS) |
|
||||||
CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN) |
|
||||||
|
|
||||||
CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT + |
|
||||||
'/INFTREES) SRCFILE(' *TCAT + |
|
||||||
&SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT + |
|
||||||
') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS) |
|
||||||
CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN) |
|
||||||
|
|
||||||
CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT + |
|
||||||
'/TREES) SRCFILE(' *TCAT + |
|
||||||
&SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT + |
|
||||||
') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS) |
|
||||||
CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN) |
|
||||||
|
|
||||||
CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT + |
|
||||||
'/UNCOMPR) SRCFILE(' *TCAT + |
|
||||||
&SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT + |
|
||||||
') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS) |
|
||||||
CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN) |
|
||||||
|
|
||||||
CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT + |
|
||||||
'/ZUTIL) SRCFILE(' *TCAT + |
|
||||||
&SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT + |
|
||||||
') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS) |
|
||||||
CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN) |
|
||||||
|
|
||||||
|
|
||||||
/* Link modules into a service program. */ |
|
||||||
|
|
||||||
CRTSRVPGM SRVPGM(&SRVLIB/ZLIB) + |
|
||||||
MODULE(&MODLIB/ADLER32 &MODLIB/COMPRESS + |
|
||||||
&MODLIB/CRC32 &MODLIB/DEFLATE + |
|
||||||
&MODLIB/GZIO &MODLIB/INFBACK + |
|
||||||
&MODLIB/INFFAST &MODLIB/INFLATE + |
|
||||||
&MODLIB/INFTREES &MODLIB/TREES + |
|
||||||
&MODLIB/UNCOMPR &MODLIB/ZUTIL) + |
|
||||||
SRCFILE(&SRCLIB/&CTLFILE) SRCMBR(BNDSRC) + |
|
||||||
TEXT('ZLIB 1.2.3') TGTRLS(V4R4M0) |
|
||||||
|
|
||||||
ENDPGM |
|
Binary file not shown.
Loading…
Reference in new issue