aboutsummaryrefslogtreecommitdiff
path: root/unix/boot/spp/rpp/rpprat/synerr.r
blob: 80bee91b93d1c84934897305fa187f9d204c614a (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
27
28
29
30
31
32
33
34
35
36
37
#-h-  synerr			  703  local   12/01/80  15:55:08
# synerr --- report non-fatal error
   include  defs

   subroutine synerr (msg)

   character msg
#      character*(*) msg

   include COMMON_BLOCKS
   character lc (MAXCHARS)

   integer i, junk
   integer itoc

   string of " of "
   string errmsg "Error on line "

   call putlin (errmsg, ERROUT)
   if (level >= 1)
      i = level
   else
      i = 1 # for EOF errors
   junk = itoc (linect (i), lc, MAXCHARS)
   call putlin (lc, ERROUT)
   for (i = fnamp - 1; i >= 1; i = i - 1)
      if (fnames (i - 1) == EOS | i == 1) {  # print file name
	 call putlin (of, ERROUT)
	 call putlin (fnames (i), ERROUT)
	 break
	 }

   call putch (COLON, ERROUT)
   call putch (BLANK, ERROUT)
   call remark (msg)
   return
   end