stdio.h defines BUFSIZ
[unix-history] / usr / src / usr.bin / f77 / libF77 / s_rnge.c
CommitLineData
ed3947dd 1/*
a6c6a0df
RE
2 * Copyright (c) 1980 Regents of the University of California.
3 * All rights reserved. The Berkeley software License Agreement
4 * specifies the terms and conditions for redistribution.
5 *
6 * @(#)s_rnge.c 5.1 %G%
ed3947dd
DW
7 */
8
9#include <stdio.h>
10
11/* called when a subscript is out of range */
12
13s_rnge(varn, offset, procn, line)
14char *varn, *procn;
15long int offset;
16int line;
17{
18register int i;
19
20fprintf(stderr, "Subscript out of range on file line %d, procedure ", line);
21for(i = 0 ; i < 8 && *procn!='_' ; ++i)
22 putc(*procn++, stderr);
23fprintf(stderr, ".\nAttempt to access the %ld-th element of variable ", offset+1);
24for(i = 0 ; i < 6 && *varn!=' ' ; ++i)
25 putc(*varn++, stderr);
26fprintf(stderr, ".\n");
50fd198f 27f77_abort();
ed3947dd 28}