Skip to content
Snippets Groups Projects
slist.c 307 B
Newer Older
Bruce Cowan's avatar
Bruce Cowan committed
#include "slist.h"

#include <stdlib.h>
#include <string.h>

SList *
slist_prepend (SList      *list,
               const char *key,
               const char *value)
{
	SList *new;

	new = malloc (sizeof (SList));
	new->key = strdup (key);
	new->value = strdup (value);
	new->next = list;

	return new;
}