2
/* $Log: init_ptrs.c,v $
3
/* Revision 1.4 2003/05/22 06:20:06 crawdad
4
/* Corrected most of the libraries and modules to use proper PSI_RETURN_XX
5
/* values from psifiles.h. Modified ccdensity, ccenergy, cchbar, cclambda,
6
/* ccsort, cctriples, cis, cphf, cusp, localize, stable, libchkpt, libciomr,
7
/* libdpd, libipv1, libpsio, libqt, and tocprint.
10
/* Revision 1.3 2002/06/24 01:02:26 crawdad
11
/* Various changes. (1) Added new function to libdpd: buf4_sort_axpy(), which
12
/* will perform a sort and axpy at the same time. Convenient for many
13
/* things. (2) Added a new sort to all buf4_sort* functions. (3) Some
14
/* documentation changes.
17
/* Revision 1.2 2001/08/28 18:42:44 crawdad
18
/* Minor changes associated with memory-leak tracking.
21
/* Revision 1.1.1.1 2000/02/04 22:53:19 evaleev
22
/* Started PSI 3 repository
24
/* Revision 2.7 1997/09/23 12:53:33 crawdad
25
/* Correcting nasty, hideous, stupied little bug that annoyed me for a week.
27
* Revision 2.6 1997/09/12 13:52:50 crawdad
28
* Changing marco name from ULL to PSI_FPTR.
30
* Revision 2.5 1997/08/25 21:49:52 crawdad
31
* Making changes for extension of PSI file size limit.
33
* Revision 2.4 1997/06/23 12:25:48 crawdad
34
* Multiple changes to libciomr: Moved "param.h" to "iomrparam.h" to avoid
35
* conflicts with similarly named system file under linux. Corrected type
36
* casting in rread(), rwrit(), sread(), and swrit() functions. Corrected
37
* unclosed tmpdisks.dat file in sequential.c. Corrected block_matrix() to
38
* avoid malloc'ing zero-length arrays.
42
* Revision 2.3 1996/07/03 11:26:38 psi
43
* Added free_ptrs() function in init_ptrs.c. Added free() calls to tstart()
46
* Revision 2.2 1996/07/02 21:06:29 sherrill
47
* Completed the changes needed to use unit numbers greater than 99; changed
48
* a hardwired 99 in init_ptrs.c to MAX_UNIT and increased a "unit" string
49
* from 3 chars to 4. Also removed a compiler warning in sequential.c by
50
* casting ud to (char *) for malloc_check().
52
* Revision 2.1 1991/06/15 18:29:21 seidl
53
* *** empty log message ***
56
static char *rcsid = "$Id: init_ptrs.c,v 1.4 2003/05/22 06:20:06 crawdad Exp $";
59
#include "iomrparam.h"
63
/* allocates memory for array of file pointers */
67
int num_ptrs = MAX_UNIT;
69
ptr.wptr = (PSI_FPTR *) malloc(sizeof(PSI_FPTR)*num_ptrs);
71
if (ptr.wptr == NULL) {
72
fprintf(stderr,"trouble allocating memory for pointers!\n");
73
exit(PSI_RETURN_FAILURE);