https://github.com/buserror/libsc
Small header only ncurses alternative
https://github.com/buserror/libsc
Last synced: about 1 year ago
JSON representation
Small header only ncurses alternative
- Host: GitHub
- URL: https://github.com/buserror/libsc
- Owner: buserror
- License: apache-2.0
- Created: 2022-09-06T05:04:06.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2024-10-07T12:41:50.000Z (over 1 year ago)
- Last Synced: 2025-04-26T12:46:30.591Z (about 1 year ago)
- Language: C
- Size: 2.66 MB
- Stars: 11
- Watchers: 5
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# libsc
This is some sort of lightweight 'libncurses' mostly made (so far) to display tables and such.
Only 'documentation' so far is the example programs. It is pretty simple tho.
The library 'compiles' itself as a single header file *sc.h* OR, as a static/dynamic library. the single file is inspired by the *stb_*.h* files, and are quite handy to make tools with less dependencies.
The static/dyn libraries are probably better for debugging, and for full install where size of the binary matters.
## What works
* printf like
* 'goto' X,Y
* windows and sub windows
* 'boxes' square and rounded
* UTF8 output
* VT100 attribute parsing, and 256 colors in/out
* "Rendering" and count lines
* "Update" current version on screen, ie move cursor back and redisplay
* Single key input, with timeout
* (sub) Window text justification
* Tested in various terminals, like xterm, tilix etc. Mileage may vary!
## TODO:
* 'diff' one output with the previous one
* UTF8 input
* vt100 full RGB support?
* Add some sort of *table* and *column* support.
## Notes:
* The library doesn't even try to look wether your terminal supports UTF8, etc. I just assumes it does.
* You need *tcc* (Fabrice Bellard tiny C runtime) to build sc.h. If you don't know about *tcc*, you should!
