diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2023-10-27 17:16:58 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2023-10-27 17:16:58 +0200 |
| commit | 989e933fc557cbc1e9e16e45033387816ee6075e (patch) | |
| tree | 867ee23bdaf6ba1e0e5f001d1a15e3bb46fa3bc3 /utils/invert.c | |
| parent | 2a8d66906dde19ffb7315fb3f60a396a71612037 (diff) | |
| download | nissy-core-989e933fc557cbc1e9e16e45033387816ee6075e.tar.gz nissy-core-989e933fc557cbc1e9e16e45033387816ee6075e.zip | |
Improved transformations and cleaned up
Diffstat (limited to 'utils/invert.c')
| -rw-r--r-- | utils/invert.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/utils/invert.c b/utils/invert.c new file mode 100644 index 0000000..3088273 --- /dev/null +++ b/utils/invert.c | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | #include <stdio.h> | ||
| 2 | #include <inttypes.h> | ||
| 3 | #include <stdbool.h> | ||
| 4 | |||
| 5 | #include "../src/cube.h" | ||
| 6 | |||
| 7 | #define STRLENMAX 1000 | ||
| 8 | |||
| 9 | int main() { | ||
| 10 | char str[STRLENMAX]; | ||
| 11 | cube_t cube; | ||
| 12 | |||
| 13 | fgets(str, STRLENMAX, stdin); | ||
| 14 | cube = readcube(H48, str); | ||
| 15 | writecube(H48, inverse(cube), str); | ||
| 16 | fputs(str, stdout); | ||
| 17 | |||
| 18 | return 0; | ||
| 19 | } | ||
