aboutsummaryrefslogtreecommitdiff
path: root/src/core/io_trans.h
diff options
context:
space:
mode:
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