Last change
on this file was
10083,
checked in by westram, 11 years ago
|
reintegrated branch 'macros2'
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Author Date Id Revision
|
File size:
1.6 KB
|
Line | |
---|
1 | // ================================================================ // |
---|
2 | // // |
---|
3 | // File : WETC_main.cxx // |
---|
4 | // Purpose : // |
---|
5 | // // |
---|
6 | // Institute of Microbiology (Technical University Munich) // |
---|
7 | // http://www.arb-home.de/ // |
---|
8 | // // |
---|
9 | // ================================================================ // |
---|
10 | |
---|
11 | #include <arbdb.h> |
---|
12 | #include <awt.hxx> |
---|
13 | #include <aw_window.hxx> |
---|
14 | #include <aw_root.hxx> |
---|
15 | |
---|
16 | AW_HEADER_MAIN |
---|
17 | |
---|
18 | |
---|
19 | int ARB_main(int argc, char *argv[]) { |
---|
20 | GB_shell shell; |
---|
21 | AW_root *aw_root = AWT_create_root("ntree.arb", "ARB_WETC", new NullTracker, &argc, &argv); // no macro recording here |
---|
22 | |
---|
23 | GB_ERROR error = NULL; |
---|
24 | |
---|
25 | if (argc != 3) { |
---|
26 | error = "Missing arguments"; |
---|
27 | } |
---|
28 | else { |
---|
29 | const char *com = argv[1]; |
---|
30 | const char *file = argv[2]; |
---|
31 | |
---|
32 | if (strcmp(com, "-fileedit") != 0) { |
---|
33 | error = GBS_global_string("Unexpected parameter '%s'", com); |
---|
34 | } |
---|
35 | else { |
---|
36 | AWT_show_file(aw_root, file); |
---|
37 | aw_root->window_hide(NULL); |
---|
38 | AWT_install_cb_guards(); |
---|
39 | aw_root->main_loop(); |
---|
40 | } |
---|
41 | } |
---|
42 | |
---|
43 | if (error) { |
---|
44 | fprintf(stderr, |
---|
45 | "Syntax: arb_wetc -fileedit filename\n" |
---|
46 | "Error: %s\n", |
---|
47 | error); |
---|
48 | return EXIT_FAILURE; |
---|
49 | } |
---|
50 | return EXIT_SUCCESS; |
---|
51 | } |
---|
52 | |
---|
Note: See
TracBrowser
for help on using the repository browser.