fixes from rick adams
authorJim Bloom <bloom@ucbvax.Berkeley.EDU>
Mon, 24 Jun 1985 04:48:59 +0000 (20:48 -0800)
committerJim Bloom <bloom@ucbvax.Berkeley.EDU>
Mon, 24 Jun 1985 04:48:59 +0000 (20:48 -0800)
SCCS-vsn: usr.bin/uucp/uulog/uulog.c 5.4
SCCS-vsn: usr.bin/uucp/uupoll/uupoll.c 5.4

usr/src/usr.bin/uucp/uulog/uulog.c
usr/src/usr.bin/uucp/uupoll/uupoll.c

index 89062aa..1131600 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char sccsid[] = "@(#)uulog.c    5.3 (Berkeley) %G%";
+static char sccsid[] = "@(#)uulog.c    5.4 (Berkeley) %G%";
 #endif
 
 #include "uucp.h"
 #endif
 
 #include "uucp.h"
@@ -30,8 +30,8 @@ char *argv[];
                                argv++;
                                argc--;
                        }
                                argv++;
                                argc--;
                        }
-                       if (strlen(sys) > 7)
-                               sys[7] = '\0';
+                       if (strlen(sys) > MAXBASENAME)
+                               sys[MAXBASENAME] = '\0';
                        if (versys(&sys) != SUCCESS){
                                fprintf(stderr,"uulog: unknown system %s\n", sys);
                                sys = NULL;
                        if (versys(&sys) != SUCCESS){
                                fprintf(stderr,"uulog: unknown system %s\n", sys);
                                sys = NULL;
index 158eec4..4570791 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char sccsid[] = "@(#)uupoll.c   5.3 (Berkeley) %G%";
+static char sccsid[] = "@(#)uupoll.c   5.4 (Berkeley) %G%";
 #endif
 
 /*
 #endif
 
 /*
@@ -23,7 +23,7 @@ register char **argv;
        int ret;
        char wrkpre[MAXFULLNAME];
        char file[MAXFULLNAME];
        int ret;
        char wrkpre[MAXFULLNAME];
        char file[MAXFULLNAME];
-       char grade = 'z';
+       char grade = 'A';
        int nocall = 0;
 
        if (argc < 2) {
        int nocall = 0;
 
        if (argc < 2) {
@@ -55,13 +55,13 @@ register char **argv;
                        continue;
                }
                /* Remove any STST file that might stop the poll */
                        continue;
                }
                /* Remove any STST file that might stop the poll */
-               sprintf(wrkpre, "%s/LCK..%.7s", LOCKDIR, argv[0]);
+               sprintf(wrkpre, "%s/LCK..%.*s", LOCKDIR, MAXBASENAME, argv[0]);
                if (access(wrkpre, 0) < 0)
                        rmstat(argv[0]);
                if (access(wrkpre, 0) < 0)
                        rmstat(argv[0]);
-               sprintf(wrkpre, "%c.%.7s", CMDPRE, argv[0]);
+               sprintf(wrkpre, "%c.%.*s", CMDPRE, SYSNSIZE, argv[0]);
                if (!iswrk(file, "chk", Spool, wrkpre)) {
                if (!iswrk(file, "chk", Spool, wrkpre)) {
-                       sprintf(file, "%s/%c.%.7s%cPOLL", subdir(Spool, CMDPRE),
-                               CMDPRE, argv[0], grade);
+                       sprintf(file, "%s/%c.%.*s%cPOLL", subdir(Spool, CMDPRE),
+                               CMDPRE, SYSNSIZE, argv[0], grade);
                        close(creat(file, 0666));
                }
                /* Attempt the call */
                        close(creat(file, 0666));
                }
                /* Attempt the call */