From owner-freebsd-questions@FreeBSD.ORG Fri Sep 30 16:59:09 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0FAA106564A for ; Fri, 30 Sep 2011 16:59:09 +0000 (UTC) (envelope-from kline@thought.org) Received: from thought.org (plato.thought.org [209.180.213.209]) by mx1.freebsd.org (Postfix) with ESMTP id CF5838FC08 for ; Fri, 30 Sep 2011 16:59:09 +0000 (UTC) Received: by thought.org (Postfix, from userid 1001) id F098FE82ABD; Fri, 30 Sep 2011 09:59:08 -0700 (PDT) Date: Fri, 30 Sep 2011 09:59:08 -0700 From: Gary Kline To: Roland Smith Message-ID: <20110930165908.GA24129@thought.org> References: <20110930044642.GA17359@thought.org> <20110930062035.GA5140@slackbox.erewhon.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110930062035.GA5140@slackbox.erewhon.net> Organization: Thought Unlimited. Public service Unix since 1986. Of_Interest: With 25 years of service to the Unix community. User-Agent: Mutt/1.5.21 (2010-09-15) Cc: FreeBSD Mailing List Subject: Re: is there a way to code this .... without curses? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2011 16:59:10 -0000 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 > Subject: Re: is there a way to code this .... without curses? > To: Gary Kline > Cc: FreeBSD Mailing List > > 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