Make SJ4 more portable
This commit is contained in:
parent
9d4a7ddf4c
commit
a160b81246
3 changed files with 2 additions and 8 deletions
|
|
@ -14,6 +14,5 @@
|
||||||
int sj4_snprintf(char*, size_t, const char*, ...);
|
int sj4_snprintf(char*, size_t, const char*, ...);
|
||||||
size_t sj4_strlcpy(char*, const char*, size_t);
|
size_t sj4_strlcpy(char*, const char*, size_t);
|
||||||
int sj4_ftruncate(FILE*, size_t);
|
int sj4_ftruncate(FILE*, size_t);
|
||||||
int sj4_unlink(const char*);
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
#include "sj4compat.h"
|
|
||||||
|
|
||||||
int sj4_unlink(const char* path) {
|
|
||||||
return unlink(path);
|
|
||||||
}
|
|
||||||
|
|
@ -607,7 +607,7 @@ int makedict(char* path, int idxlen, int seglen, int segnum) {
|
||||||
ret = SJ4_NormalEnd;
|
ret = SJ4_NormalEnd;
|
||||||
error:
|
error:
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
if(ret != SJ4_NormalEnd) sj4_unlink(path);
|
if(ret != SJ4_NormalEnd) remove(path);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -687,7 +687,7 @@ int makestdy(char* path, int stynum, int clstep, int cllen) {
|
||||||
ret = SJ4_NormalEnd;
|
ret = SJ4_NormalEnd;
|
||||||
error:
|
error:
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
if(ret != SJ4_NormalEnd) sj4_unlink(path);
|
if(ret != SJ4_NormalEnd) remove(path);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue