1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-18 00:10:04 +00:00
freebsd-ports/japanese/dserver/files/patch-ac

139 lines
3.4 KiB
Plaintext
Raw Normal View History

patch files for kenjiro
--- clients/kenjiro/sub.c.orig Tue Jun 27 01:21:31 1995
+++ clients/kenjiro/sub.c Tue Jan 28 15:39:36 1997
@@ -1,6 +1,11 @@
#include "kenjiro.h"
static int sttylevel = 0;
+#ifdef TERMIOS
+#include <termios.h>
+#include <unistd.h>
+static struct termios ttyorg, ttynew;
+#else /* TERMIOS */
#ifdef TERMIO
#include <termio.h>
#include <bsdtty.h>
@@ -10,6 +15,7 @@
static struct tchars tcorg, tcnew;
#endif
static struct ltchars ltcorg, ltcnew;
+#endif /* TERMIOS */
int numk;
int mode;
int fd1 = 0;
@@ -31,6 +37,26 @@
ttynew.c_cc[VQUIT] = 0;
if (ioctl(0, TCSETA, &ttynew) < 0) return;
#else
+# ifdef TERMIOS
+ if (tcgetattr(0, &ttyorg) < 0) return;
+ ttynew = ttyorg;
+ ttynew.c_lflag &= ~ECHO;
+ ttynew.c_lflag &= ~ICANON;
+ ttynew.c_cc[VMIN] = 1;
+ ttynew.c_cc[VTIME] = 0;
+ ttynew.c_cc[VQUIT] = 0;
+ ttynew.c_cc[VLNEXT] = _POSIX_VDISABLE;
+#if defined(VDSUSP)
+ ttynew.c_cc[VDSUSP] = _POSIX_VDISABLE;
+#else /* VDSUSP */
+# if defined(VEOL)
+ ttynew.c_cc[VEOL] = _POSIX_VDISABLE;
+# endif /* VEOL */
+#endif /* VDSUSP */
+ sttylevel++;
+ if (tcsetattr(0, TCSANOW, &ttynew) < 0) return;
+ sttylevel++;
+# else /* TERMIOS */
if (ioctl(0, TIOCGETP, &ttyorg) < 0) return;
ttynew = ttyorg;
ttynew.sg_flags |= CBREAK;
@@ -41,7 +67,9 @@
tcnew = tcorg;
tcnew.t_quitc = -1;
if (ioctl(0, TIOCSETC, &tcnew) < 0) return;
+# endif /* TERMIOS */
#endif
+#ifndef TERMIOS
sttylevel++;
if (ioctl(0, TIOCGLTC, &ltcorg) < 0) return;
ltcnew = ltcorg;
@@ -49,6 +77,7 @@
ltcnew.t_dsuspc = -1;
if (ioctl(0, TIOCSLTC, &ltcnew) < 0) return;
sttylevel++;
+#endif /* TERMIOS */
}
void romakana_fixtty()
@@ -60,12 +89,18 @@
case 1:
ioctl(0, TCSETA, &ttyorg);
#else
+# ifdef TERMIOS
+ case 2:
+ case 1:
+ tcsetattr(0, TCSANOW, &ttyorg);
+# else /* TERMIOS */
case 3:
ioctl(0, TIOCSLTC, &ltcorg);
case 2:
ioctl(0, TIOCSETC, &tcorg);
case 1:
ioctl(0, TIOCSETP, &ttyorg);
+# endif /* TERMIOS */
#endif
}
}
@@ -128,7 +163,7 @@
void getttyval()
{
-#ifdef TERMIO
+#if defined(TERMIO) || defined(TERMIOS)
struct winsize ws;
ioctl(0, TIOCGWINSZ, &ws);
--- clients/kenjiro/Makefile.orig Tue Jun 27 01:21:31 1995
+++ clients/kenjiro/Makefile Tue Jan 28 15:39:36 1997
@@ -1,5 +1,6 @@
-CFLAGS = -O # for termcap
+#CFLAGS = -O # for termcap
#CFLAGS = -O -DTERMIO # for termio
+CFLAGS = -O -DTERMIOS # for termios
# if you have no bcopy sigmask sigblock (e.g. on Solaris 2.x)
# define NO_BCOPY NO_SIGMASK NO_SIGBLOCK like
@@ -15,6 +16,11 @@
all: kenjiro kenjiro.l
+install: all
+ gzip -9Nf kenjiro.l
+ install -s kenjiro ${PREFIX}/bin/
+ install kenjiro.l.gz ${PREFIX}/man/manl/
+
kenjiro: $(OBJS)
$(CC) $(CFLAGS) -o kenjiro $(OBJS) $(LIBS)
@@ -30,6 +36,6 @@
ln -s filter.c.euc filter.c
clean:
- rm -f *.o *.out kenjiro.l kenjiro core typescript
+ rm -f *.o *.out kenjiro.l* kenjiro core typescript
# DO NOT DELETE
--- clients/kenjiro/config.h.orig Wed Jul 22 08:53:06 1998
+++ clients/kenjiro/config.h Wed Jul 22 08:53:22 1998
@@ -1,7 +1,7 @@
-#define PAGER "/usr/local/bin/less" /* pager program */
+#define PAGER "/usr/local/bin/jless" /* pager program */
#define HISTSIZE 20 /* history size */
#define KOUHO 10 /* number of kouho (0 < n <= 10) */
-#define SERVER "dserver" /* hostname with server */
+#define SERVER "localhost" /* hostname with server */
#define SERVICE "ndtp" /* service name */
#define KANJICODE JIS /* default kanji code (JIS,EUC,SJIS)*/
/*#define PORT 2010*/ /* port of service */