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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
|
/*
* SCCS: @(#)reqcode.c 1.10 (98/08/28)
*
* UniSoft Ltd., London, England
*
* (C) Copyright 1992 X/Open Company Limited
* (C) Copyright 1994 UniSoft Limited
*
* All rights reserved. No part of this source code may be reproduced,
* stored in a retrieval system, or transmitted, in any form or by any
* means, electronic, mechanical, photocopying, recording or otherwise,
* except as stated in the end-user licence agreement, without the prior
* permission of the copyright owners.
*
* X/Open and the 'X' symbol are trademarks of X/Open Company Limited in
* the UK and other countries.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
/************************************************************************
SCCS: @(#)reqcode.c 1.10 98/08/28 TETware release 3.3
NAME: reqcode.c
PRODUCT: TETware
AUTHOR: Andrew Dingwall, UniSoft Ltd.
DATE CREATED: April 1992
DESCRIPTION:
function to return printable representation of a DTET interprocess
message request code
MODIFICATIONS:
Denis McConalogue, UniSoft Limited, September 1993
added support for OP_XRCLOSE, OP_RCOPY and OP_CODESF
request messages.
Andrew Dngwall, UniSoft Ltd., November 1993
added support for FIFO transport interface
Andrew Dingwall, UniSoft Ltd., July 1998
Added support for shared API libraries.
************************************************************************/
#include <stdio.h>
#include "dtmac.h"
#include "dtmsg.h"
#include "ltoa.h"
#include "dtetlib.h"
/*
** tet_ptreqcode() - return printable representation of message request
** code
*/
TET_IMPORT char *tet_ptreqcode(request)
int request;
{
static char text[] = "request-code ";
static char msg[sizeof text + LNUMSZ];
switch (request) {
case OP_LOGON:
return("LOGON");
case OP_LOGOFF:
return("LOGOFF");
case OP_NULL:
return("NULL");
case OP_SNGET:
return("SNGET");
case OP_SNSYS:
return("SNSYS");
case OP_ASYNC:
return("ASYNC");
case OP_USYNC:
return("USYNC");
case OP_SYSID:
return("SYSID");
case OP_SYSNAME:
return("SYSNAME");
case OP_TSINFO:
return("TSINFO");
case OP_TRACE:
return("TRACE");
case OP_EXEC:
return("EXEC");
case OP_WAIT:
return("WAIT");
case OP_KILL:
return("KILL");
case OP_XROPEN:
return("XROPEN");
case OP_XRCLOSE:
return("XRCLOSE");
case OP_XRSYS:
return("XRSYS");
case OP_ICSTART:
return("ICSTART");
case OP_TPSTART:
return("TPSTART");
case OP_ICEND:
return("ICEND");
case OP_TPEND:
return("TPEND");
case OP_XRES:
return("XRES");
case OP_RESULT:
return("RESULT");
case OP_CFNAME:
return("CFNAME");
case OP_RCFNAME:
return("RCFNAME");
case OP_SNDCONF:
return("SNDCONF");
case OP_RCVCONF:
return("RCVCONF");
case OP_CONFIG:
return("CONFIG");
case OP_TFOPEN:
return("TFOPEN");
case OP_TFCLOSE:
return("TFCLOSE");
case OP_TFWRITE:
return("TFWRITE");
case OP_PUTENV:
return("PUTENV");
case OP_ACCESS:
return("ACCESS");
case OP_MKDIR:
return("MKDIR");
case OP_RMDIR:
return("RMDIR");
case OP_CHDIR:
return("CHDIR");
case OP_FOPEN:
return("FOPEN");
case OP_FCLOSE:
return("FCLOSE");
case OP_GETS:
return("GETS");
case OP_PUTS:
return("PUTS");
case OP_LOCKFILE:
return("LOCKFILE");
case OP_SHARELOCK:
return("SHARELOCK");
case OP_MKTMPDIR:
return("MKTMPDIR");
case OP_UNLINK:
return("UNLINK");
case OP_RXFILE:
return("RXFILE");
case OP_MKSDIR:
return("MKSDIR");
case OP_TSFILES:
return("TSFILES");
case OP_CODESF:
return("CODESF");
case OP_RCOPY:
return("RCOPY");
case OP_CONNECT:
return("CONNECT");
case OP_ATTENTION:
return("ATTENTION");
case OP_SETCONF:
return("SETCONF");
case OP_MKALLDIRS:
return("MKALLDIRS");
case OP_TIME:
return("TIME");
case OP_RMALLDIRS:
return("RMALLDIRS");
case OP_SNRM:
return("SNRM");
case OP_XRSEND:
return("XRSEND");
#if TESTING
case OP_PRINT:
return("PRINT");
#endif
default:
(void) sprintf(msg, "%s%d", text, request);
return(msg);
}
}
|