with va_copy: e.g.:
int
fmtprint(Fmt *f, char *fmt, ...)
{
va_list va;
int n;
f->flags = 0;
f->width = 0;
f->prec = 0;
va_copy(va, f->args);
va_end(f->args);
va_start(f->args, fmt);
n = dofmt(f, fmt);
va_end(f->args);
f->flags = 0;
f->width = 0;
f->prec = 0;
va_copy(f->args,va);
va_end(va);
if(n >= 0)
return 0;
return n;
}
Gregory Pavelcak <[EMAIL PROTECTED]> writes
|
| On Mon, 2006-01-16 at 20:19 -0500, Russ Cox wrote:
| > > The subject line pretty much says it. I installed Ubuntu Linux on my Mac
| > > Mini for the heck of it. I mainly use the Mini to drawterm to Plan 9.
| > > So, the question is which drawterm, assuming that there is an
| > > appropriate one, should I use? drawterm-linux and drawterm-osx both give
| > > me `cannot execute binary file'. I also downloaded the sources from
| > > Andrey's collection, but need to find out how to get mk installed on
| > > Ubuntu. Is the build likely to work? If you know that it won't, you
| > > could save me some trouble by filling me in :-)
| >
| > Use the sources referenced by http://swtch.com/drawterm/.
| > You'll only need make.
| >
| > Russ
|
| Thanks for the help. I seem to be getting close.
|
| But, how to fix this?
|
| make[1]: Leaving directory `/home/gp/bin/drawterm/gui-x11'
| (cd libc; make)
| make[1]: Entering directory `/home/gp/bin/drawterm/libc'
| gcc -Wall -Wno-missing-braces -ggdb -I.. -I../include -I../kern -c
| -I/usr/include/X11-D_THREAD_SAFE -pthread -O2 fmtprint.c
| fmtprint.c: In function ‘fmtprint’:
| fmtprint.c:20: error: incompatible types in assignment
| fmtprint.c:27: error: incompatible types in assignment
| make[1]: *** [fmtprint.o] Error 1
| make[1]: Leaving directory `/home/gp/bin/drawterm/libc'
| make: *** [libc/libc.a] Error 2
|
| Greg