-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patherrnomessage.cob
450 lines (445 loc) · 15.4 KB
/
errnomessage.cob
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
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
>>SOURCE FORMAT FREE
identification division.
program-id. errnomessage.
*>
*> Copyright (C) 2014 Steve Williams <[email protected]>
*>
*> This program is free software; you can redistribute it and/or
*> modify it under the terms of the GNU General Public License as
*> published by the Free Software Foundation; either version 2,
*> or (at your option) any later version.
*>
*> This program is distributed in the hope that it will be useful,
*> but WITHOUT ANY WARRANTY; without even the implied warranty of
*> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
*> GNU General Public License for more details.
*>
*> You should have received a copy of the GNU General Public
*> License along with this software; see the file COPYING.
*> If not, write to the Free Software Foundation, Inc.,
*> 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*> ============================================================
*> Get the current errno and return the errno, errno name
*> and errno message.
*>
*> The call to the c subroutine get_errno may be replaced by
*> a GNU COBOL function call in the future.
*> ============================================================
data division.
linkage section.
01 errno binary-char unsigned.
01 errno-name pic x(16).
01 errno-message pic x(64).
procedure division using errno, errno-name, errno-message.
start-errno-message.
call 'get_errno' returning errno end-call
evaluate errno
when 0
move 'OK' to errno-name
move spaces to errno-message
when 1
move 'EPERM' to errno-name
move 'Operation not permitted' to errno-message
when 2
move 'ENOENT' to errno-name
move 'No such file or directory' to errno-message
when 3
move 'ESRCH' to errno-name
move 'No such process' to errno-message
when 4
move 'EINTR' to errno-name
move 'Interrupted system call' to errno-message
when 5
move 'EIO' to errno-name
move 'I/O error' to errno-message
when 6
move 'ENXIO' to errno-name
move 'No such device or address' to errno-message
when 7
move 'E2BIG' to errno-name
move 'Argument list too long' to errno-message
when 8
move 'ENOEXEC' to errno-name
move 'Exec format error' to errno-message
when 9
move 'EBADF' to errno-name
move 'Bad file number' to errno-message
when 10
move 'ECHILD' to errno-name
move 'No child processes' to errno-message
when 11
move 'EAGAIN' to errno-name
move 'Try again' to errno-message
when 12
move 'ENOMEM' to errno-name
move 'Out of memory' to errno-message
when 13
move 'EACCES' to errno-name
move 'Permission denied' to errno-message
when 14
move 'EFAULT' to errno-name
move 'Bad address' to errno-message
when 15
move 'ENOTBLK' to errno-name
move 'Block device required' to errno-message
when 16
move 'EBUSY' to errno-name
move 'Device or resource busy' to errno-message
when 17
move 'EEXIST' to errno-name
move 'File exists' to errno-message
when 18
move 'EXDEV' to errno-name
move 'Cross-device link' to errno-message
when 19
move 'ENODEV' to errno-name
move 'No such device' to errno-message
when 20
move 'ENOTDIR' to errno-name
move 'Not a directory' to errno-message
when 21
move 'EISDIR' to errno-name
move 'Is a directory' to errno-message
when 22
move 'EINVAL' to errno-name
move 'Invalid argument' to errno-message
when 23
move 'ENFILE' to errno-name
move 'File table overflow' to errno-message
when 24
move 'EMFILE' to errno-name
move 'Too many open files' to errno-message
when 25
move 'ENOTTY' to errno-name
move 'Not a typewriter' to errno-message
when 26
move 'ETXTBSY' to errno-name
move 'Text file busy' to errno-message
when 27
move 'EFBIG' to errno-name
move 'File too large' to errno-message
when 28
move 'ENOSPC' to errno-name
move 'No space left on device' to errno-message
when 29
move 'ESPIPE' to errno-name
move 'Illegal seek' to errno-message
when 30
move 'EROFS' to errno-name
move 'Read-only file system' to errno-message
when 31
move 'EMLINK' to errno-name
move 'Too many links' to errno-message
when 32
move 'EPIPE' to errno-name
move 'Broken pipe' to errno-message
when 33
move 'EDOM' to errno-name
move 'Math argument out of domain of func' to errno-message
when 34
move 'ERANGE' to errno-name
move 'Math result not representable' to errno-message
when 35
move 'EDEADLK' to errno-name
move 'Resource deadlock would occur' to errno-message
when 36
move 'ENAMETOOLONG' to errno-name
move 'File name too long' to errno-message
when 37
move 'ENOLCK' to errno-name
move 'No record locks available' to errno-message
when 38
move 'ENOSYS' to errno-name
move 'Function not implemented' to errno-message
when 39
move 'ENOTEMPTY' to errno-name
move 'Directory not empty' to errno-message
when 40
move 'ELOOP' to errno-name
move 'Too many symbolic links encountered' to errno-message
when 41
move 'EWOULDBLOCK' to errno-name
move 'Operation would block' to errno-message
when 42
move 'ENOMSG' to errno-name
move 'No message of desired type' to errno-message
when 43
move 'EIDRM' to errno-name
move 'Identifier removed' to errno-message
when 44
move 'ECHRNG' to errno-name
move 'Channel number out of range' to errno-message
when 45
move 'EL2NSYNC' to errno-name
move 'Level 2 not synchronized' to errno-message
when 46
move 'EL3HLT' to errno-name
move 'Level 3 halted' to errno-message
when 47
move 'EL3RST' to errno-name
move 'Level 3 reset' to errno-message
when 48
move 'ELNRNG' to errno-name
move 'Link number out of range' to errno-message
when 49
move 'EUNATCH' to errno-name
move 'Protocol driver not attached' to errno-message
when 50
move 'ENOCSI' to errno-name
move 'No CSI structure available' to errno-message
when 51
move 'EL2HLT' to errno-name
move 'Level 2 halted' to errno-message
when 52
move 'EBADE' to errno-name
move 'Invalid exchange' to errno-message
when 53
move 'EBADR' to errno-name
move 'Invalid request descriptor' to errno-message
when 54
move 'EXFULL' to errno-name
move 'Exchange full' to errno-message
when 55
move 'ENOANO' to errno-name
move 'No anode' to errno-message
when 56
move 'EBADRQC' to errno-name
move 'Invalid request code' to errno-message
when 57
move 'EBADSLT' to errno-name
move 'Invalid slot' to errno-message
when 58
move 'EDEADLOCK' to errno-name
move 'deadlock' to errno-message
when 59
move 'EBFONT' to errno-name
move 'Bad font file format' to errno-message
when 60
move 'ENOSTR' to errno-name
move 'Device not a stream' to errno-message
when 61
move 'ENODATA' to errno-name
move 'No data available' to errno-message
when 62
move 'ETIME' to errno-name
move 'Timer expired' to errno-message
when 63
move 'ENOSR' to errno-name
move 'Out of streams resources' to errno-message
when 64
move 'ENONET' to errno-name
move 'Machine is not on the network' to errno-message
when 65
move 'ENOPKG' to errno-name
move 'Package not installed' to errno-message
when 66
move 'EREMOTE' to errno-name
move 'Object is remote' to errno-message
when 67
move 'ENOLINK' to errno-name
move 'Link has been severed' to errno-message
when 68
move 'EADV' to errno-name
move 'Advertise error' to errno-message
when 69
move 'ESRMNT' to errno-name
move 'Srmount error' to errno-message
when 70
move 'ECOMM' to errno-name
move 'Communication error on send' to errno-message
when 71
move 'EPROTO' to errno-name
move 'Protocol error' to errno-message
when 72
move 'EMULTIHOP' to errno-name
move 'Multihop attempted' to errno-message
when 73
move 'EDOTDOT' to errno-name
move 'RFS specific error' to errno-message
when 74
move 'EBADMSG' to errno-name
move 'Not a data message' to errno-message
when 75
move 'EOVERFLOW' to errno-name
move 'Value too large for defined data type' to errno-message
when 76
move 'ENOTUNIQ' to errno-name
move 'Name not unique on network' to errno-message
when 77
move 'EBADFD' to errno-name
move 'File descriptor in bad state' to errno-message
when 78
move 'EREMCHG' to errno-name
move 'Remote address changed' to errno-message
when 79
move 'ELIBACC' to errno-name
move 'Can not access a needed shared library' to errno-message
when 80
move 'ELIBBAD' to errno-name
move 'Accessing a corrupted shared library' to errno-message
when 81
move 'ELIBSCN' to errno-name
move '.lib section in a.out corrupted' to errno-message
when 82
move 'ELIBMAX' to errno-name
move 'Attempting to link in too many shared libraries' to errno-message
when 83
move 'ELIBEXEC' to errno-name
move 'Cannot exec a shared library directly' to errno-message
when 84
move 'EILSEQ' to errno-name
move 'Illegal byte sequence' to errno-message
when 85
move 'ERESTART' to errno-name
move 'Interrupted system call should be restarted' to errno-message
when 86
move 'ESTRPIPE' to errno-name
move 'Streams pipe error' to errno-message
when 87
move 'EUSERS' to errno-name
move 'Too many users' to errno-message
when 88
move 'ENOTSOCK' to errno-name
move 'Socket operation on non-socket' to errno-message
when 89
move 'EDESTADDRREQ' to errno-name
move 'Destination address required' to errno-message
when 90
move 'EMSGSIZE' to errno-name
move 'Message too long' to errno-message
when 91
move 'EPROTOTYPE' to errno-name
move 'Protocol wrong type for socket' to errno-message
when 92
move 'ENOPROTOOPT' to errno-name
move 'Protocol not available' to errno-message
when 93
move 'EPROTONOSUPPORT' to errno-name
move 'Protocol not supported' to errno-message
when 94
move 'ESOCKTNOSUPPORT' to errno-name
move 'Socket type not supported' to errno-message
when 95
move 'EOPNOTSUPP' to errno-name
move 'Operation not supported on transport endpoint' to errno-message
when 96
move 'EPFNOSUPPORT' to errno-name
move 'Protocol family not supported' to errno-message
when 97
move 'EAFNOSUPPORT' to errno-name
move 'Address family not supported by protocol' to errno-message
when 98
move 'EADDRINUSE' to errno-name
move 'Address already in use' to errno-message
when 99
move 'EADDRNOTAVAIL' to errno-name
move 'Cannot assign requested address' to errno-message
when 100
move 'ENETDOWN' to errno-name
move 'Network is down' to errno-message
when 101
move 'ENETUNREACH' to errno-name
move 'Network is unreachable' to errno-message
when 102
move 'ENETRESET' to errno-name
move 'Network dropped connection because of reset' to errno-message
when 103
move 'ECONNABORTED' to errno-name
move 'Software caused connection abort' to errno-message
when 104
move 'ECONNRESET' to errno-name
move 'Connection reset by peer' to errno-message
when 105
move 'ENOBUFS' to errno-name
move 'No buffer space available' to errno-message
when 106
move 'EISCONN' to errno-name
move 'Transport endpoint is already connected' to errno-message
when 107
move 'ENOTCONN' to errno-name
move 'Transport endpoint is not connected' to errno-message
when 108
move 'ESHUTDOWN' to errno-name
move 'Cannot send after transport endpoint shutdown' to errno-message
when 109
move 'ETOOMANYREFS' to errno-name
move 'Too many references: cannot splice' to errno-message
when 110
move 'ETIMEDOUT' to errno-name
move 'Connection timed out' to errno-message
when 111
move 'ECONNREFUSED' to errno-name
move 'Connection refused' to errno-message
when 112
move 'EHOSTDOWN' to errno-name
move 'Host is down' to errno-message
when 113
move 'EHOSTUNREACH' to errno-name
move 'No route to host' to errno-message
when 114
move 'EALREADY' to errno-name
move 'Operation already in progress' to errno-message
when 115
move 'EINPROGRESS' to errno-name
move 'Operation now in progress' to errno-message
when 116
move 'ESTALE' to errno-name
move 'Stale NFS file handle' to errno-message
when 117
move 'EUCLEAN' to errno-name
move 'Structure needs cleaning' to errno-message
when 118
move 'ENOTNAM' to errno-name
move 'Not a XENIX named type file' to errno-message
when 119
move 'ENAVAIL' to errno-name
move 'No XENIX semaphores available' to errno-message
when 120
move 'EISNAM' to errno-name
move 'Is a named type file' to errno-message
when 121
move 'EREMOTEIO' to errno-name
move 'Remote I/O error' to errno-message
when 122
move 'EDQUOT' to errno-name
move 'Quota exceeded' to errno-message
when 123
move 'ENOMEDIUM' to errno-name
move 'No medium found' to errno-message
when 124
move 'EMEDIUMTYPE' to errno-name
move 'Wrong medium type' to errno-message
when 125
move 'ECANCELED' to errno-name
move 'Operation Canceled' to errno-message
when 126
move 'ENOKEY' to errno-name
move 'Required key not available' to errno-message
when 127
move 'EKEYEXPIRED' to errno-name
move 'Key has expired' to errno-message
when 128
move 'EKEYREVOKED' to errno-name
move 'Key has been revoked' to errno-message
when 129
move 'EKEYREJECTED' to errno-name
move 'Key was rejected by service' to errno-message
when 130
move 'EOWNERDEAD' to errno-name
move 'Owner died' to errno-message
when 131
move 'ENOTRECOVERABLE' to errno-name
move 'State not recoverable' to errno-message
when 132
move 'ERFKILL' to errno-name
move 'Operation not possible due to RF-kill' to errno-message
when 133
move 'EHWPOISON' to errno-name
move 'Memory page has hardware error' to errno-message
when other
move 'UNKNOWN' to errno-name
move 'Unknown errorno' to errno-message
end-evaluate
goback
.
end program errnomessage.