3bdc138459
An extended C-shell with many useful features with Japanese and color support. PR: 5316 Submitted by: Issei Suzuki <issei@mikage.t-cnet.or.jp>
46 lines
1.0 KiB
Plaintext
46 lines
1.0 KiB
Plaintext
--- sh.func.c.orig Sun Dec 28 03:14:21 1997
|
|
+++ sh.func.c Sun Dec 28 03:15:00 1997
|
|
@@ -1273,6 +1273,9 @@
|
|
struct command *c;
|
|
{
|
|
Char *vp, *lp;
|
|
+#ifdef __FreeBSD__
|
|
+ static int catclosed = 0;
|
|
+#endif
|
|
|
|
USE(c);
|
|
if (*++v == 0) {
|
|
@@ -1312,9 +1315,19 @@
|
|
# ifdef LC_COLLATE
|
|
(void) setlocale(LC_COLLATE, "");
|
|
# endif
|
|
-# if defined(NLS_CATALOGS) && defined(LC_MESSAGES)
|
|
+# ifdef NLS_CATALOGS
|
|
+# ifdef LC_MESSAGES
|
|
(void) setlocale(LC_MESSAGES, "");
|
|
+# endif
|
|
+# ifdef __FreeBSD__
|
|
+ /* This code is to avoid bug. */
|
|
+ if (catclosed)
|
|
(void) catclose(catd);
|
|
+ else
|
|
+ catclosed = 1;
|
|
+# else
|
|
+ (void) catclose(catd);
|
|
+# endif /* __FreeBSD__ */
|
|
nlsinit();
|
|
# endif /* NLS_CATALOGS && LC_MESSAGES */
|
|
# ifdef LC_CTYPE
|
|
@@ -1487,8 +1500,10 @@
|
|
# ifdef LC_COLLATE
|
|
(void) setlocale(LC_COLLATE, "");
|
|
# endif
|
|
-# if defined(NLS_CATALOGS) && defined(LC_MESSAGES)
|
|
+# ifdef NLS_CATALOGS
|
|
+# ifdef LC_MESSAGES
|
|
(void) setlocale(LC_MESSAGES, "");
|
|
+# endif
|
|
(void) catclose(catd);
|
|
nlsinit();
|
|
# endif /* NLS_CATALOGS && LC_MESSAGES */
|