File: zipnote.exec

package info (click to toggle)
zip 2.20-2
  • links: PTS
  • area: non-free
  • in suites: hamm, slink
  • size: 2,296 kB
  • ctags: 3,768
  • sloc: ansic: 24,132; asm: 2,302; makefile: 459; sh: 42
file content (93 lines) | stat: -rw-r--r-- 3,559 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
/***********************************************************************/
/*                                                                     */
/* 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.                     */
/*                                                                     */
/***********************************************************************/
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 */
CLIB:
/* Rexx ********************************************/
/*                                                 */
/*                     C/370                       */
/*                   Release 2.0                   */
/*                                                 */
/*        5688-040 (C) Copyright IBM Corp. 1989    */
/*                                                 */
/***************************************************/
/* Set up libraries for C/370                      */
/***************************************************/
Address COMMAND

Txtlib   ='EDCBASE IBMLIB CMSLIB' /* required txtlibs */
loadlib  ='EDCLINK'               /* required Loadlib              */

theirs=queued()                          /* old stack contentsM068*/
'QUERY TXTLIB ( LIFO'                    /* old setting       M068*/
TxtlibList=''                            /* init list         M068*/
rc=0
Do while queued()^=theirs                /* all lines from cmdM068*/
  Parse upper pull 'TXTLIB' '=' temp     /* get one line      M068*/
  TxtlibList= temp Txtliblist            /* was stacked LIFO  M068*/
End                                                         /*M068*/
If TxtlibList='NONE' ,
 Then Do
  'GLOBAL TXTLIB' Txtlib           /* enforce what we need         */
 End
 Else Do
  Do xx=1 to Words(txtlib)
  If Find(txtliblist,word(txtlib,xx)) = 0 ,
   then txtliblist = txtliblist word(txtlib,xx)
  End
  'GLOBAL TXTLIB' Txtliblist       /* enforce what we need         */
 End
If rc<>0 Then Return


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