OVH Cloud OVH Cloud

"raw" & "cbreak" différence ?

4 réponses
Avatar
urbanlek
Bonjour,

Quelqu'un connait-il la diff=E9rence entre raw et cbreak ?
notamment avec la biblioth=E8que ncurses. J'ai regard=E9 dans le
HOWTO ncurses, mais c'est en anglais et ce n'est pas mon fort...

Merci d'avance.

4 réponses

Avatar
Laurent Wacrenier
urbanlek écrit:
Quelqu'un connait-il la différence entre raw et cbreak ?


Les signaux (^C, ^, ^Z, etc.) passent avec cbreak.

Avatar
rene-marc
urbanlek :

Quelqu'un connait-il la différence entre raw et cbreak ?
notamment avec la bibliothèque ncurses. J'ai regardé dans le
HOWTO ncurses, mais c'est en anglais et ce n'est pas mon fort...


man cbreak:

Raw mode is similar to cbreak mode, in that characters typed are imme-
diately passed through to the user program. The differences are that
in raw mode, the interrupt, quit, suspend, and flow control characters
are all passed through uninterpreted, instead of generating a signal.

Bref, en mode raw, aucun caractere de controle (^C, ^S ...) n'est
interpreté.

Avatar
Stephane Chazelas
2003/11/18, 16:56(+01), urbanlek:
Quelqu'un connait-il la différence entre raw et cbreak ?


raw, c'est cbreak ignbrk -brkint -ignpar -parmrk -inpck
-istrip -inlcr -igncr -icrnl -ixon -ixoff -iuclc -ixany
-imaxbel -opost -isig -xcase min 1 time 0

(au moins sur mon Linux).

--
Stéphane ["Stephane.Chazelas" arobase "free.fr"]

Avatar
urbanlek
On Tue, 18 Nov 2003 17:08:38 +0100
Stephane Chazelas wrote:

2003/11/18, 16:56(+01), urbanlek:
Quelqu'un connait-il la différence entre raw et cbreak ?


raw, c'est cbreak ignbrk -brkint -ignpar -parmrk -inpck
-istrip -inlcr -igncr -icrnl -ixon -ixoff -iuclc -ixany
-imaxbel -opost -isig -xcase min 1 time 0

(au moins sur mon Linux).

--
Stéphane ["Stephane.Chazelas" arobase "free.fr"]


Merci à tous...

urbanlek