fixed some includes and defines

This commit is contained in:
aap 2020-08-02 09:24:18 +02:00
parent b8751a03c3
commit 9fbe9b83ba
1 changed files with 9 additions and 9 deletions

View File

@ -5,6 +5,13 @@
#include <math.h>
#include <ctype.h>
#define PSEP_C '/'
#define PSEP_S "/"
#ifdef __unix__
#include <sys/types.h>
#include <dirent.h>
#endif
#include "rwbase.h"
#include "rwerror.h"
#include "rwplg.h"
@ -638,17 +645,10 @@ Matrix::identityError(void)
return dot(r,r) + dot(u,u) + dot(a,a) + dot(pos,pos);
}
#define PSEP_C '/'
#define PSEP_S "/"
#ifndef _WIN32
#include <sys/types.h>
#include <dirent.h>
#endif
void
correctPathCase(char *filename)
{
#ifndef _WIN32
#ifdef __unix__
DIR *direct;
struct dirent *dirent;
@ -688,7 +688,7 @@ makePath(char *filename)
for(size_t i = 0; i < len; i++)
if(filename[i] == '/' || filename[i] == '\\')
filename[i] = PSEP_C;
#ifndef _WIN32
#ifdef __unix__
correctPathCase(filename);
#endif
}