Statistiques
| Révision :

root / pobysoC-4.0 / src / test-pobyso-02.c @ 132

Historique | Voir | Annoter | Télécharger (963 octet)

1
/** @file test-pobyso-02.c
2
 * Name & purpose
3
 *
4
 * @author
5
 * @date
6
 *
7
 */
8
/******************************************************************************/
9
/* Headers, applying the "particular to general" convention.*/
10

    
11
#include "pobyso.h"
12

    
13
/* includes of local headers */
14

    
15
/* includes of project headers */
16

    
17
/* includes of system headers */
18

    
19
/* Other declarations */
20

    
21
/* Internal prototypes */
22

    
23
/* Types, constants and macros definitions */
24

    
25
/* Global variables */
26

    
27
/* Functions */
28

    
29
int
30
main(int argc, char** argv)
31
{
32
  pobyso_func_exp_t f;
33
  sollya_lib_init();
34
  pobyso_set_canonical_on();
35
  f = pobyso_parse_string(argv[1]);
36
  if (pobyso_is_function(f))
37
  {
38
    pobyso_autoprint(f);
39
    pobyso_set_canonical_on();
40
    pobyso_autoprint(sollya_lib_canonical(f));
41
  }
42
  else
43
  {
44
    fprintf(stderr,
45
        "%s can't be converted into a functional expression.\n",
46
        argv[1]);
47
  }
48
  sollya_lib_clear_obj(f);
49
  sollya_lib_close();
50
  return 0;
51
} /* End main */