https://github.com/casualsnek/linuxconio
Implementation of conio.h from ms-dos based compilers for linux systems
https://github.com/casualsnek/linuxconio
ansi-c conio curses gcc getche linux linuxconio
Last synced: 14 days ago
JSON representation
Implementation of conio.h from ms-dos based compilers for linux systems
- Host: GitHub
- URL: https://github.com/casualsnek/linuxconio
- Owner: casualsnek
- License: gpl-3.0
- Created: 2021-05-13T12:31:41.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-01-09T03:31:31.000Z (over 1 year ago)
- Last Synced: 2025-04-11T16:25:49.970Z (16 days ago)
- Topics: ansi-c, conio, curses, gcc, getche, linux, linuxconio
- Language: C
- Homepage:
- Size: 23.4 KB
- Stars: 22
- Watchers: 2
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Linux
## _"conio.h" implementation for Linux_This is the implementation of "conio.h" from ms-dos based C compilers for linux/*nix systems
Why use "conio" on linux instead of "curses" or other libraries
- Because my college forces me to use "conio" library (which is not available on linux) and i have to make sure the code i write runs on my teacher's computer too.
- Yes, this is the only reason### Features
- Does not use "curses" library.
- It works on linux with GCC and maybe BSD too## Installation
Installation is done by copying "conio.h" file to location where compiler looks for header files Or keeping "conio.h" in same directory as your code and using ``` #include "conio.h"``` instead of ```#include ```
On most systems it can be installed by running following commands in terminal emulator
```sh
$ git clone https://github.com/casualsnek/linuxconio
$ cd linuxconio
$ sudo cp conio.h /usr/include/conio.h
```
Restart your IDE if you are using one and use it as you normally wouldYou can check if it is working properly after installing by compilling and running "testconio.c" using following commands:
```sh
$ gcc testconio.c -o testconio
$ ./testconio
```### Implemented functions
May not be exact to windows "conio.h" but mostly seems to work in similar ways
- showcursor
- nocursor
- cagxy
- gotox
- gotoxy
- clrscr
- kbhit
- textbackground
- textcolor
- getch
- getche
- clreol
- delline
- cprintf
- cscanf
- cputs
- cgets
- wherex
- wherey
- getpassYou can help by adding support for missing functions or improving the already existing ones.
Please star this repository if you find ths useful