From owner-freebsd-hackers Tue Jun 24 20:41:47 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id UAA27611 for hackers-outgoing; Tue, 24 Jun 1997 20:41:47 -0700 (PDT) Received: from aak.anchorage.net (ai-132.anchorage.net [207.14.72.132]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id UAA27595 for ; Tue, 24 Jun 1997 20:41:36 -0700 (PDT) Received: from localhost (abc@localhost) by aak.anchorage.net (8.8.5/8.8.5) with SMTP id TAA15862; Tue, 24 Jun 1997 19:29:52 -0800 (AKDT) X-Authentication-Warning: aak.anchorage.net: abc owned process doing -bs Date: Tue, 24 Jun 1997 19:29:51 -0800 (AKDT) From: Steve Howe X-Sender: abc@aak.anchorage.net To: Tim Vanderhoek cc: freebsd-hackers Subject: Re: thanks. In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Tue, 24 Jun 1997, Tim Vanderhoek wrote: > #include > #include > struct termios old, new; > main(){ > tcgetattr (fileno(stdin), &old); new = old; > new &= ~(ICANON|ECHO); > tcsetattr (fileno(stdin), TCSANOW, &new); > /* Do my stuff */ > tcsetattr (fileno(stdin), TCSANOW, &old); > } > > /* Might want to fiddle MIN and TIME from man 4 termios, but in > practice, it'll not matter much */ > > You don't want to scan the screen directly, you probably just > want to throw what gets entered onscreen into a bunch of separate > strings, and then scan those. > > I would guess that some interpreted your quote slightly > differently, though. > > Incidentally, ncurses is distributed with a > (completely-documented) libforms which (supposedly) makes it > fairly easy to do that. I can't reccomend it, as I've never used > it, though... (Also, libforms gets stripped from ncurses before > ncurses is distributed with FreeBSD, so you have to grab and > build ncurses yourself. I believe it builds out-of-box.) > > Well, I'm using strings on /dev/wd0 right now to try and find any > instances of the word "fuck" on my hdd. su; strings /dev/wd0 | > more. I'm suprised, actually... It's been going for a while and > still hasn't found anything (and all my MS programs are at the > front of the disk! :)... Maybe it's getting screwed-up by > case-sensitivity... > > Outnumbered? Maybe. Outspoken? Never! > tIM...HOEk a good man, thanks. ps. i never claimed to be anything other than ignorant with unix, and don't know if it's completely possible not to be with any field. too bad there's not more people like tim and terry - learning would be a real joy. ------------------------------------------------- FingerPrint BA09868C 1B995204 58410FD3 A5E7B2DA http://www.geocities.com/siliconvalley/way/7747 -------------------------------------------------