#include "termsort.c" /* this C file is generated */
#include <parametrized.h> /* so is this */
-MODULE_ID("$Id: dump_entry.c,v 1.99 2012/03/10 23:20:35 tom Exp $")
+MODULE_ID("$Id: dump_entry.c,v 1.101 2012/10/27 19:45:17 tom Exp $")
#define INDENT 8
#define DISCARD(string) string = ABSENT_STRING
#define StrIndirect(j) ((sortmode == S_NOSORT) ? (j) : str_indirect[j])
#endif
+static void
+failed(const char *s)
+{
+ perror(s);
+ ExitProgram(EXIT_FAILURE);
+}
+
static void
strncpy_DYN(DYNBUF * dst, const char *src, size_t need)
{
if (want > dst->size) {
dst->size += (want + 1024); /* be generous */
dst->text = typeRealloc(char, dst->size, dst->text);
+ if (dst->text == 0)
+ failed("strncpy_DYN");
}
(void) strncpy(dst->text + dst->used, src, need);
dst->used += need;
*/
if (outbuf.used != 0) {
bool infodump = (outform != F_TERMCAP && outform != F_TCONVERR);
- char delim = infodump ? ',' : ':';
+ char delim = (char) (infodump ? ',' : ':');
int j;
for (j = (int) outbuf.used - 1; j > 0; --j) {