9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Sven Moritz Hallberg <sm@khjk.org>
To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu>
Subject: Re: [9fans] Drawterm on Linux/PowerPC
Date: Fri, 13 Jan 2006 16:24:26 +0100	[thread overview]
Message-ID: <43C7C62A.4080805@khjk.org> (raw)
In-Reply-To: <a4e6962a0601130429s5a7c8ea1hde26556aba17a4c5@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 560 bytes --]

Eric Van Hensbergen schrieb:
> Essentially you were on the right path, but the wrong solution.
> man va_copy and look at the plan9ports fmtprint code for how to do
> this right on ppc/linux.

Hah, I'm such an idiot, overlooked va_copy although it's right in the
manpage. Anyway, I've replace the assignments with va_copy/va_end pairs,
as in plan9ports and drawterm seems to work! At least it compiles,
starts, and complains that I didn't tell it any server... :)

Attached is the output of cvs diff.


Thanks alot for the pointer,

Sven Moritz

[-- Attachment #1.2: drawterm-va_copy-patch.diff --]
[-- Type: text/x-patch, Size: 2624 bytes --]

Index: libc/fmtprint.c
===================================================================
RCS file: /cvs/drawterm/libc/fmtprint.c,v
retrieving revision 1.1
diff -r1.1 fmtprint.c
20c20,21
< 	va = f->args;
---
> 	va_copy(va, f->args);
> 	va_end(f->args);
27c28,29
< 	f->args = va;
---
> 	va_copy(f->args, va);
> 	va_end(va);
Index: libc/fmtvprint.c
===================================================================
RCS file: /cvs/drawterm/libc/fmtvprint.c,v
retrieving revision 1.1
diff -r1.1 fmtvprint.c
20,21c20,23
< 	va = f->args;
< 	f->args = args;
---
> 	va_copy(va, f->args);
> 	va_end(f->args);
> 	va_copy(f->args, args);
> 	va_end(args);
26c28,29
< 	f->args = va;
---
> 	va_copy(f->args, va);
> 	va_end(va);
Index: libc/runevseprint.c
===================================================================
RCS file: /cvs/drawterm/libc/runevseprint.c,v
retrieving revision 1.1
diff -r1.1 runevseprint.c
18c18,19
< 	f.args = args;
---
> 	va_copy(f.args, args);
> 	va_end(args);
Index: libc/runevsmprint.c
===================================================================
RCS file: /cvs/drawterm/libc/runevsmprint.c,v
retrieving revision 1.1
diff -r1.1 runevsmprint.c
60c60,61
< 	f.args = args;
---
> 	va_copy(f.args, args);
> 	va_end(args);
Index: libc/runevsnprint.c
===================================================================
RCS file: /cvs/drawterm/libc/runevsnprint.c,v
retrieving revision 1.1
diff -r1.1 runevsnprint.c
18c18,19
< 	f.args = args;
---
> 	va_copy(f.args, args);
> 	va_end(args);
Index: libc/vfprint.c
===================================================================
RCS file: /cvs/drawterm/libc/vfprint.c,v
retrieving revision 1.1
diff -r1.1 vfprint.c
29c29,30
< 	f.args = args;
---
> 	va_copy(f.args, args);
> 	va_end(args);
Index: libc/vseprint.c
===================================================================
RCS file: /cvs/drawterm/libc/vseprint.c,v
retrieving revision 1.1
diff -r1.1 vseprint.c
18c18,19
< 	f.args = args;
---
> 	va_copy(f.args, args);
> 	va_end(args);
Index: libc/vsmprint.c
===================================================================
RCS file: /cvs/drawterm/libc/vsmprint.c,v
retrieving revision 1.1
diff -r1.1 vsmprint.c
60c60,61
< 	f.args = args;
---
> 	va_copy(f.args, args);
> 	va_end(args);
Index: libc/vsnprint.c
===================================================================
RCS file: /cvs/drawterm/libc/vsnprint.c,v
retrieving revision 1.1
diff -r1.1 vsnprint.c
18c18,19
< 	f.args = args;
---
> 	va_copy(f.args, args);
> 	va_end(args);

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 264 bytes --]

  reply	other threads:[~2006-01-13 15:24 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 [this message]
2006-01-13 22:38     ` C H Forsyth
2006-01-13 13:57 ` erik quanstrom

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=43C7C62A.4080805@khjk.org \
    --to=sm@khjk.org \
    --cc=9fans@cse.psu.edu \
    /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).