source: trunk/gcc/libf2c/libF77/F77_aloc.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: 441 bytes
Line 
1#include "f2c.h"
2#undef abs
3#undef min
4#undef max
5#include <stdio.h>
6
7static integer memfailure = 3;
8
9#include <stdlib.h>
10extern void G77_exit_0 (integer *);
11
12char *
13F77_aloc (integer Len, char *whence)
14{
15 char *rv;
16 unsigned int uLen = (unsigned int) Len; /* for K&R C */
17
18 if (!(rv = (char *) malloc (uLen)))
19 {
20 fprintf (stderr, "malloc(%u) failure in %s\n", uLen, whence);
21 G77_exit_0 (&memfailure);
22 }
23 return rv;
24}
Note: See TracBrowser for help on using the repository browser.