/[ascend]/trunk/pygtk/main.cpp
ViewVC logotype

Annotation of /trunk/pygtk/main.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 532 - (hide annotations) (download) (as text)
Mon Apr 24 02:23:08 2006 UTC (18 years, 1 month ago) by johnpye
File MIME type: text/x-c++src
File size: 671 byte(s)
Removed 'interface' directory in trunk/pygtk/interface (moved everything up a level)
Made corresponding changes to SCons* and spec files.
1 johnpye 132 #include <unistd.h>
2    
3     #include "library.h"
4     #include "type.h"
5     #include "instance.h"
6     #include "symchar.h"
7     #include "reporter.h"
8    
9     void esc_seq(char *s="0",FILE *f=stderr){
10     fprintf(f,"%c[%sm",char(27),s);
11     }
12    
13     int red_error(ERROR_REPORTER_CALLBACK_ARGS){
14     bool red=false;
15     if((int)sev >= (int)ASC_PROG_NOTE) red=true;
16    
17     if(red)esc_seq("31;2");
18     vfprintf(stderr,fmt,args);
19     if(red)esc_seq();
20     }
21    
22     int main(void){
23     Reporter *reporter = Reporter::Instance();
24     reporter->setErrorCallback(red_error);
25    
26     Library *l;
27     l = new Library();
28     l->load("simple_fs.a4c");
29     Type t;
30     t = l->findType("test_controller");
31     Instanc i = t.getInstance("tc"); // speling is deliberate
32     //i.solve();
33     }
34    

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22