blob: 8319feab9ef382cd7bb51a530d66d9354eb7b5b1 (
plain) (
blame)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
/* 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; /* XXX add test */
}
#endif
|