Import ezmlm 0.53
[ezmlm] / strerr.c
CommitLineData
5b62e993
MW
1#include "stralloc.h"
2#include "strerr.h"
3
4static stralloc sa = {0};
5
6char *strerr(se)
7struct strerr *se;
8{
9 strerr_sysinit();
10
11 if (!stralloc_copys(&sa,"")) return "out of memory";
12
13 while(se) {
14 if (se->x) if (!stralloc_cats(&sa,se->x)) return "out of memory";
15 if (se->y) if (!stralloc_cats(&sa,se->y)) return "out of memory";
16 if (se->z) if (!stralloc_cats(&sa,se->z)) return "out of memory";
17 se = se->who;
18 }
19
20 if (!stralloc_0(&sa)) return "out of memory";
21 return sa.s;
22}