/*-------------- Telecommunications & Signal Processing Lab --------------- McGill University Routine: void UTwarn (const char Warnmsg[], ...) Purpose: Print a warning message Description: This routine prints a warning message on stderr (standard error). An example of the use of this routine is as follows. UTwarn ("XXProc - Output data clipped (%d values(s))", N); Parameters: -> const char Warnmsg[] Character string to be printed. This string can contain optional formatting codes. The arguments corresponding to the formatting codes appear at the end of the argument list. The input string should not normally have a terminating newline character, since this routine supplies a newline. -> Arguments corresponding to the formatting codes. The format string and the variable number of arguments is passed on to the system routine vprintf. Author / revision: P. Kabal Copyright (C) 1996 $Revision: 1.16 $ $Date: 1996/05/06 20:35:49 $ -------------------------------------------------------------------------*/ static char rcsid[] = "$Id: UTwarn.c 1.16 1996/05/06 AFsp-V2R1 $"; #ifdef __STDC__ #include #include /* ANSI C variable-length argument list */ #include void UTwarn (const char Warnmsg[], ...) { va_list ap; va_start (ap, Warnmsg); /* Print the warning message */ vfprintf (stderr, Warnmsg, ap); fprintf (stderr, "\n"); va_end (ap); return; } #else /* not __STDC__ */ #include #include /* K&R C variable-length argument list */ #include void UTwarn (va_alist) va_dcl { va_list ap; char *Warnmsg; va_start (ap); Warnmsg = va_arg (ap, char *); /* Print the warning message */ vfprintf (stderr, Warnmsg, ap); fprintf (stderr, "\n"); va_end (ap); return; } #endif /* __STDC__ */