openbsd-ports/japanese/Wnn/patches/patch-Wnn_etc_bdic_c
2022-03-11 19:24:42 +00:00

55 lines
1.8 KiB
Plaintext

--- Wnn/etc/bdic.c.orig
+++ Wnn/etc/bdic.c
@@ -73,6 +73,8 @@
#include "jdata.h"
#include "wnn_os.h"
#include "wnn_string.h"
+#include <unistd.h>
+#include <string.h>
#ifdef JSERVER
#ifndef BDIC_WRITE_CHECK
@@ -291,7 +293,7 @@ register int n;
static
#endif
int
-getnstr(ifpter, n, st)
+priv_getnstr(ifpter, n, st)
register FILE *ifpter;
register int n;
register char *st;
@@ -672,13 +674,13 @@ struct wnn_file_head *hp;
char wnn_file_string[WNN_FILE_STRING_LEN + 1];
int err = 0;
- getnstr(ifpter, WNN_FILE_STRING_LEN, wnn_file_string);
+ priv_getnstr(ifpter, WNN_FILE_STRING_LEN, wnn_file_string);
if(strncmp(wnn_file_string, WNN_FILE_STRING, WNN_FILE_STRING_LEN))
err = -1;
if(getint((&hp->file_type), ifpter) == -1) err = -1;
if(input_file_uniq(&(hp->file_uniq), ifpter) == -1) err = -1;
if(input_file_uniq(&(hp->file_uniq_org), ifpter) == -1) err = -1;
- getnstr(ifpter, WNN_PASSWD_LEN, hp->file_passwd);
+ priv_getnstr(ifpter, WNN_PASSWD_LEN, hp->file_passwd);
getnull(ifpter, 36);
return(err);
}
@@ -725,7 +727,7 @@ FILE *ifpter;
getint(&(funiq->time), ifpter) == -1 ||
getint(&(funiq->dev), ifpter) == -1 ||
getint(&(funiq->inode), ifpter) == -1 ||
- getnstr(ifpter, WNN_HOSTLEN, funiq->createhost) == -1)
+ priv_getnstr(ifpter, WNN_HOSTLEN, funiq->createhost) == -1)
return(-1);
return(0);
}
@@ -1237,7 +1239,7 @@ struct JT *jt1;
getint(&jt1->maxtable , ifpter) == -1 ||
getint(&jt1->maxhontai , ifpter) == -1 ||
getint(&jt1->gosuu , ifpter) == -1 ||
- getnstr(ifpter, WNN_PASSWD_LEN, jt1->hpasswd) == -1 ||
+ priv_getnstr(ifpter, WNN_PASSWD_LEN, jt1->hpasswd) == -1 ||
getint(&jt1->total , ifpter) == -1 ||
getint(&jt1->maxri1[D_YOMI] , ifpter) == -1 ||
getint(&jt1->maxri1[D_KANJI] , ifpter) == -1 ||