add property at end

This commit is contained in:
Laurent Vivier 2007-08-26 20:10:17 +00:00
parent 3e35773799
commit 027eced2d7

View File

@ -0,0 +1,23 @@
/*
*
* (c) 2007 Laurent Vivier <Laurent@lvivier.info>
*
*/
#include <stdio.h>
#include <string.h>
#include "libconfig.h"
void 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);
}