alec

Abstraction Layer for Escape Codes
git clone git://git.dimitrijedobrota.com/alec.git
Log | Files | Refs | README | LICENSE

commit e3a380226dee9e79220e2dc4aeec6de0d8186159
parent 9892f3a46e97ac793b2cbd785270f3177813d3b2
Author: Dimitrije Dobrota <mail@dimitrijedobrota.com>
Date:   Tue, 27 Feb 2024 18:33:36 +0000

Remove trailing whitespace

Diffstat:
Msrc/lexer.l | 2++
Msrc/rules | 2+-
2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/lexer.l b/src/lexer.l @@ -18,6 +18,8 @@ LINE_END (\n|\r|\r\n) , { return COMMA; } [^,\n]* { + char *p = yytext + strlen(yytext) - 1; + while(isspace(*p)) *p-- = '\0'; while(*yytext && isspace(*yytext)) yytext++; yylval.n = strdup(yytext); return LITERAL; } diff --git a/src/rules b/src/rules @@ -24,7 +24,7 @@ limit_256 background int R, int G, int B limit_256 -38, ';', 5, ';', R, ';', G, ';', B, 'm' +38 , ';', 5, ';', R, ';', G, ';', B, 'm' // comment foreground COLOR color