From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <7d3530220907281119r75734c9boa41d391fd6ebd58f@mail.gmail.com> References: <7d3530220907281119r75734c9boa41d391fd6ebd58f@mail.gmail.com> Date: Wed, 5 Aug 2009 18:22:55 -0700 Message-ID: <7d3530220908051822y382be404lf1bd8353e76c4d4f@mail.gmail.com> From: John Floren To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [9fans] Unix Weenie Newsreader Topicbox-Message-UUID: 39bbae60-ead5-11e9-9d60-3106f5b1d025 On Tue, Jul 28, 2009 at 11:19 AM, John Floren wrote: > Ever wish you had more GUI programs on Plan 9 to show off to your > friends? Do you think Mothra represents the very pinnacle of UI > design? Then have I got a program for you... > > I've spent the last day or so whipping up a quick libpanel application > to read USENET via nntpfs. You can read newsgroups (not threaded, yet) > and post messages (no followups yet), all from the comfort of a > program that wouldn't look too out of place in any fashionable UNIX > establishment. Screenshots at > http://csplan9.rit.edu/users/john/uwn.png > > The source is available in /n/sources/contrib/john/uwn.tgz > > > John To follow up: You can now follow up. I've added "reply" functionality, fixing what I think was a bug in libpanel in the process. The latest version, yet again, is in /n/sources/contrib/john/uwn.tgz. The interactions between the reader and the writer are really bad, I need to work on that, but I thought I'd send this first. The possible bug was that setting up a pledit(panel, PACKE|EXPAND, Pt(0,0), inittxt, runestrlen(inittxt), 0); would cause the writer when replying if the message being quoted came to over 100 characters long. Some experimentation later, I changed line 64 of libpanel/textwin.c from if (l>t->eloc-t->loc) { to if (l>=(t->eloc-t->loc)) { which seemed to fix the problem. If it wasn't a bug and I was merely calling the pledit function wrong, please let me know. John -- "Object-oriented design is the roman numerals of computing" -- Rob Pike