예제 #1
0
파일: Error.cpp 프로젝트: adri87/Q-A
/**
 * Prints the given message and
 * exits the program with the default exit code.
 */
void fatal_error(const char* format,...) {
va_list list;
va_start(list,format);
u_vfprintf(U_STDERR,format,list);
va_end(list);
fatal_error(DEFAULT_ERROR_CODE);
}
예제 #2
0
파일: Error.cpp 프로젝트: adri87/Q-A
/**
 * Prints the given message and
 * exits the program with the given exit code.
 */
void fatal_error(int error_code,const char* format,...) {
va_list list;
va_start(list,format);
u_vfprintf(U_STDERR,format,list);
va_end(list);
fatal_error(error_code);
}
예제 #3
0
void fatal_assert(int assert_condition, const char* format, ...) {
if (assert_condition) {
  va_list list;
  va_start(list, format);
  u_vfprintf(U_STDERR, format, list);
  va_end(list);
  fatal_error(DEFAULT_ERROR_CODE);
}
}
예제 #4
0
파일: Error.cpp 프로젝트: adri87/Q-A
/**
 * Prints the given message on the error stream, but only if
 * we are in debug mode.
 */
void debug(const char* format,...) {
#ifdef DEBUG
if (!DEBUG_ON) return;
va_list list;
va_start(list,format);
u_vfprintf(U_STDERR,format,list);
va_end(list);
#else
DISCARD_UNUSED_PARAMETER(format)
#endif
}
예제 #5
0
U_CAPI int32_t U_EXPORT2
u_printf(const char *patternSpecification,
         ...)
{
    va_list ap;
    int32_t count;
    va_start(ap, patternSpecification);
    count = u_vfprintf(u_get_stdout(), patternSpecification, ap);
    va_end(ap);
    return count;
}
예제 #6
0
파일: uprintf.c 프로젝트: Botyto/Core
U_CAPI int32_t U_EXPORT2
u_fprintf(UFILE    *    f,
          const char  *  patternSpecification,
          ...)
{
	va_list ap;
	int32_t count;

	va_start(ap, patternSpecification);
	count = u_vfprintf(f, patternSpecification, ap);
	va_end(ap);

	return count;
}
예제 #7
0
파일: Error.cpp 프로젝트: adri87/Q-A
/**
 * Prints the given message on the error stream.
 */
void error(const char* format,...) {
va_list list;
va_start(list,format);
u_vfprintf(U_STDERR,format,list);
va_end(list);
}