MSVC support, Watcom is still recommended
This commit is contained in:
parent
46f95f8314
commit
c17f7a56cc
10 changed files with 87 additions and 23 deletions
|
|
@ -66,7 +66,7 @@ FILE* Fopen(char* filename, char* type) {
|
|||
fl = (FileList*)Malloc(sizeof(*fl));
|
||||
len = strlen(filename) + 1;
|
||||
fl->fname = Malloc(len);
|
||||
strlcpy(fl->fname, filename, len);
|
||||
sj4_strlcpy(fl->fname, filename, len);
|
||||
fl->fp = fp;
|
||||
fl->next = flist;
|
||||
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ char* make_idxlist(char* name) {
|
|||
|
||||
i = strlen(name);
|
||||
p = Zalloc(i + 2);
|
||||
strlcpy(p, name, i + 2);
|
||||
sj4_strlcpy(p, name, i + 2);
|
||||
return p;
|
||||
}
|
||||
char* get_idxlist(char* name) {
|
||||
|
|
@ -180,7 +180,7 @@ void mark_file(FILE* out) {
|
|||
fputc('\n', out);
|
||||
Fclose(fp);
|
||||
} else {
|
||||
strlcpy(pathname, idxtop, sizeof(pathname));
|
||||
sj4_strlcpy(pathname, idxtop, sizeof(pathname));
|
||||
pos = infp ? Ftell(infp) : 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -430,7 +430,7 @@ void makehead(u_char* dict_name) {
|
|||
put4byte(header + VERSIONPOS, DICTVERSION);
|
||||
time(&i);
|
||||
p = header + COMMENTPOS;
|
||||
snprintf((char*)p, sizeof(header) - COMMENTPOS, "%s : %s", dict_name, ctime(&i));
|
||||
sj4_snprintf((char*)p, sizeof(header) - COMMENTPOS, "%s : %s", dict_name, ctime(&i));
|
||||
while(*p) {
|
||||
if(*p == '\n') {
|
||||
*p = 0;
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@
|
|||
#include <sys/stat.h>
|
||||
|
||||
#include "sj4_dict_struct.h"
|
||||
#include "sj_compat.h"
|
||||
|
||||
/* char.c */
|
||||
int cnvyomi(int);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue