home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / graphics-0.17 / dist-stat / message.c < prev    next >
Encoding:
C/C++ Source or Header  |  1990-11-13  |  831 b   |  46 lines

  1. /*
  2.  * $Header: /files1/home/toy/src/stat/RCS/message.c,v 1.2 90/09/10 12:48:23 toy Exp $
  3.  * NAME
  4.  *    errmsg - print a message to stderr
  5.  *
  6.  * SYNOPSIS
  7.  *    void errmsg(format, ...)
  8.  *    char    *format;
  9.  *
  10.  * DESCRIPTION
  11.  *    Print a message to stderr with the name of the program
  12.  *    prepended.
  13.  *
  14.  * HISTORY
  15.  * $Log:    message.c,v $
  16.  * Revision 1.2  90/09/10  12:48:23  toy
  17.  * Added RCSID.
  18.  *
  19.  * Revision 1.1  90/09/01  17:02:00  toy
  20.  * Initial revision
  21.  *
  22.  */
  23.  
  24. #include <stdio.h>
  25. #include <varargs.h>
  26.  
  27. extern char *progname;
  28.  
  29. #ifndef    lint
  30. static char RCSID[] = "@(#) $Id: message.c,v 1.2 90/09/10 12:48:23 toy Exp $";
  31. #endif
  32.  
  33. void
  34. message (va_alist)
  35.      va_dcl
  36. {
  37.   char *format;
  38.   va_list argp;
  39.  
  40.   va_start (argp);
  41.   format = va_arg (argp, char *);
  42.  
  43.   (void) fprintf (stderr, "%s:  ", progname);
  44.   (void) vfprintf (stderr, format, argp);
  45. }
  46.