9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Sven Moritz Hallberg <sm@khjk.org>
To: 9fans@cse.psu.edu
Subject: [9fans] Drawterm on Linux/PowerPC
Date: Fri, 13 Jan 2006 12:38:06 +0100	[thread overview]
Message-ID: <43C7911E.4040509@khjk.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 1690 bytes --]

Hello 9fans,

I've tried to get drawterm to work on my Linux/PowerPC machine. I
_think_ I have "dt2k". I got it from this CVS repo:

	:pserver:anoncvs@cvs.pdos.csail.mit.edu/cvs drawterm

(BTW, it was kind of hard to confirm that this -- appearently -- is in
fact dt2k...)

Unfortunately it doesn't work. The fmtprint functions seem to do stuff
with va_lists that my system doesn't like. Specifically, fmtprint and
many other functions try to assign va_list's to fields in a Fmt
structure. This is simply rejected by my GCC (I tried versions 3.3, 3.4,
and 4.0.2):

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

This results in successfull compilation, but immediately crashes drawterm:

$ gdb ./drawterm
[..snip..]
(gdb) runStarting program: /home/pesco/Halde/drawterm/drawterm
[Thread debugging using libthread_db enabled]
[New Thread 805479776 (LWP 12368)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 805479776 (LWP 12368)]
0x10048500 in _runefmt (f=0x7fb7f3f8) at dofmt.c:234
234             x[0] = va_arg(f->args, int);

I've read in

http://www.cs.bell-labs.com/wiki/plan9/THM_2005-06-23_Summary/

that "[Ericvh] has [dt2k] working in ppc-linux". So:


	Eric, can I have your code?

	When will this find its way into the drawterm CVS?

	How can I help?


Greetings,
Sven Moritz

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

             reply	other threads:[~2006-01-13 11:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-13 11:38 Sven Moritz Hallberg [this message]
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

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=43C7911E.4040509@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).