9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@cse.psu.edu, Sven Moritz Hallberg <sm@khjk.org>
Subject: [9fans] Drawterm on Linux/PowerPC
Date: Fri, 13 Jan 2006 07:57:09 -0600	[thread overview]
Message-ID: <20060113135709.4B62E35076@dexter-peak.quanstro.net> (raw)
In-Reply-To: <43C7911E.4040509@khjk.org>


Sven Moritz Hallberg <sm@khjk.org> writes

[...]
| gcc -Wall -Wno-missing-braces -ggdb -I.. -I../include -I../kern -c
| -I/usr/X11R6/include -D_THREAD_SAFE -pthread -O2 fmtprint.c
| fmtprint.c: In function 'fmtprint':
| fmtprint.c:20: error: incompatible types in assignment
| 
| I tried to replace all the offending assignments with calls to memcpy:
| 
| /*      va = f->args; */
|         memcpy(&va, &(f->args), sizeof(va_list));

try: (from plan9port)

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;
}

- erik


      parent reply	other threads:[~2006-01-13 13:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-13 11:38 Sven Moritz Hallberg
2006-01-13 12:29 ` Eric Van Hensbergen
2006-01-13 15:24   ` Sven Moritz Hallberg
2006-01-13 22:38     ` C H Forsyth
2006-01-13 13:57 ` erik quanstrom [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060113135709.4B62E35076@dexter-peak.quanstro.net \
    --to=quanstro@quanstro.net \
    --cc=9fans@cse.psu.edu \
    --cc=sm@khjk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).