diff options
author | Jan200101 <sentrycraft123@gmail.com> | 2021-02-12 14:34:12 +0100 |
---|---|---|
committer | Jan200101 <sentrycraft123@gmail.com> | 2021-03-26 18:53:26 +0100 |
commit | 63e5e87d71e42f6f252b97468d2e4e7f3b95277a (patch) | |
tree | ceeb342a032b3b588f9c8cba55d895a5494e1b33 /src/common.c | |
parent | c7f30c98540de3ce8ad0a34b9e162801de0e257b (diff) | |
download | polecat-63e5e87d71e42f6f252b97468d2e4e7f3b95277a.tar.gz polecat-63e5e87d71e42f6f252b97468d2e4e7f3b95277a.zip |
a chunk of changes
- replace bool with ints,
- give enums a t suffix
- fix edge case in variable parser where the end of the buffer is not null
- make parseVar take an allocated variable list instead of a static one
- set the first argument of all tasks to be the prefix
- correctly parse chmodx directives
- add GAMEDIR variable to the variable list
- output known variables on installer info
- implement basic task handling
- check if file exists before redownloading
- remove debug function
- make noprogress argument into progress and convert it to int
Diffstat (limited to 'src/common.c')
-rw-r--r-- | src/common.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/common.c b/src/common.c index 151e3a7..36cd2d9 100644 --- a/src/common.c +++ b/src/common.c @@ -1,7 +1,5 @@ - #include <stdio.h> #include <string.h> -#include <stdbool.h> #include <sys/stat.h> #include <unistd.h> #include <sys/types.h> @@ -39,14 +37,14 @@ struct stat getStat(const char* path) return sb; } -bool isFile(const char* path) +int isFile(const char* path) { struct stat sb = getStat(path); return S_ISREG(sb.st_mode) || S_ISLNK(sb.st_mode); } -bool isDir(const char* path) +int isDir(const char* path) { struct stat sb = getStat(path); |