X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-psi;a=blobdiff_plain;f=src%2Fcalc.h;h=0c2678cde2daf48ca431443c1aab8bbd34d09b47;hp=d8f9e18261803dba0e977688c9a14dd20cb44f7b;hb=a7ac1c0a3c855321f21682c127a4b707de33a303;hpb=3b0b651ea1b555d8d023e45b43e5eb93b23d00a1 diff --git a/src/calc.h b/src/calc.h index d8f9e18..0c2678c 100644 --- a/src/calc.h +++ b/src/calc.h @@ -27,29 +27,20 @@ #define PSI_CALC_H #include "token.h" -#include "impl_val.h" +#include "types/impl_val.h" -#define PRIfval "f" -#define PRIdval "lf" -#define PRIldval "Lf" +#define PRIfval ".13gF" +#define PRIdval ".53g" +#define PRIldval ".64LgL" typedef token_t (*psi_calc)(token_t t1, impl_val *v1, token_t t2, impl_val *v2, impl_val *res); -token_t psi_calc_add(token_t t1, impl_val *v1, token_t t2, impl_val *v2, impl_val *res); -token_t psi_calc_sub(token_t t1, impl_val *v1, token_t t2, impl_val *v2, impl_val *res); -token_t psi_calc_mul(token_t t1, impl_val *v1, token_t t2, impl_val *v2, impl_val *res); -token_t psi_calc_div(token_t t1, impl_val *v1, token_t t2, impl_val *v2, impl_val *res); -token_t psi_calc_mod(token_t t1, impl_val *v1, token_t t2, impl_val *v2, impl_val *res); - -token_t psi_calc_not(token_t t1, impl_val *v1, token_t t2, impl_val *v2, impl_val *res); -token_t psi_calc_bin_not(token_t t1, impl_val *v1, token_t t2, impl_val *v2, impl_val *res); - -token_t psi_calc_bin_lshift(token_t t1, impl_val *v1, token_t t2, impl_val *v2, impl_val *res); -token_t psi_calc_bin_rshift(token_t t1, impl_val *v1, token_t t2, impl_val *v2, impl_val *res); -token_t psi_calc_bin_and(token_t t1, impl_val *v1, token_t t2, impl_val *v2, impl_val *res); -token_t psi_calc_bin_xor(token_t t1, impl_val *v1, token_t t2, impl_val *v2, impl_val *res); -token_t psi_calc_bin_or(token_t t1, impl_val *v1, token_t t2, impl_val *v2, impl_val *res); - -void psi_calc_cast(token_t in_type, impl_val *in_val, token_t out_type, impl_val *out_val); +#include "calc/basic.h" +#include "calc/bin.h" +#include "calc/bool.h" +#include "calc/unary.h" +#include "calc/cast.h" +#include "calc/cmp.h" +#include "calc/oper.h" #endif