/* intrat.h v0.1 (C) 1999 adolfo@di-mare.com */ #ifndef INTRAT_H #define INTRAT_H #ifdef __cplusplus extern "C" { #endif #include "clist.h" typedef struct { int n; cl_link ik; /* link field */ } int_lk; declare_binder(int_lk, ik); #define int_lk_cast(p) binder_cast(p, int_lk, ik) void int_init (int_lk * it); void int_copy (int_lk * it, int_lk * src); int int_equal(int_lk * it, int_lk * src); void int_print(int_lk * it, FILE *); void int_done (int_lk * it); typedef struct { long num, den; cl_link rk; /* link field */ } rat_lk; declare_binder(rat_lk, rk); #define rat_lk_cast(p) binder_cast(p, rat_lk, rk) void rat_init (rat_lk * it); void rat_copy (rat_lk * it, rat_lk * src); int rat_equal(rat_lk * it, rat_lk * src); void rat_print(rat_lk * it, FILE *); void rat_done (rat_lk * it); #ifdef __cplusplus } #endif #endif /* INTRAT_H */ /* EOF: intrat.h */