UNIX learning project " ft_select "

Introduction

Some programs, such as your shell, aptitude, top, tig, mcabber, dwarf fortress, zangband or herrie have at least two things in common: Firstly these programs are all executed in a terminal and secondly they all offer an advanced user interface despite the fact that they don’t offer the Microsoft Windows and OSX’s windowed graphic interface that you have come to expect.

Goals

Creating a user interface for a program that is executed in a terminal is doable. It requires that you master the programming work involved as a terminal does not do much in its “rough” mode. To see for yourself, launch the command cat without any arguments and press any keys or a combination of keys on your keyboard... In doing this, as long as you press alphanumeric keys, nothing special happens. However, if you press either the arrows, the esc key or the fn keys, for example, some random characters will appear... redo the same thing in your shell now. You are used to the left arrow moving the cursor to the previous column. Why do we observe such differences between cat and your shell? Your terminal manages many things for you without you noticing, such as for instance the display of characters as you type them or the bufferisation of each line. If, by now, you are asking yourself how you can control your terminal, this project is made for you. You will learn to configure your terminal via the "struct termios" structure as well as to use its technical capabilities, the distinguished "termcaps".