aboutsummaryrefslogtreecommitdiff
path: root/src/core/io_trans.h
blob: d91e9a28e57ce25636fc28737053f38ae7191ce5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
STATIC uint8_t readtrans(const char *);
STATIC void writetrans(uint8_t, char *);

STATIC uint8_t
readtrans(const char *buf)
{
	uint8_t t;

	for (t = 0; t < 48; t++)
		if (!strncmp(buf, transstr[t], 11))
			return t;

	LOG("readtrans error\n");
	return UINT8_ERROR;
}

STATIC void
writetrans(uint8_t t, char *buf)
{
	if (t >= 48)
		memcpy(buf, "error trans", 11);
	else
		memcpy(buf, transstr[t], 11);
	buf[11] = '\0';
}

Generated with cgit - Back to sebastiano.tronto.net