/****************************************************************************
- * Copyright (c) 1998-2007,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2011,2012 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
#include <tic.h>
-MODULE_ID("$Id: comp_error.c,v 1.32 2011/07/29 00:40:41 tom Exp $")
+MODULE_ID("$Id: comp_error.c,v 1.36 2012/02/22 22:34:31 tom Exp $")
NCURSES_EXPORT_VAR(bool) _nc_suppress_warnings = FALSE;
NCURSES_EXPORT_VAR(int) _nc_curr_line = 0; /* current line # in input */
if (TermType != 0) {
TermType[0] = '\0';
if (name)
- strncat(TermType, name, MAX_NAME_SIZE);
+ strncat(TermType, name, (size_t) MAX_NAME_SIZE);
}
}
}
#endif
if (name != 0)
- strcpy(name, TermType != 0 ? TermType : "");
+ _nc_STRCPY(name, TermType != 0 ? TermType : "", MAX_NAME_SIZE);
}
static NCURSES_INLINE void
exit(EXIT_FAILURE);
#endif
}
+
+#if NO_LEAKS
+NCURSES_EXPORT(void)
+_nc_comp_error_leaks(void)
+{
+ FreeAndNull(SourceName);
+ FreeAndNull(TermType);
+}
+#endif