aboutsummaryrefslogtreecommitdiffstats
path: root/news/husky-msged
diff options
context:
space:
mode:
authorfjoe <fjoe@FreeBSD.org>2003-01-29 03:44:46 +0800
committerfjoe <fjoe@FreeBSD.org>2003-01-29 03:44:46 +0800
commit890b66edb193513ade82a8a866e7ee2d04db1ffc (patch)
tree89216a976f55652c9672cf93a02034d9a45fce16 /news/husky-msged
parent5099e02515b0211b60df8de94e64386ee34bca4e (diff)
downloadfreebsd-ports-gnome-890b66edb193513ade82a8a866e7ee2d04db1ffc.tar.gz
freebsd-ports-gnome-890b66edb193513ade82a8a866e7ee2d04db1ffc.tar.zst
freebsd-ports-gnome-890b66edb193513ade82a8a866e7ee2d04db1ffc.zip
Doh.. Actually use curses instead of home-grown ansi driver.
Diffstat (limited to 'news/husky-msged')
-rw-r--r--news/husky-msged/files/patch-Makefile12
-rw-r--r--news/husky-msged/files/patch-areas.c18
-rw-r--r--news/husky-msged/files/patch-config.c19
-rw-r--r--news/husky-msged/files/patch-curses.c139
-rw-r--r--news/husky-msged/files/patch-list.c10
-rw-r--r--news/husky-msged/files/patch-msged.c20
-rw-r--r--news/husky-msged/files/patch-nshow.c28
-rw-r--r--news/husky-msged/files/patch-nshow.h11
-rw-r--r--news/husky-msged/files/patch-wrap.c11
9 files changed, 147 insertions, 121 deletions
diff --git a/news/husky-msged/files/patch-Makefile b/news/husky-msged/files/patch-Makefile
index 1c6942a0c87a..3e27c2702ca1 100644
--- a/news/husky-msged/files/patch-Makefile
+++ b/news/husky-msged/files/patch-Makefile
@@ -1,7 +1,11 @@
---- Makefile.orig Mon Jan 6 00:37:30 2003
-+++ Makefile Mon Jan 6 00:38:28 2003
-@@ -22,7 +22,8 @@
- CDEFS=-D$(OSTYPE) -DUSE_MSGAPI -DUNAME=\"$(UNAME)\" \
+--- Makefile.orig Mon Nov 26 19:13:21 2001
++++ Makefile Wed Jan 29 00:50:23 2003
+@@ -19,10 +19,11 @@
+ MSGEDCFG=\"$(CFGDIR)/msged.cfg\"
+ endif
+
+-CDEFS=-D$(OSTYPE) -DUSE_MSGAPI -DUNAME=\"$(UNAME)\" \
++CDEFS=-D$(OSTYPE) -DUSE_MSGAPI -DUSE_CURSES -DUNAME=\"$(UNAME)\" \
$(ADDCDEFS) -DREADMAPSDAT=\"$(CFGDIR)/readmaps.dat\" \
-DWRITMAPSDAT=\"$(CFGDIR)/writmaps.dat\" \
- -DDEFAULT_CONFIG_FILE=$(MSGEDCFG)
diff --git a/news/husky-msged/files/patch-areas.c b/news/husky-msged/files/patch-areas.c
deleted file mode 100644
index e38f92ea4914..000000000000
--- a/news/husky-msged/files/patch-areas.c
+++ /dev/null
@@ -1,18 +0,0 @@
---- areas.c.orig Fri Jan 24 15:07:44 2003
-+++ areas.c Fri Jan 24 15:09:38 2003
-@@ -739,7 +739,6 @@
-
- TTBeginOutput();
- WndClearLine(0, cm[MN_NTXT]);
-- WndClearLine(maxy - 1, cm[MN_NTXT]);
- hCurr = WndTop();
- hWnd = WndOpen(0, 1, wid, dep, NBDR | NOSAVE, 0, cm[MN_BTXT]);
- WndBox(0, 0, maxx - 1, maxy - 3, cm[MN_BTXT], SBDR);
-@@ -796,7 +795,6 @@
- dep = maxy - 2;
-
- WndClearLine(0, cm[MN_NTXT]);
-- WndClearLine(maxy - 1, cm[MN_NTXT]);
- hCurr = WndTop();
- hWnd = WndOpen(0, 1, wid, dep, NBDR, 0, cm[MN_BTXT]);
- WndBox(0, 0, maxx - 1, maxy - 3, cm[MN_BTXT], SBDR);
diff --git a/news/husky-msged/files/patch-config.c b/news/husky-msged/files/patch-config.c
deleted file mode 100644
index 1254c73506b4..000000000000
--- a/news/husky-msged/files/patch-config.c
+++ /dev/null
@@ -1,19 +0,0 @@
---- config.c.orig Fri Jan 24 15:26:47 2003
-+++ config.c Fri Jan 24 15:31:42 2003
-@@ -3978,7 +3978,7 @@
- areasort();
- group_build_arealist();
- printf (" \n");
-- InitScreen();
-+ InitScreen(0);
- mygetcwd(tmp, PATHLEN);
- ST->home = xstrdup(tmp);
-
-@@ -4003,6 +4003,5 @@
-
- WndClose(hWnd);
- WndCurr(hCurr);
-- TTScolor(cm[CM_NTXT]);
-- TTClear(hMnScr->x1, hMnScr->y1, hMnScr->x2, hMnScr->y2);
-+ InitScreen(1);
- }
diff --git a/news/husky-msged/files/patch-curses.c b/news/husky-msged/files/patch-curses.c
new file mode 100644
index 000000000000..1908ac667347
--- /dev/null
+++ b/news/husky-msged/files/patch-curses.c
@@ -0,0 +1,139 @@
+--- curses.c.orig Wed Jan 29 00:48:13 2003
++++ curses.c Wed Jan 29 01:37:29 2003
+@@ -22,6 +22,7 @@
+ #include "winsys.h"
+ #include "unused.h"
+ #include "keys.h"
++#include "readtc.h"
+ #include "specch.h"
+
+ int color;
+@@ -40,6 +41,7 @@
+ 0
+ };
+
++static int tcflags = 0; /* what we want to extract from termcap */
+
+ #define EBUFSZ 100
+ static EVT EVent[EBUFSZ]; /* event circular queue */
+@@ -436,6 +438,8 @@
+ Key_A_5, Key_A_6, Key_A_7, Key_A_8, Key_A_9
+ };
+
++void TTSendMsg(int msg, int x, int y, int msgtype);
++
+ unsigned int TTGetKey(void)
+ {
+ int ch;
+@@ -443,6 +447,11 @@
+ ch = getch();
+ switch (ch)
+ {
++ case KEY_RESIZE:
++ term.NRow = getmaxy(stdscr);
++ term.NCol = getmaxx(stdscr);
++ TTSendMsg(1, 0, 0, WND_WM_RESIZE);
++ return -1;
+ case KEY_LEFT:
+ return Key_Lft;
+ case KEY_RIGHT:
+@@ -566,6 +575,7 @@
+ case '0':
+ return Key_F10;
+ }
++ break;
+ }
+
+ if (ch >= 127) /* Treat special characters */
+@@ -611,7 +621,7 @@
+ return ch;
+ }
+
+-void TTSendMsg(unsigned int msg, int x, int y, unsigned int msgtype)
++void TTSendMsg(int msg, int x, int y, int msgtype)
+ {
+ if (((ebufin + 1) % EBUFSZ) != ebufout)
+ {
+@@ -633,6 +643,7 @@
+ meta(stdscr, TRUE);
+ intrflush(stdscr, FALSE);
+ raw();
++ query_termcap(tcflags);
+ return 0;
+ }
+
+@@ -660,30 +671,47 @@
+ return 0;
+ }
+
++static void
++collect_events(void)
++{
++ int ch = TTGetKey();
++ if (ch < 0)
++ return;
++
++ TTSendMsg(ch, 0, 0, WND_WM_CHAR);
++}
++
+ int TTGetMsg(EVT * e)
+ {
+- e->msg = TTGetKey();
+- e->x = 0;
+- e->y = 0;
+- e->msgtype = WND_WM_CHAR;
++ while (ebufin == ebufout)
++ collect_events();
++
++ e->msg = EVent[ebufout].msg;
++ e->x = EVent[ebufout].x;
++ e->y = EVent[ebufout].y;
++ e->msgtype = EVent[ebufout].msgtype;
+ e->id = 0;
++ ebufout = (ebufout + 1) % EBUFSZ;
+ return e->msg;
+ }
+
+ int TTPeekQue(void)
+ {
+- return kbhit();
++ if (kbhit())
++ collect_events();
++ return ebufin != ebufout;
+ }
+
+ void TTClearQue(void)
+ {
+- while (TTPeekQue())
+- TTGetKey();
++ ebufin = ebufout;
+ }
+
+ int TTGetChr(void)
+ {
+- return TTGetKey();
++ EVT e;
++ TTGetMsg(&e);
++ return e.msg;
+ }
+
+ static char ansi2curses[8] = {
+@@ -754,6 +782,18 @@
+ allowed_special_characters =
+ (unsigned char *) malloc(l = (strlen(value) + 1));
+ memcpy(allowed_special_characters, value, l);
++ }
++ else if (!strcmp(keyword,"pseudographics"))
++ {
++ if (atoi(value))
++ {
++ tcflags |= QUERY_ALTCHARSET;
++ }
++ else
++ {
++ tcflags &= ~QUERY_ALTCHARSET;
++ }
++ query_termcap(tcflags);
+ }
+ else
+ {
diff --git a/news/husky-msged/files/patch-list.c b/news/husky-msged/files/patch-list.c
deleted file mode 100644
index 05a427ffd50b..000000000000
--- a/news/husky-msged/files/patch-list.c
+++ /dev/null
@@ -1,10 +0,0 @@
---- list.c.orig Fri Jan 24 15:01:23 2003
-+++ list.c Fri Jan 24 15:04:28 2003
-@@ -639,7 +639,6 @@
-
- TTBeginOutput();
- WndClearLine(0, cm[MN_NTXT]);
-- WndClearLine(maxy - 1, cm[MN_NTXT]);
- WndWriteStr(2, 0, cm[LS_TTXT], CurArea.description);
- hCurr = WndTop();
- hWnd = WndOpen(0, 1, maxx - 1, maxy - 2, NBDR | NOSAVE, 0, cm[LS_NTXT]);
diff --git a/news/husky-msged/files/patch-msged.c b/news/husky-msged/files/patch-msged.c
deleted file mode 100644
index a0406a08b797..000000000000
--- a/news/husky-msged/files/patch-msged.c
+++ /dev/null
@@ -1,20 +0,0 @@
---- ./msged.c.orig Tue Nov 27 01:13:44 2001
-+++ ./msged.c Fri Jan 24 15:35:36 2003
-@@ -1863,7 +1863,7 @@
- fputs("\nEnter the command \"EXIT\" to return to " PROG ".\n", stderr);
- shell_to_dos();
- cursor(0);
-- InitScreen();
-+ InitScreen(1);
- BuildHotSpots();
- DrawHeader();
- ShowNewArea();
-@@ -2017,7 +2017,7 @@
- WndClose(hMnScr);
- KillHotSpots();
- TTclose();
-- InitScreen();
-+ InitScreen(1);
- adapt_margins();
- BuildHotSpots();
- ShowNewArea();
diff --git a/news/husky-msged/files/patch-nshow.c b/news/husky-msged/files/patch-nshow.c
deleted file mode 100644
index dcaf4788bc92..000000000000
--- a/news/husky-msged/files/patch-nshow.c
+++ /dev/null
@@ -1,28 +0,0 @@
---- ./nshow.c.orig Thu Jun 21 03:21:35 2001
-+++ ./nshow.c Fri Jan 24 15:35:24 2003
-@@ -36,7 +36,7 @@
- int groupmove = 0;
- HotGroup Hot;
-
--int InitScreen(void)
-+int InitScreen(int draw_statbar)
- {
- if (SW->usemouse == NO)
- {
-@@ -56,6 +56,8 @@
- else
- maxy = term.NRow;
- hMnScr = WndOpen(0, 0, maxx - 1, maxy - 1, NBDR, 0, cm[CM_NTXT]);
-+ if (draw_statbar && SW->statbar)
-+ WndClearLine(maxy - 1, cm[CM_ITXT]);
- SW->redraw = TRUE;
- return 0;
- }
-@@ -468,7 +470,6 @@
- if (l - 2 < maxx - 1)
- WndPutsn(l - 2, maxy - 1, (maxx - 1) - (l - 2),
- cm[CM_ITXT] | F_ALTERNATE, line + (l - 2));
-- WndClear(maxx - 1, maxy - 1, maxx - 1, maxy - 1, cm[CM_ITXT]);
- }
- if (!m)
- {
diff --git a/news/husky-msged/files/patch-nshow.h b/news/husky-msged/files/patch-nshow.h
deleted file mode 100644
index 2954d5d220dd..000000000000
--- a/news/husky-msged/files/patch-nshow.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./nshow.h.orig Fri Jan 24 15:28:13 2003
-+++ ./nshow.h Fri Jan 24 15:28:35 2003
-@@ -11,7 +11,7 @@
-
- extern int groupmove;
-
--int InitScreen(void);
-+int InitScreen(int draw_statbar);
- void AddHG(HotGroup * h, int num, int id, int x1, int y1, int x2, int y2);
- void BuildHotSpots(void);
- void KillHotSpots(void);
diff --git a/news/husky-msged/files/patch-wrap.c b/news/husky-msged/files/patch-wrap.c
deleted file mode 100644
index b2305c7df4cc..000000000000
--- a/news/husky-msged/files/patch-wrap.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./wrap.c.orig Fri Jan 24 15:26:18 2003
-+++ ./wrap.c Fri Jan 24 15:26:35 2003
-@@ -2357,7 +2357,7 @@
- /* Redraw the screen. */
-
- cursor(0);
-- InitScreen();
-+ InitScreen(1);
- BuildHotSpots();
- DrawHeader();
- ShowNewArea();