Last change
on this file was
5390,
checked in by westram, 16 years ago
|
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Author Date Id Revision
|
File size:
778 bytes
|
Line | |
---|
1 | #include <stdio.h> |
---|
2 | #include <stdlib.h> |
---|
3 | #include <string.h> |
---|
4 | #include <arbdb.h> |
---|
5 | #include <arbdbt.h> |
---|
6 | #include <cat_tree.hxx> |
---|
7 | |
---|
8 | static void error_msg(char **argv) __ATTR__NORETURN; |
---|
9 | static void error_msg(char **argv){ |
---|
10 | printf("syntax: %s treefile otb-file\n" |
---|
11 | " syntax of tree tips: name#full_name\n" |
---|
12 | ,argv[0]); |
---|
13 | exit(-1); |
---|
14 | } |
---|
15 | |
---|
16 | |
---|
17 | |
---|
18 | int main(int argc,char **argv) |
---|
19 | { |
---|
20 | |
---|
21 | if (argc != 3) error_msg(argv); |
---|
22 | char *nname = argv[1]; |
---|
23 | char *otb_name = argv[2]; |
---|
24 | |
---|
25 | |
---|
26 | GBT_TREE *tree = GBT_load_tree(nname,sizeof(GBT_TREE), 0, 1, 0); |
---|
27 | if (!tree) { |
---|
28 | GB_print_error(); |
---|
29 | return -1; |
---|
30 | } |
---|
31 | GB_ERROR error = create_and_save_CAT_tree(tree,otb_name); |
---|
32 | if (error){ |
---|
33 | fprintf(stderr,"%s\n",error); |
---|
34 | return -1; |
---|
35 | } |
---|
36 | return 0; |
---|
37 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.