blob: f882ea56e93fa5ded24dce88edb0027dde7968e2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
/* This is the template processing code of rsyslog.
* Please see syslogd.c for license information.
* This code is placed under the GPL.
* begun 2004-11-17 rgerhards
*/
#include <stdio.h>
#include <malloc.h>
#include "template.h"
static struct template *tplRoot = NULL; /* the root of the templat list */
static struct template *tplLast = NULL; /* points to the last element of the template list */
/* Constructs a template entry. Returns pointer to it
* or NULL (if it fails).
*/
struct template* tplConstruct(void)
{
struct template *pTpl;
if((pTpl = malloc(sizeof(struct template))) == NULL)
return NULL;
pTpl->pszName = NULL;
pTpl->pszTemplate = NULL;
if(tplLast == NULL)
{ /* we are the first element! */
tplRoot = tplLast = pTpl;
}
return(pTpl);
}
/*
* vi:set ai:
*/
|