From: Tad Hunt tad@csh.rit.edu
Subject: [9fans] Novice use of libg
Date: Thu, 20 Nov 1997 13:04:54 -0500 [thread overview]
Message-ID: <19971120180454.F_Z6xRxIy7ZuHv5TM-i7wmWGRr7IwGwc3NiNvsBRdE8@z> (raw)
In message <swordfish.880045065@minster.cs.york.ac.uk>, you said:
;------------------------------- cut here -----------------------
;int
;main(int argc, char **argv) {
; Mouse mouse;
; ulong Estdin;
; bool done = false;
; progname = argv[0];
; binit(panic, 0, progname);
; if ((Estdin = estart((ulong)0, 0, 8192)) == 0)
; panic("Estdin = estart(0, 0, 8192) fails");
; einit(Emouse | Estdin);
; do {
; struct Event e;
; ulong key = eread(Emouse | Estdin, &e);
; if (key == Estdin) {
;fprintf(stderr, "debug: Estdin, e.n %d\n", e.n); fflush(stderr);
; } else if (key == Emouse) {
;fprintf(stderr, "debug: Emouse, x %d y %d\n", e.mouse.xy.x, e.mouse.xy.y);
;fflush(stderr);
; } else
; panic("unexpected event");
; } while (!done);
I see two problems off the top of my head:
eread() is only called once.
done is never set to "true", thus the looping.
next reply other threads:[~1997-11-20 18:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-11-20 18:04 Tad [this message]
-- strict thread matches above, loose matches on Subject: below --
1997-11-20 23:17 forsyth
1997-11-20 16:16 john
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=19971120180454.F_Z6xRxIy7ZuHv5TM-i7wmWGRr7IwGwc3NiNvsBRdE8@z \
--to=9fans@9fans.net \
/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).