🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.os.linux.programacion
Article #10601

Re: Comportamiento raro con getch y printf

#10601
From: NotFound
Date: Sat, 16 Feb 2002 15:58
15 lines
1625 bytes
> Para que no me digais :-)  he mirado el código fuente del showkey que lo
> hace sin curses, pero pone el teclado en modo raw o xlate mediante
> llamadas ioctl, yo buscaba algo más sencillo para leer un carácter y que
> esté disponible al instante para que el programa siga su ejecución antes
> de un \n.

Pues la forma de hacerlo es esa, no hay otra más sencilla... bueno, sí,
la hay, en vez de llamadas ioctl puedes hacer un system ("stty ...");
pero es un tanto chapucero.

Salu2
Technical Details
Message-ID: <3C6E81B9.351CD6B9@hobbiton.org>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news.tele.dk!small.news.tele.dk!195.158.233.21!news.ebone.net!news1.ebone.net!cesio.mundo-r.com!not-for-mail
References: <slrna6om3r.fa.reinoso@EA4BAO.PLLANO.ESP.EU> <74eb6167.0202150119.4c2a8ae2@posting.google.com> <slrna6qdha.7c0.sromero@compiler.servicom2000> <slrna6se1b.86.reinoso@EA4BAO.PLLANO.ESP.EU>

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII
X-Google-Thread: f86c8,96738059632c4c6f
X-Google-Attributes: gidf86c8,public
X-Google-ArrivalTime: 2002-02-16 08:08:55 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news.tele.dk!small.news.tele.dk!195.158.233.21!news.ebone.net!news1.ebone.net!cesio.mundo-r.com!not-for-mail
From: NotFound <blassic@hobbiton.org>
Newsgroups: es.comp.os.linux.programacion
Subject: Re: Comportamiento raro con getch y printf
Date: Sat, 16 Feb 2002 16:58:49 +0100
Organization: Another Netscape Collabra Server User
Lines: 15
Message-ID: <3C6E81B9.351CD6B9@hobbiton.org>
References: <slrna6om3r.fa.reinoso@EA4BAO.PLLANO.ESP.EU> <74eb6167.0202150119.4c2a8ae2@posting.google.com> <slrna6qdha.7c0.sromero@compiler.servicom2000> <slrna6se1b.86.reinoso@EA4BAO.PLLANO.ESP.EU>
NNTP-Posting-Host: cm64046.red.mundo-r.com
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
X-Mailer: Mozilla 4.72 [en] (X11; I; Linux 2.2.14 i586)
X-Accept-Language: en