is there a way to code this .... without curses?

Gary Kline kline at thought.org
Fri Sep 30 16:59:10 UTC 2011


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 at xs4all.nl>
> Subject: Re: is there a way to code this .... without curses?
> To: Gary Kline <kline at thought.org>
> Cc: FreeBSD Mailing List <freebsd-questions at 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 at 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



More information about the freebsd-questions mailing list