MHpopd 1.00a patch [2/2]
しらいです。
MH 形式のローカルメイルフォルダ用 POP3/SMTP サーバ MHpopd
1.00a の patch その 2 です。
Submitted-by: shirai@chandra2
Archive-name: MHpopd-1.00a.patch/part02
---- Cut Here and feed the following to sh ----
#!/bin/sh
# This is `MHpopd-1.00a.shar.02' (part 2 of MHpopd-1.00a.patch).
# Do not concatenate these parts, unpack them in order with `/bin/sh'.
# File `MHpopd-1.00a.patch' is being continued...
#
echo=echo
touch -am 1231235999 $$.touch >/dev/null 2>&1
if test ! -f 1231235999 && test -f $$.touch; then
shar_touch=touch
else
shar_touch=:
echo
$echo 'WARNING: not restoring timestamps. Consider getting and'
$echo "installing GNU \`touch', distributed in GNU File Utilities..."
echo
fi
rm -f 1231235999 $$.touch
#
if test ! -r _sh00294/seq; then
$echo 'Please unpack part 1 first!'
exit 1
fi
shar_sequence=`cat _sh00294/seq`
if test "$shar_sequence" != 2; then
$echo 'Please unpack part' "$shar_sequence" 'next!'
exit 1
fi
if test ! -f _sh00294/new; then
$echo 'x -' 'STILL SKIPPING' 'MHpopd-1.00a.patch'
else
$echo 'x -' 'continuing file' 'MHpopd-1.00a.patch'
sed 's/^X//' << 'SHAR_EOF' >> MHpopd-1.00a.patch &&
-#else
- term_closetty();
-#endif
X
+ Xclose(STDIN_FILENO, pathstdin);
+ Xclose(STDOUT_FILENO, pathstdout);
+ Xclose(STDERR_FILENO, pathstderr);
+ if ((fd = Xopen(path, O_RDWR, 0, XF_IGNOREERR)) < 0) return(-1);
+
+#ifdef I_PUSH
+ if (Xioctl(fd, I_PUSH, "ptem") < 0
+ || Xioctl(fd, I_PUSH, "ldterm") < 0) {
+ Xclose(fd, path);
+ return(-1);
+ }
+# if defined (SOLARIS) || defined (NEWS_OS6)
+ VOID_C Xioctl(fd, I_PUSH, "ttcompat");
+# endif
+#endif /* I_PUSH */
X #ifdef TIOCSCTTY
- if (Xioctl(fd, TIOCSCTTY, NULL) < 0) return(-1);
-#else /* !TIOCSCTTY */
- if (*path) {
- int fd2;
-
- if (fd != STDIN_FILENO) Xclose(STDIN_FILENO, pathstdin);
- if (fd != STDOUT_FILENO) Xclose(STDOUT_FILENO, pathstdin);
- if (fd != STDERR_FILENO) Xclose(STDERR_FILENO, pathstdin);
- if ((fd2 = Xopen(path, O_RDWR, 0, XF_IGNOREERR)) >= 0)
- Xclose(fd2, path);
+ if (Xioctl(fd, TIOCSCTTY, NULL) < 0) {
+ Xclose(fd, path);
+ return(-1);
X }
-#endif /* !TIOCSCTTY */
+#endif
X
X VOID_C Xdup2(fd, STDIN_FILENO, pathstdin);
X VOID_C Xdup2(fd, STDOUT_FILENO, pathstdout);
X VOID_C Xdup2(fd, STDERR_FILENO, pathstderr);
- if (fd != STDIN_FILENO && fd != STDOUT_FILENO && fd != STDERR_FILENO)
- Xclose(fd, path);
+ term_loadtermio(fd, tty, ws);
+ term_safeclose(fd, path);
X
X return(0);
X }
X
-p_id_t Xforkpty(fdp)
+p_id_t Xforkpty(fdp, tty, ws)
X int *fdp;
+char *tty, *ws;
X {
X char path[MAXPATHLEN];
X p_id_t pid;
- int fd;
+ u_char uc;
+ int n, fds[2];
+
+ if (Xpipe(fds) < 0) return((p_id_t)-1);
X
- if (Xopenpty(fdp, &fd, path, sizeof(path)) < 0) {
+ if (Xopenpty(fdp, path, sizeof(path)) < 0) {
X ERRORx(("Cannot open pseudo terminal"));
- return(-1);
+ pid = (p_id_t)-1;
X }
-
- if ((pid = Xfork())) {
- if (pid < (p_id_t)0) Xclose(*fdp, pathpty);
- Xclose(fd, pathpty);
- return(pid);
+ else if ((pid = Xfork()) < (p_id_t)0) term_safeclose(*fdp, pathpty);
+ else if (pid) VOID_C Xread(fds[0], &uc, sizeof(uc), -1, NULL);
+ else {
+ term_safeclose(*fdp, pathpty);
+ n = Xlogin_tty(path, tty, ws);
+ uc = '\n';
+ VOID_C Xwrite(fds[1], &uc, sizeof(uc), -1, NULL);
+ if (n < 0) _exit(1);
X }
X
- Xclose(*fdp, pathpty);
- VOID_C Xlogin_tty(fd, path);
+ term_safeclose(fds[0], NULL);
+ term_safeclose(fds[1], NULL);
X
- return(0);
+ return(pid);
X }
X
X #ifdef TEST
@@ -231,7 +244,7 @@
X int argc;
X char *argv[], *envp[];
X {
- char *prog, *path, *args[3], buf[MAXLINEBUF + 1];
+ char *tty, *ws, *prog, *path, *args[3], buf[MAXLINEBUF + 1];
X ALLOC_T ptr;
X p_id_t pid;
X time_t last;
@@ -254,8 +267,11 @@
X args[1] = "./ptytest.pwd";
X args[2] = NULL;
X
+ term_getterm(&tty, &ws);
X sig_blockchild();
- pid = Xforkpty(&fd);
+ pid = Xforkpty(&fd, tty, ws);
+ if (tty) free(tty);
+ if (ws) free(ws);
X if (pid > (p_id_t)0) wait_push(pid);
X sig_unblockchild();
X
@@ -326,7 +342,7 @@
X }
X
X wait_cancel(pid);
- Xclose(fd, prog);
+ term_safeclose(fd, prog);
X
X return((n < 0) ? 1 : 0);
X }
diff -urNP ../MHpopd-1.00/pwd.c ./pwd.c
--- ../MHpopd-1.00/pwd.c Thu Mar 31 00:00:00 2005
+++ ./pwd.c Tue May 31 00:00:00 2005
@@ -20,15 +20,15 @@
X #define MAXHOSTNAMELEN 256
X #endif
X
-static struct passwd *Xgetpwnam __P_((char *));
-static char **pwd_addenv __P_((char **, int *, char *, char *));
-static char **pwd_genenv __P_((struct passwd *));
-static int pwd_finduser __P_((char *, struct passwd *));
-static int pwd_loadconf __P_((struct passwd *));
-static char *pwd_decode __P_((char *));
+static struct NEAR passwd *Xgetpwnam __P_((char *));
+static char **NEAR pwd_addenv __P_((char **, int *, char *, char *));
+static char **NEAR pwd_genenv __P_((struct passwd *));
+static int NEAR pwd_finduser __P_((char *, struct passwd *));
+static int NEAR pwd_loadconf __P_((struct passwd *));
+static char *NEAR pwd_decode __P_((char *));
X
X
-static struct passwd *Xgetpwnam(s)
+static struct passwd *NEAR Xgetpwnam(s)
X char *s;
X {
X struct passwd *pwd;
@@ -47,7 +47,7 @@
X return(pwd);
X }
X
-static char **pwd_addenv(envp, np, s, val)
+static char **NEAR pwd_addenv(envp, np, s, val)
X char **envp;
X int *np;
X char *s, *val;
@@ -75,7 +75,7 @@
X return(envp);
X }
X
-static char **pwd_genenv(pwd)
+static char **NEAR pwd_genenv(pwd)
X struct passwd *pwd;
X {
X char **envp;
@@ -111,7 +111,7 @@
X return(pwd -> pw_dir);
X }
X
-static int pwd_finduser(path, pwd)
+static int NEAR pwd_finduser(path, pwd)
X char *path;
X struct passwd *pwd;
X {
@@ -168,7 +168,7 @@
X return(0);
X }
X
-static int pwd_loadconf(pwd)
+static int NEAR pwd_loadconf(pwd)
X struct passwd *pwd;
X {
X char path[MAXPATHLEN];
@@ -191,7 +191,7 @@
X return(0);
X }
X
-static char *pwd_decode(path)
+static char *NEAR pwd_decode(path)
X char *path;
X {
X XFILE *fp;
diff -urNP ../MHpopd-1.00/signal.c ./signal.c
--- ../MHpopd-1.00/signal.c Thu Mar 31 00:00:00 2005
+++ ./signal.c Tue May 31 00:00:00 2005
@@ -36,10 +36,10 @@
X
X static char **sig_rmvlist = NULL;
X
-static sigcst_t Xsignal __P_((int, sigcst_t));
-static VOID Xsigblock __P_((sigmask_t, sigmask_t *));
-static VOID Xsigsetmask __P_((sigmask_t));
-static int trap_common __P_((int));
+static sigcst_t NEAR Xsignal __P_((int, sigcst_t));
+static VOID NEAR Xsigblock __P_((sigmask_t, sigmask_t *));
+static VOID NEAR Xsigsetmask __P_((sigmask_t));
+static int NEAR trap_common __P_((int));
X #ifdef SIGHUP
X static int trap_hup __P_((VOID_A));
X #endif
@@ -94,10 +94,10 @@
X {SIGCHLD, trap_chld, SIG_TRAP | SIG_CHLD, 0},
X #endif
X };
-#define SIGLISTSIZ (sizeof(sig_list) / sizeof(sigtype_t))
+#define SIGLISTSIZ ((int)sizeof(sig_list) / sizeof(sigtype_t))
X
X
-static sigcst_t Xsignal(sig, func)
+static sigcst_t NEAR Xsignal(sig, func)
X int sig;
X sigcst_t func;
X {
@@ -127,10 +127,11 @@
X #endif /* !USESIGACTION */
X
X ERRORx(("Cannot set signal handler"));
+
X return(SIG_ERR);
X }
X
-static VOID Xsigblock(mask, omaskp)
+static VOID NEAR Xsigblock(mask, omaskp)
X sigmask_t mask, *omaskp;
X {
X #ifdef USESIGPMASK
@@ -148,7 +149,7 @@
X #endif
X }
X
-static VOID Xsigsetmask(mask)
+static VOID NEAR Xsigsetmask(mask)
X sigmask_t mask;
X {
X #ifdef USESIGPMASK
@@ -166,7 +167,7 @@
X #endif
X }
X
-static int trap_common(sig)
+static int NEAR trap_common(sig)
X int sig;
X {
X sigmask_t mask, omask;
diff -urNP ../MHpopd-1.00/smtp.c ./smtp.c
--- ../MHpopd-1.00/smtp.c Thu Mar 31 00:00:00 2005
+++ ./smtp.c Tue May 31 00:00:00 2005
@@ -16,7 +16,7 @@
X #define SMTP_BCC "Bcc"
X #define SMTP_FORWARDER "X-Forwarder"
X
-typedef int (*fieldfunc_t)__P_((char *, ALLOC_T *, ALLOC_T));
+typedef int (NEAR *fieldfunc_t)__P_((char *, ALLOC_T *, ALLOC_T));
X
X typedef struct _field_t {
X char *ident;
@@ -33,17 +33,17 @@
X int smtp_status = SMTP_STAT_NONE;
X int smtp_flags = 0;
X
-static char *smtp_parseerror __P_((XFILE *, int, char *, char *));
-static char *smtp_unparen __P_((char *, ALLOC_T *, XFILE *));
-static char *smtp_unbrace __P_((char *, XFILE *));
-static int smtp_alterfield __P_((char **, ALLOC_T *, char *, ALLOC_T));
-static int smtp_from __P_((char *, ALLOC_T *, ALLOC_T));
-static int smtp_to __P_((char *, ALLOC_T *, ALLOC_T));
-static int smtp_getfield __P_((char **, ALLOC_T *, int));
-static int smtp_addfrom __P_((XFILE *));
-static int smtp_addbcc __P_((XFILE *));
-static int smtp_addforwarder __P_((XFILE *));
-static int smtp_closehead __P_((XFILE *));
+static char *NEAR smtp_parseerror __P_((XFILE *, int, char *, char *));
+static char *NEAR smtp_unparen __P_((char *, ALLOC_T *, XFILE *));
+static char *NEAR smtp_unbrace __P_((char *, XFILE *));
+static int NEAR smtp_alterfield __P_((char **, ALLOC_T *, char *, ALLOC_T));
+static int NEAR smtp_from __P_((char *, ALLOC_T *, ALLOC_T));
+static int NEAR smtp_to __P_((char *, ALLOC_T *, ALLOC_T));
+static int NEAR smtp_getfield __P_((char **, ALLOC_T *, int));
+static int NEAR smtp_addfrom __P_((XFILE *));
+static int NEAR smtp_addbcc __P_((XFILE *));
+static int NEAR smtp_addforwarder __P_((XFILE *));
+static int NEAR smtp_closehead __P_((XFILE *));
X
X static field_t fieldlist[] = {
X DEFFLD("From", nullstr, smtp_from),
@@ -57,10 +57,10 @@
X DEFFLD("Delivered-To", NULL, NULL),
X DEFFLD("Message-Id", NULL, NULL),
X };
-#define FIELDLISTSIZ (sizeof(fieldlist) / sizeof(field_t))
+#define FIELDLISTSIZ ((int)sizeof(fieldlist) / sizeof(field_t))
X
X
-static char *smtp_parseerror(fp, code, mes, s)
+static char *NEAR smtp_parseerror(fp, code, mes, s)
X XFILE *fp;
X int code;
X char *mes, *s;
@@ -76,7 +76,7 @@
X return((n < 0) ? NULL : nullstr);
X }
X
-static char *smtp_unparen(s, lenp, fp)
+static char *NEAR smtp_unparen(s, lenp, fp)
X char *s;
X ALLOC_T *lenp;
X XFILE *fp;
@@ -113,7 +113,7 @@
X return(s);
X }
X
-static char *smtp_unbrace(s, fp)
+static char *NEAR smtp_unbrace(s, fp)
X char *s;
X XFILE *fp;
X {
@@ -174,7 +174,7 @@
X return(s);
X }
X
-static int smtp_alterfield(bufp, lenp, s, len)
+static int NEAR smtp_alterfield(bufp, lenp, s, len)
X char **bufp;
X ALLOC_T *lenp;
X char *s;
@@ -196,7 +196,7 @@
X }
X
X /*ARGSUSED*/
-static int smtp_from(buf, lenp, len)
+static int NEAR smtp_from(buf, lenp, len)
X char *buf;
X ALLOC_T *lenp, len;
X {
@@ -205,7 +205,7 @@
X return(0);
X }
X
-static int smtp_to(buf, lenp, len)
+static int NEAR smtp_to(buf, lenp, len)
X char *buf;
X ALLOC_T *lenp, len;
X {
@@ -263,7 +263,7 @@
X return((!n) ? 1 : 0);
X }
X
-static int smtp_getfield(bufp, lenp, flags)
+static int NEAR smtp_getfield(bufp, lenp, flags)
X char **bufp;
X ALLOC_T *lenp;
X int flags;
@@ -294,7 +294,7 @@
X return(0);
X }
X
-static int smtp_addfrom(fp)
+static int NEAR smtp_addfrom(fp)
X XFILE *fp;
X {
X char buf[SMTP_MAXBUF];
@@ -307,7 +307,7 @@
X return(Xfwrite((u_char *)buf, n, fp));
X }
X
-static int smtp_addbcc(fp)
+static int NEAR smtp_addbcc(fp)
X XFILE *fp;
X {
X char buf[SMTP_MAXBUF];
@@ -327,7 +327,7 @@
X return(0);
X }
X
-static int smtp_addforwarder(fp)
+static int NEAR smtp_addforwarder(fp)
X XFILE *fp;
X {
X char *cp, buf[SMTP_MAXBUF];
@@ -340,7 +340,7 @@
X return(Xfwrite((u_char *)buf, n, fp));
X }
X
-static int smtp_closehead(fp)
+static int NEAR smtp_closehead(fp)
X XFILE *fp;
X {
X if (smtp_addfrom(fp) < 0 || smtp_addbcc(fp) < 0
diff -urNP ../MHpopd-1.00/smtprecv.c ./smtprecv.c
--- ../MHpopd-1.00/smtprecv.c Thu Mar 31 00:00:00 2005
+++ ./smtprecv.c Tue May 31 00:00:00 2005
@@ -16,7 +16,7 @@
X #define SMTP_AUTH "AUTH="
X #define SMTP_AUTHLEN (sizeof(SMTP_AUTH) - 1)
X
-typedef int (*smtpfunc_t)__P_((char **, XFILE *fp));
+typedef int (NEAR *smtpfunc_t)__P_((char **, XFILE *fp));
X
X typedef struct _smtpcmd_t {
X char *ident;
@@ -30,20 +30,20 @@
X #define SMTP_AUTHEHLO 000010
X #define DEFCMD(i,c,f) {i, sizeof(i) - 1, c, f}
X
-static int smtp_helo __P_((char **, XFILE *fp));
-static int smtp_ehlo __P_((char **, XFILE *fp));
-static int smtp_mail __P_((char **, XFILE *fp));
-static int smtp_rcpt __P_((char **, XFILE *fp));
-static int smtp_data __P_((char **, XFILE *fp));
-static int smtp_rset __P_((char **, XFILE *fp));
-static int smtp_noop __P_((char **, XFILE *fp));
-static int smtp_quit __P_((char **, XFILE *fp));
-static int smtp_vrfy __P_((char **, XFILE *fp));
-static int smtp_none __P_((char **, XFILE *fp));
-static int smtp_xusr __P_((char **, XFILE *fp));
-static int smtp_auth __P_((char **, XFILE *fp));
-static int smtp_help __P_((char **, XFILE *fp));
-static int smtp_noauth __P_((char **, XFILE *fp));
+static int NEAR smtp_helo __P_((char **, XFILE *fp));
+static int NEAR smtp_ehlo __P_((char **, XFILE *fp));
+static int NEAR smtp_mail __P_((char **, XFILE *fp));
+static int NEAR smtp_rcpt __P_((char **, XFILE *fp));
+static int NEAR smtp_data __P_((char **, XFILE *fp));
+static int NEAR smtp_rset __P_((char **, XFILE *fp));
+static int NEAR smtp_noop __P_((char **, XFILE *fp));
+static int NEAR smtp_quit __P_((char **, XFILE *fp));
+static int NEAR smtp_vrfy __P_((char **, XFILE *fp));
+static int NEAR smtp_none __P_((char **, XFILE *fp));
+static int NEAR smtp_xusr __P_((char **, XFILE *fp));
+static int NEAR smtp_auth __P_((char **, XFILE *fp));
+static int NEAR smtp_help __P_((char **, XFILE *fp));
+static int NEAR smtp_noauth __P_((char **, XFILE *fp));
X
X static smtpcmd_t smtpcmdlist[] = {
X DEFCMD("HELO", smtp_helo, SMTP_NOAUTH),
@@ -65,10 +65,10 @@
X DEFCMD("HELP", smtp_help, SMTP_EXTRA | SMTP_NOAUTH | SMTP_NOHELP),
X DEFCMD("*", smtp_noauth, SMTP_NOAUTH | SMTP_NOHELP),
X };
-#define SMTPCMDLISTSIZ (sizeof(smtpcmdlist) / sizeof(smtpcmd_t))
+#define SMTPCMDLISTSIZ ((int)sizeof(smtpcmdlist) / sizeof(smtpcmd_t))
X
X
-static int smtp_helo(argv, fp)
+static int NEAR smtp_helo(argv, fp)
X char **argv;
X XFILE *fp;
X {
@@ -82,10 +82,11 @@
X return(-1);
X
X smtp_status = SMTP_STAT_HELO;
+
X return(0);
X }
X
-static int smtp_ehlo(argv, fp)
+static int NEAR smtp_ehlo(argv, fp)
X char **argv;
X XFILE *fp;
X {
@@ -115,10 +116,11 @@
X }
X
X smtp_status = SMTP_STAT_HELO;
+
X return(0);
X }
X
-static int smtp_mail(argv, fp)
+static int NEAR smtp_mail(argv, fp)
X char **argv;
X XFILE *fp;
X {
@@ -152,10 +154,11 @@
X }
X
X smtp_reverse = cp;
+
X return(0);
X }
X
-static int smtp_rcpt(argv, fp)
+static int NEAR smtp_rcpt(argv, fp)
X char **argv;
X XFILE *fp;
X {
@@ -192,11 +195,12 @@
X }
X
X smtp_forward = list;
+
X return(0);
X }
X
X /*ARGSUSED*/
-static int smtp_data(argv, fp)
+static int NEAR smtp_data(argv, fp)
X char **argv;
X XFILE *fp;
X {
@@ -216,7 +220,7 @@
X }
X
X /*ARGSUSED*/
-static int smtp_rset(argv, fp)
+static int NEAR smtp_rset(argv, fp)
X char **argv;
X XFILE *fp;
X {
@@ -229,7 +233,7 @@
X }
X
X /*ARGSUSED*/
-static int smtp_noop(argv, fp)
+static int NEAR smtp_noop(argv, fp)
X char **argv;
X XFILE *fp;
X {
@@ -237,7 +241,7 @@
X }
X
X /*ARGSUSED*/
-static int smtp_quit(argv, fp)
+static int NEAR smtp_quit(argv, fp)
X char **argv;
X XFILE *fp;
X {
@@ -246,7 +250,7 @@
X return(1);
X }
X
-static int smtp_vrfy(argv, fp)
+static int NEAR smtp_vrfy(argv, fp)
X char **argv;
X XFILE *fp;
X {
@@ -266,7 +270,7 @@
X }
X
X /*ARGSUSED*/
-static int smtp_none(argv, fp)
+static int NEAR smtp_none(argv, fp)
X char **argv;
X XFILE *fp;
X {
@@ -274,26 +278,28 @@
X }
X
X /*ARGSUSED*/
-static int smtp_xusr(argv, fp)
+static int NEAR smtp_xusr(argv, fp)
X char **argv;
X XFILE *fp;
X {
X if (smtp_send(fp, 250, "Initial submission") < 0) return(-1);
X smtp_flags |= SMTP_XUSR;
+
X return(0);
X }
X
-static int smtp_auth(argv, fp)
+static int NEAR smtp_auth(argv, fp)
X char **argv;
X XFILE *fp;
X {
X if (smtp_status > SMTP_STAT_HELO)
X return(smtp_send(fp, 503, "AUTH Already authenticated"));
+
X return(auth_setmech(argv, fp));
X }
X
X /*ARGSUSED*/
-static int smtp_help(argv, fp)
+static int NEAR smtp_help(argv, fp)
X char **argv;
X XFILE *fp;
X {
@@ -317,12 +323,13 @@
X }
X
X /*ARGSUSED*/
-static int smtp_noauth(argv, fp)
+static int NEAR smtp_noauth(argv, fp)
X char **argv;
X XFILE *fp;
X {
X if (smtp_send(fp, 250, "ok") < 0) return(-1);
X smtp_status = SMTP_STAT_HELO;
+
X return(0);
X }
X
diff -urNP ../MHpopd-1.00/socket.c ./socket.c
--- ../MHpopd-1.00/socket.c Thu Mar 31 00:00:00 2005
+++ ./socket.c Tue May 31 00:00:00 2005
@@ -10,14 +10,14 @@
X #include <netinet/in.h>
X #include <arpa/inet.h>
X
-static int Xsocket __P_((int, int, int));
-static int Xgetsockopt __P_((int, int, int, int));
-static int Xsetsockopt __P_((int, int, int, int));
-static int Xbind __P_((int, struct sockaddr *, sock_len_t));
-static int Xlisten __P_((int, int));
+static int NEAR Xsocket __P_((int, int, int));
+static int NEAR Xgetsockopt __P_((int, int, int, int));
+static int NEAR Xsetsockopt __P_((int, int, int, int));
+static int NEAR Xbind __P_((int, struct sockaddr *, sock_len_t));
+static int NEAR Xlisten __P_((int, int));
X
X
-static int Xsocket(domain, type, protocol)
+static int NEAR Xsocket(domain, type, protocol)
X int domain, type, protocol;
X {
X int s;
@@ -31,10 +31,11 @@
X }
X
X ERRORx(("Cannot create socket"));
+
X return(-1);
X }
X
-static int Xgetsockopt(s, level, optname, flags)
+static int NEAR Xgetsockopt(s, level, optname, flags)
X int s, level, optname, flags;
X {
X sock_len_t len;
@@ -56,10 +57,11 @@
X }
X
X if (!(flags & XF_IGNOREERR)) ERRORx(("Cannot set socket option"));
+
X return(-1);
X }
X
-static int Xsetsockopt(s, level, optname, val)
+static int NEAR Xsetsockopt(s, level, optname, val)
X int s, level, optname, val;
X {
X for (;;) {
@@ -77,10 +79,11 @@
X }
X
X ERRORx(("Cannot set socket option"));
+
X return(-1);
X }
X
-static int Xbind(s, addr, len)
+static int NEAR Xbind(s, addr, len)
X int s;
X struct sockaddr *addr;
X sock_len_t len;
@@ -102,10 +105,11 @@
X }
X
X ERRORx(("Cannot bind socket"));
+
X return(-1);
X }
X
-static int Xlisten(s, backlog)
+static int NEAR Xlisten(s, backlog)
X int s, backlog;
X {
X for (;;) {
@@ -123,6 +127,7 @@
X }
X
X ERRORx(("Cannot listen socket"));
+
X return(-1);
X }
X
@@ -221,6 +226,7 @@
X sig_child();
X wait_discard();
X Xclose(s, pathsocket);
+
X return(fd);
X }
X
@@ -254,7 +260,7 @@
X if (!isblank2(buf[ptr])) break;
X if (ptr > (ALLOC_T)0) memmove(buf, &(buf[ptr]), len -= ptr);
X buf[len] = '\0';
-
X if (lenp) *lenp = len;
+
X return(buf);
X }
diff -urNP ../MHpopd-1.00/stat.c ./stat.c
--- ../MHpopd-1.00/stat.c Thu Mar 31 00:00:00 2005
+++ ./stat.c Tue May 31 00:00:00 2005
@@ -8,9 +8,9 @@
X #include "fileio.h"
X
X
-static int Xstat __P_((char *, struct stat *, int));
+static int NEAR Xstat __P_((char *, struct stat *, int));
X
-static int Xstat(path, buf, errflags)
+static int NEAR Xstat(path, buf, errflags)
X char *path;
X struct stat *buf;
X int errflags;
diff -urNP ../MHpopd-1.00/syscall.c ./syscall.c
--- ../MHpopd-1.00/syscall.c Thu Mar 31 00:00:00 2005
+++ ./syscall.c Tue May 31 00:00:00 2005
@@ -101,6 +101,7 @@
X }
X
X if (path) ERRORx(("%s: Cannot read", path));
+
X return(-1);
X }
X
@@ -143,6 +144,7 @@
X }
X
X if (path) ERRORx(("%s: Cannot write", path));
+
X return(-1);
X }
X
@@ -164,6 +166,7 @@
X else if ((errflags & XF_IGNORENOENT) && errno == ENOENT)
X DEBUG(4, ("%s: Cannot find file", path));
X else ERRORx(("%s: Cannot open", path));
+
X return(-1);
X }
X
@@ -189,6 +192,7 @@
X }
X
X if (path) ERRORx(("%s: Cannot close", path));
+
X errno = duperrno;
X }
X
@@ -209,6 +213,7 @@
X }
X
X if (path) ERRORx(("%s: Cannot seek", path));
+
X return((off_t)-1);
X }
X
@@ -231,6 +236,7 @@
X }
X
X if (path) ERRORx(("%s: Cannot fcntl", path));
+
X return(-1);
X }
X
@@ -277,6 +283,7 @@
X #endif /* POSIX || SYSV */
X
X if (path) ERRORx(("%s: Cannot lock", path));
+
X return(-1);
X }
X
@@ -294,6 +301,7 @@
X }
X
X if (path) ERRORx(("%s: Cannot truncate", path));
+
X return(-1);
X }
X
@@ -309,6 +317,7 @@
X }
X
X ERRORx(("Cannot create pipe"));
+
X return(-1);
X }
X
@@ -327,6 +336,7 @@
X }
X
X ERRORx(("%s: Cannot duplicate file descriptor (%d)", path, new));
+
X return(-1);
X }
X
@@ -342,6 +352,7 @@
X }
X
X ERRORx(("%s: Cannot change current working directory", path));
+
X return(-1);
X }
X
@@ -357,6 +368,7 @@
X }
X
X ERRORx(("%s: Cannot rename (-> %s)", old, new));
+
X return(-1);
X }
X
@@ -372,6 +384,7 @@
X }
X
X ERRORx(("%s: Cannot remove", path));
+
X return(-1);
X }
X
@@ -411,6 +424,7 @@
X #endif /* !USESETREUID */
X
X ERRORx(("Cannot set user ID"));
+
X return(-1);
X }
X
@@ -450,6 +464,7 @@
X #endif /* !USESETREGID */
X
X ERRORx(("Cannot set group ID"));
+
X return(-1);
X }
X
@@ -467,6 +482,7 @@
X return((p_id_t)-1);
X }
X if (Xsetpgrp(0, pid) < 0) return((p_id_t)-1);
+ term_closetty();
X
X return(pid);
X #endif /* !USESETSID */
@@ -488,6 +504,7 @@
X }
X
X ERRORx(("Cannot fork"));
+
X return((p_id_t)-1);
X }
X
@@ -508,6 +525,7 @@
X }
X
X ERRORx(("Cannot set process group"));
+
X return(-1);
X }
X
diff -urNP ../MHpopd-1.00/term.c ./term.c
--- ../MHpopd-1.00/term.c Thu Mar 31 00:00:00 2005
+++ ./term.c Tue May 31 00:00:00 2005
@@ -11,20 +11,50 @@
X #ifdef USETERMIOS
X #include <termios.h>
X typedef struct termios termioctl_t;
-#define REQSETP TCSAFLUSH
+#define tioctl(d, r, a) ((r) ? Xtcsetattr(d, (r) - 1, a) : Xtcgetattr(d, a))
+#define REQGETP 0
+#define REQSETP (TCSAFLUSH + 1)
+#define REQSETN (TCSANOW + 1)
X #endif
X
X #ifdef USETERMIO
X #include <termio.h>
X typedef struct termio termioctl_t;
+#define tioctl Xioctl
X #define REQGETP TCGETA
X #define REQSETP TCSETAF
+#define REQSETN TCSETA
X #endif
X
X #ifdef USESGTTY
X #include <sgtty.h>
+typedef int termioctl_t;
+#define tioctl Xioctl
+#define REQGETP TIOCLGET
+#define REQSETP TIOCLSET
+#define REQSETN TIOCSETN
X #endif
X
+#ifdef TIOCGWINSZ
+typedef struct winsize termwsize_t;
+#define REQGETWS TIOCGWINSZ
+#define REQSETWS TIOCSWINSZ
+#else /* !TIOCGWINSZ */
+# ifdef WIOCGETD
+typedef struct uwdata termwsize_t;
+#define REQGETWS WIOCGETD
+#define REQSETWS WIOCSETD
+# else /* !WIOCGETD */
+# ifdef TIOCGSIZE
+typedef struct ttysize termwsize_t;
+#define REQGETWS TIOCGSIZE
+#define REQSETWS TIOCSSIZE
+# else /* !TIOCGSIZE */
+#define NOTERMWSIZE
+# endif /* !TIOCGSIZE */
+# endif /* !WIOCGETD */
+#endif /* !TIOCGWINSZ */
+
X #ifndef ECHOCTL
X #define ECHOCTL 0
X #endif
@@ -32,18 +62,18 @@
X #define LCTLECH 0
X #endif
X
-#ifndef USESGTTY
-static int Xtcgetattr __P_((int, termioctl_t *));
-static int Xtcsetattr __P_((int, int, termioctl_t *));
-#endif
-static p_id_t Xtcgetpgrp __P_((int));
-static int Xtcsetpgrp __P_((int, p_id_t));
-static int term_noctl __P_((int));
+#ifdef USETERMIOS
+static int NEAR Xtcgetattr __P_((int, termioctl_t *));
+static int NEAR Xtcsetattr __P_((int, int, termioctl_t *));
+#endif
+static p_id_t NEAR Xtcgetpgrp __P_((int));
+static int NEAR Xtcsetpgrp __P_((int, p_id_t));
+static int NEAR term_noctl __P_((int));
X
X
X int Xioctl(fd, request, argp)
X int fd, request;
-char *argp;
+VOID_P argp;
X {
X for (;;) {
X if (ioctl(fd, request, argp) >= 0) {
@@ -60,70 +90,65 @@
X }
X
X ERRORx(("Cannot I/O control"));
+
X return(-1);
X }
X
-#ifndef USESGTTY
-static int Xtcgetattr(fd, t)
+#ifdef USETERMIOS
+static int NEAR Xtcgetattr(fd, t)
X int fd;
X termioctl_t *t;
X {
-# ifndef USETERMIOS
- return(Xioctl(fd, REQGETP, (char *)t));
-# else /* USETERMIOS */
X for (;;) {
X if (tcgetattr(fd, t) >= 0) {
X errno = 0;
X return(0);
X }
-# ifdef EAGAIN
+# ifdef EAGAIN
X else if (errno == EAGAIN) continue;
-# endif
-# ifdef EWOULDBLOCK
+# endif
+# ifdef EWOULDBLOCK
X else if (errno == EWOULDBLOCK) continue;
-# endif
+# endif
X else if (errno != EINTR || sig_check(0) < 0) break;
X }
X
X ERRORx(("Cannot get attribute for terminal"));
+
X return(-1);
-# endif /* USETERMIOS */
X }
X
-static int Xtcsetattr(fd, action, t)
+static int NEAR Xtcsetattr(fd, action, t)
X int fd, action;
X termioctl_t *t;
X {
-# ifndef USETERMIOS
- return(Xioctl(fd, action, (char *)t));
-# else /* USETERMIOS */
X for (;;) {
X if (tcsetattr(fd, action, t) >= 0) {
X errno = 0;
X return(0);
X }
-# ifdef EAGAIN
+# ifdef EAGAIN
X else if (errno == EAGAIN) continue;
-# endif
-# ifdef EWOULDBLOCK
+# endif
+# ifdef EWOULDBLOCK
X else if (errno == EWOULDBLOCK) continue;
-# endif
+# endif
X else if (errno != EINTR || sig_check(0) < 0) break;
X }
X
X ERRORx(("Cannot set attribute for terminal"));
+
X return(-1);
-# endif /* USETERMIOS */
X }
-#endif /* !USESGTTY */
+#endif /* USETERMIOS */
X
-static p_id_t Xtcgetpgrp(fd)
+static p_id_t NEAR Xtcgetpgrp(fd)
X int fd;
X {
X p_id_t pgid;
X
X #ifdef TIOCGPGRP
- if (Xioctl(fd, TIOCGPGRP, (char *)&pgid) >= 0) return(pgid);
+ if (Xioctl(fd, TIOCGPGRP, &pgid) >= 0) return(pgid);
X #else /* !TIOCGPGRP */
X for (;;) {
X if ((pgid = tcgetpgrp(fd)) >= (p_id_t)0)
@@ -146,12 +171,12 @@
X return((p_id_t)-1);
X }
X
-static int Xtcsetpgrp(fd, pgid)
+static int NEAR Xtcsetpgrp(fd, pgid)
X int fd;
X p_id_t pgid;
X {
X #ifdef TIOCSPGRP
- if (Xioctl(fd, TIOCSPGRP, (char *)&pgid) >= 0) return(0);
+ if (Xioctl(fd, TIOCSPGRP, &pgid) >= 0) return(0);
X #else /* !TIOCSPGRP */
X for (;;) {
X if (tcsetpgrp(fd, pgid) >= 0)
@@ -174,32 +199,130 @@
X return(-1);
X }
X
-int term_closetty(VOID_A)
+VOID term_safeclose(fd, path)
+int fd;
+char *path;
X {
- int n, fd;
+ int duperrno;
X
- if ((fd = Xopen(_PATH_DEVNULL, O_RDWR, 0, XF_IGNOREERR)) >= 0) {
- VOID_C Xdup2(fd, STDIN_FILENO, pathstdin);
- VOID_C Xdup2(fd, STDOUT_FILENO, pathstdout);
- VOID_C Xdup2(fd, STDERR_FILENO, pathstderr);
- if (fd != STDIN_FILENO
- && fd != STDOUT_FILENO
- && fd != STDERR_FILENO)
- Xclose(fd, _PATH_DEVNULL);
+ if (fd < 0) return;
+ duperrno = errno;
+ if (fd != STDIN_FILENO && fd != STDOUT_FILENO && fd != STDERR_FILENO)
+ Xclose(fd, path);
+ errno = duperrno;
+}
+
+/*ARGSUSED*/
+VOID term_loadtermio(fd, tty, ws)
+int fd;
+char *tty, *ws;
+{
+ ALLOC_T size;
+
+ if (tty) {
+ size = (ALLOC_T)0;
+ VOID_C tioctl(fd, REQSETN, (termioctl_t *)&(tty[size]));
+#ifdef USESGTTY
+ size += sizeof(termioctl_t);
+ VOID_C Xioctl(fd, TIOCLSET, (int *)&(tty[size]));
+ size += sizeof(int);
+ VOID_C Xioctl(fd, TIOCSETC, (struct tchars *)&(tty[size]));
+#endif
+ }
+
+#ifndef NOTERMWSIZE
+ if (ws) VOID_C Xioctl(fd, REQSETWS, (termwsize_t *)ws);
+#endif
+}
+
+VOID term_savetermio(fd, ttyp, wsp)
+int fd;
+char **ttyp, **wsp;
+{
+#ifndef NOTERMWSIZE
+ char *ws;
+#endif
+ ALLOC_T size;
+ char *tty;
+
+ if (ttyp) do {
+ *ttyp = NULL;
+ size = sizeof(termioctl_t);
+#ifdef USESGTTY
+ size += sizeof(int) + sizeof(struct tchars);
+#endif
+ if (!(tty = (char *)malloc(size))) break;
+
+ size = (ALLOC_T)0;
+ if (tioctl(fd, REQGETP, (termioctl_t *)&(tty[size])) < 0) {
+ free(tty);
+ break;
+ }
+#ifdef USESGTTY
+ size += sizeof(termioctl_t);
+ if (Xioctl(fd, TIOCLGET, (int *)&(tty[size])) < 0) {
+ free(tty);
+ break;
+ }
+ size += sizeof(int);
+ if (Xioctl(fd, TIOCGETC, (struct tchars *)&(tty[size])) < 0) {
+ free(tty);
+ break;
+ }
+#endif /* USESGTTY */
+ *ttyp = tty;
+ } while (0);
+
+ if (wsp) do {
+ *wsp = NULL;
+#ifndef NOTERMWSIZE
+ if (!(ws = (char *)malloc(sizeof(termwsize_t)))) break;
+
+ if (Xioctl(fd, REQGETWS, (termwsize_t *)ws) < 0) {
+ free(ws);
+ break;
+ }
+ *wsp = ws;
+#endif /* !NOTERMWSIZE */
+ } while (0);
+}
+
+VOID term_getterm(ttyp, wsp)
+char **ttyp, **wsp;
+{
+ int fd;
+
+ for (fd = 0; fd < 2; fd++) {
+ if (!isatty(fd)) continue;
+ term_savetermio(fd, ttyp, wsp);
+ if (ttyp && *ttyp) ttyp = NULL;
+ if (wsp && *wsp) wsp = NULL;
+ if (!ttyp && !wsp) return;
X }
X
- n = 0;
-#ifdef TIOCNOTTY
X if ((fd = Xopen(_PATH_TTY, O_RDWR, 0, XF_IGNOREERR)) >= 0) {
- n = Xioctl(fd, TIOCNOTTY, NULL);
- if (fd != STDIN_FILENO
- && fd != STDOUT_FILENO
- && fd != STDERR_FILENO)
- Xclose(fd, _PATH_DEVNULL);
+ term_savetermio(fd, ttyp, wsp);
+ term_safeclose(fd, _PATH_DEVNULL);
X }
-#endif /* TIOCNOTTY */
+}
X
- return(n);
+VOID term_closetty(VOID_A)
+{
+ int fd;
+
+#ifdef TIOCNOTTY
+ if ((fd = Xopen(_PATH_TTY, O_RDWR, 0, XF_IGNOREERR)) >= 0) {
+ VOID_C Xioctl(fd, TIOCNOTTY, NULL);
+ term_safeclose(fd, _PATH_DEVNULL);
+ }
+#else
+ if ((fd = Xopen(_PATH_DEVNULL, O_RDWR, 0, XF_IGNOREERR)) >= 0) {
+ VOID_C Xdup2(fd, STDIN_FILENO, pathstdin);
+ VOID_C Xdup2(fd, STDOUT_FILENO, pathstdout);
+ VOID_C Xdup2(fd, STDERR_FILENO, pathstderr);
+ term_safeclose(fd, _PATH_DEVNULL);
+ }
+#endif
X }
X
X int term_gettty(VOID_A)
@@ -208,7 +331,7 @@
X
X if ((fd = Xopen(_PATH_TTY, O_RDWR, 0, XF_IGNOREERR)) < 0) return(-1);
X n = Xtcsetpgrp(fd, Xgetpgrp());
- Xclose(fd, _PATH_TTY);
+ term_safeclose(fd, _PATH_TTY);
X
X return(n);
X }
@@ -219,27 +342,23 @@
X
X if ((fd = Xopen(_PATH_TTY, O_RDWR, 0, XF_IGNOREERR)) < 0) return(0);
X n = (Xtcgetpgrp(fd) >= (p_id_t)0) ? 1 : 0;
- Xclose(fd, _PATH_TTY);
+ term_safeclose(fd, _PATH_TTY);
X
X return(n);
X }
X
-static int term_noctl(fd)
+static int NEAR term_noctl(fd)
X int fd;
X {
-#ifdef USESGTTY
- int lflag;
-
- if (Xioctl(fd, TIOCLGET, (char *)&lflag) < 0) return(-1);
- lflag &= ~LCTLECH;
- if (Xioctl(fd, TIOCLSET, (char *)&lflag) < 0) return(-1);
-#else /* !USESGTTY */
X termioctl_t tty;
X
- if (Xtcgetattr(fd, &tty) < 0) return(-1);
+ if (tioctl(fd, REQGETP, &tty) < 0) return(-1);
+#ifdef USESGTTY
+ tty &= ~LCTLECH;
+#else
X tty.c_lflag &= ~ECHOCTL;
- if (Xtcsetattr(fd, REQSETP, &tty) < 0) return(-1);
-#endif /* !USESGTTY */
+#endif
+ if (tioctl(fd, REQSETP, &tty) < 0) return(-1);
X
X return(0);
X }
@@ -249,6 +368,7 @@
X if (term_noctl(STDIN_FILENO)) return(-1);
X if (term_noctl(STDOUT_FILENO)) return(-1);
X if (term_noctl(STDERR_FILENO)) return(-1);
+ term_getterm(&origtty, &origws);
X
X return(0);
X }
diff -urNP ../MHpopd-1.00/time.c ./time.c
--- ../MHpopd-1.00/time.c Thu Mar 31 00:00:00 2005
+++ ./time.c Tue May 31 00:00:00 2005
@@ -16,21 +16,21 @@
X static char *time_weekstr[] = {
X "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat",
X };
-#define WEEKSTRSIZ (sizeof(time_weekstr) / sizeof (char *))
+#define WEEKSTRSIZ ((int)sizeof(time_weekstr) / sizeof (char *))
X
X static char *time_monthstr[] = {
X "Jan", "Feb", "Mar", "Apr", "May", "Jun",
X "Jul", "Aug", "Sep", "Oct", "Nov", "Dec",
X };
-#define MONTHSTRSIZ (sizeof(time_weekstr) / sizeof (char *))
+#define MONTHSTRSIZ ((int)sizeof(time_weekstr) / sizeof (char *))
X
X #ifdef NOTMGMTOFF
-static long Xtimegm __P_((struct tm *));
+static long NEAR Xtimegm __P_((struct tm *));
X #endif
X
X
X #ifdef NOTMGMTOFF
-static long Xtimegm(tm)
+static long NEAR Xtimegm(tm)
X struct tm *tm;
X {
X long t;
@@ -73,8 +73,8 @@
X
X VOID_C Xgettimeofday(&t_val, &t_zone);
X t = (time_t)(t_val.tv_sec);
-
X if (tp) *tp = t;
+
X return(t);
X }
X
diff -urNP ../MHpopd-1.00/var.c ./var.c
--- ../MHpopd-1.00/var.c Thu Mar 31 00:00:00 2005
+++ ./var.c Tue May 31 00:00:00 2005
@@ -19,6 +19,8 @@
X char pathstdin[] = "(stdin)";
X char pathstdout[] = "(stdout)";
X char pathstderr[] = "(stderr)";
+char *origtty = NULL;
+char *origws = NULL;
X char **pwd_envp = NULL;
X int sig_ignore = 0;
X char log_buf[MAXLINEBUF + 1] = "";
@@ -55,7 +57,7 @@
X char *hostname = NULL;
X char *mhprofile = NULL;
X char *mhpopdrc = NULL;
-int readtimeout = 0;
+int sockettimeout = 0;
X char *mypasswd = NULL;
X char *folders = NULL;
X int debuglevel = 0;
diff -urNP ../MHpopd-1.00/var.h ./var.h
--- ../MHpopd-1.00/var.h Thu Mar 31 00:00:00 2005
+++ ./var.h Tue May 31 00:00:00 2005
@@ -15,6 +15,8 @@
X extern char pathstdin[];
X extern char pathstdout[];
X extern char pathstderr[];
+extern char *origtty;
+extern char *origws;
X extern char **pwd_envp;
X extern int sig_ignore;
X extern char log_buf[MAXLINEBUF + 1];
@@ -51,7 +53,7 @@
X extern char *hostname;
X extern char *mhprofile;
X extern char *mhpopdrc;
-extern int readtimeout;
+extern int sockettimeout;
X extern char *mypasswd;
X extern char *folders;
X extern int debuglevel;
diff -urNP ../MHpopd-1.00/version.h ./version.h
--- ../MHpopd-1.00/version.h Thu Mar 31 00:00:00 2005
+++ ./version.h Tue May 31 00:00:00 2005
@@ -5,4 +5,4 @@
X */
X
X char *distributor = NULL;
-static char version[] = "@(#)mhpopd.c 1.00 03/31/05";
+static char version[] = "@(#)mhpopd.c 1.00a 05/31/05";
diff -urNP ../MHpopd-1.00/wait.c ./wait.c
--- ../MHpopd-1.00/wait.c Thu Mar 31 00:00:00 2005
+++ ./wait.c Tue May 31 00:00:00 2005
@@ -64,10 +64,10 @@
X static waitstat_t *wait_stack = NULL;
X static int wait_max = 0;
X
-static VOID wait_setstat __P_((p_id_t, int));
+static VOID NEAR wait_setstat __P_((p_id_t, int));
X
X
-static VOID wait_setstat(pid, n)
+static VOID NEAR wait_setstat(pid, n)
X p_id_t pid;
X int n;
X {
diff -urNP ../MHpopd-1.00/wild.c ./wild.c
--- ../MHpopd-1.00/wild.c Thu Mar 31 00:00:00 2005
+++ ./wild.c Tue May 31 00:00:00 2005
@@ -11,13 +11,14 @@
X #define wild_plain(c) ((c) & ~WILD_META)
X #define wild_isplain(c) (!((c) & WILD_META))
X
-static u_short *wild_single __P_((u_short *, int, ALLOC_T *));
-static u_short *wild_addch __P_((u_short *, int, ALLOC_T, ALLOC_T *));
-static u_short *wild_bracket __P_((u_short *, char *, ALLOC_T *, ALLOC_T *));
-static int wild_matchbracket __P_((int, u_short *));
+static u_short *NEAR wild_single __P_((u_short *, int, ALLOC_T *));
+static u_short *NEAR wild_addch __P_((u_short *, int, ALLOC_T, ALLOC_T *));
+static u_short *NEAR wild_bracket __P_((u_short *, char *,
+ ALLOC_T *, ALLOC_T *));
+static int NEAR wild_matchbracket __P_((int, u_short *));
X
X
-static u_short *wild_single(pat, c, sizep)
+static u_short *NEAR wild_single(pat, c, sizep)
X u_short *pat;
X int c;
X ALLOC_T *sizep;
@@ -37,7 +38,7 @@
X return(pat);
X }
X
-static u_short *wild_addch(pat, c, ptr, sizep)
+static u_short *NEAR wild_addch(pat, c, ptr, sizep)
X u_short *pat;
X int c;
X ALLOC_T ptr, *sizep;
@@ -60,7 +61,7 @@
X return(pat);
X }
X
-static u_short *wild_bracket(pat, s, lenp, sizep)
+static u_short *NEAR wild_bracket(pat, s, lenp, sizep)
X u_short *pat;
X char *s;
X ALLOC_T *lenp, *sizep;
@@ -141,7 +142,7 @@
X return(pat);
X }
X
-static int wild_matchbracket(c, pat)
+static int NEAR wild_matchbracket(c, pat)
X int c;
X u_short *pat;
X {
@@ -209,6 +210,7 @@
X }
X
X pat += *pat + 1;
+
X return(wild_match(s, len, pat));
X }
X
SHAR_EOF
$echo 'File' 'MHpopd-1.00a.patch' 'is complete' &&
$shar_touch -am 05242327105 'MHpopd-1.00a.patch' &&
chmod 0644 'MHpopd-1.00a.patch' ||
$echo 'restore of' 'MHpopd-1.00a.patch' 'failed'
if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
&& ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
md5sum -c << SHAR_EOF >/dev/null 2>&1 \
|| $echo 'MHpopd-1.00a.patch:' 'MD5 check failed'
4d7a30fa432f3b93dc91cb3b65b2b9ec MHpopd-1.00a.patch
SHAR_EOF
else
shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'MHpopd-1.00a.patch'`"
test 79932 -eq "$shar_count" ||
$echo 'MHpopd-1.00a.patch:' 'original size' '79932,' 'current size' "$shar_count!"
fi
fi
$echo 'You have unpacked the last part'
rm -fr _sh00294
exit 0
--
しらい たかし
Fnews-brouse 1.9(20180406) -- by Mizuno, MWE <mwe@ccsf.jp>
GnuPG Key ID = ECC8A735
GnuPG Key fingerprint = 9BE6 B9E9 55A5 A499 CD51 946E 9BDC 7870 ECC8 A735