mirror of
https://github.com/vivier/EMILE.git
synced 2024-12-22 10:29:31 +00:00
add property at end
This commit is contained in:
parent
3e35773799
commit
027eced2d7
23
libconfig/config_add_property.c
Normal file
23
libconfig/config_add_property.c
Normal 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);
|
||||
}
|
Loading…
Reference in New Issue
Block a user