Date: Fri, 30 Sep 2011 09:59:08 -0700 From: Gary Kline <kline@thought.org> To: Roland Smith <rsmith@xs4all.nl> Cc: FreeBSD Mailing List <freebsd-questions@freebsd.org> Subject: Re: is there a way to code this .... without curses? Message-ID: <20110930165908.GA24129@thought.org> In-Reply-To: <20110930062035.GA5140@slackbox.erewhon.net> References: <20110930044642.GA17359@thought.org> <20110930062035.GA5140@slackbox.erewhon.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Sep 30, 2011 at 08:20:35AM +0200, Roland Smith wrote: > Date: Fri, 30 Sep 2011 08:20:35 +0200 > From: Roland Smith <rsmith@xs4all.nl> > Subject: Re: is there a way to code this .... without curses? > To: Gary Kline <kline@thought.org> > Cc: FreeBSD Mailing List <freebsd-questions@freebsd.org> > > On Thu, Sep 29, 2011 at 09:46:45PM -0700, Gary Kline wrote: > > guys, > > > > i have written a small program using curses; that isn't the problem. > > but does anybody onlist know how to code the following in C: > > > > void foo() > > { > > > > system("stty raw"); > > man cfmakeraw > > > . > > . > > . > > system("stty cooked"); > > } > > See f_sane in /usr/src/bin/stty/key.c. The parameters set in f_sane are > eventually passed to tcsetattr(3), so see 'man tcsetattr' > > > anybody? yoa! well, i forget that i am/was using the linux stty, so my question probably should go to that flavor on Nix ... just because there may be somed differences between the bsd flavor of stty and the linux version. this hads to do with my port of the python key-click script i was asking about about a week ago. i do have something working in C/C++. i'm getting going with the volume option today. i just wanted some few lines of C to replace the system() calls forf stty. thanks, gary ps: what i'm working on just _may_ work on both bsd and linux. dunno yet. > > Roland > -- > R.F.Smith http://www.xs4all.nl/~rsmith/ > [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated] > pgp: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 (KeyID: C321A725) -- Gary Kline kline@thought.org http://www.thought.org Public Service Unix Journey Toward the Dawn, E-Book: http://www.thought.org The 8.51a release of Jottings: http://jottings.thought.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110930165908.GA24129>