Return to main.c CVS log | Up to [local] / src / usr.bin / systat |
version 1.22, 2002/02/16 21:27:54 | version 1.23, 2002/02/19 19:39:39 | ||
---|---|---|---|
|
|
||
#include <unistd.h> | #include <unistd.h> | ||
#include <stdlib.h> | #include <stdlib.h> | ||
#include <limits.h> | #include <limits.h> | ||
#include <stdarg.h> | |||
#include "systat.h" | #include "systat.h" | ||
#include "extern.h" | #include "extern.h" | ||
|
|
||
gotwinch = 1; | gotwinch = 1; | ||
} | } | ||
#ifdef __STDC__ | |||
#include <stdarg.h> | |||
#else | |||
#include <varargs.h> | |||
#endif | |||
#ifdef __STDC__ | |||
void | void | ||
error(const char *fmt, ...) | error(const char *fmt, ...) | ||
#else | |||
void | |||
error(fmt, va_alist) | |||
char *fmt; | |||
va_dcl | |||
#endif | |||
{ | { | ||
va_list ap; | va_list ap; | ||
char buf[255]; | char buf[255]; | ||
int oy, ox; | int oy, ox; | ||
#ifdef __STDC__ | |||
va_start(ap, fmt); | |||
#else | |||
va_start(ap); | |||
#endif | |||
va_start(ap, fmt); | |||
if (wnd) { | if (wnd) { | ||
getyx(stdscr, oy, ox); | getyx(stdscr, oy, ox); | ||
(void) vsnprintf(buf, sizeof buf, fmt, ap); | (void) vsnprintf(buf, sizeof buf, fmt, ap); |