+/*
+ * Copyright (c) 1980 Regents of the University of California.
+ * All rights reserved. The Berkeley software License Agreement
+ * specifies the terms and conditions for redistribution.
+ */
+
+#ifndef lint
+static char *sccsid = "@(#)init.c 5.2 (Berkeley) 8/29/85";
+#endif
+
+/*
+ * init.c
+ *
+ * Initializations for f77 compiler, pass 1.
+ *
+ * University of Utah CS Dept modification history:
+ *
+ * $Header: init.c,v 5.2 85/08/10 04:30:57 donn Exp $
+ * $Log: init.c,v $
+ * Revision 5.2 85/08/10 04:30:57 donn
+ * Jerry Berkman's changes to ifdef 66 code and handle -r8/double flag.
+ *
+ * Revision 5.1 85/08/10 03:47:33 donn
+ * 4.3 alpha
+ *
+ * Revision 2.1 84/07/19 12:03:26 donn
+ * Changed comment headers for UofU.
+ *
+ * Revision 1.3 84/02/28 21:07:53 donn
+ * Added Berkeley changes for call argument temporaries fix.
+ *
+ * Fixed incorrect check of 'cdatafile' when 'cchkfile' is opened. -- Donn
+ */
+
#include "defs.h"
#include "io.h"
#include <sys/file.h>
struct Labelblock *thislabel = NULL;
flag nowarnflag = NO;
flag ftn66flag = NO;
+#ifdef ONLY66
flag no66flag = NO;
flag noextflag = NO;
+#endif
+flag dblflag = NO;
flag profileflag = NO;
flag optimflag = NO;
flag shiftcase = YES;
flag toomanyinit;
ftnint curdtelt;
chainp templist = NULL;
+chainp argtemplist = CHNULL;
+chainp activearglist = CHNULL;
chainp holdtemps = NULL;
int dorange = 0;
struct Entrypoint *entries = NULL;
fatalstr("cannot open tmp file %s", cdatafname);
cchkfile = open(cchkfname, O_CREAT | O_RDWR, 0600);
-if (cdatafile < 0)
+if (cchkfile < 0)
fatalstr("cannot open tmp file %s", cchkfname);
pruse(initfile, USEINIT);
for(cp = templist ; cp ; cp = cp->nextp)
free( (charptr) (cp->datap) );
frchain(&templist);
+for (cp = argtemplist; cp; cp = cp->nextp)
+ free((char *) (cp->datap));
+frchain(&argtemplist);
holdtemps = NULL;
dorange = 0;
nregvar = 0;
setimpl(TYUNKNOWN, (ftnint) 0, 'a', 'z');
else
{
- setimpl(TYREAL, (ftnint) 0, 'a', 'z');
+ setimpl(dblflag ? TYDREAL : TYREAL, (ftnint) 0, 'a', 'z');
setimpl(tyint, (ftnint) 0, 'i', 'n');
}
setimpl(-STGBSS, (ftnint) 0, 'a', 'z'); /* set class */