1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 dcl cu_$arg_list_ptr entry() returns (ptr);
16 dcl ssu_$abort_line entry() options(variable);
17 dcl ssu_$abort_subsystem entry() options(variable);
18 dcl ssu_$arg_ptr entry (ptr, fixed bin, ptr, fixed bin(21));
19 dcl ssu_$create_invocation entry (char(*), char(*), ptr, ptr, char(*), ptr, fixed bin(35));
20 dcl ssu_$destroy_invocation entry (ptr);
21 dcl ssu_$execute_line entry (ptr, ptr, fixed bin(21), fixed bin(35));
22 dcl ssu_$execute_string entry (ptr, char(*), fixed bin(35));
23 dcl ssu_$get_area entry (ptr, ptr, char(*), ptr);
24 dcl ssu_$get_info_ptr entry (ptr) returns(ptr);
25 dcl ssu_$get_subsystem_name entry (ptr) returns(char(32));
26 dcl ssu_$listen entry (ptr, ptr, fixed bin(35));
27 dcl ssu_$print_message entry() options(variable);
28 dcl ssu_$return_arg entry (ptr, fixed bin, bit(1) aligned, ptr, fixed bin(21));
29 dcl ssu_$set_prompt entry (ptr, char(64) var);
30 dcl ssu_$set_prompt_mode entry (ptr, bit(*));
31 dcl ssu_$standalone_invocation entry (ptr, char(*), char(*), ptr, entry, fixed bin(35));
32
33 dcl (F init("0"b), T init("1"b)) bit(1) aligned int static options(constant);
34
35
36 dcl ssu_et_$subsystem_aborted fixed bin(35) ext static;
37
38 dcl cleanup condition;
39
40
41 dcl argCount fixed bin;
42 dcl argI fixed bin init (0);
43
44 dcl arg char(argL) based(argP),
45 argL fixed bin(21),
46 argP ptr;
47
48 dcl af_ret char (af_retL) varying based(af_retP),
49 af_retL fixed bin (21),
50 af_retP ptr;
51
52 dcl code fixed bin(35);
53
54 dcl isAF bit(1) aligned;
55 dcl isStandalone bit(1) aligned;
56
57 dcl sciP ptr;
58
59
60 %page;
61
62
63
64
65
66
67 arg_setup:
68 proc (AsciP);
69
70 dcl AsciP ptr;
71
72 call ssu_$return_arg (AsciP, argCount, isAF, af_retP, af_retL);
73 end arg_setup;
74
75
76 args_remain:
77 proc () returns (bit (1) aligned);
78 return (argI < argCount);
79 end args_remain;
80
81
82 isControlArg:
83 proc (Aarg) returns (bit(1) aligned);
84
85 dcl Aarg char(*);
86 dcl argFirst char(1) defined(Aarg);
87 dcl length builtin;
88
89 if length(Aarg) = 0 then return(F);
90 if argFirst ^= "-" then return(F);
91 return(T);
92 end isControlArg;
93
94
95 abort_to_EXIT:
96 proc();
97 goto EXIT;
98 end abort_to_EXIT;
99
100
101 standalone_cleanup_handler:
102 proc(AisStandalone, AsciP);
103
104 dcl AisStandalone bit(1) aligned;
105 dcl AsciP ptr;
106
107 if AisStandalone then do;
108 call ssu_$destroy_invocation (AsciP);
109 AisStandalone = F;
110 end;
111 return;
112
113 end standalone_cleanup_handler;
114
115