EMILE/libconfig/config_add_property.c
2007-09-08 23:09:14 +00:00

26 lines
399 B
C

/*
*
* (c) 2007 Laurent Vivier <Laurent@lvivier.info>
*
*/
#include <stdio.h>
#include <string.h>
#include "libconfig.h"
int config_add_property(int8_t* configuration, char* name, char* property)
{
int index = strlen((char*)configuration);
if (index > 0)
{
configuration[index] = '\n';
index++;
}
sprintf((char*)configuration + index,
"%s %s", name, property);
return index;
}