home *** CD-ROM | disk | FTP | other *** search
- #include <stdarg.h>
-
- char *PrintString(const char *fmt, ...)
- /* Convert printf() arguments into a static string. */
- {
- va_list args;
- static char line[999];
-
- va_start(args, fmt);
- vsprintf(line, fmt, args);
- va_end(args);
- return line;
-
- }
-
- void Msg(const char *fmt, ...)
- /* Send message to stdout user. */
- {
- char *line;
-
- line = PrintString(fmt);
- print("%s\n", line);
- ...
- }
-
-