fixes from rick adams
authorJim Bloom <bloom@ucbvax.Berkeley.EDU>
Fri, 21 Jun 1985 01:11:42 +0000 (17:11 -0800)
committerJim Bloom <bloom@ucbvax.Berkeley.EDU>
Fri, 21 Jun 1985 01:11:42 +0000 (17:11 -0800)
SCCS-vsn: usr.bin/uucp/port/mkdir.c 5.2
SCCS-vsn: usr.bin/uucp/uucico/pk0.c 5.4
SCCS-vsn: usr.bin/uucp/uucico/pk1.c 5.4

usr/src/usr.bin/uucp/port/mkdir.c
usr/src/usr.bin/uucp/uucico/pk0.c
usr/src/usr.bin/uucp/uucico/pk1.c

index c95e1de..90b658a 100644 (file)
@@ -1,9 +1,10 @@
 #ifndef lint
 #ifndef lint
-static char sccsid[] = "@(#)mkdir.c    5.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)mkdir.c    5.2 (Berkeley) %G%";
 #endif
 
 #ifndef BSD4_2
 #include <stdio.h>
 #endif
 
 #ifndef BSD4_2
 #include <stdio.h>
+
 /*
  * make a directory. Also make sure that the directory is owned
  * by the right userid
 /*
  * make a directory. Also make sure that the directory is owned
  * by the right userid
@@ -19,10 +20,11 @@ int mode;
                        ;
                (void) chmod(path, mode);
        } else {
                        ;
                (void) chmod(path, mode);
        } else {
-               (void) umask(mode);
+               (void) umask(~mode);
                (void) execlp("mkdir", "mkdir", path, (char *)NULL);
                perror(path);
                _exit(1);
        }
                (void) execlp("mkdir", "mkdir", path, (char *)NULL);
                perror(path);
                _exit(1);
        }
+       return status;
 }
 #endif !BSD4_2
 }
 #endif !BSD4_2
index f9afd6f..8d0789d 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char sccsid[] = "@(#)pk0.c      5.3 (Berkeley) %G%";
+static char sccsid[] = "@(#)pk0.c      5.4 (Berkeley) %G%";
 #endif
 
 #include "uucp.h"
 #endif
 
 #include "uucp.h"
@@ -14,7 +14,6 @@ char mask[8] = { 1, 2, 4, 010, 020, 040, 0100, 0200 };
 
 struct pack *pklines[NPLINES];
 int    pkactive;
 
 struct pack *pklines[NPLINES];
 int    pkactive;
-long chksum();
 
 /*
  * receive control messages
 
 /*
  * receive control messages
@@ -210,17 +209,15 @@ free:
 }
 
 /*ARGSUSED*/
 }
 
 /*ARGSUSED*/
-pkread(ipk, ibuf, icount)
-int icount;
+pkread(pk, ibuf, icount)
+register struct pack *pk;
 char *ibuf;
 char *ibuf;
-struct pack *ipk;
+int icount;
 {
 {
-       register struct pack *pk;
        register x;
        int is, cc, xfr, count;
        char *cp, **bp;
 
        register x;
        int is, cc, xfr, count;
        char *cp, **bp;
 
-       pk = ipk;
        xfr = 0;
        count = 0;
        while (pkaccept(pk) == 0)
        xfr = 0;
        count = 0;
        while (pkaccept(pk) == 0)
@@ -272,18 +269,16 @@ struct pack *ipk;
 }
 
 /*ARGSUSED*/
 }
 
 /*ARGSUSED*/
-pkwrite(ipk, ibuf, icount)
-struct pack *ipk;
+pkwrite(pk, ibuf, icount)
+register struct pack *pk;
 char *ibuf;
 int icount;
 {
 char *ibuf;
 int icount;
 {
-       register struct pack *pk;
        register x;
        int partial;
        caddr_t cp;
        int cc, fc, count;
 
        register x;
        int partial;
        caddr_t cp;
        int cc, fc, count;
 
-       pk = ipk;
        if (pk->p_state&DOWN || !pk->p_state&LIVE) {
                return -1;
        }
        if (pk->p_state&DOWN || !pk->p_state&LIVE) {
                return -1;
        }
@@ -347,8 +342,6 @@ register struct pack *pk;
        return i;
 }
 
        return i;
 }
 
-
-
 pkoutput(pk)
 register struct pack *pk;
 {
 pkoutput(pk)
 register struct pack *pk;
 {
@@ -456,17 +449,13 @@ out:
  *     releasing space and turning off line discipline
  */
 /*ARGSUSED*/
  *     releasing space and turning off line discipline
  */
 /*ARGSUSED*/
-pkclose(ipk, ibuf, icount)
-struct pack *ipk;
-char *ibuf;
-int icount;
+pkclose(pk)
+register struct pack *pk;
 {
 {
-       register struct pack *pk;
        register i;
        char **bp;
        int rcheck = 0;
 
        register i;
        char **bp;
        int rcheck = 0;
 
-       pk = ipk;
        pk->p_state |= DRAINO;
 
        /*
        pk->p_state |= DRAINO;
 
        /*
@@ -532,18 +521,6 @@ register struct pack *pk;
        pk->p_nxtps = 1;
 }
 
        pk->p_nxtps = 1;
 }
 
-pkline(pk)
-register struct pack *pk;
-{
-       register i;
-
-       for(i=0;i<NPLINES;i++) {
-               if (pklines[i]==pk)
-                       return i;
-       }
-       return -i;
-}
-
 #ifndef BSD4_2
 bzero(s,n)
 register char *s;
 #ifndef BSD4_2
 bzero(s,n)
 register char *s;
index 77b424f..42a565b 100644 (file)
@@ -1,11 +1,11 @@
 #ifndef lint
 #ifndef lint
-static char sccsid[] = "@(#)pk1.c      5.3 (Berkeley) %G%";
+static char sccsid[] = "@(#)pk1.c      5.4 (Berkeley) %G%";
 #endif
 
 #endif
 
+#include <signal.h>
 #include "uucp.h"
 #include "pk.h"
 #include <setjmp.h>
 #include "uucp.h"
 #include "pk.h"
 #include <setjmp.h>
-#include <signal.h>
 #ifdef BSD4_2
 #include <sys/time.h>
 #endif BSD4_2
 #ifdef BSD4_2
 #include <sys/time.h>
 #endif BSD4_2
@@ -22,8 +22,8 @@ int iomask[2];
 #define CONNODATA 10
 #define NTIMEOUT 10
 
 #define CONNODATA 10
 #define NTIMEOUT 10
 
-extern int Errorrate;
 extern int errno;
 extern int errno;
+extern int Retries;
 extern char *sys_errlist[];
 extern jmp_buf Sjbuf;
 extern char *malloc();
 extern char *sys_errlist[];
 extern jmp_buf Sjbuf;
 extern char *malloc();
@@ -35,7 +35,7 @@ int Ntimeout = 0;
  *
  */
 
  *
  */
 
-struct pack *pklines[NPLINES];
+extern struct pack *pklines[];
 
 /*
  * start initial synchronization.
 
 /*
  * start initial synchronization.
@@ -150,6 +150,7 @@ struct pack *ipk;
                }
                /* set up retransmit or REJ */
                tries++;
                }
                /* set up retransmit or REJ */
                tries++;
+               Retries++;
                pk->p_msg |= pk->p_rmsg;
                if (pk->p_msg == 0)
                        pk->p_msg |= M_RR;
                pk->p_msg |= pk->p_rmsg;
                if (pk->p_msg == 0)
                        pk->p_msg |= M_RR;