/programs/fs/unzip60/cmsmvs/INSTALL.CMS |
---|
0,0 → 1,159 |
----------------------------------------------------------------------- |
[Installation notes for VM/CMS port of UNZIP 5.32 and ZIP 2.2] |
Additional notes from Ian E. Gorman (4/98): |
I have not fully tested ZIP and UNZIP in VM (for example, I have not |
tried all the options), so ZIP 2.2 for VM and UNZIP 5.32 for VM |
should be regarded as beta versions. Try them out before you decide |
that you can depend on them. |
Most of the work for the VM port has been done by others, but I have |
made some changes and compiled on a more recent version of VM/CMS. It |
is possible that I have introduced new problems or undone some of the |
solutions found by previous authors. |
Installation |
============ |
The executables are stored in CMS "PACK" format instead of being |
stored in ZIP archives. This format takes a little longer to |
download, but installation is slightly simpler. |
Installing UNZIP |
---------------- |
The UNZIP executable is supplied as the binary file UNZIP.MOD, in the |
CMS "PACK" format. |
You must get the UNZIP.MOD file on to your system as a binary file in |
fixed recording mode, block size 1024. |
If you are using FTP in CMS, you can get the file in the correct |
format with the LOCSITE and BINARY commands. Assuming that the UNZIP |
executable is stored on the remote site as unz532vm.mod, you could |
issue the following commands |
FTP where.ever.com |
<enter user id and password and other stuff> |
BINARY |
LOCSITE FIX 1024 |
GET unz532vm.mod |
QUIT |
If you are using a 3270 terminal session to upload from a PC, you can |
upload the file in the correct format with the SEND command: |
SEND unz532vm.mod A: unz532vm mod a1 (RECFM F LRECL 1024 |
If your 3270 emulator does not have the SEND command, but is a GUI |
application, it may allow you to upload from the menu bar. If so, |
set your options to binary, VM/CMS, fixed record length, and a length |
of 1024 before you upload. |
When you get the PACKed file on your CMS minidisk, you convert it to |
an executable module by using the COPY command with the UNPACK option: |
COPY unz532vm mod a unzip module a1 (UNPACK OLDDATE REPLACE |
You can omit the OLDDATE and REPLACE options if you want to. |
Installing ZIP |
-------------- |
The ZIP executable is supplied as the binary file ZIP.MOD, in the CMS |
"PACK" format. |
You must get the ZIP.MOD file on to your system as a binary file in |
fixed recording mode, block size 1024. Assuming that the file is |
stored as zip22vm.mod, you can get the file the same way you got the |
UNZIP.MOD file: |
Using FTP: |
FTP where.ever.com |
<enter user id and password and other stuff> |
BINARY |
LOCSITE FIX 1024 |
GET zip22vm.mod |
QUIT |
Using 3270 file transfer: |
SEND unz532vm.mod A: unz532vm mod a1 (RECFM F LRECL 1024 |
When you get the PACKed file on your CMS minidisk, you convert it to |
an executable module by using the COPY command with the UNPACK option: |
COPY zip22vm mod a zip module a1 (UNPACK OLDDATE REPLACE |
Installing Documentation |
------------------------ |
Once you have UNZIP running, you can use it to extract documentation |
from ZIP archives. |
You can transfer the ZIP archives to VMV/CMS as a binary file with any |
record length. A record length of 1 will work fine: |
via FTP: |
FTP where.ever.com |
<enter user id and password and other stuff> |
BINARY |
LOCSITE FIX 1 |
GET zip22vm.zip zipdoc.zip |
GET unz532vm.zip unzipdoc.zip |
QUIT |
via 3270 session: |
SEND zip22vm.zip A: unzipdoc zip a1 (RECFM F LRECL 1 |
SEND unz532vm.zip A: zipdoc zip a1 (RECFM F LRECL 1 |
Once you have the ZIP archives, extract the documentation to the minidisk of |
your choice by using the -d option: |
unzip -a -d A2 unzipdoc.zip |
unzip -a -d A2 zipdoc.zip |
The "-a" option is required because the documents are archived as |
ASCII text files, but they must be converted to EBCDIC to read them |
in VM/CMS. |
Notes |
===== |
Different EBCDIC Character Sets |
------------------------------- |
The documentation may look strange on your system, because UNZIP |
translates from ASCII to "Open Systems" EBCDIC (IBM-1047). Unless |
you are a software developer, you are probably using a different |
kind of EBCDIC (like US EBCDIC, IBM-037). This causes some character |
codes to display as different characters. For example, the character |
codes that display as square brackets in IBM-1047 will display as |
e-acute and a-grave in IBM-037. |
You can use the IBM ICONV utility to translate documents from one |
character set to another: |
ICONV old doc a new doc a1 (FROMCODE IBM-1047 TOCODE IBM-037 |
IND$FILE protocol |
----------------- |
This is the method by which files are transferred via 3270 sessions |
between PC and mainframe. |
If you know how to transfer files via 3270 session between PC and |
mainframe, you know as much as you need to know about IND$FILE. |
If your mainframe has IND$FILE, and your 3270 emulator does file |
transfers, you can use your emulator to transfer files between PC |
and mainframe. |
/programs/fs/unzip60/cmsmvs/README.CMS |
---|
0,0 → 1,434 |
Using ZIP and UNZIP on VM/CMS |
============================= |
Installing executables |
---------------------- |
The following CMS MODULEs are available: |
ZIP |
ZIPNOTE |
ZIPCLOAK |
ZIPSPLIT |
UNZIP |
In addition to these, each MODULE file also has an EXEC with the same |
name. These EXECs are front-ends to the MODULES that will attempt to |
set up the required runtime libraries before running the MODULE. |
All the EXECs are identical. Only their names are different. |
They are stored as plain text files. |
The CMS MODULE files have been packed using the COPYFILE command to |
allow their file format to be properly restored, since variable length |
binary files will not currently unzip properly (see below for details). |
The MODULEs are shipped with a filetype or extension of CMO (for CMS |
MODULE). Their names may vary on the distribution disk to indicate |
their level, etc. |
To restore them to executable MODULEs on CMS, do the following: |
1. Upload them to CMS with a Fixed record length with LRECL 1024. |
Example, from a DOS or OS/2 window, type this: |
SEND unzip.cmo A:unzip module a (RECFM F LRECL 1024 |
Example, using FTP from CMS, type this: |
BINARY FIXED 1024 |
GET unzip.cmo unzip.module.a |
Note: Replace "unzip.cmo" with the actual name. |
2. Use COPYFILE to unpack the file. |
Example, in CMS type this: |
COPYFILE UNZIP MODULE A (UNPACK REPLACE OLDDATE |
3. Repeat steps 1-2 for each of the programs. |
4. Build the ZIPINFO module by typing this: |
COPYFILE UNZIP MODULE A ZIPINFO MODULE A (OLDDATE |
5. Upload the EXECs to CMS as text files (with ASCII-to-EBCDIC |
translation). |
Example, from a DOS or OS/2 window, type this: |
SEND unzip.exc A:unzip exec a (CRLF |
Example, using FTP from CMS, type this: |
GET unzip.exc unzip.exec.a |
6. Repeat steps 4 for each of the EXECs. |
Preparing the environment |
------------------------- |
The executables provided were compiled with IBM C 3.1.0 and |
require the the Language Environment (LE) runtime libraries. |
To provide access to the runtime libraries: |
1. Link to the disk containing the Language Environment files, |
if necessary. |
2. Use the command "GLOBAL LOADLIB SCEERUN" |
These commands can be placed in your PROFILE EXEC. |
Note: EXECs have been provided called ZIP, UNZIP, etc. that |
issue the GLOBAL LOADLIB statement. This was done to alleviate |
frustration of users that don't have the GLOBAL LOADLIB statement |
in their PROFILE EXEC. These EXECs may require changing for |
your system. |
Unfortunately, there is no way, using IBM C, to produce a MODULE |
that doesn't require a runtime library. |
Testing |
------- |
To test the MODULEs, just type ZIP or UNZIP. They should |
show help information on using the commands. |
If you see something like this: |
DMSLIO201W The following names are undefined: |
CEEEV003 |
DMSABE155T User abend 4093 called from 00DCD298 reason code 000003EB |
Then you don't have access to the proper runtime libraries, as |
described above. |
Here is additional information on the ZIP and UNZIP programs that |
may assist support personnel: |
- Compiled with IBM C V3R1M0 on VM/ESA 2.2.0 with |
CMS level 13 Service Level 702. |
- Require the SCEERUN LOADLIB runtime library. This is |
part of the Language Environment (LE). |
- Linked with options RMODE ANY AMODE ANY RLDSAVE. |
If you continue to have trouble, report the problem to Zip-Bugs |
(see the bottom of this document). |
Compiling the source on VM/CMS |
------------------------------ |
The source has been successfully compiled previously using |
C/370 2.1 and 2.2. The source has been recently compiled using |
IBM C 3.1.0 on VM/ESA 2.2.0 with CMS level 13. I don't have |
access to an MVS system so the code hasn't been tested there |
in a while. |
1. Unzip the source files required for CMS. The root-level files |
inside the ZIP file and the files in the CMSMVS subdirectory are |
needed. Example (use both commands): |
unzip -aj zip23.zip -x */* -dc |
unzip -aj zip23.zip cmsmvs/* -dc |
This example unzips the files to the C-disk, while translating |
character data and ignoring paths. |
If you don't already have a working UNZIP MODULE on CMS you will |
have to unzip the files on another system and transport them |
to CMS. All the required files are plain text so they can |
be transferred with ASCII-to-EBCDIC translations. |
2. Repeat step 1 with the zip file containing the UNZIP code. |
Unzip the files to a different disk than the disk used for the ZIP |
code. |
3. To compile the ZIP code, run the supplied CCZIP EXEC. |
To compile the UNZIP code, run the supplied CCUNZIP EXEC. |
NOTE: |
Some of the ZIP and UNZIP source files have the same name. It is |
recommended that you keep the source from each on separate disks and |
move the disk you are building from ahead of the other in the search |
order. |
For example, you may have a 192 disk with the ZIP source code and |
a 193 disk with the UNZIP source code. To compile ZIP, access |
the 192 disk as B, then run CCZIP. This will create the following |
modules: ZIP, ZIPNOTE, ZIPSPLIT, ZIPCLOAK. |
To compile UNZIP, access 193 as B, then run CCUNZIP. This will create |
the following modules: UNZIP, ZIPINFO (a copy of UNZIP). |
========================================================================= |
Using ZIP/UNZIP |
--------------- |
Documentation for the commands is in MANUAL NONAME (for ZIP) and in |
UNZIP DOC UNZIP. INFOZIP DOC describes the use of the -Z option of |
UNZIP. |
The rest of this section explains special notes concerning the VM/CMS |
version of ZIP and UNZIP. |
Filenames and directories |
------------------------- |
1. Specifying filenames |
a. When specifying CMS files, use filename.filetype.filemode format |
(separate the three parts of the name with a period and use no |
spaces). Example: profile.exec.a |
Unfortunately, this prevents you from using ZIP from |
FILELIST. To unzip a zip file, however, you can type something |
like this next to it in FILELIST: |
unzip /n -d c |
This will unzip the contents of the current file to a C-disk. |
b. It is possible to use DD names with ZIP and UNZIP on CMS, though |
it can be cumbersome. Example: |
filedef out disk myzip zip a |
zip dd:out file1.txt file2.txt |
While you can also use a DD name for the input files, ZIP |
currently does not correctly resolve the filename and will |
store something like "dd:in" inside the ZIP file. A file stored |
in this manor cannot easily be unzipped, as "dd:in" is an invalid |
filename. |
c. In places where a directory name would be used on a PC, such as |
for the ZIP -b (work path) option or the UNZIP -d (destination |
path) options, use a filemode letter for CMS. For example, |
to unzip files onto a C-disk, you might type something like this: |
unzip myzip.zip -d c |
Currently, ZIP uses the A-disk for work files. When zipping |
large files, you may want to specify a larger disk for work files. |
This example will use a C-disk for work files. |
zip -b C myzip.zip.c test.dat.a |
2. Filename conversions |
a. Filemode letters are never stored into the zip file or take from |
a zip file. Only the filename and filetype are used. |
ZIP removes the filemode when storing the filename into the |
zip file. UNZIP assumes "A" for the filemode unless the -d |
option is used. |
b. When unzipping, any path names are removed from the fileid |
and the last two period-separated words are used as the |
filename and filetype. These are truncated to a maximum of |
eight characters, if necessary. If the filetype (extension) |
is missing, then UNZIP uses "NONAME" for the filetype. |
Any '(' or ')' characters are removed from the fileid. |
c. All files are created in upper-case. Files in mixed-case |
cannot currently be stored into a ZIP file. |
d. Shared File System (SFS) directories are not supported. |
Files are always accessed by fn.ft.fm. To use an SFS disk, |
Assign it a filemode, then it can be used. |
3. Wildcards in file names |
a. Wildcards are not supported in the zip filename. The full |
filename of the zip file must be given (but the .zip is not |
necessary). So, you can't do this: |
unzip -t *.zip |
b. Wildcards CAN be used with UNZIP to select (or exclude) files |
inside a zip file. Examples: |
unzip myzip *.c - Unzip all .c files. |
unzip myzip *.c -x z*.c - Unzip all .c files but those |
starting with Z. |
c. Wildcards cannot currently be used to select files with ZIP. |
So, you can't do this: |
zip -a myzip *.exec |
I expect to fix this for CMS in the future. |
4. File timestamps |
a. The dates and times of files being zipped or unzipped are not |
currently read or set. When a file is zipped, the timestamp |
inside the zip file will always be the current system date and |
time. Likewise, when unzipping, the date and time of files |
being unzipped will always be the current system date/time. |
b. Existing files are assumed to be newer than files inside a zip |
file when using the -f freshen option of UNZIP. This will prevent |
overwriting files that may be newer than the files inside the |
zip file, but also effectively prevents the -f option from working. |
5. ASCII, EBCDIC, and binary data |
Background |
---------- |
Most systems create data files as just a stream of bytes. Record |
breaks happen when certain characters (new line and/or carriage |
return characters) are encountered in the data. How to interpret |
the data in a file is up to the user. The system must be told |
to either notice new line characters in the data or to assume |
that the data in the file is binary data and should be read or |
written as-is. |
CMS and MVS are record-based systems. All files are composed |
of data records. These can be stored in fixed-length files or |
in variable length files. With fixed-length files, each record |
is the same length. The record breaks are implied by the |
LRECL (logical record length) attribute associated with the file. |
With variable-length files, each record contains the length of |
that record. The separation of records are not part of the |
data, but part of the file structure. |
This means you can store any type of data in either type of file |
structure without having to worry about the data being interpreted |
as a record break. Fixed-length files may have padding at the |
end of the file to make up a full record. Variable-length files |
have no padding, but require extra record length data be stored |
with the file data. |
Storing fixed-length files into a zip file is simple, because all |
the data can just be dumped into the zip file and the record |
format (RECFM) and logical record length (LRECL) can be stored |
in the extra data area of the zip file so they can be restored |
when UNZIP is used. |
Storing variable-length data is harder. There is no place to put |
the record length data needed for each record of the file. This |
data could be written to the zip file as the first two bytes of |
each record and interpreted that way by UNZIP. That would make |
the data unusable on systems other than CMS and MVS, though. |
Currently, there isn't a solution to this problem. Each record is |
written to the zip file and the record length information is |
discarded. Binary data stored in variable-length files can't be put |
into a zip file then later unzipped back into the proper records. |
This is fine for binary data that will be read as a stream of bytes |
but not OK where the records matter, such as with CMS MODULEs. |
If the data is text (character data), there is a solution. |
This data can be converted into ASCII when it's stored into |
a zip file. The end of each record is now marked in the file |
by new line characters. Another advantage of this method is |
that the data is now accessible to non-EBCDIC systems. When |
the data is unzipped on CMS or MVS, it is converted back into |
EBCDIC and the records are recreated into a variable-length file. |
So, here's what we have... |
a. To store readable text data into a zip file that can be used |
on other platforms, use the -a option with ZIP to convert the |
data to ASCII. These files will unzip into variable-length |
files on CMS and should not contain binary data or corruption |
may occur. |
b. Files that were zipped on an ASCII-based system will be |
automatically translated to EBCDIC when unzipped. To prevent |
this (to unzip binary data on CMS that was sent from an |
ASCII-based system), use the -B option with UNZIP to force Binary |
mode. To zip binary files on CMS, use the -B option with ZIP to |
force Binary mode. This will prevent any data conversions from |
taking place. |
c. When using the ZIP program without specifying the "-a" or "-B" |
option, ZIP defaults to "native" (EBCDIC) mode and tries to |
preserve the file information (RECFM, LRECL, and BLKSIZE). So |
when you unzip a file zipped with ZIP under CMS or MVS, UNZIP |
restores the file info. The output will be fixed-length if the |
original was fixed and variable-length if the original was |
variable. |
If UNZIP gives a "write error (disk full?)" message, you may be |
trying to unzip a binary file that was zipped as a text file |
(without using the -B option) |
Summary |
------- |
Here's how to ZIP the different types of files. |
RECFM F text |
Use the -a option with ZIP to convert to ASCII for use with other |
platforms or no options for use on EBCDIC systems only. |
RECFM V text |
Use the -a option with ZIP to convert to ASCII for use with other |
platforms or no options for use on EBCDIC systems only. |
RECFM F binary |
Use the -B option with ZIP (upper-case "B"). |
RECFM V binary |
Use the -B option with ZIP. Can be zipped OK but the record |
structure is destroyed when unzipped. This is OK for data files |
read as binary streams but not OK for files such as CMS MODULEs. |
6. Character Sets |
If you are used to running UNZIP on systems like UNIX, DOS, OS/2 or |
Windows, you will may have some problems with differences in the |
character set. |
There are a number of different EBCDIC code pages, like there are a |
number of different ASCII code pages. For example, there is a US |
EBCDIC, a German EBCDIC, and a Swedish EBCDIC. As long as you are |
working with other people who use the same EBCDIC code page, you |
will have no trouble. If you work with people who use ASCII, or who |
use a different EBCDIC code page, you may need to do some |
translation. |
UNZIP translates ASCII text files to and from Open Systems EBCDIC |
(IBM-1047), which may not be the EBCDIC that you are using. For |
example, US EBCDIC (IBM-037) uses different character codes for |
square brackets. In such cases, you can use the ICONV utility |
(supplied with IBM C) to translate between your EBCDIC character set |
and IBM-1047. |
If your installation does not use IBM-1047 EBCDIC, messages from |
UNZIP may look a little odd. For example, in a US EBCDIC |
installation, an opening square bracket will become an i-acute and a |
closing square bracket will become a u-grave. |
The supplied ZIP and UNZIP EXECs attempt to correct this by setting |
CMS INPUT and OUTPUT translations to adjust the display of left and |
right brackets. You may need to change this if brackets don't |
display correctly on your system. |
7. You can unzip using VM/CMS PIPELINES so unzip can be used as |
a pipeline filter. Example: |
'PIPE COMMAND UNZIP -p test.zip george.test | Count Lines | Cons' |
Please report all bugs and problems to: |
Zip-Bugs@lists.wku.edu |
----------------------------------------------------------------------- |
Original CMS/MVS port by George Petrov. |
e-mail: c888090@nlevdpsb.snads.philips.nl |
tel: +31-40-781155 |
Philips C&P |
Eindhoven |
The Netherlands |
----------------------------------------------------------------------- |
Additional fixes and README re-write (4/98) by Greg Hartwig. |
e-mail: ghartwig@ix.netcom.com |
ghartwig@vnet.ibm.com |
----------------------------------------------------------------------- |
Additional notes from Ian E. Gorman. |
e-mail: ian@iosphere.net |
/programs/fs/unzip60/cmsmvs/README.MVS |
---|
0,0 → 1,169 |
Thank you for trying this port of UNZIP for VM/CMS and MVS! |
Using under MVS: |
------------------------- |
1. To use the Info-ZIP's UNZIP under MVS you need: |
- C/370 ver 2.1 compiler or another compatible compiler supporting |
long names for function/variable names. |
2. To compile the program under MVS do : |
- unzip all the files from unz54vm.zip file. They are stored as |
ASCII format so you have to unzip them first on PC or other |
system that already have UNZIP, and then upload them to the |
mainframe with ASCII to EBCDIC conversion. |
- Copy all the .C files in the PDS called USERID.UNZIP.C |
- Copy all the .H files in the PDS called USERID.UNZIP.H |
- adjust the job UNZMVSC.JOB to work on your site. Change USERID |
to your userid. You might need to change the CEE dataset names |
to match your OS/390 system. |
- Preallocate PDS datasets named: USERID.UNZIP.OBJ and |
USERID.UNZIP.LOAD |
- execute the job UNZMVSC to compile and link all the sources. |
- if everything is ok you will get an UNZIP MODULE |
3. Using UNZIP |
- Just read the UNZIP.TXT |
- A few exceptions concerning MVS |
3.0. There are different ways to invoke UNZIP. |
- allocating UNZIP.LOAD dataset to your ISPLLIB if you |
want to invoke UNZIP under ISPF. |
Then just type UNZIP ...parms... to get it work |
- You can also call it directly with : |
TSO CALL 'userid.UNZIP.LOAD(UNZIP)' '...parms...' |
(notice to quotes!) |
- You can even call it from a batch job like: |
//MYZIP JOB (account) |
//STEP1 EXEC PGM=UNZIP,PARM='-l mytestz.zip *.c' |
//STEPLIB DD DSN=userid.UNZIP.LOAD,DISP=SHR |
//SYSPRINT DD SYSOUT=* |
This will list all the .c files from the zip file mytestz.zip |
3.1. If the ZIP file has been zipped on an ASCII based system |
it will be automatically translated to EBCDIC |
( I hope I got all those translation tables OK :-). |
You can force ASCII to EBCDIC conversion with the -a flag. |
3.2. The date/time of the output files is set to the |
current system date/time - not according the date/time in |
the zip file. |
3.3. You can even unzip using TSO/E PIPELINES |
so unzip can be used as pipeline filter: |
'pipe cms unzip -p test.zip george.test | count lines | cons' |
( we do also a lot of pipethinking here ;-) |
3.4. If you got also the ZIP program (see ZIP21VM.ZIP) you can |
do zipping and unzipping without translating to ASCII |
the ZIP also preserves the file informations (LRECL,BLKSIZE..) |
So when you UNZIP a file zipped with ZIP under MVS it |
restores the file info. |
There currently some problems with file with RECFM=V* |
I don't save the length of each record yet :-) |
3.5. No wildcards are supported in the input zip name you have |
to give the real name (.zip is not necessary) |
So you CAN'T use things like: unzip -t *.zip |
3.6. But you CAN use wildcards as filename selection like: |
unzip -t myzip *.c - OK or even |
unzip -t myzip *.c -x z*.c - to exclude all files matching |
z*.c |
3.7. You can unzip to a PDS using the -d parameter, |
for example: |
unzip -dmyzip myzip *.c |
This will unzip all .c files that are in the zip file in a |
PDS directory called MYZIP.C |
BE AWARE that the extension of every files is being placed as |
last identifier on the PDS name, so if you have a file in the |
zipfile called 'testp.doc' and you use '-d mypds' the PDS |
name will become 'mypds.doc(testp)' |
Depending on which options IBM chose for C this week, unzip |
may or may not prefix output files with your userid and/or |
TSO prefix. To prevent this, quote the filename to -d, for |
example |
//UNZIP EXEC PGM=UNZIP, |
// PARM='/-a -o ''userid.zip'' -d ''hlq.test'' *' |
//STEPLIB DD DSN=USERID.UNZIP.LOAD,DISP=SHR |
//SYSPRINT DD SYSOUT=* |
//SYSOUT DD SYSOUT=* |
The above JCL converts from ASCII to EBCDIC (-a), always |
overwrites existing members (-o), extracts from 'userid.zip', |
writes to files starting with 'hlq.test', all members (*). |
Note the double quotes because PARM= requires single quotes. |
3.8. The rules for output DCBs are a little messy. If the output |
file already exists (remember the -d option) then unzip uses |
the existing DCB and space values. |
If the output file does not exist and the input zip came from |
MVS then unzip makes its best attempt at preserving the |
original DCB. However there is not enough information stored |
in the zip file to do this correctly for all file types, some |
file types may be corrupted. |
If the output file does not exist and the input zip does not |
contain MVS DCB information then unzip uses RECFM=U, |
LRECL=32760 for binary data, RECFM=V, LRECL=133 for text. |
Text includes ASCII to EBCDIC conversion. As soon as the |
output file is created, unzip uses the same output DCB for |
all following members, even if the input is a mixture of text |
and binary. |
In all cases, unzip has no built in parameters for space. |
For a preallocated file this is not a problem. If unzip |
creates an output file you get a default space allocation |
which is site dependent. |
It is far better to preallocate the output files with the |
correct space and DCB values then use the -d option to point |
to those files. |
3.9. All '+','_' or '-' signs are skipped from the filenames |
Please repport all bugs and problems to : |
Zip-Bugs@lists.wku.edu |
That's all for now. |
Have fun! |
George Petrov |
e-mail: c888090@nlevdpsb.snads.philips.nl |
tel: +31-40-781155 |
Philips C&P |
Eindhoven |
The Netherlands |
Updated by: |
Keith Owens <kaos@ocs.com.au> |
/programs/fs/unzip60/cmsmvs/WHATSNEW.CMS |
---|
0,0 → 1,27 |
Important Changes made for ZIP 2.3b and UNZIP 5.33c executables: |
1. WARNING: These executables have been compiled for the |
Language Environment (LE). You must now have access to the file |
SCEERUN LOADLIB in order to run ZIP and UNZIP on CMS. You no longer |
need access to EDCLINK LOADLIB. The provided ZIP and UNZIP EXECs |
have been changed to issue a new GLOBAL LOADLIB command. You may |
need to modify these EXECs for your installation. You may want to |
change any GLOBAL LOADLIB command you may have in your PROFILE EXEC. |
Versions could be made available for the older EDCLINK LOADLIB |
runtimes upon request. |
2. ZIP files will now be variable length files rather than fixed |
length files. |
3. Help information for ZIP and UNZIP has been changed to show |
"fm" rather than "path" on CMS with certain options. |
4. README CMS has been entirely rewritten. It now contains all |
information for ZIP and UNZIP. |
----------------------------------------------------------------------- |
Greg Hartwig, April 1998. |
e-mail: ghartwig@ix.netcom.com |
ghartwig@vnet.ibm.com |
/programs/fs/unzip60/cmsmvs/ccunzip.exec |
---|
0,0 → 1,77 |
/* CCUNZIP EXEC Compile unzip 5.4 for VM/CMS */ |
/* Author: George Petrov, 11 Apr 1995 (VMCOMPIL EXEC) */ |
/* Modified for IBM C V3R1 by Ian E. Gorman, 2 Nov 1998 |
Facilities for compiling and testing were provided by |
OmniMark Technologies Corporation, Ottawa, Canada |
*/ |
Address Command |
Signal On Error |
/* Allow longnames, compile re-entrant code. |
global.c and vmmvs.c require EXTENDED features */ |
CCopts = 'LONGNAME RENT LANGLVL(EXTENDED) NOEXECOPS' |
/* UNZIP options -- VM_CMS, REENTRANT */ |
CCopts = CCopts 'DEFINE(VM_CMS,REENTRANT)' |
/* Link the load module to run in more or less than 16MB memory */ |
LINKopts = 'AMODE ANY RMODE ANY RLDSAVE' |
'GLOBAL TXTLIB SCEELKED CMSLIB' |
'GLOBAL LOADLIB SCEERUN' |
/* produce the TEXT (object) files */ |
linklist='' |
modname='UNZIP' |
Say 'Building' modname 'MODULE...' |
Call Compile 'UNZIP' |
Call Compile 'CRC32' |
Call Compile 'CRYPT' |
Call Compile 'ENVARGS' |
Call Compile 'EXPLODE' |
Call Compile 'EXTRACT' |
Call Compile 'FILEIO' |
Call Compile 'GLOBALS' |
Call Compile 'INFLATE' |
Call Compile 'PROCESS' |
Call Compile 'LIST' |
Call Compile 'MATCH' |
Call Compile 'TTYIO' |
Call Compile 'UNREDUCE' |
Call Compile 'UNSHRINK' |
Call Compile 'ZIPINFO' |
Call Compile 'VMMVS' |
Say 'Linking...' |
'EXEC CMOD' linklist '(MODNAME' modname LINKopts |
Say modname 'built successfully.' |
/* Make ZIPINFO from UNZIP */ |
modname = 'ZIPINFO' |
'COPYFILE UNZIP MODULE A ZIPINFO MODULE A (OLDDATE REPLACE' |
Say modname 'built successfully.' |
Say 'Done.' |
Exit rc |
error: |
Say 'Error' rc 'during compilation!' |
Say 'Error in line' sigl':' |
Say ' 'Sourceline(sigl) |
Exit rc |
Compile: Procedure Expose CCopts LINKopts linklist |
Parse arg filename filetype filemode . |
If filetype='' Then filetype='C' |
linklist = linklist filename |
Say 'Compiling' filename filetype filemode '...' |
'EXEC CC' filename filetype filemode '('CCopts |
Return rc |
/programs/fs/unzip60/cmsmvs/mc.exec |
---|
0,0 → 1,85 |
/* MAKECPIP EXEC Make program to build a C/370 module */ |
/* Author: George Petrov, 29 Sep 1994 */ |
arg fn . '(' cparms /* Filter name */ |
'pipe (end ?) < 'fn' makefile', /* get all source files from */ |
'| frlab GLOBALS:'||, |
'| drop', |
'| strip', |
'| var globals' |
cparms = cparms globals |
say '' |
say 'Compile options : 'cparms |
say '' |
if pos('REB',cparms) > 0 then do |
parse var cparms cp1 'REB' . ' ' cp2 /* REBuild options specified ? */ |
cparms = cp1||cp2 |
pipe1=, |
'pipe (end ?) < 'fn' makefile', /* get all source files from */ |
'| nfind *'||, /* the makefile and compile */ |
'| frlab TEXT:'||, /* only the those who are */ |
'| r: tolab MODULE:'||, /* changed or never compiled */ |
'| drop', |
'| o: fanout', |
'| chop before str /(/', |
'| statew', |
'| c: fanout', /* compiled */ |
'| specs /Compiling / 1 w1-3 n / .../ n', |
'| cons' |
end |
else do |
pipe1=, |
'pipe (end ?) < 'fn' makefile', /* get all source files from */ |
'| nfind *'||, /* the makefile and compile */ |
'| frlab TEXT:'||, /* only the those who are */ |
'| r: tolab MODULE:'||, /* changed or never compiled */ |
'| drop', |
'| o: fanout', |
'| specs w1 1 /C/ nw w3 nw write w1 1 /TEXT A/ nw', |
'| chop before str /(/', |
'| statew', |
'| change (57 66) / /0/', |
'| sort 1.8 d', /* sort the date and time */ |
'| uniq 1-17 singles', /* if the first is a source */ |
'| sort 1.8 d 64.2 d 57.2 d 60.2 d 66.8 d', /* sort the date */ |
'| uniq 1-8 first', /* if the first is a source */ |
'| locate 9.8 /C /', /* program then it has to be */ |
'| c: fanout', /* compiled */ |
'| specs /Compiling / 1 w1-3 n / .../ n', |
'| cons' |
end |
pipe2= '?', |
'r:', |
'| drop', |
'| specs w1 1', /* save the module name in var */ |
'| var module', |
'?', |
'o:', |
'| specs w1 1', |
'| join * / /', |
'| var texts', /* save all the text file names */ |
'?', /* for later include */ |
'c:', |
'| specs /CC / 1 w1-3 n /(NOTERM 'cparms'/ nw', /* compile! */ |
'| err: cms | cons', |
'?', |
'err:', |
'| nfind 0'||, |
'| var err', |
'| specs /----> Errors found! RC=/ 1 1-* n', |
'| cons' |
/* '| g: gate'*/ |
pipe1 pipe2 |
say '' |
if symbol('err') = 'VAR' & err ^= 0 then do |
say 'Errors found in source files - link aborted! RC = 'err |
exit err |
end |
say 'Generating module 'module |
'pipe cms cmod' fn texts' | > 'fn' LINK A' |
exit rc |
error: |
say 'Error in REXX detected!' |
Say 'Syntax error on line' Sigl':' Sourceline(Sigl) |
Say 'Error was:' Errortext(RC) |
return rc |
/programs/fs/unzip60/cmsmvs/mvs.mki |
---|
0,0 → 1,151 |
# Makefile for the MVS (OS/390 Base) version of UNZIP 5.4 |
# Produced for C/C++ V3R2 in OS/390 1.2.0 by Ian E. Gorman, 2 Nov 1998 |
# Facilities for compiling and testing were made available by |
# OmniMark Technologies Corporation, Ottawa, Canada |
# NOTES |
# |
# The only tabs in this file are in the first character of each recipe |
# line, where they are required by make. |
# |
# Run this makefile in OpenMVS (OS/390 POSIX) using source files in the |
# HFS file system. You can write the load module to either HFS file |
# system or to a PDS in the native MVS file system. The PDS must have |
# sufficient free space to hold the load module. |
# |
# To compile to a member of a PDS: |
# make |
# or |
# make unzip.mvs |
# |
# To compile a test version into the HFS file system: |
# make hfs |
# UNZIP options -- MVS, REENTRANT |
ZIPOPTS=-DMVS |
# directories |
# generic source code |
SRC=.. |
SRC_P=$(SRC)/ |
# source code for MVS |
CMSMVS=../cmsmvs |
CMSMVS_P=$(CMSMVS)/ |
# include files |
INCLS=-I$(SRC) -I$(CMSMVS) |
# object files and load modules |
BLD_P=../mvs/ |
# Other options |
# Suffixes (E and O must be different) |
E= |
O=.o |
# Need EXTENDED features for global.c and vmvms.c, so not using c89 |
CC=cc |
CFLAGS=-D_OPEN_SYS $(ZIPOPTS) $(INCLS) |
LD=cc |
LDFLAGS= |
# Files |
# object (TEXT) files |
OBJECTS= $(BLD_P)unzip$(O) $(BLD_P)crc32$(O) \ |
$(BLD_P)crypt$(O) $(BLD_P)envargs$(O) $(BLD_P)explode$(O) \ |
$(BLD_P)extract$(O) $(BLD_P)fileio$(O) $(BLD_P)globals$(O) \ |
$(BLD_P)inflate$(O) $(BLD_P)process$(O) $(BLD_P)list$(O) \ |
$(BLD_P)match$(O) $(BLD_P)ttyio$(O) $(BLD_P)unreduce$(O) \ |
$(BLD_P)unshrink$(O) $(BLD_P)zipinfo$(O) $(BLD_P)vmmvs$(O) |
# Header files |
HFILES= $(SRC_P)consts.h $(SRC_P)crypt.h $(SRC_P)ebcdic.h \ |
$(SRC_P)globals.h $(SRC_P)inflate.h \ |
$(SRC_P)ttyio.h $(SRC_P)unzip.h $(SRC_P)unzpriv.h \ |
$(SRC_P)unzvers.h $(SRC_P)zip.h $(CMSMVS_P)vmmvs.h \ |
$(CMSMVS_P)vmstat.h |
# Rules |
all: $(BLD_P)unzip.mvs$(E) |
hfs: $(BLD_P)unzip$(E) |
# link |
$(BLD_P)unzip.mvs$(E): $(OBJECTS) |
$(LD) -o "//INFOZIP.LOAD(UNZIP)" $(LDFLAGS) $^ |
echo "tso call \"infozip(unzip)\" \"'\"\"""$$""@""\"\"'\"" > $% |
chmod a+x $% |
$(BLD_P)unzip$(E): $(OBJECTS) |
$(LD) -o $% $(LDFLAGS) $^ |
# compile |
$(BLD_P)api$(O): $(SRC_P)api.c $(HFILES) |
$(CC) -c -o $% $(CFLAGS) $(SRC_P)api.c |
$(BLD_P)apihelp$(O): $(SRC_P)apihelp.c $(HFILES) |
$(CC) -c -o $% $(CFLAGS) $(SRC_P)apihelp.c |
$(BLD_P)crc32$(O): $(SRC_P)crc32.c $(HFILES) |
$(CC) -c -o $% $(CFLAGS) $(SRC_P)crc32.c |
$(BLD_P)crypt$(O): $(SRC_P)crypt.c $(HFILES) |
$(CC) -c -o $% $(CFLAGS) $(SRC_P)crypt.c |
$(BLD_P)envargs$(O): $(SRC_P)envargs.c $(HFILES) |
$(CC) -c -o $% $(CFLAGS) $(SRC_P)envargs.c |
$(BLD_P)explode$(O): $(SRC_P)explode.c $(HFILES) |
$(CC) -c -o $% $(CFLAGS) $(SRC_P)explode.c |
$(BLD_P)extract$(O): $(SRC_P)extract.c $(HFILES) |
$(CC) -c -o $% $(CFLAGS) $(SRC_P)extract.c |
$(BLD_P)fileio$(O): $(SRC_P)fileio.c $(HFILES) |
$(CC) -c -o $% $(CFLAGS) $(SRC_P)fileio.c |
$(BLD_P)funzip$(O): $(SRC_P)funzip.c $(HFILES) |
$(CC) -c -o $% $(CFLAGS) $(SRC_P)funzip.c |
$(BLD_P)globals$(O): $(SRC_P)globals.c $(HFILES) |
$(CC) -c -o $% $(CFLAGS) $(SRC_P)globals.c |
$(BLD_P)inflate$(O): $(SRC_P)inflate.c $(HFILES) |
$(CC) -c -o $% $(CFLAGS) $(SRC_P)inflate.c |
$(BLD_P)list$(O): $(SRC_P)list.c $(HFILES) |
$(CC) -c -o $% $(CFLAGS) $(SRC_P)list.c |
$(BLD_P)match$(O): $(SRC_P)match.c $(HFILES) |
$(CC) -c -o $% $(CFLAGS) $(SRC_P)match.c |
$(BLD_P)process$(O): $(SRC_P)process.c $(HFILES) |
$(CC) -c -o $% $(CFLAGS) $(SRC_P)process.c |
$(BLD_P)ttyio$(O): $(SRC_P)ttyio.c $(HFILES) |
$(CC) -c -o $% $(CFLAGS) $(SRC_P)ttyio.c |
$(BLD_P)unreduce$(O): $(SRC_P)unreduce.c $(HFILES) |
$(CC) -c -o $% $(CFLAGS) $(SRC_P)unreduce.c |
$(BLD_P)unshrink$(O): $(SRC_P)unshrink.c $(HFILES) |
$(CC) -c -o $% $(CFLAGS) $(SRC_P)unshrink.c |
$(BLD_P)unzip$(O): $(SRC_P)unzip.c $(HFILES) |
$(CC) -c -o $% $(CFLAGS) $(SRC_P)unzip.c |
$(BLD_P)unzipstb$(O): $(SRC_P)unzipstb.c $(HFILES) |
$(CC) -c -o $% $(CFLAGS) $(SRC_P)unzipstb.c |
$(BLD_P)zipinfo$(O): $(SRC_P)zipinfo.c $(HFILES) |
$(CC) -c -o $% $(CFLAGS) $(SRC_P)zipinfo.c |
$(BLD_P)vmmvs$(O): $(CMSMVS_P)vmmvs.c $(HFILES) |
$(CC) -c -o $% $(CFLAGS) $(CMSMVS_P)vmmvs.c |
/programs/fs/unzip60/cmsmvs/unzip.exec |
---|
0,0 → 1,66 |
/***********************************************************************/ |
/* */ |
/* Front-end EXEC to set up linkage to the C runtime libraries */ |
/* before executing a MODULE generated from C code. */ |
/* */ |
/* Copy this file as an EXEC with a filename matching the C MODULE. */ |
/* */ |
/* Greg Hartwig (ghartwig@vnet.ibm.com) 7/31/97, 4/24/98. */ |
/* */ |
/***********************************************************************/ |
Address Command |
Parse Arg argstring |
Parse Source . . myname . |
/* Set output and input character translation so brackets show up */ |
'SET OUTPUT AD' 'BA'x |
'SET OUTPUT BD' 'BB'x |
'SET INPUT BA AD' |
'SET INPUT BB BD' |
Call CLIB |
If rc<>0 Then Do |
Say 'The required C runtime libraries don''t appear to be available.' |
Say myname 'can not run.' |
Exit 12 |
End |
/* Run the command */ |
myname argstring |
Exit rc |
/* Contents of the CLIB EXEC, modified for RC checking. */ |
/* Removed TXTLIB setting. Only LOADLIB needed for execution. */ |
CLIB: |
/***************************************************/ |
/* SET UP LIBRARIES FOR LE for MVS & VM */ |
/***************************************************/ |
Address COMMAND |
loadlib ='EDCLINK' /* C/370 runtime */ |
loadlib ='SCEERUN' /* LE runtime */ |
theirs=queued() /* old stack contentsM068*/ |
'QUERY LOADLIB ( LIFO' /* old setting M068*/ |
LoadlibList='' /* init list M068*/ |
rc=0 |
Do while queued()^=theirs /* all lines from cmdM068*/ |
Parse upper pull 'LOADLIB' '=' Ltemp /* get one line M068*/ |
LoadlibList= Ltemp Loadliblist /* was stacked LIFO M068*/ |
End /*M068*/ |
If loadlibList='NONE' , |
Then Do |
'GLOBAL LOADLIB' Loadlib /* enforce what we need */ |
End |
Else Do |
Do xx=1 to Words(loadlib) |
If Find(loadliblist,word(loadlib,xx)) = 0 , |
then loadliblist = loadliblist word(loadlib,xx) |
End |
'GLOBAL LOADLIB' loadliblist /* enforce what we need */ |
End |
Return |
/programs/fs/unzip60/cmsmvs/unzip.makefile |
---|
0,0 → 1,25 |
* This is a comment |
* this makefile compiles filter UNZIP |
GLOBALS: |
long def(VM_CMS) |
TEXT: |
unzip c |
crc32 c |
crypt c |
envargs c |
explode c |
extract c |
fileio c |
globals c |
inflate c |
list c |
match c |
process c |
ttyio c |
unreduce c |
unshrink c |
zipinfo c |
vmmvs c |
MODULE: |
unzip module |
/programs/fs/unzip60/cmsmvs/unzmvsc.job |
---|
0,0 → 1,130 |
//* |
//* LE COMPILE FOR UNZIP541. |
//* ALL STEPS SHOULD GET COND CODE 0 EXCEPT FOR PLINK.PLKED WHICH GETS 4. |
//* |
//CBC JCLLIB ORDER=CBC.SCBCPRC |
//UNZIP EXEC EDCC,COND=(0,NE),CREGSIZ='0M', |
// INFILE='USERID.UNZIP.C(UNZIP)', |
// OUTFILE='USERID.UNZIP.OBJ(UNZIP),DISP=SHR', |
// CPARM='LONG,NOTERM,LIST,XREF,SOURCE', |
// CPARM2='OPT(2),DEF(MVS),NOMAR,NOSEQ,CSECT' |
//COMPILE.USERLIB DD DSN=USERID.UNZIP.H,DISP=SHR |
//CRC32 EXEC EDCC,COND=(0,NE),CREGSIZ='0M', |
// INFILE='USERID.UNZIP.C(CRC32)', |
// OUTFILE='USERID.UNZIP.OBJ(CRC32),DISP=SHR', |
// CPARM='LONG,NOTERM,LIST,XREF,SOURCE', |
// CPARM2='OPT(2),DEF(MVS),NOMAR,NOSEQ,CSECT' |
//COMPILE.USERLIB DD DSN=USERID.UNZIP.H,DISP=SHR |
//CRYPT EXEC EDCC,COND=(0,NE),CREGSIZ='0M', |
// INFILE='USERID.UNZIP.C(CRYPT)', |
// OUTFILE='USERID.UNZIP.OBJ(CRYPT),DISP=SHR', |
// CPARM='LONG,NOTERM,LIST,XREF,SOURCE', |
// CPARM2='OPT(2),DEF(MVS),NOMAR,NOSEQ,CSECT' |
//COMPILE.USERLIB DD DSN=USERID.UNZIP.H,DISP=SHR |
//ENVARGS EXEC EDCC,COND=(0,NE),CREGSIZ='0M', |
// INFILE='USERID.UNZIP.C(ENVARGS)', |
// OUTFILE='USERID.UNZIP.OBJ(ENVARGS),DISP=SHR', |
// CPARM='LONG,NOTERM,LIST,XREF,SOURCE', |
// CPARM2='OPT(2),DEF(MVS),NOMAR,NOSEQ,CSECT' |
//COMPILE.USERLIB DD DSN=USERID.UNZIP.H,DISP=SHR |
//EXPLODE EXEC EDCC,COND=(0,NE),CREGSIZ='0M', |
// INFILE='USERID.UNZIP.C(EXPLODE)', |
// OUTFILE='USERID.UNZIP.OBJ(EXPLODE),DISP=SHR', |
// CPARM='LONG,NOTERM,LIST,XREF,SOURCE', |
// CPARM2='OPT(2),DEF(MVS),NOMAR,NOSEQ,CSECT' |
//COMPILE.USERLIB DD DSN=USERID.UNZIP.H,DISP=SHR |
//EXTRACT EXEC EDCC,COND=(0,NE),CREGSIZ='0M', |
// INFILE='USERID.UNZIP.C(EXTRACT)', |
// OUTFILE='USERID.UNZIP.OBJ(EXTRACT),DISP=SHR', |
// CPARM='LONG,NOTERM,LIST,XREF,SOURCE', |
// CPARM2='OPT(2),DEF(MVS),NOMAR,NOSEQ,CSECT' |
//COMPILE.USERLIB DD DSN=USERID.UNZIP.H,DISP=SHR |
//FILEIO EXEC EDCC,COND=(0,NE),CREGSIZ='0M', |
// INFILE='USERID.UNZIP.C(FILEIO)', |
// OUTFILE='USERID.UNZIP.OBJ(FILEIO),DISP=SHR', |
// CPARM='LONG,NOTERM,LIST,XREF,SOURCE', |
// CPARM2='OPT(2),DEF(MVS),NOMAR,NOSEQ,CSECT' |
//COMPILE.USERLIB DD DSN=USERID.UNZIP.H,DISP=SHR |
//GLOBALS EXEC EDCC,COND=(0,NE),CREGSIZ='0M', |
// INFILE='USERID.UNZIP.C(GLOBALS)', |
// OUTFILE='USERID.UNZIP.OBJ(GLOBALS),DISP=SHR', |
// CPARM='LONG,NOTERM,LIST,XREF,SOURCE', |
// CPARM2='OPT(2),DEF(MVS),NOMAR,NOSEQ,CSECT' |
//COMPILE.USERLIB DD DSN=USERID.UNZIP.H,DISP=SHR |
//INFLATE EXEC EDCC,COND=(0,NE),CREGSIZ='0M', |
// INFILE='USERID.UNZIP.C(INFLATE)', |
// OUTFILE='USERID.UNZIP.OBJ(INFLATE),DISP=SHR', |
// CPARM='LONG,NOTERM,LIST,XREF,SOURCE', |
// CPARM2='OPT(2),DEF(MVS),NOMAR,NOSEQ,CSECT' |
//COMPILE.USERLIB DD DSN=USERID.UNZIP.H,DISP=SHR |
//LIST EXEC EDCC,COND=(0,NE),CREGSIZ='0M', |
// INFILE='USERID.UNZIP.C(LIST)', |
// OUTFILE='USERID.UNZIP.OBJ(LIST),DISP=SHR', |
// CPARM='LONG,NOTERM,LIST,XREF,SOURCE', |
// CPARM2='OPT(2),DEF(MVS),NOMAR,NOSEQ,CSECT' |
//COMPILE.USERLIB DD DSN=USERID.UNZIP.H,DISP=SHR |
//MATCH EXEC EDCC,COND=(0,NE),CREGSIZ='0M', |
// INFILE='USERID.UNZIP.C(MATCH)', |
// OUTFILE='USERID.UNZIP.OBJ(MATCH),DISP=SHR', |
// CPARM='LONG,NOTERM,LIST,XREF,SOURCE', |
// CPARM2='OPT(2),DEF(MVS),NOMAR,NOSEQ,CSECT' |
//COMPILE.USERLIB DD DSN=USERID.UNZIP.H,DISP=SHR |
//PROCESS EXEC EDCC,COND=(0,NE),CREGSIZ='0M', |
// INFILE='USERID.UNZIP.C(PROCESS)', |
// OUTFILE='USERID.UNZIP.OBJ(PROCESS),DISP=SHR', |
// CPARM='LONG,NOTERM,LIST,XREF,SOURCE', |
// CPARM2='OPT(2),DEF(MVS),NOMAR,NOSEQ,CSECT' |
//COMPILE.USERLIB DD DSN=USERID.UNZIP.H,DISP=SHR |
//TTYIO EXEC EDCC,COND=(0,NE),CREGSIZ='0M', |
// INFILE='USERID.UNZIP.C(TTYIO)', |
// OUTFILE='USERID.UNZIP.OBJ(TTYIO),DISP=SHR', |
// CPARM='LONG,NOTERM,LIST,XREF,SOURCE', |
// CPARM2='OPT(2),DEF(MVS),NOMAR,NOSEQ,CSECT' |
//COMPILE.USERLIB DD DSN=USERID.UNZIP.H,DISP=SHR |
//UNREDUCE EXEC EDCC,COND=(0,NE),CREGSIZ='0M', |
// INFILE='USERID.UNZIP.C(UNREDUCE)', |
// OUTFILE='USERID.UNZIP.OBJ(UNREDUCE),DISP=SHR', |
// CPARM='LONG,NOTERM,LIST,XREF,SOURCE', |
// CPARM2='OPT(2),DEF(MVS),NOMAR,NOSEQ,CSECT' |
//COMPILE.USERLIB DD DSN=USERID.UNZIP.H,DISP=SHR |
//UNSHRINK EXEC EDCC,COND=(0,NE),CREGSIZ='0M', |
// INFILE='USERID.UNZIP.C(UNSHRINK)', |
// OUTFILE='USERID.UNZIP.OBJ(UNSHRINK),DISP=SHR', |
// CPARM='LONG,NOTERM,LIST,XREF,SOURCE', |
// CPARM2='OPT(2),DEF(MVS),NOMAR,NOSEQ,CSECT' |
//COMPILE.USERLIB DD DSN=USERID.UNZIP.H,DISP=SHR |
//ZIPINFO EXEC EDCC,COND=(0,NE),CREGSIZ='0M', |
// INFILE='USERID.UNZIP.C(ZIPINFO)', |
// OUTFILE='USERID.UNZIP.OBJ(ZIPINFO),DISP=SHR', |
// CPARM='LONG,NOTERM,LIST,XREF,SOURCE', |
// CPARM2='OPT(2),DEF(MVS),NOMAR,NOSEQ,CSECT' |
//COMPILE.USERLIB DD DSN=USERID.UNZIP.H,DISP=SHR |
//VMMVS EXEC EDCC,COND=(0,NE),CREGSIZ='0M', |
// INFILE='USERID.UNZIP.C(VMMVS)', |
// OUTFILE='USERID.UNZIP.OBJ(VMMVS),DISP=SHR', |
// CPARM='LONG,NOTERM,LIST,XREF,SOURCE', |
// CPARM2='OPT(2),DEF(MVS),NOMAR,NOSEQ,CSECT' |
//COMPILE.USERLIB DD DSN=USERID.UNZIP.H,DISP=SHR |
//PLINK EXEC PROC=EDCPL,COND=(4,LT), |
// OUTFILE='USERID.UNZIP.LOAD(UNZIP),DISP=SHR', |
// PPARM='NONCAL,MAP,MEMORY', |
// LPARM='LIST,MAP,XREF' |
//SYSPRINT DD SYSOUT=* |
//PLKED.SYSIN DD DSN=USERID.UNZIP.OBJ(UNZIP),DISP=SHR |
// DD DSN=USERID.UNZIP.OBJ(CRC32),DISP=SHR |
// DD DSN=USERID.UNZIP.OBJ(CRYPT),DISP=SHR |
// DD DSN=USERID.UNZIP.OBJ(ENVARGS),DISP=SHR |
// DD DSN=USERID.UNZIP.OBJ(EXPLODE),DISP=SHR |
// DD DSN=USERID.UNZIP.OBJ(EXTRACT),DISP=SHR |
// DD DSN=USERID.UNZIP.OBJ(FILEIO),DISP=SHR |
// DD DSN=USERID.UNZIP.OBJ(GLOBALS),DISP=SHR |
// DD DSN=USERID.UNZIP.OBJ(INFLATE),DISP=SHR |
// DD DSN=USERID.UNZIP.OBJ(LIST),DISP=SHR |
// DD DSN=USERID.UNZIP.OBJ(MATCH),DISP=SHR |
// DD DSN=USERID.UNZIP.OBJ(PROCESS),DISP=SHR |
// DD DSN=USERID.UNZIP.OBJ(TTYIO),DISP=SHR |
// DD DSN=USERID.UNZIP.OBJ(UNREDUCE),DISP=SHR |
// DD DSN=USERID.UNZIP.OBJ(UNSHRINK),DISP=SHR |
// DD DSN=USERID.UNZIP.OBJ(ZIPINFO),DISP=SHR |
// DD DSN=USERID.UNZIP.OBJ(VMMVS),DISP=SHR |
//LKED.SYSLIB DD DISP=SHR,DSN=CEE.SCEELKED |
/programs/fs/unzip60/cmsmvs/unzvmc.exec |
---|
0,0 → 1,56 |
/* VMCOMPIL EXEC Unzip compile for VM/CMS */ |
/* Author : George Petrov, 11 Apr 1995 */ |
signal on error |
parms = '(long def(VM_CMS)' |
/* Add local options */ |
/* "TARGET(COMPAT)" is required for V2.2 compiler */ |
parms = parms 'TARGET(COMPAT) SOURCE' |
say 'Compiling UNZIP C...' |
'cc unzip c 'parms |
say 'Compiling CRC32 C...' |
'cc crc32 c 'parms |
say 'Compiling CRYPT C...' |
'cc crypt c 'parms |
say 'Compiling ENVARGS C...' |
'cc envargs c 'parms |
say 'Compiling EXPLODE C...' |
'cc explode c 'parms |
say 'Compiling EXTRACT C...' |
'cc extract c 'parms |
say 'Compiling FILEIO C...' |
'cc fileio c 'parms |
say 'Compiling GLOBALS C...' |
'cc globals c 'parms |
say 'Compiling INFLATE C...' |
'cc inflate c 'parms |
say 'Compiling PROCESS C...' |
'cc process c 'parms |
say 'Compiling LIST C...' |
'cc list c 'parms |
say 'Compiling MATCH C...' |
'cc match c 'parms |
say 'Compiling TTYIO C...' |
'cc ttyio c 'parms |
say 'Compiling UNREDUCE C...' |
'cc unreduce c 'parms |
say 'Compiling UNSHRINK C...' |
'cc unshrink c 'parms |
say 'Compiling ZIPINFO C...' |
'cc zipinfo c 'parms |
say 'Compiling VMMVS C...' |
'cc vmmvs c 'parms |
say 'Linking all files...' |
'cmod unzip unzip crc32 crypt envargs explode extract fileio globals', |
'inflate list match process ttyio unreduce unshrink zipinfo vmmvs' |
say 'All Done!' |
say "To run enter : UNZIP parms" |
exit rc |
error: |
say 'Error during compilation!' |
exit rc |
/programs/fs/unzip60/cmsmvs/vmmvs.c |
---|
0,0 → 1,683 |
/* |
Copyright (c) 1990-2005 Info-ZIP. All rights reserved. |
See the accompanying file LICENSE, version 2000-Apr-09 or later |
(the contents of which are also included in unzip.h) for terms of use. |
If, for some reason, all these files are missing, the Info-ZIP license |
also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html |
*/ |
/*--------------------------------------------------------------------------- |
vmmvs.c (for both VM/CMS and MVS) |
Contains: vmmvs_open_infile() |
open_outfile() |
close_outfile() |
close_infile() |
getVMMVSexfield() |
do_wild() |
mapattr() |
mapname() |
checkdir() |
check_for_newer() |
stat() |
version() |
---------------------------------------------------------------------------*/ |
#define __VMMVS_C /* identifies this source module */ |
#define UNZIP_INTERNAL |
#include "unzip.h" |
/********************************/ |
/* Function vmmvs_open_infile() */ |
/********************************/ |
FILE *vmmvs_open_infile(__G) |
__GDEF |
{ |
FILE *fzip; |
G.tempfn = NULL; |
fzip = fopen(G.zipfn, FOPR); |
#if 0 |
/* Let's try it without the convert for a while -- RG Hartwig */ |
if ((fzip = fopen(G.zipfn,"rb,recfm=fb")) == NULL) { |
size_t cnt; |
char *buf; |
FILE *in, *out; |
if ((buf = (char *)malloc(32768)) == NULL) return NULL; |
if ((G.tempfn = tmpnam(NULL)) == NULL) return NULL; |
if ((in = fopen(G.zipfn,"rb")) != NULL && |
(out = fopen(G.tempfn,"wb,recfm=fb,lrecl=1")) != NULL) { |
Trace((stdout,"Converting ZIP file to fixed record format...\n")); |
while (!feof(in)) { |
cnt = fread(buf,1,32768,in); |
if (cnt) fwrite(buf,1,cnt,out); |
} |
} |
else { |
free(buf); |
fclose(out); |
fclose(in); |
return NULL; |
} |
free(buf); |
fclose(out); |
fclose(in); |
fzip = fopen(G.tempfn,"rb,recfm=fb"); |
if (fzip == NULL) return NULL; |
/* Update the G.ziplen value since it might have changed after |
the reformatting copy. */ |
fseek(fzip,0L,SEEK_SET); |
fseek(fzip,0L,SEEK_END); |
G.ziplen = ftell(fzip); |
} |
#endif |
return fzip; |
} |
/***************************/ |
/* Function open_outfile() */ |
/***************************/ |
int open_outfile(__G) /* return 1 if fail */ |
__GDEF |
{ |
char type[100]; |
char *mode = NULL; |
#ifdef MVS |
/* Check if the output file already exists and do not overwrite its DCB */ |
char basefilename[PATH_MAX], *p; |
FILE *exists; |
/* Get the base file name, without any member name */ |
strcpy(basefilename, G.filename); |
if ((p = strchr(basefilename, '(')) != NULL) { |
if (basefilename[0] == '\'') |
*p++ = '\''; |
*p = '\0'; |
} |
exists = fopen(basefilename, FOPR); |
if (exists) { |
if (G.pInfo->textmode) |
mode = FOPWTE; /* Text file, existing */ |
else |
mode = FOPWE; /* Binary file, existing */ |
fclose(exists); |
} |
else /* continued on next line */ |
#endif /* MVS */ |
if (G.pInfo->textmode) { |
if (mode == NULL) |
mode = FOPWT; |
} else if (G.lrec.extra_field_length > 0 && G.extra_field != NULL) { |
unsigned lef_len = (unsigned)(G.lrec.extra_field_length); |
uch *lef_buf = G.extra_field; |
while (lef_len > EB_HEADSIZE) { |
unsigned eb_id = makeword(&lef_buf[EB_ID]); |
unsigned eb_dlen = makeword(&lef_buf[EB_LEN]); |
if (eb_dlen > (lef_len - EB_HEADSIZE)) { |
/* Discovered some extra field inconsistency! */ |
TTrace((stderr, |
"open_outfile: block length %u > rest lef_size %u\n", |
eb_dlen, lef_len - EB_HEADSIZE)); |
break; |
} |
if ((eb_id == EF_VMCMS || eb_id == EF_MVS) && |
(getVMMVSexfield(type, lef_buf, eb_dlen) > 0)) { |
mode = type; |
break; |
} |
/* Skip this extra field block */ |
lef_buf += (eb_dlen + EB_HEADSIZE); |
lef_len -= (eb_dlen + EB_HEADSIZE); |
} |
} |
if (mode == NULL) mode = FOPW; |
Trace((stderr, "Output file='%s' opening with '%s'\n", G.filename, mode)); |
if ((G.outfile = fopen(G.filename, mode)) == NULL) { |
Info(slide, 0x401, ((char *)slide, "\nerror: cannot create %s\n", |
FnFilter1(G.filename))); |
Trace((stderr, "error %d: '%s'\n", errno, strerror(errno))); |
return 1; |
} |
return 0; |
} /* end function open_outfile() */ |
/****************************/ |
/* Function close_outfile() */ |
/****************************/ |
void close_outfile(__G) |
__GDEF |
{ |
fclose(G.outfile); |
} /* end function close_outfile() */ |
/***************************/ |
/* Function close_infile() */ |
/***************************/ |
void close_infile(__G) |
__GDEF |
{ |
fclose(G.zipfd); |
/* If we're working from a temp file, erase it now */ |
if (G.tempfn) |
remove(G.tempfn); |
} /* end function close_infile() */ |
/******************************/ |
/* Function getVMMVSexfield() */ |
/******************************/ |
extent getVMMVSexfield(type, ef_block, datalen) |
char *type; |
uch *ef_block; |
unsigned datalen; |
{ |
fldata_t *fdata = (fldata_t *) &ef_block[4]; |
if (datalen < sizeof(fldata_t)) |
return 0; |
strcpy(type, "w"); |
strcat(type, fdata->__openmode == __TEXT ? "" |
:fdata->__openmode == __BINARY ? "b" |
:fdata->__openmode == __RECORD ? "b,type=record" |
: ""); |
strcat(type, ",recfm="); |
strcat(type, fdata->__recfmF? "F" |
:fdata->__recfmV? "V" |
:fdata->__recfmU? "U" |
: "?"); |
if (fdata->__recfmBlk) strcat(type, "B"); |
if (fdata->__recfmS) strcat(type, "S"); |
if (fdata->__recfmASA) strcat(type, "A"); |
if (fdata->__recfmM) strcat(type, "M"); |
sprintf(type+strlen(type), ",lrecl=%ld", fdata->__recfmV |
? fdata->__maxreclen+4 |
: fdata->__maxreclen); |
#ifdef VM_CMS |
/* For CMS, use blocksize for FB files only */ |
if (fdata->__recfmBlk) |
sprintf(type+strlen(type), ",blksize=%ld", fdata->__blksize); |
#else |
/* For MVS, always use blocksize */ |
sprintf(type+strlen(type), ",blksize=%ld", fdata->__blksize); |
#endif |
return strlen(type); |
} /* end function getVMMVSexfield() */ |
#ifndef SFX |
/**********************/ |
/* Function do_wild() */ /* for porting: dir separator; match(ignore_case) */ |
/**********************/ |
char *do_wild(__G__ wld) |
__GDEF |
ZCONST char *wld; /* only used first time on a given dir */ |
{ |
static int First = 0; |
static char filename[256]; |
if (First == 0) { |
First = 1; |
strncpy(filename, wld, sizeof(filename)); |
filename[sizeof(filename)-1] = '\0'; |
return filename; |
} |
else |
return (char *)NULL; |
} /* end function do_wild() */ |
#endif /* !SFX */ |
/************************/ |
/* Function mapattr() */ |
/************************/ |
int mapattr(__G) |
__GDEF |
{ |
return 0; |
} |
/************************/ |
/* Function mapname() */ |
/************************/ |
int mapname(__G__ renamed) |
__GDEF |
int renamed; |
/* |
* returns: |
* MPN_OK - no problem detected |
* MPN_INF_TRUNC - caution (truncated filename) |
* MPN_INF_SKIP - info "skip entry" (dir doesn't exist) |
* MPN_ERR_SKIP - error -> skip entry |
* MPN_ERR_TOOLONG - error -> path is too long |
* MPN_NOMEM - error (memory allocation failed) -> skip entry |
* [also MPN_VOL_LABEL, MPN_CREATED_DIR] |
*/ |
{ |
char newname[FILNAMSIZ], *lbar; |
#ifdef MVS |
char *pmember; |
#endif |
int name_changed = MPN_OK; |
if (G.pInfo->vollabel) |
return MPN_VOL_LABEL; /* can't set disk volume labels in CMS_MVS */ |
#ifdef MVS |
/* Remove bad characters for MVS from the filename */ |
while ((lbar = strpbrk(G.filename, "_+-")) != NULL) { |
/* Must use memmove() here because data overlaps. */ |
/* strcpy() gives undefined behavior in this case. */ |
memmove(lbar, lbar+1, strlen(lbar)); |
name_changed = MPN_INF_TRUNC; |
} |
#endif |
/* Remove bad characters for MVS/CMS from the filename */ |
while ((lbar = strpbrk(G.filename, "()")) != NULL) { |
memmove(lbar, lbar+1, strlen(lbar)); |
name_changed = MPN_INF_TRUNC; |
} |
#ifdef VM_CMS |
if ((lbar = strrchr(G.filename, '/')) != NULL) { |
strcpy(newname, lbar+1); |
Trace((stderr, "File '%s' renamed to '%s'\n", G.filename, newname)); |
strcpy(G.filename, newname); |
name_changed = MPN_INF_TRUNC; |
} |
#else /* MVS */ |
if ((pmember = strrchr(G.filename, '/')) == NULL) |
pmember = G.filename; |
else |
pmember++; |
/* search for extension in file name */ |
if ((lbar = strrchr(pmember, '.')) != NULL) { |
*lbar++ = '\0'; |
strcpy(newname, pmember); |
strcpy(pmember, lbar); |
strcat(pmember, "("); |
strcat(pmember, newname); |
strcat(pmember, ")"); |
} |
/* Remove all 'internal' dots '.', to prevent false consideration as |
* MVS path delimiters! */ |
while ((lbar = strrchr(G.filename, '.')) != NULL) { |
memmove(lbar, lbar+1, strlen(lbar)); |
name_changed = MPN_INF_TRUNC; |
} |
/* Finally, convert path delimiters from internal '/' to external '.' */ |
while ((lbar = strchr(G.filename, '/')) != NULL) |
*lbar = '.'; |
#endif /* ?VM_CMS */ |
#ifndef MVS |
if ((lbar = strchr(G.filename, '.')) == NULL) { |
printf("WARNING: file '%s' has no extension - renamed to '%s.NONAME'\n"\ |
,G.filename, G.filename); |
strcat(G.filename, ".NONAME"); |
name_changed = MPN_INF_TRUNC; |
} |
#endif |
checkdir(__G__ G.filename, GETPATH); |
return name_changed; |
} /* end function mapname() */ |
int checkdir(__G__ pathcomp, flag) |
__GDEF |
char *pathcomp; |
int flag; |
/* |
* returns: |
* MPN_OK - no problem detected |
* MPN_INF_TRUNC - (on APPEND_NAME) truncated filename |
* MPN_INF_SKIP - path doesn't exist, not allowed to create |
* MPN_ERR_SKIP - path doesn't exist, tried to create and failed; or path |
* exists and is not a directory, but is supposed to be |
* MPN_ERR_TOOLONG - path is too long |
* MPN_NOMEM - can't allocate memory for filename buffers |
*/ |
{ |
static int rootlen = 0; /* length of rootpath */ |
static char *rootpath; /* user's "extract-to" directory */ |
# define FN_MASK 7 |
# define FUNCTION (flag & FN_MASK) |
/*--------------------------------------------------------------------------- |
ROOT: if appropriate, store the path in rootpath and create it if neces- |
sary; else assume it's a zipfile member and return. This path segment |
gets used in extracting all members from every zipfile specified on the |
command line. Note that under OS/2 and MS-DOS, if a candidate extract-to |
directory specification includes a drive letter (leading "x:"), it is |
treated just as if it had a trailing '/'--that is, one directory level |
will be created if the path doesn't exist, unless this is otherwise pro- |
hibited (e.g., freshening). |
---------------------------------------------------------------------------*/ |
#if (!defined(SFX) || defined(SFX_EXDIR)) |
if (FUNCTION == ROOT) { |
Trace((stderr, "initializing root path to [%s]\n", |
FnFilter1(pathcomp))); |
if (pathcomp == (char *)NULL) { |
rootlen = 0; |
} |
else if ((rootlen = strlen(pathcomp)) > 0) { |
if ((rootpath = (char *)malloc(rootlen+1)) == NULL) { |
rootlen = 0; |
return MPN_NOMEM; |
} |
strcpy(rootpath, pathcomp); |
Trace((stderr, "rootpath now = [%s]\n", rootpath)); |
} |
return MPN_OK; |
} |
#endif /* !SFX || SFX_EXDIR */ |
/*--------------------------------------------------------------------------- |
GETPATH: copy full path to the string pointed at by pathcomp, and free |
buildpath. |
---------------------------------------------------------------------------*/ |
if (FUNCTION == GETPATH) { |
if (rootlen > 0) { |
#ifdef VM_CMS /* put the exdir after the filename */ |
strcat(pathcomp, "."); /* used as minidisk to be save on */ |
strcat(pathcomp, rootpath); |
#else /* MVS */ |
char newfilename[PATH_MAX]; |
char *start_fname; |
int quoted = 0; |
strcpy(newfilename, rootpath); |
if (newfilename[0] == '\'') { |
quoted = strlen(newfilename) - 1; |
if (newfilename[quoted] == '\'') |
newfilename[quoted] = '\0'; |
else |
quoted = 0; |
} |
if (strchr(pathcomp, '(') == NULL) { |
if ((start_fname = strrchr(pathcomp, '.')) == NULL) { |
start_fname = pathcomp; |
} |
else { |
*start_fname++ = '\0'; |
strcat(newfilename, "."); |
strcat(newfilename, pathcomp); |
} |
strcat(newfilename, "("); |
strcat(newfilename, start_fname); |
strcat(newfilename, ")"); |
} |
else { |
strcat(newfilename, "."); |
strcat(newfilename, pathcomp); |
} |
if (quoted) |
strcat(newfilename, "'"); |
Trace((stdout, "new dataset : %s\n", newfilename)); |
strcpy(pathcomp, newfilename); |
#endif /* ?VM_CMS */ |
} |
return MPN_OK; |
} |
/*--------------------------------------------------------------------------- |
END: free rootpath, immediately prior to program exit. |
---------------------------------------------------------------------------*/ |
if (FUNCTION == END) { |
Trace((stderr, "freeing rootpath\n")); |
if (rootlen > 0) { |
free(rootpath); |
rootlen = 0; |
} |
return MPN_OK; |
} |
return MPN_INVALID; /* should never reach */ |
} /* end function checkdir() */ |
/******************************/ |
/* Function check_for_newer() */ /* used for overwriting/freshening/updating */ |
/******************************/ |
int check_for_newer(__G__ filename) /* return 1 if existing file is newer */ |
__GDEF /* or equal; 0 if older; -1 if doesn't */ |
char *filename; /* exist yet */ |
{ |
FILE *stream; |
if ((stream = fopen(filename, FOPR)) != NULL) { |
fclose(stream); |
/* File exists, assume it is "newer" than archive entry. */ |
return EXISTS_AND_NEWER; |
} |
/* File does not exist. */ |
return DOES_NOT_EXIST; |
} /* end function check_for_newer() */ |
/*********************/ |
/* Function stat() */ |
/*********************/ |
int stat(const char *path, struct stat *buf) |
{ |
FILE *fp; |
char fname[PATH_MAX]; |
time_t ltime; |
if ((fp = fopen(path, FOPR)) != NULL) { |
fldata_t fdata; |
if (fldata( fp, fname, &fdata ) == 0) { |
buf->st_dev = fdata.__device; |
buf->st_mode = *(short *)(&fdata); |
} |
/* Determine file size by seeking to EOF */ |
fseek(fp,0L,SEEK_END); |
buf->st_size = ftell(fp); |
fclose(fp); |
/* set time fields in stat buf to current time. */ |
time(<ime); |
buf->st_atime = |
buf->st_mtime = |
buf->st_ctime = ltime; |
/* File exists, return success */ |
return 0; |
} |
return 1; |
} |
#ifdef STAND_ALONE |
/***************************/ |
/* Function main_vmmvs() */ |
/***************************/ |
/* This function is called as main() to parse arguments */ |
/* into argc and argv. This is required for stand-alone */ |
/* execution. This calls the "real" main() when done. */ |
int MAIN_VMMVS(void) |
{ |
int argc=0; |
char *argv[50]; |
int iArgLen; |
char argstr[256]; |
char **pEPLIST, *pCmdStart, *pArgStart, *pArgEnd; |
/* Get address of extended parameter list from S/370 Register 0 */ |
pEPLIST = (char **)__xregs(0); |
/* Null-terminate the argument string */ |
pCmdStart = *(pEPLIST+0); |
pArgStart = *(pEPLIST+1); |
pArgEnd = *(pEPLIST+2); |
iArgLen = pArgEnd - pCmdStart + 1; |
/* Make a copy of the command string */ |
memcpy(argstr, pCmdStart, iArgLen); |
argstr[iArgLen] = '\0'; /* Null-terminate */ |
/* Store first token (cmd) */ |
argv[argc++] = strtok(argstr, " "); |
/* Store the rest (args) */ |
while (argv[argc-1]) |
argv[argc++] = strtok(NULL, " "); |
argc--; /* Back off last NULL entry */ |
/* Call "real" main() function */ |
return MAIN(argc, argv); |
} |
#endif /* STAND_ALONE */ |
#ifndef SFX |
/************************/ |
/* Function version() */ |
/************************/ |
void version(__G) |
__GDEF |
{ |
int len; |
char liblvlmsg [50+1]; |
char *compiler = "?"; |
char *platform = "?"; |
char complevel[64]; |
/* Map the runtime library level information */ |
union { |
unsigned int iVRM; |
struct { |
unsigned int pd:4; /* Product designation */ |
unsigned int vv:4; /* Version */ |
unsigned int rr:8; /* Release */ |
unsigned int mm:16; /* Modification level */ |
} xVRM; |
} VRM; |
/* Break down the runtime library level */ |
VRM.iVRM = __librel(); |
sprintf(liblvlmsg, "Using runtime library level %s V%dR%dM%d", |
(VRM.xVRM.pd==1 ? "LE" : "CE"), |
VRM.xVRM.vv, VRM.xVRM.rr, VRM.xVRM.mm); |
/* Note: LE = Language Environment, CE = Common Env. (C/370). */ |
/* This refers ONLY to the current runtimes, not the compiler. */ |
#ifdef VM_CMS |
platform = "VM/CMS"; |
#ifdef __IBMC__ |
compiler = "IBM C"; |
#else |
compiler = "C/370"; |
#endif |
#endif |
#ifdef MVS |
platform = "MVS"; |
#ifdef __IBMC__ |
compiler = "IBM C/C++"; |
#else |
compiler = "C/370"; |
#endif |
#endif |
#ifdef __COMPILER_VER__ |
VRM.iVRM = __COMPILER_VER__; |
sprintf(complevel," V%dR%dM%d", |
VRM.xVRM.vv, VRM.xVRM.rr, VRM.xVRM.mm); |
#else |
#ifdef __IBMC__ |
sprintf(complevel," V%dR%d", __IBMC__ / 100, (__IBMC__ % 100)/10); |
#else |
complevel[0] = '\0'; |
#endif |
#endif |
/* Output is in the form "Compiled with %s%s for %s%s%s%s." */ |
len = sprintf((char *)slide, LoadFarString(CompiledWith), |
/* Add compiler name and level */ |
compiler, complevel, |
/* Add compile environment */ |
platform, |
/* Add timestamp */ |
#ifdef __DATE__ |
" on " __DATE__ |
#ifdef __TIME__ |
" at " __TIME__ |
#endif |
#endif |
".\n", "", |
liblvlmsg |
); |
(*G.message)((zvoid *)&G, slide, (ulg)len, 0); |
} /* end function version() */ |
#endif /* !SFX */ |
/programs/fs/unzip60/cmsmvs/vmmvs.h |
---|
0,0 → 1,96 |
/* |
Copyright (c) 1990-2008 Info-ZIP. All rights reserved. |
See the accompanying file LICENSE, version 2007-Mar-04 or later |
(the contents of which are also included in unzip.h) for terms of use. |
If, for some reason, all these files are missing, the Info-ZIP license |
also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html |
*/ |
/* vmmvs.h: include file for both VM/CMS and MVS ports of UnZip */ |
#ifndef __vmmvs_h /* prevent multiple inclusions */ |
#define __vmmvs_h |
#ifndef NULL |
# define NULL (zvoid *)0 |
#endif |
#ifdef MVS |
# define _POSIX_SOURCE /* tell MVS we want full definitions */ |
# define NO_STRNICMP /* MVS has no strnicmp() */ |
# include <features.h> |
/* MVS complains if a function has the same name as a csect. */ |
# if defined(__UNZIP_C) |
# pragma csect(STATIC,"unzip_s") |
# elif defined(__CRC32_C) |
# pragma csect(STATIC,"crc32_s") |
# elif defined(__ENVARGS_C) |
# pragma csect(STATIC,"envarg_s") |
# elif defined(__EXPLODE_C) |
# pragma csect(STATIC,"explod_s") |
# elif defined(__INFLATE_C) |
# pragma csect(STATIC,"inflat_s") |
# elif defined(__MATCH_C) |
# pragma csect(STATIC,"match_s") |
# elif defined(__UNREDUCE_C) |
# pragma csect(STATIC,"unredu_s") |
# elif defined(__UNSHRINK_C) |
# pragma csect(STATIC,"unshri_s") |
# elif defined(__ZIPINFO_C) |
# pragma csect(STATIC,"zipinf_s") |
# endif |
#endif /* MVS */ |
#include <time.h> /* the usual non-BSD time functions */ |
#ifdef VM_CMS |
# include "vmstat.h" |
#endif |
#ifdef MVS |
# include <sys/stat.h> |
#endif |
#define PASSWD_FROM_STDIN |
/* Kludge until we know how to open a non-echo tty channel */ |
#define EBCDIC |
/* In the context of Info-ZIP, a portable "text" mode file implies the use of |
an ASCII-compatible (ISO 8859-1, or other extended ASCII) code page. */ |
#ifdef MORE |
# undef MORE |
#endif |
/* Workarounds for missing RTL functionality */ |
#define isatty(t) 1 |
#ifdef UNZIP /* definitions for UNZIP */ |
#define INBUFSIZ 8192 |
#define USE_STRM_INPUT |
#define USE_FWRITE |
#define PATH_MAX 128 |
#ifndef QUERY_TRNEWLN |
# define QUERY_TRNEWLN /* terminate interaction queries with '\n' */ |
#endif |
#ifndef DATE_FORMAT |
# define DATE_FORMAT DF_MDY |
#endif |
#define lenEOL 1 |
/* The use of "ebcdic[LF]" is not reliable; VM/CMS C/370 uses the |
* EBCDIC specific "NL" ('NewLine') control character (and not the EBCDIC |
* equivalent of the ASCII "LF" ('LineFeed')) as line terminator! |
* To work around this problem, we explicitely emit the C compiler's native |
* '\n' line terminator. |
*/ |
#if 0 |
#define PutNativeEOL *q++ = native(LF); |
#else |
#define PutNativeEOL *q++ = '\n'; |
#endif |
#endif /* UNZIP */ |
#endif /* !__vmmvs_h */ |
/programs/fs/unzip60/cmsmvs/vmstat.h |
---|
0,0 → 1,57 |
/* |
Copyright (c) 1990-2000 Info-ZIP. All rights reserved. |
See the accompanying file LICENSE, version 2000-Apr-09 or later |
(the contents of which are also included in unzip.h) for terms of use. |
If, for some reason, all these files are missing, the Info-ZIP license |
also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html |
*/ |
#ifndef __vmstat_h |
#define __vmstat_h |
/* stat.h definitions */ |
#ifndef _INO_T_DEFINED |
typedef unsigned short ino_t; /* i-node number (not used on DOS) */ |
#define _INO_T_DEFINED |
#endif |
#ifndef _DEV_T_DEFINED |
typedef short dev_t; /* device code */ |
#define _DEV_T_DEFINED |
#endif |
#ifndef _OFF_T_DEFINED |
typedef long off_t; /* file offset value */ |
#define _OFF_T_DEFINED |
#endif |
#ifndef _STAT_DEFINED |
struct stat { |
dev_t st_dev; |
ino_t st_ino; |
short st_mode; |
short st_nlink; |
int st_uid; |
int st_gid; |
off_t st_size; |
time_t st_atime; |
time_t st_mtime; |
time_t st_ctime; |
}; |
#define _STAT_DEFINED |
#endif |
int stat(const char *path, struct stat *buf); |
int fstat(int fd, struct stat *buf); |
#define S_IFMT 0xFFFF |
#define _FLDATA(m) (*(fldata_t *) &m) |
#define S_ISDIR(m) (_FLDATA(m).__dsorgPDSdir) |
#define S_ISREG(m) (_FLDATA(m).__dsorgPO | \ |
_FLDATA(m).__dsorgPDSmem | \ |
_FLDATA(m).__dsorgPS) |
#define S_ISBLK(m) (_FLDATA(m).__recfmBlk) |
#define S_ISMEM(m) (_FLDATA(m).__dsorgMem) |
#endif /* __vmstat_h */ |
/programs/fs/unzip60/cmsmvs/zipinfo.exec |
---|
0,0 → 1,66 |
/***********************************************************************/ |
/* */ |
/* Front-end EXEC to set up linkage to the C runtime libraries */ |
/* before executing a MODULE generated from C code. */ |
/* */ |
/* Copy this file as an EXEC with a filename matching the C MODULE. */ |
/* */ |
/* Greg Hartwig (ghartwig@vnet.ibm.com) 7/31/97, 4/24/98. */ |
/* */ |
/***********************************************************************/ |
Address Command |
Parse Arg argstring |
Parse Source . . myname . |
/* Set output and input character translation so brackets show up */ |
'SET OUTPUT AD' 'BA'x |
'SET OUTPUT BD' 'BB'x |
'SET INPUT BA AD' |
'SET INPUT BB BD' |
Call CLIB |
If rc<>0 Then Do |
Say 'The required C runtime libraries don''t appear to be available.' |
Say myname 'can not run.' |
Exit 12 |
End |
/* Run the command */ |
myname argstring |
Exit rc |
/* Contents of the CLIB EXEC, modified for RC checking. */ |
/* Removed TXTLIB setting. Only LOADLIB needed for execution. */ |
CLIB: |
/***************************************************/ |
/* SET UP LIBRARIES FOR LE for MVS & VM */ |
/***************************************************/ |
Address COMMAND |
loadlib ='EDCLINK' /* C/370 runtime */ |
loadlib ='SCEERUN' /* LE runtime */ |
theirs=queued() /* old stack contentsM068*/ |
'QUERY LOADLIB ( LIFO' /* old setting M068*/ |
LoadlibList='' /* init list M068*/ |
rc=0 |
Do while queued()^=theirs /* all lines from cmdM068*/ |
Parse upper pull 'LOADLIB' '=' Ltemp /* get one line M068*/ |
LoadlibList= Ltemp Loadliblist /* was stacked LIFO M068*/ |
End /*M068*/ |
If loadlibList='NONE' , |
Then Do |
'GLOBAL LOADLIB' Loadlib /* enforce what we need */ |
End |
Else Do |
Do xx=1 to Words(loadlib) |
If Find(loadliblist,word(loadlib,xx)) = 0 , |
then loadliblist = loadliblist word(loadlib,xx) |
End |
'GLOBAL LOADLIB' loadliblist /* enforce what we need */ |
End |
Return |