home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / c / cuj9301.zip / 1101108A < prev    next >
Text File  |  1992-11-03  |  408b  |  26 lines

  1. #include <stdarg.h>
  2.  
  3. char *PrintString(const char *fmt, ...)
  4. /* Convert printf() arguments into a static string. */
  5. {
  6.     va_list   args;
  7.     static char line[999];
  8.  
  9.     va_start(args, fmt);
  10.     vsprintf(line, fmt, args);
  11.     va_end(args);
  12.     return line;
  13.  
  14. }
  15.  
  16. void Msg(const char *fmt, ...)
  17. /* Send message to stdout user. */
  18. {
  19.     char   *line;
  20.  
  21.     line = PrintString(fmt);
  22.     print("%s\n", line);
  23.     ...
  24. }
  25.  
  26.