EMILE/libconfig/config_add_property.c
2007-08-31 20:42:27 +00:00

26 lines
383 B
C

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