aboutsummaryrefslogtreecommitdiff
path: root/src/core/io_trans.h
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2024-08-18 14:26:45 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2024-08-18 14:26:45 +0200
commit18c9a8b8905304cf5f8fc15825769046a3144866 (patch)
treea7807bb32b0a5d9ded7d3cedccc598f64a9b00fe /src/core/io_trans.h
parentf25a10e19eca294c4e6a99e4f80ce5cfd11a0e5f (diff)
downloadnissy-core-18c9a8b8905304cf5f8fc15825769046a3144866.tar.gz
nissy-core-18c9a8b8905304cf5f8fc15825769046a3144866.zip
Reorganized folder structure
Diffstat (limited to 'src/core/io_trans.h')
-rw-r--r--src/core/io_trans.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/core/io_trans.h b/src/core/io_trans.h
new file mode 100644
index 0000000..7187b7a
--- /dev/null
+++ b/src/core/io_trans.h
@@ -0,0 +1,25 @@
1_static uint8_t readtrans(const char *);
2_static void writetrans(uint8_t, char *);
3
4_static uint8_t
5readtrans(const char *buf)
6{
7 uint8_t t;
8
9 for (t = 0; t < 48; t++)
10 if (!strncmp(buf, transstr[t], 11))
11 return t;
12
13 LOG("readtrans error\n");
14 return _error;
15}
16
17_static void
18writetrans(uint8_t t, char *buf)
19{
20 if (t >= 48)
21 memcpy(buf, "error trans", 11);
22 else
23 memcpy(buf, transstr[t], 11);
24 buf[11] = '\0';
25}

Generated with cgit - Back to sebastiano.tronto.net