Thun/implementations/C
Simon Forman 8016fd697a Allow for redefinition of user defs.
And some protection for inscribe, empty quotes or quotes that do not
have a symbol at the first item are just consumed without affecting the
user defs.

Because the Gperf wordlist is checked before the user defs hash the
inscribe command cannot overwrite the commands defined in the wordlist.
2023-02-08 23:20:35 -08:00
..
.gitignore Ignore object files. 2023-02-02 16:14:11 -08:00
KEYWORDS.in User definitions with the inscribe command. 2023-02-08 21:13:23 -08:00
KEYWORDS.txt User definitions with the inscribe command. 2023-02-08 21:13:23 -08:00
Makefile Oh, LDFLAGS, right... 2023-02-08 11:55:33 -08:00
README.md A README file. 2023-02-05 14:54:33 -08:00
convert_defs.py Handle definitions with non-alphanumeric chars in their names. 2023-02-08 12:50:23 -08:00
definitions.c unstack 2023-02-08 15:06:12 -08:00
definitions.h unstack 2023-02-08 15:06:12 -08:00
defs.txt unstack 2023-02-08 15:06:12 -08:00
joy.c Allow for redefinition of user defs. 2023-02-08 23:20:35 -08:00
joy.h User definitions with the inscribe command. 2023-02-08 21:13:23 -08:00
keywords.c User definitions with the inscribe command. 2023-02-08 21:13:23 -08:00
notes dip 2023-02-05 08:49:05 -08:00
uthash.h User definitions with the inscribe command. 2023-02-08 21:13:23 -08:00

README.md

Thun in C

This is my first attempt to write C in many years, I hope it's not too embarassing.

I use Gperf to create a static wordlist. This make word lookup very efficient, but there's no way currently to add definitions at runtime.

There's a janky script convert_defs.py that generates definitions.c, definitions.h, and KEYWORDS.txt from the defs.txt file. I would like to replace the dependency on Python with, say, Awk or something.