source: trunk/gcc/libf2c/libF77/s_rnge.c

Last change on this file was 1392, checked in by bird, 21 years ago

This commit was generated by cvs2svn to compensate for changes in r1391,
which included commits to RCS files with non-trunk default branches.

  • Property cvs2svn:cvs-rev set to 1.1.1.2
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 592 bytes
Line 
1#include <stdio.h>
2#include "f2c.h"
3
4/* called when a subscript is out of range */
5
6extern void sig_die (char *, int);
7integer
8s_rnge (char *varn, ftnint offset, char *procn, ftnint line)
9{
10 register int i;
11
12 fprintf (stderr, "Subscript out of range on file line %ld, procedure ",
13 (long) line);
14 while ((i = *procn) && i != '_' && i != ' ')
15 putc (*procn++, stderr);
16 fprintf (stderr, ".\nAttempt to access the %ld-th element of variable ",
17 (long) offset + 1);
18 while ((i = *varn) && i != ' ')
19 putc (*varn++, stderr);
20 sig_die (".", 1);
21 return 0; /* not reached */
22}
Note: See TracBrowser for help on using the repository browser.