mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-27 15:39:40 +08:00
6973bf5482
* libF77/configure.in: Define IEEE_COMPLEX_DIVIDE. * libF77/[cz]_div.c: Arrange for compilation under -DIEEE_COMPLEX_DIVIDE to make these routines avoid calling sig_die when the denominator vanishes. * libF77/s_rnge.c: Add casts for the case of sizeof(ftnint) == sizeof(int) < sizeof(long). * libI77/endfile.c: Set state to writing (b->uwrt = 1) when an endfile statement requires copying the file Also, supply a missing (long) cast in the sprintf call. * libI77/sfe.c: Add #ifdef ALWAYS_FLUSH logic, for formatted I/O. From-SVN: r32496
27 lines
686 B
C
27 lines
686 B
C
#include <stdio.h>
|
|
#include "f2c.h"
|
|
|
|
/* called when a subscript is out of range */
|
|
|
|
#ifdef KR_headers
|
|
extern VOID sig_die();
|
|
integer s_rnge(varn, offset, procn, line) char *varn, *procn; ftnint offset, line;
|
|
#else
|
|
extern VOID sig_die(char*,int);
|
|
integer s_rnge(char *varn, ftnint offset, char *procn, ftnint line)
|
|
#endif
|
|
{
|
|
register int i;
|
|
|
|
fprintf(stderr, "Subscript out of range on file line %ld, procedure ",
|
|
(long)line);
|
|
while((i = *procn) && i != '_' && i != ' ')
|
|
putc(*procn++, stderr);
|
|
fprintf(stderr, ".\nAttempt to access the %ld-th element of variable ",
|
|
(long)offset+1);
|
|
while((i = *varn) && i != ' ')
|
|
putc(*varn++, stderr);
|
|
sig_die(".", 1);
|
|
return 0; /* not reached */
|
|
}
|