aboutsummaryrefslogtreecommitdiffstats
path: root/libterminput_unmarshal_text__.c
blob: 4843db4219ba0d241004d9b8e3cb76d7181bfdad (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* See LICENSE file for copyright and license details. */
#include "common.h"


int
libterminput_unmarshal_text__(struct libterminput_unmarshaller *how, struct libterminput_text *what)
{
	what->type = LIBTERMINPUT_TEXT;
	if (how->load(how, &what->nbytes, sizeof(what->nbytes)) ||
	    how->load(how, what->bytes, sizeof(what->nbytes)))
		return -1;
	return 0;
}