fixed some bugs, switching to actual usefull_macros library

This commit is contained in:
2026-05-19 17:37:45 +03:00
parent 9c2b6aeebf
commit a6978dd84a
12 changed files with 465 additions and 418 deletions

View File

@@ -140,7 +140,7 @@ static inline const char *gethex(const char *line, int *ch){
static inline const char *getspec(const char *line, int *ch){
if(!*line){ *ch = -1; return line; }
int got = -1, s = *line++; // next symbol after '\'
if(s >= '0' && s <= '7'){ // octal symbol
if(s >= '0' && s <= '7'){ // octal symbol like \127
line = getoct(line-1, &got);
}else switch(s){
case 'a': got = '\a'; break;
@@ -186,6 +186,7 @@ int convert_and_send(disptype input_type, const char *line){
if(curpos + sz >= bufsiz){ // out ouptut buffer can't be larger than input
bufsiz += BUFSIZ;
buf = realloc(buf, bufsiz);
if(!buf) ERR("realloc()");
}
}
while(*line){