ARB
Main Page
Namespaces
Classes
Files
File List
File Members
WETC
WETC_main.cxx
Go to the documentation of this file.
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
);
// no macro recording here
22
23
GB_ERROR
error
=
NULp
;
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
(
NULp
);
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
GB_ERROR
const char * GB_ERROR
Definition:
arb_core.h:25
GBS_global_string
const char * GBS_global_string(const char *templat,...)
Definition:
arb_msg.cxx:203
arbdb.h
EXIT_SUCCESS
#define EXIT_SUCCESS
Definition:
arb_a2ps.c:154
com
T_PT_MAIN com
Definition:
probe_design.cxx:125
error
static void error(const char *msg)
Definition:
mkptypes.cxx:96
aw_root.hxx
EXIT_FAILURE
#define EXIT_FAILURE
Definition:
arb_a2ps.c:157
NullTracker
Definition:
aw_root.hxx:76
AW_HEADER_MAIN
#define AW_HEADER_MAIN
Definition:
aw_window.hxx:36
aw_window.hxx
awt.hxx
GB_shell
Definition:
arbdb.h:171
AW_root::main_loop
void main_loop()
Definition:
AW_root.cxx:625
AWT_create_root
AW_root * AWT_create_root(const char *properties, const char *program, UserActionTracker *user_tracker)
Definition:
AWT_db_browser.cxx:1293
AW_root
Definition:
aw_root.hxx:86
NULp
#define NULp
Definition:
cxxforward.h:114
AWT_install_cb_guards
void AWT_install_cb_guards()
Definition:
AWT_db_browser.cxx:1362
ARB_main
AW_HEADER_MAIN int ARB_main(int argc, char *argv[])
Definition:
WETC_main.cxx:19
AW_root::window_hide
void window_hide(AW_window *aww)
Definition:
AW_root.cxx:477
AWT_show_file
void AWT_show_file(AW_root *awr, const char *filename)
Definition:
AWT_asciiprint.cxx:484
Generated by
1.8.8