cooked vs. raw modes

cooked vs. raw modes

Post by Daniel Edle » Sun, 14 Mar 1999 04:00:00



I recently did a project which required changed the terminal driver, tty.c.
The goal was to create a new editing capability along the lines of the
CTRL-U command to erase a complete line in canonical/cooked mode.  So I put
the statement looking for my new control character in the if(canonical)
statement.  Everything has worked fine, except the teaching assistant
responsible for grading the projects says that the new feature shouldn't
work in the MINIX shell because it is in non-canonical/raw mode.  I don't
think it is because there is nothing in the source code for sh that sets any
flags in the termios structure and by default programs operate in canonical
mode.

So my question is: is the shell operating normally in canonical or
non-canonical mode?

Mr. Tanenbaum said he was swamped and that I should ask the newsgroup.  So
thanks for any reply,

Daniel Edlen

 
 
 

cooked vs. raw modes

Post by Kees J B » Sun, 14 Mar 1999 04:00:00




>So my question is: is the shell operating normally in canonical or
>non-canonical mode?

The ordinary shell, /bin/sh, is using canonical mode.  The shell used as
a login shell by bin, /usr/bin/ash, uses non-canonical mode.  You won't
find a trace of this in src/commands/ash/ though, because ash uses a line
editing library.  That library can be found in src/lib/editline/.

I don't understand the thing about implementing CTRL-U as a line-erase,
though.  The normal terminal interface already has it that way.

Figuring out all the flags that need to be set/unset to get 8-bit clean
raw mode, now that's a challenge!

Quote:>Mr. Tanenbaum said he was swamped and that I should ask the newsgroup.  So
>thanks for any reply,

The problem with being a professor is that you have to sit in way too
many commitees.  Andy is right about sending you here for another
reason, this way we can all listen in.
--
Kees J. Bot, Systems Programmer, Sciences dept., Vrije Universiteit Amsterdam

 
 
 

cooked vs. raw modes

Post by Will Ro » Sun, 14 Mar 1999 04:00:00


: I recently did a project which required changed the terminal driver, tty.c.
: The goal was to create a new editing capability along the lines of the
: CTRL-U command to erase a complete line in canonical/cooked mode.  So I put
: the statement looking for my new control character in the if(canonical)
: statement.  Everything has worked fine, except the teaching assistant
: responsible for grading the projects says that the new feature shouldn't
: work in the MINIX shell because it is in non-canonical/raw mode.  I don't
: think it is because there is nothing in the source code for sh that sets any
: flags in the termios structure and by default programs operate in canonical
: mode.

Well, does your code work from the shell or not?  (I must admit, I'd
be inclined to put the changes into console.c).

Will

 
 
 

1. 84bit raw on Nikon 4000ED: VueScan raw vs Silverfast 48bit HDR raw vs Nikon NEF raw

For negative scans/archives, could/would anyone please describe the
basic differences (if any) between the 48bit raw scan data obtained
from a Nikon 4000 ED using the following three software choices:

1) VueScan 48bit raw
2) SilverFast 48bit HDR (raw) output
3) 48bit NEF raw (Nikon's own raw format)

For the Nikon 4000 ED, would one or another choice be better/worse for
archive and post scan processing?

Thanks

--Caleb

2. Text in the upper left corner

3. Raw and Cooked input mode (Dev)

4. Java, C++ Developer

5. Is VueScan Raw data slightly cooked?

6. Simple question

7. system mode vs. task mode debugging

8. Which Amiga model was the best?

9. Mode 2 vs Mode 4 CD ROMS and IDE pulsing

10. HDD, mode 3 vs. mode 4

11. Kernel mode vs user mode

12. Real Mode vs. Protected Mode

13. help with reading character in raw mode from stdin