Subversion Repositories eduke32

Rev

Rev 2549 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2542 helixhorne 1
//
2
// Common non-engine code/data for EDuke32 and Mapster32
3
//
4
 
5
#include "compat.h"
6
 
7
#include "common.h"
8
 
9
 
10
struct strllist *CommandPaths, *CommandGrps;
11
 
12
void G_AddGroup(const char *buffer)
13
{
14
    char buf[BMAX_PATH];
15
 
16
    struct strllist *s = Bcalloc(1,sizeof(struct strllist));
17
 
18
    Bstrcpy(buf, buffer);
19
 
20
    if (Bstrchr(buf,'.') == 0)
21
        Bstrcat(buf,".grp");
22
 
23
    s->str = Bstrdup(buf);
24
 
25
    if (CommandGrps)
26
    {
27
        struct strllist *t;
28
        for (t = CommandGrps; t->next; t=t->next) ;
29
        t->next = s;
30
        return;
31
    }
32
    CommandGrps = s;
33
}
34
 
35
void G_AddPath(const char *buffer)
36
{
37
    struct strllist *s = Bcalloc(1,sizeof(struct strllist));
38
    s->str = Bstrdup(buffer);
39
 
40
    if (CommandPaths)
41
    {
42
        struct strllist *t;
43
        for (t = CommandPaths; t->next; t=t->next) ;
44
        t->next = s;
45
        return;
46
    }
47
    CommandPaths = s;
48
}