|
conio_lt 0.2.0
A lite version of the 'conio.h' library for Unix-like systems.
|
| Author | Ryuu Mitsuki |
| Version | 0.2.0 |
| APIs | 12 |
The conio_lt library is a lightweight adaptation of the conio.h library designed for Unix-like systems. Originally a library for old DOS systems, conio.h provided essential functions for console input and output. This lite version aims to bring these functionalities to Unix-like systems and Borland C++, especially for legacy version of Borland C++.
Visit this site for more detailed information about this project, including the APIs documentation.
[!IMPORTANT]
On Windows, this library can be used with Git Bash as the shell environment, combined with MinGW for thegcccompiler. Ensure that MinGW is correctly installed on Windows, and thegcccompiler runs smoothly.
| API | Description |
|---|---|
clrscr() | Clears the terminal screen. |
rstscr() | Clears and resets the terminal screen. |
getch() | Reads a single character from the standard input. |
getche() | Reads a single character from the standard input and echoes it. |
gotoxy(cpos_t, cpos_t) | Moves the cursor to specified coordinates on the terminal screen. |
gotox(cpos_t) | Moves the cursor position to specified X-coordinate, leaving Y-coordinate unchanged. |
gotoy(cpos_t) | Moves the cursor position to specified Y-coordinate, leaving X-coordinate unchanged. |
putch(int) | Writes a character to the standard output (stdout). |
ungetch(int) | Pushes a character back onto the input stream (stdin). |
wherex() | Retrieves the current X-coordinate of the cursor on the terminal screen. |
wherey() | Retrieves the current Y-coordinate of the cursor on the terminal screen. |
wherexy(cpos_t*, cpos_t*) | Retrieves the current X and Y coordinates of the cursor on the terminal screen. |
[!NOTE]
This library provides a concise set of functions commonly used for console-based applications.
Alternatively, download the artifact from the latest release.
[!WARNING]
RequiresAdministratororrootprivileges. This installation is specific to Unix-like systems. For Borland C++, copy it to the location where Borland C++ searches its libraries, depending on the installation directory. Alternative way is that you can install it as an external library, see "[Install as an external library](#install-ext-lib)".
Supports both non-root and rooted devices on Termux. The PREFIX environment variable typically points to "~/../usr", with the tilde (~) representing the home directory on Unix-like systems.
[!NOTE]
This installation method is suitable for Termux Android users and enables easy integration with C projects on your device.
[!NOTE]
Replace"path/to/your_project"with the actual path to your project directory.
This project was inspired from @zoelabbb/conio.h, authored by himself, @zoelabbb.
This project is licensed under the terms of the GNU General Public License. Refer to the LICENSE file or visit https://www.gnu.org/licenses/gpl.html for more information.