aboutsummaryrefslogtreecommitdiff
path: root/unix/boot/spp/rpp/ratlibr/errsub.r
blob: 6e34195ae86ea919a65ea052b0c95826a83a7d85 (plain) (blame)
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
include	defs

# errsub - see if argument is ERROUT substitution

   integer function errsub (arg, file, access)

   character arg (ARB), file (ARB)
   integer access

   if (arg (1) == QMARK & arg (2) != QMARK & arg (2) != EOS) {
      errsub = YES
      access = WRITE
      call scopy (arg, 2, file, 1)
      }

   else if (arg (1) == QMARK & arg (2) == QMARK & arg (3) != EOS) {
      errsub = YES
      access = APPEND
      call scopy (arg, 3, file, 1)
      }

   else
      errsub = NO

   return
   end