diff --git a/src/main.c b/src/main.c index 6d951f7..f571b91 100644 --- a/src/main.c +++ b/src/main.c @@ -66,12 +66,15 @@ static uint8_t threshold = 2; static size_t passes = 1; /* function definitions */ +#ifdef SYS_NT static char* correct_slashes(const char* path); +#endif static char* my_basename(const char* raw_path); static void parse_value(uint8_t destination, const char* arg); bool args_match(const char* arg, const char* args_list[]); /* function implementations */ +#ifdef SYS_NT static char* correct_slashes(const char* path) { char* new_path = strdup(path); if (new_path == NULL) @@ -86,9 +89,16 @@ static char* correct_slashes(const char* path) { return new_path; } +#endif static char* my_basename(const char* raw_path) { - char* path = correct_slashes(raw_path); + char* path = +#ifdef SYSNT + correct_slashes +#else + strdup +#endif + (raw_path); if (path == NULL) return NULL;