root / pobysoC-4.0 / src / test-pobyso-02.c @ 132
Historique | Voir | Annoter | Télécharger (963 octet)
1 | 132 | storres | /** @file test-pobyso-02.c
|
---|---|---|---|
2 | 132 | storres | * Name & purpose
|
3 | 132 | storres | *
|
4 | 132 | storres | * @author
|
5 | 132 | storres | * @date
|
6 | 132 | storres | *
|
7 | 132 | storres | */
|
8 | 132 | storres | /******************************************************************************/
|
9 | 132 | storres | /* Headers, applying the "particular to general" convention.*/
|
10 | 132 | storres | |
11 | 132 | storres | #include "pobyso.h" |
12 | 132 | storres | |
13 | 132 | storres | /* includes of local headers */
|
14 | 132 | storres | |
15 | 132 | storres | /* includes of project headers */
|
16 | 132 | storres | |
17 | 132 | storres | /* includes of system headers */
|
18 | 132 | storres | |
19 | 132 | storres | /* Other declarations */
|
20 | 132 | storres | |
21 | 132 | storres | /* Internal prototypes */
|
22 | 132 | storres | |
23 | 132 | storres | /* Types, constants and macros definitions */
|
24 | 132 | storres | |
25 | 132 | storres | /* Global variables */
|
26 | 132 | storres | |
27 | 132 | storres | /* Functions */
|
28 | 132 | storres | |
29 | 132 | storres | int
|
30 | 132 | storres | main(int argc, char** argv) |
31 | 132 | storres | { |
32 | 132 | storres | pobyso_func_exp_t f; |
33 | 132 | storres | sollya_lib_init(); |
34 | 132 | storres | pobyso_set_canonical_on(); |
35 | 132 | storres | f = pobyso_parse_string(argv[1]);
|
36 | 132 | storres | if (pobyso_is_function(f))
|
37 | 132 | storres | { |
38 | 132 | storres | pobyso_autoprint(f); |
39 | 132 | storres | pobyso_set_canonical_on(); |
40 | 132 | storres | pobyso_autoprint(sollya_lib_canonical(f)); |
41 | 132 | storres | } |
42 | 132 | storres | else
|
43 | 132 | storres | { |
44 | 132 | storres | fprintf(stderr, |
45 | 132 | storres | "%s can't be converted into a functional expression.\n",
|
46 | 132 | storres | argv[1]);
|
47 | 132 | storres | } |
48 | 132 | storres | sollya_lib_clear_obj(f); |
49 | 132 | storres | sollya_lib_close(); |
50 | 132 | storres | return 0; |
51 | 132 | storres | } /* End main */ |