source: tags/initial/TREEGEN/sim.c

Last change on this file was 2, checked in by oldcode, 24 years ago

Initial revision

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 944 bytes
Line 
1#ifndef __RNS_H
2    #include "rns.h"
3#endif
4#ifndef __SIMCFG_H
5    #include "simcfg.h"
6#endif
7#ifndef __TIME_H
8    #include <time.h>
9#endif
10#ifndef __STDLIB_H
11    #include <stdlib.h>
12#endif
13#ifndef __BASE_H
14    #include "base.h"
15#endif
16
17/* --------------------------------------------------------------------------- */
18/*      int main(int argc, str argv[]) */
19/* ------------------------------------------------------ 14.05.95 11.14 ----- */
20int main(int argc, str argv[])
21{
22    RNS origin;
23
24    if (argc!=4) error("Usage: SIM <cfg> <topo> <seq>");
25
26    srand((unsigned)time(NULL));
27    initBaseLookups();
28
29    readSimCfg(argv[1]);
30    origin = createOriginRNS();
31
32    topo = fopen(argv[2], "w"); if (!topo) { perror(argv[2]); exit(1); }
33    seq = fopen(argv[3], "w"); if (!seq) { perror(argv[3]); exit(1); }
34
35    splitRNS(origin, 0.0, timeSteps, 0);
36    dumpDepths();
37
38    fclose(seq);
39    fclose(topo);
40
41    free(origin);
42    return 0;
43}
44
45
46
Note: See TracBrowser for help on using the repository browser.