#include <ctype.h>
#include <errno.h>
+#include <lib-lib/str.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
{
outbuf = realloc (outbuf, (++outcount) * sizeof (var_t));
outbuf[outcount - 1].seen = 0;
- outbuf[outcount - 1].name = strdup (name);
+ outbuf[outcount - 1].name = strdup(name);
outbuf[outcount - 1].descr = NULL;
}
}
if (lold == 0)
- outbuf[outcount - 1].descr = strdup (s);
+ outbuf[outcount - 1].descr = strdup(s);
else {
outbuf[outcount - 1].descr =
realloc (outbuf[outcount - 1].descr, lold + lnew + 1);
return;
}
- memset (val, 0, sizeof (val));
+ memset(val, 0, sizeof(val));
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)));
return add_s ("<");
case '>':
return add_s (">");
+#if 0
case '$':
return add_s ("$");
case '_':
return add_s ("_");
case '%':
return add_s ("%");
+#endif
case '&':
return add_s ("&");
+#if 0
case '\\':
return add_s ("\");
case '"':
return add_s ("]");
case '~':
return add_s ("˜");
+#endif
default:
return add_c (c);
}
/* SGML based manual */
case F_SGML:
{
- add_s ("\n<sect1 id=\"");
- sgml_id_fputs (varname);
- add_s ("\">\n<title>");
+ add_s ("\n<muttng-doc:vardef name=\"");
sgml_fputs (varname);
- add_s ("</title>\n<para>Type: <literal>");
+ add_s ("\">\n<para>Type: <literal>");
add_s (type2human (type));
- add_s ("</literal></para>\n\n");
+ add_s ("</literal></para>\n");
if (type == DT_STR || type == DT_RX || type == DT_ADDR
|| type == DT_PATH) {
}
case SP_END_SECT:
{
- add_s ("</sect1>\n");
+ add_s ("</muttng-doc:vardef>\n");
break;
}
case SP_STR:
sgml_id_fputs (ref);
add_s ("\">\n");
if (output_dollar)
- add_s ("$");
+ add_s ("$");
sgml_fputs (ref);
add_s ("</link>");
break;