예제 #1
0
void Rprintf(const char *format, ...)
{
    va_list(ap);

    va_start(ap, format);
    Rvprintf(format, ap);
    va_end(ap);
}
예제 #2
0
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;
}
예제 #3
0
파일: gui.c 프로젝트: TaddyLab/gamlr
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);
}
예제 #4
0
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);
}
예제 #5
0
파일: regex2dfa.c 프로젝트: cran/rcqp
/**
 * 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);
  }
}
예제 #6
0
파일: output.c 프로젝트: rforge/rcwb
/**
 * 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);
}
예제 #7
0
HIDE void rjprintf(char *fmt, ...) {
  va_list v;
  va_start(v,fmt);
  Rvprintf(fmt,v);
  va_end(v);
}