v
v copied to clipboard
termio: new termio module
move the tcgetattr and tcsetattr functions in a new termio module. The code needed refactoring as different OS have different fields size, position and number for the C.termios structure, which could not be correctly expressed consitently otherwise.
It has the positive side effect to reduce the number of unsafe calls. New testing code was also added for the readline module as it is relying of the feature.
This work seems to have triggered a bug with the cyclic dependency checking of V, which need to be reviewed before this code can be merged.