Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /branches/vis12-cl/src/compiler/c-target/fragments/seq-main.in
ViewVC logotype

Diff of /branches/vis12-cl/src/compiler/c-target/fragments/seq-main.in

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3117, Sun Mar 22 08:30:03 2015 UTC revision 3118, Mon Mar 23 18:05:45 2015 UTC
# Line 7  Line 7 
7    
8    // create the world    // create the world
9      @PREFIX@World_t *wrld = @PREFIX@New();      @PREFIX@World_t *wrld = @PREFIX@New();
10      if (wrld == 0)      if (wrld == 0) {
11            fprintf(stderr, "unable to create world\n");
12          exit (1);          exit (1);
13        }
14    
   // handle command-line options  
     {  
         Diderot_Options_t *opts = Diderot_OptNew ();  
15  #ifndef DIDEROT_NO_INPUTS  #ifndef DIDEROT_NO_INPUTS
16      // initialize the default values for the inputs
17          @PREFIX@Inputs_t inputs;          @PREFIX@Inputs_t inputs;
18          InitDefaults (&inputs);          InitDefaults (&inputs);
19  #endif  #endif
20    
21      // handle command-line options
22        {
23            Diderot_Options_t *opts = Diderot_OptNew ();
24          Diderot_OptAddFlag (opts, "v,verbose", "enable runtime-system messages", &(wrld->verboseFlg));          Diderot_OptAddFlag (opts, "v,verbose", "enable runtime-system messages", &(wrld->verboseFlg));
25          Diderot_OptAddFlag (opts, "t,timing", "enable execution timing", &timingFlg);          Diderot_OptAddFlag (opts, "t,timing", "enable execution timing", &timingFlg);
26  //      Diderot_OptAddFlag (opts, "T,text", "enable text output", &printOutputFlg);  //      Diderot_OptAddFlag (opts, "T,text", "enable text output", &printOutputFlg);
27  #ifndef DIDEROT_NO_INPUTS  #ifndef DIDEROT_NO_INPUTS
28          // register options for setting global inputs
29          RegisterGlobalOpts (&inputs, opts);          RegisterGlobalOpts (&inputs, opts);
30  #endif  #endif
31          RegisterOutputOpts (opts);          RegisterOutputOpts (opts);
32          Diderot_OptProcess (opts, argc, argv);          Diderot_OptProcess (opts, argc, argv);
33          Diderot_OptFree (opts);          Diderot_OptFree (opts);
 #ifndef DIDEROT_NO_INPUTS  
       // initialize the input globals  
         if (InitInputs (wrld, &inputs)) {  
             fprintf(stderr, "Error initializing inputs:\n%s\n", biffMsgStrGet(wrld->errors));  
             exit(1);  
         }  
 #endif  
34      }      }
35    
36    // initialize scheduler stuff    // initialize scheduler stuff
# Line 43  Line 41 
41          exit(1);          exit(1);
42      }      }
43    
44    #ifndef DIDEROT_NO_INPUTS
45      // initialize the input globals
46        if (InitInputs (wrld, &inputs)) {
47            fprintf(stderr, "Error initializing inputs:\n%s\n", biffMsgStrGet(wrld->errors));
48            exit(1);
49        }
50    #endif
51    
52    // run the generated global initialization code    // run the generated global initialization code
53      if (wrld->verboseFlg)      if (wrld->verboseFlg)
54          fprintf (stderr, "initializing globals ...\n");          fprintf (stderr, "initializing globals ...\n");

Legend:
Removed from v.3117  
changed lines
  Added in v.3118

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0