diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2022-09-10 19:13:02 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2022-09-10 19:13:02 +0200 |
| commit | 2dce2a8a0ebd95e9e65d9d53206c4b2babc2af2f (patch) | |
| tree | 0310e3458cee1d1bef6b5e9e656c9694d3bb212a /src/fst.c | |
| parent | 86dd040a2d2f06e8355f5441fb1da5ed59ecc399 (diff) | |
| download | nissy-2dce2a8a0ebd95e9e65d9d53206c4b2babc2af2f.tar.gz nissy-2dce2a8a0ebd95e9e65d9d53206c4b2babc2af2f.zip | |
Added fst_cube prototypes
Diffstat (limited to 'src/fst.c')
| -rw-r--r-- | src/fst.c | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/src/fst.c b/src/fst.c new file mode 100644 index 0000000..91c022a --- /dev/null +++ b/src/fst.c | |||
| @@ -0,0 +1,58 @@ | |||
| 1 | #define FST_C | ||
| 2 | |||
| 3 | #include "fst.h" | ||
| 4 | |||
| 5 | static void fst_to_ep(FstCube fst, int *ep); | ||
| 6 | |||
| 7 | FstCube | ||
| 8 | cube_to_fst(Cube *cube) | ||
| 9 | { | ||
| 10 | Cube c; | ||
| 11 | FstCube ret; | ||
| 12 | |||
| 13 | copy_cube(cube, &c); | ||
| 14 | ret.uf_eofb = index_eofb(&c); | ||
| 15 | ret.uf_eposepe = index_eposepe(&c); | ||
| 16 | ret.uf_coud = index_coud(&c); | ||
| 17 | ret.uf_cp = index_cp(&c); | ||
| 18 | copy_cube(cube, &c); | ||
| 19 | transform_cube(fr, &c); | ||
| 20 | ret.fr_eofb = index_eofb(&c); | ||
| 21 | ret.fr_eposepe = index_eposepe(&c); | ||
| 22 | ret.fr_coud = index_coud(&c); | ||
| 23 | transform_cube(rd, &c); | ||
| 24 | ret.rd_eofb = index_eofb(&c); | ||
| 25 | ret.rd_eposepe = index_eposepe(&c); | ||
| 26 | ret.rd_coud = index_coud(&c); | ||
| 27 | |||
| 28 | return ret; | ||
| 29 | } | ||
| 30 | |||
| 31 | FstCube | ||
| 32 | fst_inverse(FstCube fst) | ||
| 33 | { | ||
| 34 | /* TODO */ | ||
| 35 | } | ||
| 36 | |||
| 37 | FstCube | ||
| 38 | fst_move(Move m, FstCube fst) | ||
| 39 | { | ||
| 40 | /* TODO */ | ||
| 41 | } | ||
| 42 | |||
| 43 | void | ||
| 44 | fst_to_cube(FstCube fst, Cube *cube) | ||
| 45 | { | ||
| 46 | invindex_eofb((uint64_t)fst.uf_eofb, cube); | ||
| 47 | fst_to_ep(fst, cube->ep); | ||
| 48 | invindex_coud((uint64_t)fst.uf_coud, cube); | ||
| 49 | invindex_cp((uint64_t)fst.uf_cp, cube); | ||
| 50 | } | ||
| 51 | |||
| 52 | static void | ||
| 53 | fst_to_ep(FstCube fst, int *ep) | ||
| 54 | { | ||
| 55 | /* TODO */ | ||
| 56 | } | ||
| 57 | |||
| 58 | #endif | ||
