Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- openbsd-current-vm# diff -uNpr oui.c.orig.port oui.c
- --- oui.c.orig.port Thu Jun 22 11:30:49 1995
- +++ oui.c Fri Nov 17 21:27:31 2023
- @@ -3,15 +3,16 @@
- ************************************************************************/
- #include <stdio.h>
- +#include <stdarg.h>
- char *getenv();
- static FILE *ouiFp;
- static int uin;
- static int uilev;
- -ouiTrace(prim,fmt,a,b,c,d,e,f,g)
- - char *fmt;
- - FILE *prim;
- +void
- +ouiTrace(char *prim, char *fmt, ...)
- { char *logf;
- + va_list ap;
- if( ouiFp == NULL ){
- if( logf = getenv("ONEW_UIFLOG") )
- @@ -23,10 +24,14 @@ ouiTrace(prim,fmt,a,b,c,d,e,f,g)
- return;
- fprintf(ouiFp,"%4d ",++uin);
- fprintf(ouiFp,"%-16s ",prim);
- - if(fmt) fprintf(ouiFp,fmt,a,b,c,d,e,f,g);
- + if(fmt){
- + va_start(ap, fmt);
- + vprintf(fmt, ap);
- + va_end(ap);
- + }
- fprintf(ouiFp,"\n");
- }
- -Onew_ouiTrace(prim,fmt,a,b,c,d,e,f,g){ ouiTrace(prim,fmt,a,b,c,d,e,f,g); }
- +#define Onew_ouiTrace(prim,fmt,...) ouiTrace(prim,fmt,__VA_ARGS__)
- ouiGETCHAR()
- { int ch;
- openbsd-current-vm#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement