[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[FDclone-users:00566] Re: patch当ててみたのですが



 しらいです。

In Message-Id <20060811212626.052181.28a69f38@isis.ocn.ne.jp>
        yuji tamura <yuji@isis.ocn.ne.jp>さんwrites:
> こんばんは、田村です。

> >  kanji.c の openunitbl() の中に Xopen() がありますが、その
> > 直前に「fd=-1;」という行を追加して下さい。
> 
> この Xopen() は 738行目でしょうか?

 patch を当てる前の素の 2.08f だと 732 行目になります。まぁ
一箇所しかないので間違えないとは思いますが。


> 以上の .fd2rc で、起動、正常な動作(わかる限りでの)、
> 日本語ファイル名表示を確認しました。
> 
> 「UNICODEBUFFER=1」が効いているのか、日本語ファイル名の
> たくさんあるディレクトリのブラウズも高速に動いているようです。

 無事に動いて何よりです。

 では一応完成版の patch を挙げておきますね。

# 2.08g を出すべきなのかなー?

---- Cut Here ----
diff -u ../old/FD-2.08f/dosdisk.c ./dosdisk.c
--- ../old/FD-2.08f/dosdisk.c	Tue Aug  8 00:00:00 2006
+++ ./dosdisk.c	Fri Aug 11 23:36:44 2006
@@ -943,12 +943,14 @@
 	if (!unitblpath || !*unitblpath) strcpy(path, file);
 	else strcatdelim2(path, unitblpath, file);
 
+	fd = -1;
 	if ((fd = Xopen(path, O_BINARY | O_RDONLY, 0666)) < 0) fd = -1;
-	else if (!unitblent && sureread(fd, buf, 2) != 2) {
+	else if (unitblent) /*EMPTY*/;
+	else if (sureread(fd, buf, 2) == 2) unitblent = getword(buf, 0);
+	else {
 		Xclose(fd);
 		fd = -1;
 	}
-	else unitblent = getword(buf, 0);
 
 	return(fd);
 }
diff -u ../old/FD-2.08f/kanji.c ./kanji.c
--- ../old/FD-2.08f/kanji.c	Tue Aug  8 00:00:00 2006
+++ ./kanji.c	Fri Aug 11 23:36:56 2006
@@ -165,7 +165,9 @@
 static char *NEAR _kanjiconv __P_((char *, char *, int, int, int, int *, int));
 #endif	/* !_NOKANJICONV */
 
+#ifdef	FD
 int noconv = 0;
+#endif
 #ifndef	_NOKANJIFCONV
 int nokanjifconv = 0;
 char *sjispath = NULL;
@@ -729,12 +731,20 @@
 	if (!unitblpath || !*unitblpath) strcpy(path, file);
 	else strcatdelim2(path, unitblpath, file);
 
+# ifdef	FD
+	noconv++;
+# endif
+	fd = -1;
 	if ((fd = Xopen(path, O_BINARY | O_RDONLY, 0666)) < 0) fd = -1;
-	else if (!unitblent && sureread(fd, buf, 2) != 2) {
+	else if (unitblent) /*EMPTY*/;
+	else if (sureread(fd, buf, 2) == 2) unitblent = getword(buf, 0);
+	else {
 		Xclose(fd);
 		fd = -1;
 	}
-	else unitblent = getword(buf, 0);
+# ifdef	FD
+	noconv--;
+# endif
 
 	return(fd);
 }
diff -u ../old/FD-2.08f/log.c ./log.c
--- ../old/FD-2.08f/log.c	Tue Aug  8 00:00:00 2006
+++ ./log.c	Wed Aug  9 00:43:17 2006
@@ -109,6 +109,7 @@
 char *buf;
 int len;
 {
+	static int logging = 0;
 	lockbuf_t *lck;
 	struct tm *tm;
 	char hbuf[MAXLOGLEN + 1];
@@ -116,6 +117,7 @@
 	u_char uc;
 	int n;
 
+	if (logging) return;
 #ifndef	NOUID
 	if (!getuid()) {
 		n = rootloglevel;
@@ -126,6 +128,7 @@
 	n = loglevel;
 	if (!n || n < lvl) return;
 
+	logging = 1;
 	if ((lck = openlogfile())) {
 		t = time(NULL);
 		tm = localtime(&t);
@@ -148,6 +151,7 @@
 		VOID_C write(lck -> fd, &uc, sizeof(uc));
 		lockclose(lck);
 	}
+	logging = 0;
 #ifndef	NOSYSLOG
 	if (usesyslog && syslogged >= 0) {
 		if (!syslogged) {
---- Cut Here ----

                                               しらい たかし