changeset 13:3c5835cca094

fix
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sat, 21 Apr 2012 15:40:28 +0900
parents 441a2190cfae
children 518ccf412946
files config/version config/version.c doc/version.rf uip/mhlsbr.c uip/mhn.c uip/picksbr.c uip/popsbr.c uip/pshsbr.c uip/rcvtty.c uip/slocal.c uip/whom.c
diffstat 11 files changed, 34 insertions(+), 38 deletions(-) [+]
line wrap: on
line diff
--- a/config/version	Sat Apr 21 13:10:49 2012 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-6.8.3.97
--- a/config/version.c	Sat Apr 21 13:10:49 2012 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-#ifndef JAPAN
-char *version = "@(#)MH 6.8.3 #97[UCI] (leo.cr.ie.u-ryukyu.ac.jp) of Sat Apr 21 12:32:34 JST 2012";
-#else /* JAPAN */
-char *version = "@(#)MH 6.8.3.JP-pre3.05-20010615 #97[UCI] (leo.cr.ie.u-ryukyu.ac.jp) of Sat Apr 21 12:32:34 JST 2012";
-#endif /* JAPAN */
--- a/doc/version.rf	Sat Apr 21 13:10:49 2012 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-.ds MH 6.8.3 #97[UCI]
--- a/uip/mhlsbr.c	Sat Apr 21 13:10:49 2012 +0900
+++ b/uip/mhlsbr.c	Sat Apr 21 15:40:28 2012 +0900
@@ -694,7 +694,7 @@
 	    fprintf (stderr, "c1: name=\"%s\" text=\"%s\" ovtxt=\"%s\"\n",
 		    c1 -> c_name, c1 -> c_text, c1 -> c_ovtxt);
 	    fprintf (stderr, "\tnfs=0x%lx fmt=0x%lx\n",
-		    c1 -> c_nfs, c1 -> c_fmt);
+		    (long)c1 -> c_nfs, (long)c1 -> c_fmt);
 	    fprintf (stderr, "\toffset=%d ovoff=%d width=%d cwidth=%d length=%d\n",
 		    c1 -> c_offset, c1 -> c_ovoff, c1 -> c_width,
 		    c1 -> c_cwidth, c1 -> c_length);
--- a/uip/mhn.c	Sat Apr 21 13:10:49 2012 +0900
+++ b/uip/mhn.c	Sat Apr 21 15:40:28 2012 +0900
@@ -21,6 +21,7 @@
 #ifdef	UNISTD
 #include <unistd.h>
 #endif
+extern char *LocalName();
 
 /*  */
 
@@ -1965,7 +1966,7 @@
 #endif /* JAPAN */
     }
 
-    fprintf (stderr, "  fp 0x%lx file \"%s\" begin %d end %d\n",
+    fprintf (stderr, "  fp 0x%lx file \"%s\" begin %ld end %ld\n",
 	     (long)ct -> c_fp, empty (ct -> c_file), ct -> c_begin, ct -> c_end);
 
     if (ct -> c_celistfnx)
@@ -6054,7 +6055,7 @@
 	if (partno > 0xff)
 	    clock++, partno = 0;
 
-    (void) sprintf (mapname, "%08lx%04x%02x", (long)clock /*0xffffffff*/
+    (void) sprintf (mapname, "%08lx%04x%02x", (long)clock /*0xffffffff*/,
 		    pid & 0xffff, partno++ & 0xff);
     if (debugsw)
 	fprintf (stderr, "creating mapping %s -> %s\n", mapname, id);
--- a/uip/picksbr.c	Sat Apr 21 13:10:49 2012 +0900
+++ b/uip/picksbr.c	Sat Apr 21 15:40:28 2012 +0900
@@ -542,7 +542,7 @@
 		dasctime (&n -> n_tws, TW_NULL));
 	return;
     }
-    fprintf (stderr, "UNKNOWN(0x%lx)\n", (*n -> n_action));
+    fprintf (stderr, "UNKNOWN(0x%lx)\n", (long)(*n -> n_action));
 }
 
 /*  */
--- a/uip/popsbr.c	Sat Apr 21 13:10:49 2012 +0900
+++ b/uip/popsbr.c	Sat Apr 21 15:40:28 2012 +0900
@@ -65,7 +65,7 @@
 static putline();
 
 #ifdef NNTP
-static	int	xtnd_last = -1,
+static	long	xtnd_last = -1,
 		xtnd_first = 0;
 static char	xtnd_name[512];	/* INCREDIBLE HACK!! */
 #endif /* NNTP */
@@ -422,9 +422,9 @@
         (*action) ();
 {
 #ifndef NNTP
-    return traverse (action, "RETR %d", (targ_t)msgno, (char*)0L, (char*)0L, (char*)0L);
+    return traverse (action, "RETR %d", (targ_t)(long)msgno, (char*)0L, (char*)0L, (char*)0L);
 #else	/* NNTP */
-    return traverse (action, "ARTICLE %d", (targ_t)msgno, (char*)0L, (char*)0L, (char*)0L);
+    return traverse (action, "ARTICLE %d", (targ_t)(long)msgno, (char*)0L, (char*)0L, (char*)0L);
 #endif	/* NNTP */
 }
 
@@ -498,9 +498,9 @@
         (*action) ();
 {
 #ifndef NNTP
-    return traverse (action, "TOP %d %d", (targ_t)msgno, (targ_t)lines, (char*)0L, (char*)0L);
+    return traverse (action, "TOP %d %d", (targ_t)(long)msgno, (targ_t)(long)lines, (char*)0L, (char*)0L);
 #else	/* NNTP */
-    return traverse (action, "HEAD %d", (targ_t)msgno, (char*)0L, (char*)0L, (char*)0L);
+    return traverse (action, "HEAD %d", (targ_t)(long)msgno, (char*)0L, (char*)0L, (char*)0L);
 #endif	/* NNTP */
 }
 
--- a/uip/pshsbr.c	Sat Apr 21 13:10:49 2012 +0900
+++ b/uip/pshsbr.c	Sat Apr 21 15:40:28 2012 +0900
@@ -1,6 +1,6 @@
 /* popsbr.c - POP client subroutines */
 #ifndef	lint
-static char ident[] = "@(#)$Id: pshsbr.c,v 1.2 2006/12/05 18:18:13 kono Exp $";
+static char ident[] = "@(#)$Id: popsbr.c,v 1.2 2006/12/05 18:18:13 kono Exp $";
 #endif /* lint */
 
 #if defined(NNTP) && !defined(PSHSBR)
@@ -27,14 +27,15 @@
 #define	TRM	"."
 #define	TRMLEN	(sizeof TRM - 1)
 
+
 #include <errno.h>
+
 #if !defined(BSD44) && !defined(__GNU_LIBRARY__)
 extern int  sys_nerr;
 extern char *sys_errlist[];
 #endif
-#ifdef __NetBSD__ /* XXX */
-#include <errno.h>
-#endif
+
+
 
 static int  poprint = 0;
 static int  pophack = 0;
@@ -60,11 +61,11 @@
 static	int	command(), multiline();
 #endif
 
-static int	getline();
+static int	getline00();
 static putline();
 
 #ifdef NNTP
-static	int	xtnd_last = -1,
+static	long	xtnd_last = -1,
 		xtnd_first = 0;
 static char	xtnd_name[512];	/* INCREDIBLE HACK!! */
 #endif /* NNTP */
@@ -167,13 +168,13 @@
 #ifndef NNTP
     if (pop_set (fd1, fd2, snoop) == NOTOK)
 #else	/* NNTP */
-    if (pop_set (fd1, fd2, snoop, (char *)0) == NOTOK)
+    if (pop_set (fd1, fd2, snoop, (char *)0L) == NOTOK)
 #endif	/* NNTP */
 	return NOTOK;
 
     (void) signal (SIGPIPE, SIG_IGN);
 
-    switch (getline (response, sizeof response, input)) {
+    switch (getline00 (response, sizeof response, input)) {
 	case OK: 
 	    if (poprint)
 		fprintf (stderr, "<--- %s\n", response);
@@ -324,7 +325,7 @@
 	    0, 0, 0, 0) == OK)
 	return OK;
     if (traverse (action, "XHDR NONAME %d-%d",
-	    (targ_t)xtnd_first, (targ_t)xtnd_last, (char*)0, (char*)0) == OK)
+	    (targ_t)xtnd_first, (targ_t)xtnd_last, 0, 0) == OK)
 	return OK;
 
     status = NOTOK;
@@ -421,9 +422,9 @@
         (*action) ();
 {
 #ifndef NNTP
-    return traverse (action, "RETR %d", (targ_t)msgno, (char*)0, (char*)0, (char*)0);
+    return traverse (action, "RETR %d", (targ_t)(long)msgno, (char*)0L, (char*)0L, (char*)0L);
 #else	/* NNTP */
-    return traverse (action, "ARTICLE %d", (targ_t)msgno, (char*)0, (char*)0, (char*)0);
+    return traverse (action, "ARTICLE %d", (targ_t)(long)msgno, (char*)0L, (char*)0L, (char*)0L);
 #endif	/* NNTP */
 }
 
@@ -497,9 +498,9 @@
         (*action) ();
 {
 #ifndef NNTP
-    return traverse (action, "TOP %d %d", (targ_t)msgno, (targ_t)lines, (char*)0, (char*)0);
+    return traverse (action, "TOP %d %d", (targ_t)(long)msgno, (targ_t)(long)lines, (char*)0L, (char*)0L);
 #else	/* NNTP */
-    return traverse (action, "HEAD %d", (targ_t)msgno, (char*)0, (char*)0, (char*)0);
+    return traverse (action, "HEAD %d", (targ_t)(long)msgno, (char*)0L, (char*)0L, (char*)0L);
 #endif	/* NNTP */
 }
 
@@ -616,7 +617,7 @@
     if (putline (buffer, output) == NOTOK)
 	return NOTOK;
 
-    switch (getline (response, sizeof response, input)) {
+    switch (getline00 (response, sizeof response, input)) {
 	case OK: 
 	    if (poprint)
 		fprintf (stderr, "<--- %s\n", response);
@@ -642,7 +643,7 @@
 #endif
     char    buffer[BUFSIZ + TRMLEN];
 
-    if (getline (buffer, sizeof buffer, input) != OK)
+    if (getline00 (buffer, sizeof buffer, input) != OK)
 	return NOTOK;
 #ifdef	DEBUG
     if (poprint)
@@ -662,7 +663,7 @@
 
 /*  */
 
-static int  getline (s, n, iop)
+static int  getline00 (s, n, iop)
 char   *s;
 int     n;
 FILE * iop;
--- a/uip/rcvtty.c	Sat Apr 21 13:10:49 2012 +0900
+++ b/uip/rcvtty.c	Sat Apr 21 15:40:28 2012 +0900
@@ -261,7 +261,7 @@
 		_exit (-1);
 	    closefds (3);
 #ifdef	BSD42
-	    (void) setpgrp (0, getpid ());
+	    (void) setpgrp (); // (void) setpgrp (0, getpid ());
 #endif	/* BSD42 */
 #ifdef SVR4
 	    (void) setsid();
--- a/uip/slocal.c	Sat Apr 21 13:10:49 2012 +0900
+++ b/uip/slocal.c	Sat Apr 21 15:40:28 2012 +0900
@@ -22,7 +22,7 @@
  */
 
 /*  */
-
+#include <unistd.h>
 #include "../h/mh.h"
 #include "../h/dropsbr.h"
 #include "../h/rcvmail.h"
@@ -1172,7 +1172,7 @@
 	    }
 #endif	/* TIOCNOTTY */
 #ifdef	BSD42
-	    (void) setpgrp (0, getpid ());
+	    (void) setpgrp (); // (void) setpgrp (0, getpid ());
 #endif	/* BSD42 */
 
 	    *environ = NULL;
@@ -1355,12 +1355,12 @@
 		if (hp) {
 		    ep = rindex (++hp, '\n');
 		    sprintf (buffer, "Return-Path: %.*s!%.*s\n",
-			    ep - hp, hp,
-			    cp - fp, fp);
+			    (int)(ep - hp), hp,
+			    (int)(cp - fp), fp);
 		}
 		else
 		    sprintf (buffer, "Return-Path: %.*s\n",
-			    cp - fp, fp);
+			    (int)(cp - fp), fp);
 #endif
 	    }
 #ifdef	notdef		/* mbx_copy does this */
--- a/uip/whom.c	Sat Apr 21 13:10:49 2012 +0900
+++ b/uip/whom.c	Sat Apr 21 15:40:28 2012 +0900
@@ -5,6 +5,7 @@
 
 #include "../h/mh.h"
 #include <stdio.h>
+#include <unistd.h>
 #include <signal.h>
 #ifdef LOCALE
 #include	<locale.h>