1
0
mirror of https://gittea.dev/nova/th.git synced 2025-12-12 18:50:10 -05:00

migration of concat to macro based implementation

This commit is contained in:
nova
2025-11-16 11:34:11 +01:00
parent be9436570c
commit ddcf4d4105
4 changed files with 102 additions and 74 deletions

View File

@@ -85,8 +85,9 @@ char* text(char *path, unsigned long *file_size){
}
}
char* generic(char *path){
char *cmd = concat("file ./\"", path);
cmd = concat(cmd, "\"");
char *cmd;
concat(cmd, "file ./\"", path, 0);
concat(cmd, cmd, "\"", 1);
FILE *cmd_open = popen(cmd, "r");
char *line = NULL;