Parent Directory | Revision Log
Merging in refactor of the C++ code, which is moved out of 'pygtk' and into 'ascxx'. Adding support for IPOPT 3.9.1, the current latest version. Support in dtar for parallel builds (possibly needs some testing still).
1 | #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 |