Skip to content

Commit

Permalink
more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
PKD667 committed May 2, 2024
1 parent f5a0459 commit 156c9b4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
3 changes: 2 additions & 1 deletion cutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,15 @@ long rdfile(const char* filePath,char** buffer);
// write entire file safely
int wrnfile(const char* filePath,char* buffer,long size);
#define wrfile(filePath,buffer) wrnfile(filePath,buffer,strlen(buffer))

/*
Check if a dir exists :
* 0 - doesn't exist
* 1 - exists
* 2 - Not a directory
*/
int xisdir (const char *d);
// for some reason some versions of libspm use isdir instead of xisdir
#define isdir xisdir
// create dir recursivelty (similar to mkdir -p)
int pmkdir (const char *dir);
// move a file and create the dir if it doesn't exist
Expand Down
2 changes: 1 addition & 1 deletion src/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ long rdfile(const char* filePath,char** buffer)
return length;
}

int wrfile(const char* filePath,char* buffer,long size)
int wrnfile(const char* filePath,char* buffer,long size)
{
FILE *fp;
fp = fopen(filePath , "wb" );
Expand Down
3 changes: 1 addition & 2 deletions src/system.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ int xisdir (const char *d)

}

// for some reason some versions of libspm use isdir instead of xisdir
#define isdir xisdir


int pmkdir (const char *dir)
{
Expand Down

0 comments on commit 156c9b4

Please sign in to comment.