2007-03-22 18:12:32 +00:00
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <strings.h>
|
|
|
|
|
|
|
|
#include "sx_slentry.h"
|
|
|
|
|
2015-07-12 17:31:09 +03:00
|
|
|
struct sx_slentry*
|
2007-03-22 18:12:32 +00:00
|
|
|
sx_slentry_new(char* t)
|
|
|
|
{
|
2019-12-30 05:12:11 +00:00
|
|
|
struct sx_slentry* e = malloc(sizeof(struct sx_slentry));
|
|
|
|
|
|
|
|
if (!e)
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
memset(e, 0, sizeof(struct sx_slentry));
|
|
|
|
|
|
|
|
if (t)
|
|
|
|
e->text = strdup(t);
|
|
|
|
|
2007-03-22 18:12:32 +00:00
|
|
|
return e;
|
2019-12-30 20:55:38 +01:00
|
|
|
}
|
2015-07-12 17:31:09 +03:00
|
|
|
|
|
|
|
struct sx_tentry*
|
|
|
|
sx_tentry_new(char* t)
|
|
|
|
{
|
|
|
|
struct sx_tentry* te = malloc(sizeof(struct sx_tentry));
|
2019-12-30 05:12:11 +00:00
|
|
|
|
2015-07-12 17:31:09 +03:00
|
|
|
if (!te)
|
|
|
|
return NULL;
|
2019-12-30 05:12:11 +00:00
|
|
|
|
2015-07-12 17:31:09 +03:00
|
|
|
memset(te, 0, sizeof(struct sx_tentry));
|
|
|
|
te->text = strdup(t);
|
2019-12-30 05:12:11 +00:00
|
|
|
|
2015-07-12 17:31:09 +03:00
|
|
|
return te;
|
2019-12-30 20:55:38 +01:00
|
|
|
}
|