Very cool redesign...

This commit is contained in:
Ognjen Milan Robovic 2023-09-12 05:23:59 -04:00
parent f3a71ba518
commit 91eec541ad
3 changed files with 5 additions and 9 deletions

View File

@ -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

View File

@ -2,6 +2,6 @@
set -xe
sudo cp xighlight /usr/bin/xighlight
cp xighlight /usr/bin/xighlight
exit

View File

@ -8,8 +8,6 @@
#include <xolatile/xyntax.h>
#include <xolatile/xyntax.c>
#include <xolatile/xurses.h>
#include <xolatile/xurses.c>
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);