aboutsummaryrefslogblamecommitdiffstats
path: root/libfonts_confsplit__.c
blob: 959a4b45cff0da9d23d6baf6a7d39a134b373b1f (plain) (tree)











































                                                         
/* See LICENSE file for copyright and license details. */
#include "common.h"
#ifndef TEST


char *
libfonts_confsplit__(char *line)
{
	size_t p, q;

	p = 0;
	while (line[p] && line[p] != '=')
		p += 1;
	if (!line[p])
		return NULL;

	q = p;
	while (q && isblank(line[q - 1]))
	       q -= 1;
	if (!q)
		return NULL;
	line[q] = '\0';

	p++;
	while (isblank(line[p]))
		p++;
	if (!line[p])
		return NULL;

	return &line[p];
}


#else


int
main(void)
{
	return 0; /* TODO add test */
}


#endif