From 91eec541adef1810cd0432a3b2d4fb245b59d3c5 Mon Sep 17 00:00:00 2001 From: xolatile Date: Tue, 12 Sep 2023 05:23:59 -0400 Subject: [PATCH] Very cool redesign... --- compile.sh | 4 +--- install.sh | 2 +- xighlight.c | 8 +++----- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/compile.sh b/compile.sh index f439cca..891af0c 100644 --- a/compile.sh +++ b/compile.sh @@ -2,8 +2,6 @@ set -xe -clang -g -ansi -Weverything -o xighlight xighlight.c -gcc -g -ansi -Wall -Wextra -Wpedantic -o xighlight xighlight.c -cat xighlight.c | valgrind --show-leak-kinds=all --leak-check=full --track-origins=yes ./xighlight +gcc -ansi -Wall -Wextra -Wpedantic -Werror -o xighlight xighlight.c exit diff --git a/install.sh b/install.sh index f716b91..c9b547d 100644 --- a/install.sh +++ b/install.sh @@ -2,6 +2,6 @@ set -xe -sudo cp xighlight /usr/bin/xighlight +cp xighlight /usr/bin/xighlight exit diff --git a/xighlight.c b/xighlight.c index 14df5f3..75d8d52 100644 --- a/xighlight.c +++ b/xighlight.c @@ -8,8 +8,6 @@ #include #include -#include -#include int main (void) { int offset = 0; @@ -50,14 +48,14 @@ int main (void) { select = syntax_select (& buffer [offset], & length); if (select >= syntax_count) { - curses_style (EFFECT_NORMAL, COLOUR_WHITE); + terminal_style (EFFECT_NORMAL, COLOUR_WHITE); } else { - curses_style (syntax_effect [select], syntax_colour [select]); + terminal_style (syntax_effect [select], syntax_colour [select]); } out (& buffer [offset], length); - curses_style (-1, -1); + terminal_style (-1, -1); } buffer = deallocate (buffer);