projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
the C gods blessed us with a preprocessor, use it.
[apps/madmutt.git]
/
makedoc.c
diff --git
a/makedoc.c
b/makedoc.c
index
f5e85cf
..
6910e54
100644
(file)
--- a/
makedoc.c
+++ b/
makedoc.c
@@
-31,6
+31,7
@@
#include <ctype.h>
#include <errno.h>
#include <ctype.h>
#include <errno.h>
+#include <lib-lib/str.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
@@
-191,7
+192,7
@@
static void add_var (const char *name)
{
outbuf = realloc (outbuf, (++outcount) * sizeof (var_t));
outbuf[outcount - 1].seen = 0;
{
outbuf = realloc (outbuf, (++outcount) * sizeof (var_t));
outbuf[outcount - 1].seen = 0;
- outbuf[outcount - 1].name =
p_strdup(name, str_len(name)
);
+ outbuf[outcount - 1].name =
strdup(name
);
outbuf[outcount - 1].descr = NULL;
}
outbuf[outcount - 1].descr = NULL;
}
@@
-207,7
+208,7
@@
static int add_s (const char *s)
}
if (lold == 0)
}
if (lold == 0)
- outbuf[outcount - 1].descr =
p_strdup(s, str_len(s)
);
+ outbuf[outcount - 1].descr =
strdup(s
);
else {
outbuf[outcount - 1].descr =
realloc (outbuf[outcount - 1].descr, lold + lnew + 1);
else {
outbuf[outcount - 1].descr =
realloc (outbuf[outcount - 1].descr, lold + lnew + 1);
@@
-513,13
+514,13
@@
static void handle_confline (char *s)
return;
}
return;
}
- memset
(val, 0, sizeof
(val));
+ memset
(val, 0, sizeof
(val));
do {
if (!strcmp (buff, "}"))
break;
do {
if (!strcmp (buff, "}"))
break;
-
strncpy (val + STRLEN (val), buff, sizeof (val) - STRLEN (val)
);
+
m_strcat(val, sizeof(val), buff
);
}
while ((s = get_token (buff, sizeof (buff), s)));
}
while ((s = get_token (buff, sizeof (buff), s)));