Пример #1
0
void _nc_err_abort(const char *const fmt, ...)
{
va_list argp;

	where_is_problem();
	va_start(argp,fmt);
	vfprintf (stderr, fmt, argp);
	fprintf (stderr, "\n");
	va_end(argp);
	exit(EXIT_FAILURE);
}
Пример #2
0
void _nc_syserr_abort(const char *const fmt, ...)
{
va_list argp;

	where_is_problem();
	va_start(argp,fmt);
	vfprintf (stderr, fmt, argp);
	fprintf (stderr, "\n");
	va_end(argp);
	abort();
}
Пример #3
0
void _nc_warning(const char *const fmt, ...)
{
va_list argp;

	if (_nc_suppress_warnings)
	    return;

	where_is_problem();
	va_start(argp,fmt);
	vfprintf (stderr, fmt, argp);
	fprintf (stderr, "\n");
	va_end(argp);
}
Пример #4
0
void _nc_syserr_abort(const char *const fmt, ...)
{
va_list argp;

	where_is_problem();
	va_start(argp,fmt);
	vfprintf (stderr, fmt, argp);
	fprintf (stderr, "\n");
	va_end(argp);

	/* If we're debugging, try to show where the problem occurred - this
	 * will dump core.
	 */
#if defined(TRACE) || !defined(NDEBUG)
	abort();
#else
	/* Dumping core in production code is not a good idea.
	 */
	exit(EXIT_FAILURE);
#endif
}