Import ezmlm 0.53
[ezmlm] / strerr.c
1 #include "stralloc.h"
2 #include "strerr.h"
3
4 static stralloc sa = {0};
5
6 char *strerr(se)
7 struct 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 }