2 static char rcsid[] = "$Id: main.c,v 2.8 1994/06/24 10:40:17 ceriel Exp $";
14 * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
15 * See the copyright notice in the ACK home directory, in the file "Copyright".
17 * Author: Hans van Staveren
21 * Main program for EM optimizer
24 main(argc,argv) int argc; char *argv[]; {
25 int somespace[STACKROOM];
28 while (argc-->1 && **++argv == '-')
31 fprintf(stderr,"Usage: %s [-Ln] [-m<num>] [name]\n",progname);
35 if (freopen(*argv,"r",stdin) == NULL)
36 error("Cannot open %s",*argv);
38 coreinit((short *)somespace,(short *)(somespace+STACKROOM));
44 flags(s) register char *s; {
48 case 'L': Lflag = TRUE; break;
49 case 'n': nflag = TRUE; break;
50 case 'm': if (*(s+1) == 'l') {
54 repl_muls = atoi(s+1); break;
62 if (readshort() != (short) sp_magic)
63 error("wrong input file");
65 outfile = fopen(mktemp(template),"w");
67 error("can't create %s",template);