pkgsrc/mail/ja-mh-curses/patches/patch-aa100644 000000 000000 00000000455 07475672040 0014306$NetBSD: patch-aa,v 1.1 2002/05/31 13:01:20 seb Exp $ --- ./sbr/m_getdefs.c.orig Wed Dec 2 02:05:00 1998 +++ ./sbr/m_getdefs.c Mon Nov 1 19:13:29 1999 @@ -7,4 +7,7 @@ #include #include +#ifdef UNISTD +#include +#endif #include #include pkgsrc/mail/ja-mh-curses/patches/patch-ab100644 000000 000000 00000000430 07475672040 0014300$NetBSD: patch-ab,v 1.1 2002/05/31 13:01:20 seb Exp $ --- ./sbr/refile.c.orig Wed Dec 1 13:01:26 1993 +++ ./sbr/refile.c Mon Nov 1 19:13:30 1999 @@ -6,4 +6,7 @@ #include "../h/mh.h" #include +#ifdef UNISTD +#include +#endif int refile (arg, file) pkgsrc/mail/ja-mh-curses/patches/patch-ac100644 000000 000000 00000000376 07475672040 0014312$NetBSD: patch-ac,v 1.1 2002/05/31 13:01:20 seb Exp $ --- ./sbr/remdir.c.orig Fri Apr 24 06:02:00 1998 +++ ./sbr/remdir.c Mon Nov 1 19:13:30 1999 @@ -6,4 +6,7 @@ #include "../h/mh.h" #include +#ifdef UNISTD +#include +#endif pkgsrc/mail/ja-mh-curses/patches/patch-ad100644 000000 000000 00000000402 07475672040 0014301$NetBSD: patch-ad,v 1.1 2002/05/31 13:01:20 seb Exp $ --- ./sbr/showfile.c.orig Wed Dec 1 13:01:26 1993 +++ ./sbr/showfile.c Mon Nov 1 19:13:30 1999 @@ -3,4 +3,7 @@ #include "../h/mh.h" #include +#ifdef UNISTD +#include +#endif pkgsrc/mail/ja-mh-curses/patches/patch-ae100644 000000 000000 00000000364 07475672040 0014311$NetBSD: patch-ae,v 1.1 2002/05/31 13:01:20 seb Exp $ --- ./uip/inc.c.orig Fri Sep 10 02:10:53 1999 +++ ./uip/inc.c Mon Nov 1 19:13:30 1999 @@ -38,4 +38,7 @@ #include #endif +#ifdef UNISTD +#include +#endif /* */ pkgsrc/mail/ja-mh-curses/patches/patch-af100644 000000 000000 00000000405 07475672040 0014306$NetBSD: patch-af,v 1.1 2002/05/31 13:01:20 seb Exp $ --- ./uip/mhlsbr.c.orig Tue Feb 9 20:30:00 1999 +++ ./uip/mhlsbr.c Mon Nov 1 19:13:30 1999 @@ -21,4 +21,7 @@ #include #include +#ifdef UNISTD +#include +#endif pkgsrc/mail/ja-mh-curses/patches/patch-ag100644 000000 000000 00000000364 07475672040 0014313$NetBSD: patch-ag,v 1.1 2002/05/31 13:01:20 seb Exp $ --- ./uip/mhn.c.orig Tue Feb 9 20:30:00 1999 +++ ./uip/mhn.c Mon Nov 1 19:13:30 1999 @@ -19,4 +19,7 @@ #include #endif +#ifdef UNISTD +#include +#endif /* */ pkgsrc/mail/ja-mh-curses/patches/patch-ah100644 000000 000000 00000000372 07475672040 0014313$NetBSD: patch-ah,v 1.1 2002/05/31 13:01:20 seb Exp $ --- ./uip/rcvtty.c.orig Tue Feb 9 20:30:00 1999 +++ ./uip/rcvtty.c Mon Nov 1 19:13:30 1999 @@ -30,4 +30,7 @@ #include #endif +#ifdef UNISTD +#include +#endif /* */ pkgsrc/mail/ja-mh-curses/patches/patch-ai100644 000000 000000 00000000441 07475672040 0014311$NetBSD: patch-ai,v 1.1 2002/05/31 13:01:20 seb Exp $ --- ./uip/replsbr.c.orig Fri Sep 10 13:51:41 1999 +++ ./uip/replsbr.c Mon Nov 1 19:13:30 1999 @@ -11,4 +11,7 @@ #include /* off_t */ #include /* L_SET */ +#ifdef UNISTD +#include +#endif pkgsrc/mail/ja-mh-curses/patches/patch-aj100644 000000 000000 00000000452 07475672040 0014314$NetBSD: patch-aj,v 1.1 2002/05/31 13:01:20 seb Exp $ --- ./uip/sendsbr.c.orig Tue Feb 9 20:30:00 1999 +++ ./uip/sendsbr.c Mon Nov 1 19:13:30 1999 @@ -10,4 +10,7 @@ #include #include +#ifdef UNISTD +#include +#endif static alert(), anno(), annoaux(); pkgsrc/mail/ja-mh-curses/patches/patch-ak100644 000000 000000 00000000431 07475672040 0014312$NetBSD: patch-ak,v 1.1 2002/05/31 13:01:20 seb Exp $ --- ./uip/spost.c.orig Wed Dec 2 02:05:00 1998 +++ ./uip/spost.c Mon Nov 1 19:13:30 1999 @@ -23,4 +23,7 @@ #include #endif +#ifdef UNISTD +#include +#endif extern char *getfullname (), *getusr (); pkgsrc/mail/ja-mh-curses/patches/patch-al100644 000000 000000 00000033500 10131713331 0014274$NetBSD$ --- uip/vmh.c.orig 1999-02-09 20:30:00.000000000 +0900 +++ uip/vmh.c @@ -23,6 +23,9 @@ static char ident[] = "@(#)$Id: vmh.c,v If curses ever gets fixed, then XYZ code can be removed */ +#ifdef UNISTD +#include +#endif #ifdef __osf__ #define _BSD #endif @@ -85,9 +88,15 @@ struct iovec { #define _maxy maxy #define _curx curx /* curses.h */ #define _cury cury +#ifndef __NetBSD__ void __cputchar __P((int)); +#endif #undef _putchar +#ifdef BSD44 +#define _putchar __cputchar +#else #define _putchar (int (*)()) __cputchar +#endif #include /* sgttyb */ #endif /* !__NCURSES_H && (BSD44 || linux) */ @@ -199,6 +208,19 @@ static struct ltchars ltc; #endif #endif /* TIOCGLTC */ +#ifndef A_CHARTEXT +#define A_CHARTEXT 0xFF +#endif + +#ifdef __NetBSD__ +static char *tc_CE, *tc_CM, *tc_SO, *tc_SE, *tc_US, *tc_UE; +#define CE tc_CE +#define CM tc_CM +#define SO tc_SO +#define SE tc_SE +#define US tc_US +#define UE tc_UE +#endif #if !defined(SYS5) && !defined(BSD44) && !defined(TERMINFO) int _putchar (); @@ -325,7 +347,7 @@ static vmh () { wclrtoeol (Command); wrefresh (Command); - switch (WINgetstr (Command, buffer)) { + switch (WINgetstr (Command, (unsigned char *)buffer, sizeof(buffer))) { case NOTOK: break; @@ -411,7 +433,11 @@ static int pINI () { bp += strlen (bp); for (w = windows; *w; w++) { #ifndef __NCURSES_H +#ifndef __NetBSD__ (void) sprintf (bp, " %d", (*w) -> _maxy); +#else /* __NetBSD__ */ + (void) sprintf (bp, " %d", getmaxy (*w)); +#endif /* __NetBSD__ */ #else /* __NCURSES_H */ (void) sprintf (bp, " %d", (*w) -> _maxy + 1); #endif /* __NCURSES_H */ @@ -643,7 +669,11 @@ register WINDOW *w; if ((c = *bp++) == '\n') linsert (w); #ifndef __NCURSES_H +#ifndef __NetBSD__ else if (w -> _curx == w -> _maxx - 2 && w == Display) { +#else /* __NetBSD__ */ + else if (getcurx (w) == getmaxx (w) - 2 && w == Display) { +#endif /* __NetBSD__ */ #else /* __NCURSES_H */ else if (w -> _curx == w -> _maxx - 1 && w == Display) { #endif /* __NCURSES_H */ @@ -655,10 +685,21 @@ register WINDOW *w; if (c > 0x20 && c < 0x7f) { #endif /* JAPAN */ int i; - for (i = strlen(ltail->l_buf); i < w->_curx; i++) + for (i = strlen(ltail->l_buf); +#ifndef __NetBSD__ + i < w->_curx; +#else /* __NetBSD__ */ + i < getcurx (w); +#endif /* __NetBSD__ */ + i++) ltail -> l_buf[i] = ' '; +#ifndef __NetBSD__ ltail -> l_buf[w -> _curx] = c; ltail -> l_buf[w -> _curx + 1] = '\0'; +#else /* __NetBSD__ */ + ltail -> l_buf[getcurx (w)] = c; + ltail -> l_buf[getcurx (w) + 1] = '\0'; +#endif /* __NetBSD__ */ } else { #ifdef JAPAN kanji1st = 0; @@ -670,7 +711,11 @@ register WINDOW *w; } if (WINputc (w, c) == ERR #ifndef __NCURSES_H +#ifndef __NetBSD__ || (w -> _curx >= w -> _maxx - 1 && w == Display +#else /* __NetBSD__ */ + || (getcurx (w) >= getmaxx (w) - 1 && w == Display +#endif /* __NetBSD__ */ && WINputc (w, '\n') == ERR)) #else /* __NCURSES_H */ || (w -> _curx >= w -> _maxx && w == Display @@ -767,6 +812,9 @@ static int WINinit (nprog) { sideground (); #ifndef TERMINFO +#ifdef __NetBSD__ + CM = getcap ("cm"); +#endif if (CM == NULL) #else /* TERMINFO */ if (cursor_address == NULL) /* assume mtr wanted "cm", not "CM" */ @@ -781,6 +829,15 @@ static int WINinit (nprog) { #ifndef TERMINFO if (tgetflag ("xt") || tgetnum ("sg") > 0) SO = SE = US = UE = NULL; +#ifdef __NetBSD__ + else { + SO = getcap ("so"); + SE = getcap ("se"); + US = getcap ("us"); + UE = getcap ("ue"); + } + CE = getcap ("ce"); +#endif #else /* TERMINFO */ /* * If termcap mapped directly to terminfo, we'd use the following: @@ -808,7 +865,11 @@ static int WINinit (nprog) { windows[numwins] = NULL; #ifndef __NCURSES_H +#ifndef __NetBSD__ largemove = Display -> _maxy / 2 + 2; +#else /* __NetBSD__ */ + largemove = getmaxy (Display) / 2 + 2; +#endif /* __NetBSD__ */ #else /* __NCURSES_H */ largemove = (Display -> _maxy + 1) / 2 + 2; #endif /* __NCURSES_H */ @@ -817,35 +878,72 @@ static int WINinit (nprog) { /* */ -static int WINgetstr (w, buffer) +static int WINgetstr (w, buffer, size) register WINDOW *w; +#ifdef JAPAN +unsigned char *buffer; +#else char *buffer; +#endif +size_t size; { register int c; +#ifdef JAPAN + int wlim; + register int pcs; + register unsigned char *bp; +#else register char *bp; +#endif +#ifdef JAPAN + pcs = 0; +#endif bp = buffer; - *bp = 0; + *bp = '\0'; + +#ifndef __NCURSES_H +#ifndef __NetBSD__ + wlim = w -> _maxx - (sizeof(myprompt) - 3) - strlen(invo_name) - 3; +#else /* __NetBSD__ */ + wlim = getmaxx (w) - (sizeof(myprompt) - 3) - strlen(invo_name) - 3; +#endif /* __NetBSD__ */ +#else /* __NCURSES_H */ + wlim = getmaxx (w) - (sizeof(myprompt) - 3) - strlen(invo_name) - 2; +#endif /* __NCURSES_H */ + if (size > wlim) + size = wlim; + else + --size; for (;;) { + c = wgetch (w); + if (c == ERR) + adios (NULLCP, "wgetch lost"); + c &= A_CHARTEXT; + if (bp - buffer >= size && + !(c == intrc || c == EOFC || c == ERASE || c == KILL || + c == WERASC || c == '\r' || c == '\n')) + continue; #ifdef JAPAN - switch (c = wgetch (w) & 0xff) { + switch (c) { #else /* JAPAN */ - switch (c = toascii (wgetch (w))) { + switch (c = toascii (c)) { #endif /* JAPAN */ - case ERR: - adios (NULLCP, "wgetch lost"); - case '\f': wrefresh (curscr); break; case '\r': case '\n': - *bp = 0; + *bp = '\0'; if (bp > buffer) { leaveok (curscr, FALSE); +#ifndef __NetBSD__ wmove (w, 0, w -> _curx - (bp - buffer)); +#else /* __NetBSD__ */ + wmove (w, 0, getcurx (w) - (bp - buffer)); +#endif /* __NetBSD__ */ wrefresh (w); leaveok (curscr, TRUE); } @@ -869,14 +967,53 @@ char *buffer; if (c == ERASE) { if (bp <= buffer) continue; +#ifndef __NetBSD__ bp--, w -> _curx--; +#else /* __NetBSD__ */ + bp--; + wmove (w, getcury (w), getcurx (w) - 1); +#endif /* __NetBSD__ */ +#ifdef JAPAN + if (bp > buffer) { + if ((*bp >= 0xa1 && *bp <= 0xfe) && + (*(bp-1) >= 0xa1 && *(bp-1) <= 0xfe)) { +#ifndef __NetBSD__ + bp--, w -> _curx--; +#else /* __NetBSD__ */ + bp--; + wmove (w, getcury (w), getcurx (w) - 1); +#endif /* __NetBSD__ */ + if (bp > buffer && *(bp-1) == 0x8f) { +#ifndef __NetBSD__ + bp--, w -> _curx--; +#else /* __NetBSD__ */ + bp--; + wmove (w, getcury (w), getcurx (w) - 1); +#endif /* __NetBSD__ */ + } + } else if ((*bp >= 0xa1 && *bp <= 0xdf) && + *(bp-1) == 0x8e) { +#ifndef __NetBSD__ + bp--, w -> _curx--; +#else /* __NetBSD__ */ + bp--; + wmove (w, getcury (w), getcurx (w) - 1); +#endif /* __NetBSD__ */ + } + } +#endif /* JAPAN */ + pcs = 0; wclrtoeol (w); break; } if (c == KILL) { if (bp <= buffer) continue; +#ifndef __NetBSD__ w -> _curx -= bp - buffer; +#else /* __NetBSD__ */ + wmove (w, getcury (w), bp - buffer); +#endif /* __NetBSD__ */ bp = buffer; wclrtoeol (w); break; @@ -885,26 +1022,80 @@ char *buffer; if (bp <= buffer) continue; do { +#ifndef __NetBSD__ bp--, w -> _curx--; +#else /* __NetBSD__ */ + bp--; + wmove (w, getcury (w), getcurx (w) - 1); +#endif /* __NetBSD__ */ } while (isspace (*bp) && bp > buffer); if (bp > buffer) { do { +#ifndef __NetBSD__ bp--, w -> _curx--; +#else /* __NetBSD__ */ + bp--; + wmove (w, getcury (w), getcurx (w) - 1); +#endif /* __NetBSD__ */ } while (!isspace (*bp) && bp > buffer); if (isspace (*bp)) +#ifndef __NetBSD__ bp++, w -> _curx++; +#else /* __NetBSD__ */ + { + bp++; + wmove (w, getcury (w), getcurx (w) + 1); + } +#endif /* __NetBSD__ */ } wclrtoeol (w); break; } #ifdef JAPAN - if ((c >= ' ' && c < '\177') || (c >= 0xa1 && c <= 0xfe)) -#else /* JAPAN */ - if (c >= ' ' && c < '\177') + switch (pcs) { + case 0: + default: #endif /* JAPAN */ + if (c >= ' ' && c < '\177') (void) waddch (w, *bp++ = c); +#ifdef JAPAN + else if (c >= 0xa1 && c <= 0xfe && + bp - buffer + 2 < size) { + (void) waddch (w, *bp++ = c); + pcs = 011; + } else if (c == 0x8e && + bp - buffer + 2 < size) { + (void) waddch (w, *bp++ = c); + pcs = 021; + } else if (c == 0x8f && + bp - buffer + 3 < size) { + (void) waddch (w, *bp++ = c); + pcs = 031; + } else + pcs = 0; + break; + case 011: /* code set 1, 2nd character */ + case 032: /* code set 3, 3rd character */ + if (c >= 0xa1 && c <= 0xfe) + (void) waddch (w, *bp++ = c); + pcs = 0; + break; + case 021: /* code set 2, 2nd character */ + if (c >= 0xa1 && c <= 0xdf) + (void) waddch (w, *bp++ = c); + pcs = 0; + break; + case 031: /* code set 3, 2nd character */ + if (c >= 0xa1 && c <= 0xfe && + bp - buffer + 1 < size) { + (void) waddch (w, *bp++ = c); + pcs = 032; + } else + pcs = 0; + } +#endif /* JAPAN */ break; } @@ -989,12 +1180,19 @@ int fin; once_only: ; #endif /* notdef */ werase (w); +#ifdef JAPAN + wrefresh (w); +#endif wmove (w, 0, 0); if (ltop == NULL) if (fin) { #ifndef __NCURSES_H +#ifndef __NetBSD__ (void) lgo (ltail -> l_no - w -> _maxy + 1); +#else /* __NetBSD__ */ + (void) lgo (ltail -> l_no - getmaxy (w) + 1); +#endif /* __NetBSD__ */ #else /* __NCURSES_H */ (void) lgo (ltail -> l_no - w -> _maxy + 2); #endif /* __NCURSES_H */ @@ -1013,8 +1211,13 @@ once_only: ; if (fin) { #ifdef notdef #ifndef __NCURSES_H +#ifndef __NetBSD__ if (nlatch && (ltail -> l_no >= w -> _maxy)) { (void) lgo (ltail -> l_no - w -> _maxy + 1); +#else /* __NetBSD__ */ + if (nlatch && (ltail -> l_no >= getmaxy (w))) { + (void) lgo (ltail -> l_no - getmaxy (w) + 1); +#endif /* __NetBSD__ */ #else /* __NCURSES_H */ if (nlatch && (ltail -> l_no > w -> _maxy)) { (void) lgo (ltail -> l_no - w -> _maxy + 2); @@ -1108,7 +1311,11 @@ again: ; case 'G': #ifndef __NCURSES_H +#ifndef __NetBSD__ if (lgo (n ? n : ltail -> l_no - w -> _maxy + 1)) +#else /* __NetBSD__ */ + if (lgo (n ? n : ltail -> l_no - getmaxy (w) + 1)) +#endif /* __NetBSD__ */ #else /* __NCURSES_H */ if (lgo (n ? n : ltail -> l_no - w -> _maxy + 2)) #endif /* __NCURSES_H */ @@ -1185,7 +1392,8 @@ register char c; default: if (!isascii (c) #ifdef JAPAN - && !(c >= 0xa1 && c <= 0xfe) /* pass EUC */ + && !(c >= 0xa1 && c <= 0xfe || + c == 0x8e || c == 0x8f) /* pass EUC */ #endif /* JAPAN */ ) { if (WINputc (w, 'M') == ERR || WINputc (w, '-') == ERR) @@ -1209,8 +1417,13 @@ register char c; return waddch (w, c); #ifndef __NCURSES_H +#ifndef __NetBSD__ if ((x = w -> _curx) < 0 || x >= w -> _maxx || (y = w -> _cury) < 0 || y >= w -> _maxy) +#else /* __NetBSD__ */ + if ((x = getcurx (w)) < 0 || x >= getmaxx (w) + || (y = getcury (w)) < 0 || y >= getmaxy (w)) +#endif /* __NetBSD__ */ #else /* __NCURSES_H */ if ((x = w -> _curx) < 0 || x > w -> _maxx || (y = w -> _cury) < 0 || y > w -> _maxy) @@ -1226,7 +1439,11 @@ register char c; case '\n': #ifndef __NCURSES_H +#ifndef __NetBSD__ if (++y < w -> _maxy) +#else /* __NetBSD__ */ + if (++y < getmaxy (w)) +#endif /* __NetBSD__ */ #else /* __NCURSES_H */ if (++y <= w -> _maxy) #endif /* __NCURSES_H */ @@ -1237,7 +1454,11 @@ register char c; default: #ifndef __NCURSES_H +#ifndef __NetBSD__ if (++x < w -> _maxx) +#else /* __NetBSD__ */ + if (++x < getmaxx (w)) +#endif /* __NetBSD__ */ #else /* __NCURSES_H */ if (++x <= w -> _maxx) #endif /* __NCURSES_H */ @@ -1280,8 +1501,16 @@ WINDOW *w; #ifndef __NCURSES_H { int i; +#ifdef __NetBSD__ + int origx, origy, maxx; + chtype ch; + maxx = getmaxx (w); + if ((lp -> l_buf = (char *) malloc(maxx + 1)) == NULL) +#else if ((lp -> l_buf = (char *) malloc(w -> _maxx + 1)) == NULL) +#endif adios (NULLCP, "unable to allocate storage"); +#ifndef __NetBSD__ for (i = 0; i < w -> _maxx; i++) #if !defined(BSD44) && !defined(__386BSD__) && !defined(linux) lp -> l_buf[i] = (char) w -> _y[w -> _cury][i]; @@ -1289,6 +1518,16 @@ WINDOW *w; lp -> l_buf[i] = w -> lines[w -> _cury] -> line[i].ch; #endif lp -> l_buf[w -> _maxx] = '\0'; +#else /* __NetBSD__ */ + origx = getcurx (w); + origy = getcury (w); + for (i = 0; i < maxx; i++) { + wmove (w, origy, i); + lp -> l_buf[i] = winch (w) & A_CHARTEXT; + } + wmove (w, origy, origx); + lp -> l_buf[maxx] = '\0'; +#endif /* __NetBSD__ */ } #else /* __NCURSES_H */ { @@ -1301,8 +1540,12 @@ WINDOW *w; } #endif /* __NCURSES_H */ for (cp = lp -> l_buf + strlen (lp -> l_buf) - 1; cp >= lp -> l_buf; cp--) +#ifndef JAPAN if (isspace (*cp)) - *cp = 0; +#else /* JAPAN */ + if (isspace ((unsigned char)(*cp))) +#endif /* JAPAN */ + *cp = '\0'; else break; @@ -1467,7 +1710,9 @@ static TTYoff () { INTR = intrc; #ifndef SYS5 +#ifndef __NetBSD__ (void) ioctl (fileno (stdin), TIOCSETC, (char *) &tc); +#endif #else /* SYS5 */ #if defined(TCGETATTR) && !defined(TCSETA) && defined(TCSANOW) (void) tcsetattr (fileno (stdin), TCSANOW, &sg); @@ -1479,6 +1724,9 @@ static TTYoff () { leaveok (curscr, TRUE); mvcur (0, COLS - 1, LINES - 1, 0); endwin (); +#ifdef __NetBSD__ + (void) ioctl (fileno (stdin), TIOCSETC, (char *) &tc); +#endif if (tty_ready == DONE) { #ifndef TERMINFO if (CE) @@ -1509,7 +1757,7 @@ static foreground () { tpgrp; TYPESIG (*tstat) (); - if ((pgrp = getpgrp (0)) == NOTOK) + if ((pgrp = getpgrp (/*0*/)) == NOTOK) adios ("process group", "unable to determine"); for (;;) { if (ioctl (fileno (stdin), TIOCGPGRP, (char *) &tpgrp) == NOTOK) pkgsrc/mail/ja-mh-curses/patches/patch-am100644 000000 000000 00000000374 07475672040 0014322$NetBSD: patch-am,v 1.1 2002/05/31 13:01:20 seb Exp $ --- ./uip/vmhtest.c.orig Fri Apr 24 06:02:00 1998 +++ ./uip/vmhtest.c Mon Nov 1 19:13:30 1999 @@ -11,4 +11,7 @@ #include #endif +#ifdef UNISTD +#include +#endif /* */ pkgsrc/mail/ja-mh-curses/patches/patch-an100644 000000 000000 00000000427 07475672040 0014322$NetBSD: patch-an,v 1.1 2002/05/31 13:01:20 seb Exp $ --- ./uip/whatnowsbr.c.orig Tue Feb 9 20:30:00 1999 +++ ./uip/whatnowsbr.c Mon Nov 1 19:13:30 1999 @@ -9,4 +9,7 @@ #include #include +#ifdef UNISTD +#include +#endif #ifndef MIME pkgsrc/mail/ja-mh-curses/patches/patch-ao100644 000000 000000 00000000355 07475672040 0014323$NetBSD: patch-ao,v 1.1 2002/05/31 13:01:20 seb Exp $ --- ./uip/wmh.c.orig Fri Apr 24 06:02:00 1998 +++ ./uip/wmh.c Mon Nov 1 19:13:30 1999 @@ -29,4 +29,7 @@ #include #endif +#ifdef UNISTD +#include +#endif pkgsrc/mail/ja-mh-curses/patches/patch-ap100644 000000 000000 00000000461 07475672040 0014322$NetBSD: patch-ap,v 1.1 2002/05/31 13:01:20 seb Exp $ --- ./configure.in.orig Fri Oct 1 23:01:15 1999 +++ ./configure.in Mon Nov 1 19:08:09 1999 @@ -354,4 +354,8 @@ fi fi + if test "$OBJECT_FMT" = ELF + then + sharedlib=gnuelf + fi slflags="-fpic" slibdir=$libdir pkgsrc/mail/ja-mh-curses/patches/patch-aq100644 000000 000000 00000000466 07475672040 0014330$NetBSD: patch-aq,v 1.1 2002/05/31 13:01:20 seb Exp $ --- ./configure.orig Fri Oct 1 23:01:45 1999 +++ ./configure Mon Nov 1 19:08:09 1999 @@ -1386,4 +1386,8 @@ fi fi + if test "$OBJECT_FMT" = ELF + then + sharedlib=gnuelf + fi slflags="-fpic" slibdir=$libdir pkgsrc/mail/ja-mh-curses/patches/patch-ar100644 000000 000000 00000000766 07475672040 0014334$NetBSD: patch-ar,v 1.1 2002/05/31 13:01:20 seb Exp $ --- ./zotnet/mts/client.c.orig Fri Sep 10 14:47:56 1999 +++ ./zotnet/mts/client.c Tue Feb 29 22:38:35 2000 @@ -360,7 +360,8 @@ /* taken from ISODE's compat/internet.c */ #if !defined(SOLARIS) && !defined(linux) && !defined(__bsdi__) && \ - !defined(OSF1) && !defined(__osf__) && !defined(__FreeBSD__) + !defined(OSF1) && !defined(__osf__) && !defined(__FreeBSD__) && \ + !defined(__NetBSD__) #ifndef DG #ifndef __alpha u_long inet_addr (); pkgsrc/mail/ja-mh-curses/patches/patch-as100644 000000 000000 00000002204 10122736373 0014313$NetBSD: patch-as,v 1.1 2004/09/18 04:43:39 taca Exp $ --- sbr/concat.c.orig 1993-12-01 13:01:21.000000000 +0900 +++ sbr/concat.c @@ -2,13 +2,12 @@ #include "../h/mh.h" #include -#include +#include /* VARARGS */ -char *concat (va_alist) -va_dcl +char *concat (char *first, ...) { register char *cp, *dp, @@ -17,19 +16,26 @@ va_dcl register va_list list; len = 1; - va_start (list); - while (cp = va_arg (list, char *)) - len += strlen (cp); - va_end (list); + if (first) { + len += strlen(first); + va_start (list, first); + while (cp = va_arg (list, char *)) + len += strlen (cp); + va_end (list); + } dp = sp = malloc (len); if (dp == NULL) adios (NULLCP, "unable to allocate string storage"); - va_start (list); - while (cp = va_arg (list, char *)) - sp = copy (cp, sp); - va_end (list); + *sp = '\0'; + if (first) { + sp = copy (first, sp); + va_start (list, first); + while (cp = va_arg (list, char *)) + sp = copy (cp, sp); + va_end (list); + } return dp; } pkgsrc/mail/ja-mh-curses/patches/patch-at100644 000000 000000 00000000433 10131704025 0014303$NetBSD$ --- h/mh.h.orig 1998-12-02 02:05:00.000000000 +0900 +++ h/mh.h @@ -253,7 +253,7 @@ void ambigsw (); int atooi (); char **brkstring (); void closefds (); -char *concat (); +char *concat (char *first, ...); char *copy (); char **copyip (); void cpydata (); pkgsrc/mail/ja-mh-curses/Makefile100644 000000 000000 00000001650 10122737406 0012703# $NetBSD: Makefile,v 1.4 2004/09/18 04:52:22 taca Exp $ # FreeBSD Id: Makefile,v 1.13 1999/02/10 18:13:21 motoyuki Exp $ DISTNAME= mh-6.8.4-JP-3.03 PKGNAME= ja-mh6-3.03 CATEGORIES= japanese mail MASTER_SITES= ftp://ports.jp.freebsd.org/pub/FreeBSD-jp/ports-jp/LOCAL_PORTS/ \ ftp://komadori.planet.sci.kobe-u.ac.jp/pub/MH/ \ ftp://ftp.chem.eng.himeji-tech.ac.jp/pub/net/mh/ MAINTAINER= tech-pkg-ja@jp.NetBSD.org COMMENT= Rand MH mail handling system + Japanese patches DEPENDS= ja-less>=332:../../misc/ja-less CONFLICTS= nmh-[0-9]* ja-mh-*_JP_* .include "../../mk/bsd.prefs.mk" MANCOMPRESSED= yes GNU_CONFIGURE= yes CONFIGURE_ENV+= OBJECT_FMT=${OBJECT_FMT} CONFIGURE_ARGS= --enable-batchmode \ --libexecdir=${PREFIX}/libexec/mh \ --enable-jmandir=${PREFIX}/man/ja_JP.EUC \ --enable-apop=${PREFIX}/etc/pop.auth --enable-rpop post-install: ${LN} -sf libmh.so.3.2 ${PREFIX}/lib/libmh.so.3 .include "../../mk/bsd.pkg.mk" pkgsrc/mail/ja-mh-curses/DESCR100644 000000 000000 00000000325 07475672040 0012035This is the MH mail user agent (reader/sender) with Japanese patches, a command line based mail reader that is powerful and extensible. MH is an excellent choice for people who receive and process a LOT of mail. pkgsrc/mail/ja-mh-curses/distinfo100644 000000 000000 00000002515 10131713461 0013001$NetBSD: distinfo,v 1.2 2004/09/18 04:43:39 taca Exp $ SHA1 (mh-6.8.4-JP-3.03.tar.gz) = e533b22c23e79e8cba50ed2fe391f0f3b3ca332a Size (mh-6.8.4-JP-3.03.tar.gz) = 1567712 bytes SHA1 (patch-aa) = d38c2340f53ddfafb63857a7c6cbf95f8ba91cbf SHA1 (patch-ab) = 6ba17b9bb6844bbf5fc3d4edf268b7d671427438 SHA1 (patch-ac) = aea3d9bdfb5faa42ec55af92c5b1d5cd74f3d42d SHA1 (patch-ad) = 5d1e3f54abbb114bf5d3c367de1b186b8dd39317 SHA1 (patch-ae) = 183afc6c35c04912986bb3826d9d443b0aaacb7f SHA1 (patch-af) = 0f9dd68449f56039555253a8e1ba9a2923c5ef4e SHA1 (patch-ag) = 5e68e06be4ff523335900b2dd01defbe84cd725c SHA1 (patch-ah) = 3cabf8ae640fbce889dda69521453dc0a9e621f5 SHA1 (patch-ai) = c9da909f7783f6600a21ac6f035b8df732275539 SHA1 (patch-aj) = 418b6e60541558f2702393b89df76ad9edf1774f SHA1 (patch-ak) = 7f8442f265111a4b87393b3a64fd8692c23b379d SHA1 (patch-al) = 68170a2bb860a86b8e1eb24ad486014dec52d540 SHA1 (patch-am) = 3cea349883c6e73d95844a44586d32c0046eb94c SHA1 (patch-an) = c879444e422531fc2c3d2a6bd4c52c9680239a5f SHA1 (patch-ao) = 4ad1798a6d4cdc2c977dd5186e9a111a4585df94 SHA1 (patch-ap) = bde44e5f75ee1e124b5fff9679823e1ee2c313f0 SHA1 (patch-aq) = e9399fe4a26005be428960666ac7ac437789aaa5 SHA1 (patch-ar) = 3f9a0e510c9649ac07f07ef86f4a139bba1a5055 SHA1 (patch-as) = 287118b416c42d4ec340c4548242d4e15afa6748 SHA1 (patch-at) = 081b88574e1e8d1a0d2ff28edbf3933b1253c7d9 pkgsrc/mail/ja-mh-curses/PLIST100644 000000 000000 00000006555 10131704004 0012056@comment $NetBSD: PLIST,v 1.1 2002/05/31 13:01:20 seb Exp $ bin/ali bin/anno bin/bbc bin/burst bin/comp bin/dist bin/folder bin/folders bin/forw bin/inc bin/mark bin/mhmail bin/mhn bin/mhparam bin/mhpath bin/msgchk bin/msh bin/next bin/packf bin/pgped bin/pgpshow bin/pick bin/prev bin/prompter bin/refile bin/repl bin/rmf bin/rmm bin/scan bin/send bin/show bin/sortm bin/vmh bin/whatnow bin/whom lib/libmh.so lib/libmh.so.3 lib/libmh.so.3.2 libexec/mh/MailAliases libexec/mh/ap libexec/mh/components libexec/mh/conflict libexec/mh/digestcomps libexec/mh/distcomps libexec/mh/dp libexec/mh/fmtdump libexec/mh/forwcomps libexec/mh/install-mh libexec/mh/mhl libexec/mh/mhl.body libexec/mh/mhl.digest libexec/mh/mhl.format libexec/mh/mhl.forward libexec/mh/mhl.headers libexec/mh/mhn_defaults libexec/mh/mtstailor libexec/mh/packmbox libexec/mh/post libexec/mh/rcvdist libexec/mh/rcvdistcomps libexec/mh/rcvpack libexec/mh/rcvstore libexec/mh/rcvtty libexec/mh/replcomps libexec/mh/scan.default libexec/mh/scan.mailx libexec/mh/scan.size libexec/mh/scan.time libexec/mh/scan.timely libexec/mh/slocal libexec/mh/spost libexec/mh/tmac.h libexec/mh/viamail man/ja_JP.EUC/man1/ali.1 man/ja_JP.EUC/man1/anno.1 man/ja_JP.EUC/man1/bbc.1 man/ja_JP.EUC/man1/burst.1 man/ja_JP.EUC/man1/comp.1 man/ja_JP.EUC/man1/dist.1 man/ja_JP.EUC/man1/folder.1 man/ja_JP.EUC/man1/forw.1 man/ja_JP.EUC/man1/inc.1 man/ja_JP.EUC/man1/mark.1 man/ja_JP.EUC/man1/mh-chart.1 man/ja_JP.EUC/man1/mh.1 man/ja_JP.EUC/man1/mhl.1 man/ja_JP.EUC/man1/mhmail.1 man/ja_JP.EUC/man1/mhn.1 man/ja_JP.EUC/man1/mhook.1 man/ja_JP.EUC/man1/mhparam.1 man/ja_JP.EUC/man1/mhpath.1 man/ja_JP.EUC/man1/msgchk.1 man/ja_JP.EUC/man1/msh.1 man/ja_JP.EUC/man1/next.1 man/ja_JP.EUC/man1/packf.1 man/ja_JP.EUC/man1/pgped.1 man/ja_JP.EUC/man1/pick.1 man/ja_JP.EUC/man1/prev.1 man/ja_JP.EUC/man1/prompter.1 man/ja_JP.EUC/man1/rcvstore.1 man/ja_JP.EUC/man1/refile.1 man/ja_JP.EUC/man1/repl.1 man/ja_JP.EUC/man1/rmf.1 man/ja_JP.EUC/man1/rmm.1 man/ja_JP.EUC/man1/scan.1 man/ja_JP.EUC/man1/send.1 man/ja_JP.EUC/man1/show.1 man/ja_JP.EUC/man1/slocal.1 man/ja_JP.EUC/man1/sortm.1 man/ja_JP.EUC/man1/vmh.1 man/ja_JP.EUC/man1/whatnow.1 man/ja_JP.EUC/man1/whom.1 man/ja_JP.EUC/man5/mh-alias.5 man/ja_JP.EUC/man5/mh-format.5 man/ja_JP.EUC/man5/mh-mail.5 man/ja_JP.EUC/man5/mh-profile.5 man/ja_JP.EUC/man5/mh-sequence.5 man/ja_JP.EUC/man5/mh-tailor.5 man/ja_JP.EUC/man8/ap.8 man/ja_JP.EUC/man8/conflict.8 man/ja_JP.EUC/man8/dp.8 man/ja_JP.EUC/man8/fmtdump.8 man/ja_JP.EUC/man8/install-mh.8 man/ja_JP.EUC/man8/post.8 man/man1/ali.1 man/man1/anno.1 man/man1/bbc.1 man/man1/burst.1 man/man1/comp.1 man/man1/dist.1 man/man1/folder.1 man/man1/forw.1 man/man1/inc.1 man/man1/mark.1 man/man1/mh-chart.1 man/man1/mh.1 man/man1/mhl.1 man/man1/mhmail.1 man/man1/mhn.1 man/man1/mhook.1 man/man1/mhparam.1 man/man1/mhpath.1 man/man1/msgchk.1 man/man1/msh.1 man/man1/next.1 man/man1/packf.1 man/man1/pgped.1 man/man1/pick.1 man/man1/prev.1 man/man1/prompter.1 man/man1/rcvstore.1 man/man1/refile.1 man/man1/repl.1 man/man1/rmf.1 man/man1/rmm.1 man/man1/scan.1 man/man1/send.1 man/man1/show.1 man/man1/slocal.1 man/man1/sortm.1 man/man1/vmh.1 man/man1/whatnow.1 man/man1/whom.1 man/man5/mh-alias.5 man/man5/mh-format.5 man/man5/mh-mail.5 man/man5/mh-profile.5 man/man5/mh-sequence.5 man/man5/mh-tailor.5 man/man8/ap.8 man/man8/conflict.8 man/man8/dp.8 man/man8/fmtdump.8 man/man8/install-mh.8 man/man8/post.8 @dirrm libexec/mh pkgsrc/mail/ja-mh-ncurses/patches/patch-aa100644 000000 000000 00000000455 07475672040 0014464$NetBSD: patch-aa,v 1.1 2002/05/31 13:01:20 seb Exp $ --- ./sbr/m_getdefs.c.orig Wed Dec 2 02:05:00 1998 +++ ./sbr/m_getdefs.c Mon Nov 1 19:13:29 1999 @@ -7,4 +7,7 @@ #include #include +#ifdef UNISTD +#include +#endif #include #include pkgsrc/mail/ja-mh-ncurses/patches/patch-ab100644 000000 000000 00000000430 07475672040 0014456$NetBSD: patch-ab,v 1.1 2002/05/31 13:01:20 seb Exp $ --- ./sbr/refile.c.orig Wed Dec 1 13:01:26 1993 +++ ./sbr/refile.c Mon Nov 1 19:13:30 1999 @@ -6,4 +6,7 @@ #include "../h/mh.h" #include +#ifdef UNISTD +#include +#endif int refile (arg, file) pkgsrc/mail/ja-mh-ncurses/patches/patch-ac100644 000000 000000 00000000376 07475672040 0014470$NetBSD: patch-ac,v 1.1 2002/05/31 13:01:20 seb Exp $ --- ./sbr/remdir.c.orig Fri Apr 24 06:02:00 1998 +++ ./sbr/remdir.c Mon Nov 1 19:13:30 1999 @@ -6,4 +6,7 @@ #include "../h/mh.h" #include +#ifdef UNISTD +#include +#endif pkgsrc/mail/ja-mh-ncurses/patches/patch-ad100644 000000 000000 00000000402 07475672040 0014457$NetBSD: patch-ad,v 1.1 2002/05/31 13:01:20 seb Exp $ --- ./sbr/showfile.c.orig Wed Dec 1 13:01:26 1993 +++ ./sbr/showfile.c Mon Nov 1 19:13:30 1999 @@ -3,4 +3,7 @@ #include "../h/mh.h" #include +#ifdef UNISTD +#include +#endif pkgsrc/mail/ja-mh-ncurses/patches/patch-ae100644 000000 000000 00000000364 07475672040 0014467$NetBSD: patch-ae,v 1.1 2002/05/31 13:01:20 seb Exp $ --- ./uip/inc.c.orig Fri Sep 10 02:10:53 1999 +++ ./uip/inc.c Mon Nov 1 19:13:30 1999 @@ -38,4 +38,7 @@ #include #endif +#ifdef UNISTD +#include +#endif /* */ pkgsrc/mail/ja-mh-ncurses/patches/patch-af100644 000000 000000 00000000405 07475672040 0014464$NetBSD: patch-af,v 1.1 2002/05/31 13:01:20 seb Exp $ --- ./uip/mhlsbr.c.orig Tue Feb 9 20:30:00 1999 +++ ./uip/mhlsbr.c Mon Nov 1 19:13:30 1999 @@ -21,4 +21,7 @@ #include #include +#ifdef UNISTD +#include +#endif pkgsrc/mail/ja-mh-ncurses/patches/patch-ag100644 000000 000000 00000000364 07475672040 0014471$NetBSD: patch-ag,v 1.1 2002/05/31 13:01:20 seb Exp $ --- ./uip/mhn.c.orig Tue Feb 9 20:30:00 1999 +++ ./uip/mhn.c Mon Nov 1 19:13:30 1999 @@ -19,4 +19,7 @@ #include #endif +#ifdef UNISTD +#include +#endif /* */ pkgsrc/mail/ja-mh-ncurses/patches/patch-ah100644 000000 000000 00000000372 07475672040 0014471$NetBSD: patch-ah,v 1.1 2002/05/31 13:01:20 seb Exp $ --- ./uip/rcvtty.c.orig Tue Feb 9 20:30:00 1999 +++ ./uip/rcvtty.c Mon Nov 1 19:13:30 1999 @@ -30,4 +30,7 @@ #include #endif +#ifdef UNISTD +#include +#endif /* */ pkgsrc/mail/ja-mh-ncurses/patches/patch-ai100644 000000 000000 00000000441 07475672040 0014467$NetBSD: patch-ai,v 1.1 2002/05/31 13:01:20 seb Exp $ --- ./uip/replsbr.c.orig Fri Sep 10 13:51:41 1999 +++ ./uip/replsbr.c Mon Nov 1 19:13:30 1999 @@ -11,4 +11,7 @@ #include /* off_t */ #include /* L_SET */ +#ifdef UNISTD +#include +#endif pkgsrc/mail/ja-mh-ncurses/patches/patch-aj100644 000000 000000 00000000452 07475672040 0014472$NetBSD: patch-aj,v 1.1 2002/05/31 13:01:20 seb Exp $ --- ./uip/sendsbr.c.orig Tue Feb 9 20:30:00 1999 +++ ./uip/sendsbr.c Mon Nov 1 19:13:30 1999 @@ -10,4 +10,7 @@ #include #include +#ifdef UNISTD +#include +#endif static alert(), anno(), annoaux(); pkgsrc/mail/ja-mh-ncurses/patches/patch-ak100644 000000 000000 00000000431 07475672040 0014470$NetBSD: patch-ak,v 1.1 2002/05/31 13:01:20 seb Exp $ --- ./uip/spost.c.orig Wed Dec 2 02:05:00 1998 +++ ./uip/spost.c Mon Nov 1 19:13:30 1999 @@ -23,4 +23,7 @@ #include #endif +#ifdef UNISTD +#include +#endif extern char *getfullname (), *getusr (); pkgsrc/mail/ja-mh-ncurses/patches/patch-al100644 000000 000000 00000013146 10131713441 0014460$NetBSD$ --- uip/vmh.c.orig 1999-02-09 20:30:00.000000000 +0900 +++ uip/vmh.c @@ -23,6 +23,9 @@ static char ident[] = "@(#)$Id: vmh.c,v If curses ever gets fixed, then XYZ code can be removed */ +#ifdef UNISTD +#include +#endif #ifdef __osf__ #define _BSD #endif @@ -85,9 +88,15 @@ struct iovec { #define _maxy maxy #define _curx curx /* curses.h */ #define _cury cury +#ifndef __NetBSD__ void __cputchar __P((int)); +#endif #undef _putchar +#ifdef BSD44 +#define _putchar __cputchar +#else #define _putchar (int (*)()) __cputchar +#endif #include /* sgttyb */ #endif /* !__NCURSES_H && (BSD44 || linux) */ @@ -325,7 +334,7 @@ static vmh () { wclrtoeol (Command); wrefresh (Command); - switch (WINgetstr (Command, buffer)) { + switch (WINgetstr (Command, (unsigned char *)buffer, sizeof(buffer))) { case NOTOK: break; @@ -817,32 +826,60 @@ static int WINinit (nprog) { /* */ -static int WINgetstr (w, buffer) +static int WINgetstr (w, buffer, size) register WINDOW *w; +#ifdef JAPAN +unsigned char *buffer; +#else char *buffer; +#endif +size_t size; { register int c; +#ifdef JAPAN + int wlim; + register int pcs; + register unsigned char *bp; +#else register char *bp; +#endif +#ifdef JAPAN + pcs = 0; +#endif bp = buffer; - *bp = 0; + *bp = '\0'; +#ifndef __NCURSES_H + wlim = w -> _maxx - (sizeof(myprompt) - 3) - strlen(invo_name) - 3; +#else /* __NCURSES_H */ + wlim = w -> _maxx - (sizeof(myprompt) - 3) - strlen(invo_name) - 2; +#endif /* __NCURSES_H */ + if (size > wlim) + size = wlim; + else + --size; for (;;) { + c = wgetch (w); + if (c == ERR) + adios (NULLCP, "wgetch lost"); + c &= A_CHARTEXT; + if (bp - buffer >= size && + !(c == intrc || c == EOFC || c == ERASE || c == KILL || + c == WERASC || c == '\r' || c == '\n')) + continue; #ifdef JAPAN - switch (c = wgetch (w) & 0xff) { + switch (c) { #else /* JAPAN */ - switch (c = toascii (wgetch (w))) { + switch (c = toascii (c)) { #endif /* JAPAN */ - case ERR: - adios (NULLCP, "wgetch lost"); - case '\f': wrefresh (curscr); break; case '\r': case '\n': - *bp = 0; + *bp = '\0'; if (bp > buffer) { leaveok (curscr, FALSE); wmove (w, 0, w -> _curx - (bp - buffer)); @@ -870,6 +907,19 @@ char *buffer; if (bp <= buffer) continue; bp--, w -> _curx--; + if (bp > buffer) { + if ((*bp >= 0xa1 && *bp <= 0xfe) && + (*(bp-1) >= 0xa1 && *(bp-1) <= 0xfe)) { + bp--, w -> _curx--; + if (bp > buffer && *(bp-1) == 0x8f) { + bp--, w -> _curx--; + } + } else if ((*bp >= 0xa1 && *bp <= 0xdf) && + *(bp-1) == 0x8e) { + bp--, w -> _curx--; + } + } + pcs = 0; wclrtoeol (w); break; } @@ -900,11 +950,48 @@ char *buffer; } #ifdef JAPAN - if ((c >= ' ' && c < '\177') || (c >= 0xa1 && c <= 0xfe)) -#else /* JAPAN */ - if (c >= ' ' && c < '\177') + switch (pcs) { + case 0: + default: #endif /* JAPAN */ + if (c >= ' ' && c < '\177') (void) waddch (w, *bp++ = c); +#ifdef JAPAN + else if (c >= 0xa1 && c <= 0xfe && + bp - buffer + 2 < size) { + (void) waddch (w, *bp++ = c); + pcs = 011; + } else if (c == 0x8e && + bp - buffer + 2 < size) { + (void) waddch (w, *bp++ = c); + pcs = 021; + } else if (c == 0x8f && + bp - buffer + 3 < size) { + (void) waddch (w, *bp++ = c); + pcs = 031; + } else + pcs = 0; + break; + case 011: /* code set 1, 2nd character */ + case 032: /* code set 3, 3rd character */ + if (c >= 0xa1 && c <= 0xfe) + (void) waddch (w, *bp++ = c); + pcs = 0; + break; + case 021: /* code set 2, 2nd character */ + if (c >= 0xa1 && c <= 0xdf) + (void) waddch (w, *bp++ = c); + pcs = 0; + break; + case 031: /* code set 3, 2nd character */ + if (c >= 0xa1 && c <= 0xfe && + bp - buffer + 1 < size) { + (void) waddch (w, *bp++ = c); + pcs = 032; + } else + pcs = 0; + } +#endif /* JAPAN */ break; } @@ -989,6 +1076,9 @@ int fin; once_only: ; #endif /* notdef */ werase (w); +#ifdef JAPAN + wrefresh (w); +#endif wmove (w, 0, 0); if (ltop == NULL) @@ -1185,7 +1275,8 @@ register char c; default: if (!isascii (c) #ifdef JAPAN - && !(c >= 0xa1 && c <= 0xfe) /* pass EUC */ + && !(c >= 0xa1 && c <= 0xfe || + c == 0x8e || c == 0x8f) /* pass EUC */ #endif /* JAPAN */ ) { if (WINputc (w, 'M') == ERR || WINputc (w, '-') == ERR) @@ -1292,17 +1383,23 @@ WINDOW *w; } #else /* __NCURSES_H */ { - int i; + int origx; if ((lp -> l_buf = (char *) malloc(w -> _maxx + 2)) == NULL) adios (NULLCP, "unable to allocate storage"); - for (i = 0; i <= w -> _maxx; i++) - lp -> l_buf[i] = (char) w -> _line[w -> _cury].text[i]; + origx = w -> _curx; + if (mvwinnstr(w, w -> _cury, 0, lp -> l_buf, w -> _maxx + 1) == ERR) + adios (NULLCP, "unable to get data from window"); + wmove (w, w -> _cury, origx); lp -> l_buf[w -> _maxx + 1] = '\0'; } #endif /* __NCURSES_H */ for (cp = lp -> l_buf + strlen (lp -> l_buf) - 1; cp >= lp -> l_buf; cp--) +#ifndef JAPAN if (isspace (*cp)) - *cp = 0; +#else /* JAPAN */ + if (isspace ((unsigned char)(*cp))) +#endif /* JAPAN */ + *cp = '\0'; else break; @@ -1509,7 +1606,7 @@ static foreground () { tpgrp; TYPESIG (*tstat) (); - if ((pgrp = getpgrp (0)) == NOTOK) + if ((pgrp = getpgrp (/*0*/)) == NOTOK) adios ("process group", "unable to determine"); for (;;) { if (ioctl (fileno (stdin), TIOCGPGRP, (char *) &tpgrp) == NOTOK) pkgsrc/mail/ja-mh-ncurses/patches/patch-am100644 000000 000000 00000000374 07475672040 0014500$NetBSD: patch-am,v 1.1 2002/05/31 13:01:20 seb Exp $ --- ./uip/vmhtest.c.orig Fri Apr 24 06:02:00 1998 +++ ./uip/vmhtest.c Mon Nov 1 19:13:30 1999 @@ -11,4 +11,7 @@ #include #endif +#ifdef UNISTD +#include +#endif /* */ pkgsrc/mail/ja-mh-ncurses/patches/patch-an100644 000000 000000 00000000427 07475672040 0014500$NetBSD: patch-an,v 1.1 2002/05/31 13:01:20 seb Exp $ --- ./uip/whatnowsbr.c.orig Tue Feb 9 20:30:00 1999 +++ ./uip/whatnowsbr.c Mon Nov 1 19:13:30 1999 @@ -9,4 +9,7 @@ #include #include +#ifdef UNISTD +#include +#endif #ifndef MIME pkgsrc/mail/ja-mh-ncurses/patches/patch-ao100644 000000 000000 00000000355 07475672040 0014501$NetBSD: patch-ao,v 1.1 2002/05/31 13:01:20 seb Exp $ --- ./uip/wmh.c.orig Fri Apr 24 06:02:00 1998 +++ ./uip/wmh.c Mon Nov 1 19:13:30 1999 @@ -29,4 +29,7 @@ #include #endif +#ifdef UNISTD +#include +#endif pkgsrc/mail/ja-mh-ncurses/patches/patch-ap100644 000000 000000 00000000461 07475672040 0014500$NetBSD: patch-ap,v 1.1 2002/05/31 13:01:20 seb Exp $ --- ./configure.in.orig Fri Oct 1 23:01:15 1999 +++ ./configure.in Mon Nov 1 19:08:09 1999 @@ -354,4 +354,8 @@ fi fi + if test "$OBJECT_FMT" = ELF + then + sharedlib=gnuelf + fi slflags="-fpic" slibdir=$libdir pkgsrc/mail/ja-mh-ncurses/patches/patch-aq100644 000000 000000 00000000466 07475672040 0014506$NetBSD: patch-aq,v 1.1 2002/05/31 13:01:20 seb Exp $ --- ./configure.orig Fri Oct 1 23:01:45 1999 +++ ./configure Mon Nov 1 19:08:09 1999 @@ -1386,4 +1386,8 @@ fi fi + if test "$OBJECT_FMT" = ELF + then + sharedlib=gnuelf + fi slflags="-fpic" slibdir=$libdir pkgsrc/mail/ja-mh-ncurses/patches/patch-ar100644 000000 000000 00000000766 07475672040 0014512$NetBSD: patch-ar,v 1.1 2002/05/31 13:01:20 seb Exp $ --- ./zotnet/mts/client.c.orig Fri Sep 10 14:47:56 1999 +++ ./zotnet/mts/client.c Tue Feb 29 22:38:35 2000 @@ -360,7 +360,8 @@ /* taken from ISODE's compat/internet.c */ #if !defined(SOLARIS) && !defined(linux) && !defined(__bsdi__) && \ - !defined(OSF1) && !defined(__osf__) && !defined(__FreeBSD__) + !defined(OSF1) && !defined(__osf__) && !defined(__FreeBSD__) && \ + !defined(__NetBSD__) #ifndef DG #ifndef __alpha u_long inet_addr (); pkgsrc/mail/ja-mh-ncurses/patches/patch-as100644 000000 000000 00000002204 10122736373 0014471$NetBSD: patch-as,v 1.1 2004/09/18 04:43:39 taca Exp $ --- sbr/concat.c.orig 1993-12-01 13:01:21.000000000 +0900 +++ sbr/concat.c @@ -2,13 +2,12 @@ #include "../h/mh.h" #include -#include +#include /* VARARGS */ -char *concat (va_alist) -va_dcl +char *concat (char *first, ...) { register char *cp, *dp, @@ -17,19 +16,26 @@ va_dcl register va_list list; len = 1; - va_start (list); - while (cp = va_arg (list, char *)) - len += strlen (cp); - va_end (list); + if (first) { + len += strlen(first); + va_start (list, first); + while (cp = va_arg (list, char *)) + len += strlen (cp); + va_end (list); + } dp = sp = malloc (len); if (dp == NULL) adios (NULLCP, "unable to allocate string storage"); - va_start (list); - while (cp = va_arg (list, char *)) - sp = copy (cp, sp); - va_end (list); + *sp = '\0'; + if (first) { + sp = copy (first, sp); + va_start (list, first); + while (cp = va_arg (list, char *)) + sp = copy (cp, sp); + va_end (list); + } return dp; } pkgsrc/mail/ja-mh-ncurses/patches/patch-au100644 000000 000000 00000000731 10131704405 0014465$NetBSD$ --- conf/makefiles/uip.orig 1998-12-02 02:05:00.000000000 +0900 +++ conf/makefiles/uip @@ -165,7 +165,8 @@ LDLIBES = ../config/config.o \ @BEGIN: SUN4SHLIB -Bdynamic \ @END: SUN4SHLIB - @(SLDFLAG) -lmh$(SLIBVER) ../mts/libmts.a ../zotnet/libzot.a + @(SLDFLAG) -L../sbr -lmh$(SLIBVER) -L../mts -lmts \ + -L../zotnet -lzot LDLIBS = $(LDLIBES) ../config/version.o $(LDOPTLIB) LDLIBS_POST = $(LDLIBES) ../config/version.o $(LDOPTLIB_POST) @END: SHAREDLIB pkgsrc/mail/ja-mh-ncurses/patches/patch-at100644 000000 000000 00000000433 10131704405 0014463$NetBSD$ --- h/mh.h.orig 1998-12-02 02:05:00.000000000 +0900 +++ h/mh.h @@ -253,7 +253,7 @@ void ambigsw (); int atooi (); char **brkstring (); void closefds (); -char *concat (); +char *concat (char *first, ...); char *copy (); char **copyip (); void cpydata (); pkgsrc/mail/ja-mh-ncurses/Makefile100644 000000 000000 00000001772 10131704352 0013060# $NetBSD: Makefile,v 1.4 2004/09/18 04:52:22 taca Exp $ # FreeBSD Id: Makefile,v 1.13 1999/02/10 18:13:21 motoyuki Exp $ DISTNAME= mh-6.8.4-JP-3.03 PKGNAME= ja-mh6-3.03 CATEGORIES= japanese mail MASTER_SITES= ftp://ports.jp.freebsd.org/pub/FreeBSD-jp/ports-jp/LOCAL_PORTS/ \ ftp://komadori.planet.sci.kobe-u.ac.jp/pub/MH/ \ ftp://ftp.chem.eng.himeji-tech.ac.jp/pub/net/mh/ MAINTAINER= tech-pkg-ja@jp.NetBSD.org COMMENT= Rand MH mail handling system + Japanese patches DEPENDS= ja-less>=332:../../misc/ja-less CONFLICTS= nmh-[0-9]* ja-mh-*_JP_* .include "../../mk/bsd.prefs.mk" USE_BUILDLINK3= yes USE_NCURSES= yes MANCOMPRESSED= yes GNU_CONFIGURE= yes CONFIGURE_ENV+= OBJECT_FMT=${OBJECT_FMT} CONFIGURE_ARGS= --enable-batchmode \ --libexecdir=${PREFIX}/libexec/mh \ --enable-jmandir=${PREFIX}/man/ja_JP.EUC \ --enable-apop=${PREFIX}/etc/pop.auth --enable-rpop post-install: ${LN} -sf libmh.so.3.2 ${PREFIX}/lib/libmh.so.3 .include "../../devel/ncurses/buildlink3.mk" .include "../../mk/bsd.pkg.mk" pkgsrc/mail/ja-mh-ncurses/DESCR100644 000000 000000 00000000325 07475672040 0012213This is the MH mail user agent (reader/sender) with Japanese patches, a command line based mail reader that is powerful and extensible. MH is an excellent choice for people who receive and process a LOT of mail. pkgsrc/mail/ja-mh-ncurses/distinfo100644 000000 000000 00000002610 10131713450 0013151$NetBSD: distinfo,v 1.2 2004/09/18 04:43:39 taca Exp $ SHA1 (mh-6.8.4-JP-3.03.tar.gz) = e533b22c23e79e8cba50ed2fe391f0f3b3ca332a Size (mh-6.8.4-JP-3.03.tar.gz) = 1567712 bytes SHA1 (patch-aa) = d38c2340f53ddfafb63857a7c6cbf95f8ba91cbf SHA1 (patch-ab) = 6ba17b9bb6844bbf5fc3d4edf268b7d671427438 SHA1 (patch-ac) = aea3d9bdfb5faa42ec55af92c5b1d5cd74f3d42d SHA1 (patch-ad) = 5d1e3f54abbb114bf5d3c367de1b186b8dd39317 SHA1 (patch-ae) = 183afc6c35c04912986bb3826d9d443b0aaacb7f SHA1 (patch-af) = 0f9dd68449f56039555253a8e1ba9a2923c5ef4e SHA1 (patch-ag) = 5e68e06be4ff523335900b2dd01defbe84cd725c SHA1 (patch-ah) = 3cabf8ae640fbce889dda69521453dc0a9e621f5 SHA1 (patch-ai) = c9da909f7783f6600a21ac6f035b8df732275539 SHA1 (patch-aj) = 418b6e60541558f2702393b89df76ad9edf1774f SHA1 (patch-ak) = 7f8442f265111a4b87393b3a64fd8692c23b379d SHA1 (patch-al) = 6b697483ab951cb4b58d8fe2286bf6c46008f396 SHA1 (patch-am) = 3cea349883c6e73d95844a44586d32c0046eb94c SHA1 (patch-an) = c879444e422531fc2c3d2a6bd4c52c9680239a5f SHA1 (patch-ao) = 4ad1798a6d4cdc2c977dd5186e9a111a4585df94 SHA1 (patch-ap) = bde44e5f75ee1e124b5fff9679823e1ee2c313f0 SHA1 (patch-aq) = e9399fe4a26005be428960666ac7ac437789aaa5 SHA1 (patch-ar) = 3f9a0e510c9649ac07f07ef86f4a139bba1a5055 SHA1 (patch-as) = 287118b416c42d4ec340c4548242d4e15afa6748 SHA1 (patch-at) = 081b88574e1e8d1a0d2ff28edbf3933b1253c7d9 SHA1 (patch-au) = 255d7837c32a798886f84a0e11ab5153397bb22c pkgsrc/mail/ja-mh-ncurses/PLIST100644 000000 000000 00000006555 10131704352 0012242@comment $NetBSD: PLIST,v 1.1 2002/05/31 13:01:20 seb Exp $ bin/ali bin/anno bin/bbc bin/burst bin/comp bin/dist bin/folder bin/folders bin/forw bin/inc bin/mark bin/mhmail bin/mhn bin/mhparam bin/mhpath bin/msgchk bin/msh bin/next bin/packf bin/pgped bin/pgpshow bin/pick bin/prev bin/prompter bin/refile bin/repl bin/rmf bin/rmm bin/scan bin/send bin/show bin/sortm bin/vmh bin/whatnow bin/whom lib/libmh.so lib/libmh.so.3 lib/libmh.so.3.2 libexec/mh/MailAliases libexec/mh/ap libexec/mh/components libexec/mh/conflict libexec/mh/digestcomps libexec/mh/distcomps libexec/mh/dp libexec/mh/fmtdump libexec/mh/forwcomps libexec/mh/install-mh libexec/mh/mhl libexec/mh/mhl.body libexec/mh/mhl.digest libexec/mh/mhl.format libexec/mh/mhl.forward libexec/mh/mhl.headers libexec/mh/mhn_defaults libexec/mh/mtstailor libexec/mh/packmbox libexec/mh/post libexec/mh/rcvdist libexec/mh/rcvdistcomps libexec/mh/rcvpack libexec/mh/rcvstore libexec/mh/rcvtty libexec/mh/replcomps libexec/mh/scan.default libexec/mh/scan.mailx libexec/mh/scan.size libexec/mh/scan.time libexec/mh/scan.timely libexec/mh/slocal libexec/mh/spost libexec/mh/tmac.h libexec/mh/viamail man/ja_JP.EUC/man1/ali.1 man/ja_JP.EUC/man1/anno.1 man/ja_JP.EUC/man1/bbc.1 man/ja_JP.EUC/man1/burst.1 man/ja_JP.EUC/man1/comp.1 man/ja_JP.EUC/man1/dist.1 man/ja_JP.EUC/man1/folder.1 man/ja_JP.EUC/man1/forw.1 man/ja_JP.EUC/man1/inc.1 man/ja_JP.EUC/man1/mark.1 man/ja_JP.EUC/man1/mh-chart.1 man/ja_JP.EUC/man1/mh.1 man/ja_JP.EUC/man1/mhl.1 man/ja_JP.EUC/man1/mhmail.1 man/ja_JP.EUC/man1/mhn.1 man/ja_JP.EUC/man1/mhook.1 man/ja_JP.EUC/man1/mhparam.1 man/ja_JP.EUC/man1/mhpath.1 man/ja_JP.EUC/man1/msgchk.1 man/ja_JP.EUC/man1/msh.1 man/ja_JP.EUC/man1/next.1 man/ja_JP.EUC/man1/packf.1 man/ja_JP.EUC/man1/pgped.1 man/ja_JP.EUC/man1/pick.1 man/ja_JP.EUC/man1/prev.1 man/ja_JP.EUC/man1/prompter.1 man/ja_JP.EUC/man1/rcvstore.1 man/ja_JP.EUC/man1/refile.1 man/ja_JP.EUC/man1/repl.1 man/ja_JP.EUC/man1/rmf.1 man/ja_JP.EUC/man1/rmm.1 man/ja_JP.EUC/man1/scan.1 man/ja_JP.EUC/man1/send.1 man/ja_JP.EUC/man1/show.1 man/ja_JP.EUC/man1/slocal.1 man/ja_JP.EUC/man1/sortm.1 man/ja_JP.EUC/man1/vmh.1 man/ja_JP.EUC/man1/whatnow.1 man/ja_JP.EUC/man1/whom.1 man/ja_JP.EUC/man5/mh-alias.5 man/ja_JP.EUC/man5/mh-format.5 man/ja_JP.EUC/man5/mh-mail.5 man/ja_JP.EUC/man5/mh-profile.5 man/ja_JP.EUC/man5/mh-sequence.5 man/ja_JP.EUC/man5/mh-tailor.5 man/ja_JP.EUC/man8/ap.8 man/ja_JP.EUC/man8/conflict.8 man/ja_JP.EUC/man8/dp.8 man/ja_JP.EUC/man8/fmtdump.8 man/ja_JP.EUC/man8/install-mh.8 man/ja_JP.EUC/man8/post.8 man/man1/ali.1 man/man1/anno.1 man/man1/bbc.1 man/man1/burst.1 man/man1/comp.1 man/man1/dist.1 man/man1/folder.1 man/man1/forw.1 man/man1/inc.1 man/man1/mark.1 man/man1/mh-chart.1 man/man1/mh.1 man/man1/mhl.1 man/man1/mhmail.1 man/man1/mhn.1 man/man1/mhook.1 man/man1/mhparam.1 man/man1/mhpath.1 man/man1/msgchk.1 man/man1/msh.1 man/man1/next.1 man/man1/packf.1 man/man1/pgped.1 man/man1/pick.1 man/man1/prev.1 man/man1/prompter.1 man/man1/rcvstore.1 man/man1/refile.1 man/man1/repl.1 man/man1/rmf.1 man/man1/rmm.1 man/man1/scan.1 man/man1/send.1 man/man1/show.1 man/man1/slocal.1 man/man1/sortm.1 man/man1/vmh.1 man/man1/whatnow.1 man/man1/whom.1 man/man5/mh-alias.5 man/man5/mh-format.5 man/man5/mh-mail.5 man/man5/mh-profile.5 man/man5/mh-sequence.5 man/man5/mh-tailor.5 man/man8/ap.8 man/man8/conflict.8 man/man8/dp.8 man/man8/fmtdump.8 man/man8/install-mh.8 man/man8/post.8 @dirrm libexec/mh