void Rprintf(const char *format, ...) { va_list(ap); va_start(ap, format); Rvprintf(format, ap); va_end(ap); }
HIDE void profReport(char *fmt, ...) { long npt=time_ms(); va_list v; va_start(v,fmt); Rvprintf(fmt,v); va_end(v); Rprintf(" %ld ms\n",npt-profilerTime); profilerTime=npt; }
void speak(const char *str, ...) { va_list argp; va_start(argp, str); #ifdef RPRINT Rvprintf(str, argp); #else vprintf(str, argp); #endif va_end(argp); }
void rniftyreg_fprintf (FILE *stream, const char *format, ...) { va_list args; va_start(args, format); if (stream == stdout) Rvprintf(format, args); else if (stream == stderr) REvprintf(format, args); else vfprintf(stream, format, args); va_end(args); }
/** * Prints an error message to NULL, and * exits the program if there are now just too many errors. */ static void REGEX2DFA_ERROR(char *Format, ...) { va_list AP; Rprintf( "[%d] ", LINE); va_start(AP, Format); Rvprintf( Format, AP); va_end(AP); Rprintf("%d",'\n'); if (++ERRORS == MAX_ERRORS) { Rprintf( "regex2dfa: Reached the %d error limit.\n", MAX_ERRORS); rcqp_receive_error(1); } }
/** * Print a message to output (for instance a debug message). * * @see MessageType * @param type Specifies what type of message (messages of some types are not always printed) * @param format Format string (and ...) are passed as arguments to vfprintf(). */ void cqpmessage(MessageType type, char *format, ...) { va_list ap; va_start(ap, format); /* do not print Message unless parser is in verbose mode */ if ((type != Message) || verbose_parser) { char *msg; switch (type) { case Error: msg = "CQP Error"; break; case Warning: msg = "Warning"; break; case Message: msg = "Message"; break; case Info: msg = "Information"; break; default: msg = "<UNKNOWN MESSAGE TYPE>"; break; } if (!silent || type == Error) { Rprintf( "%s:\n\t", msg); Rvprintf( format, ap); Rprintf( "\n"); } } va_end(ap); }
HIDE void rjprintf(char *fmt, ...) { va_list v; va_start(v,fmt); Rvprintf(fmt,v); va_end(v); }