summaryrefslogtreecommitdiff
path: root/src/geometry/geometry.c
blob: 322ada0562a8db2e549b1bc6c1899d87aedcf352 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <string.h>

#include <kalmia.h>
#include "util/util.h"
#include "xml/xml.h"
#include "geometry.h"


int kai_read_float_array(struct ka_float_array_t *dest, struct kai_tag_t *src)
{
	if (strcmp(src->type, "float_array") != 0) {
		/* incorrect tag type */
		return -1;
	}

	char *count_str = kai_tag_get_attr(src, "count");
	if (count_str == NULL) {
		/* missing required count attribute! */
		return -1;
	}

	return 0;
}