Date: Tue, 24 Jun 1997 19:29:51 -0800 (AKDT) From: Steve Howe <un_x@anchorage.net> To: Tim Vanderhoek <hoek@hwcn.org> Cc: freebsd-hackers <hackers@FreeBSD.ORG> Subject: Re: thanks. Message-ID: <Pine.BSF.3.95q.970624191844.15722A-100000@aak.anchorage.net> In-Reply-To: <Pine.GSO.3.96.970624080450.9455A-100000@james.freenet.hamilton.on.ca>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 24 Jun 1997, Tim Vanderhoek wrote: > #include <termios.h> > #include <stdio.h> > 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... <sigh> > > 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 -------------------------------------------------
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95q.970624191844.15722A-100000>