Skip to content

Instantly share code, notes, and snippets.

View min4builder's full-sized avatar

lieks min4builder

View GitHub Profile
@min4builder
min4builder / vtermtest.c
Last active September 25, 2023 20:07 — forked from shimarin/vtermtest.cpp
SDL2 terminal emulator using libvterm (C99 version)
/* gcc vtermtest.c -std=c99 `pkg-config --cflags --libs vterm sdl2 SDL2_ttf`
warnings: -Wall -Wextra -Wno-parentheses -Wno-unused-parameter -Wpedantic
originally based on: https://gist.github.com/shimarin/71ace40e7443ed46387a477abf12ea70
TODO:
- fix resize rendering
- fix vis rendering
- command line parsing (-e)
- color scheme
@min4builder
min4builder / gap.c
Created May 22, 2023 20:28
Gap buffer implementation
/* Hole manager for E. Written by: Joseph H. Allen, 9/10/89
Updated to ANSI C in 2023-05-12 by Lucas Ieks
Here's the buffer manager from an editor I wrote (and which I'm using right
now) and an explanation of the functions/macros provided. Like emacs, it does
not force the gap to be at the point.
The file is stored in memory like this:
lowest: buffer -> +---------+