]> git.dd.net - ust.git/commitdiff
minor tweaks and fixes
authorgit <redacted>
Mon, 2 Mar 2026 08:20:35 +0000 (03:20 -0500)
committergit <redacted>
Mon, 2 Mar 2026 08:20:35 +0000 (03:20 -0500)
config.def.h
ust.c

index 44583ca83ac567e486fa529e39eb039124220e94..c7637dc6175ae83da9e6517380b55d05c357e7fd 100644 (file)
@@ -60,7 +60,7 @@ int verbose = 0; /*(0|1)*/
  * tty* - 'dial-in' device, blocks opening until a connection is established
  * ttyU* - USB variant
  */
-char line[16] = "/dev/cuau0";
+char line[64] = "/dev/cuau0";
 
 /*
  * baud is usually configurable to standard values only, 
diff --git a/ust.c b/ust.c
index 7d4918c96268e1b48dd17ed7bd5cc8e707174e56..df002ce15f8c716a9f0a082b4ef325fa88f8c034 100644 (file)
--- a/ust.c
+++ b/ust.c
@@ -456,6 +456,7 @@ readport(void *unused)
 {
        Sizes msizes;
        struct timespec ts;
+
        ts.tv_sec = sreaddelay;
        ts.tv_nsec = nsreaddelay;
        msizes.sizesm = scratchrsz;
@@ -561,7 +562,7 @@ rmchar(char *buff, ssize_t size, int *scratch, const Args *args)
 }
 
 void
-interchck()
+interchck(void)
 {
        if (interactive) {
                if (gettermattr(STDIN_FILENO, &origterm) < 0 )
@@ -602,7 +603,7 @@ interchck()
 }
 
 void
-cechck()
+cechck(void)
 {
        if ((!half || !canonical) && interactive) {
                newterm.c_lflag |= ECHO;
@@ -871,7 +872,7 @@ main(int argc, char *argv[])
                case 'd':
                        tl = strtol(optarg, &endptr, 10);
                        if (errno != 0 || *endptr != '\0' || t < 0) {
-                               fprintf(stderr, "%s: invalid character delay: %s\n", argv[0], optarg);
+                               fprintf(stderr, "invalid character delay: %s\n", optarg);
                                goto ustusage;
                        } else {
                                chardelay = tl;
@@ -879,7 +880,7 @@ main(int argc, char *argv[])
                        break;
                case 'D':
                        if (optarg[1] != '\0' || !(optarg[0] >= '5' && optarg[0] <= '8')) {
-                               fprintf(stderr, "%s: invalid number of data bits: %s\n", argv[0], optarg);
+                               fprintf(stderr, "invalid number of data bits: %s\n", optarg);
                                goto ustusage;  
                        } else {
                                datab = optarg[0];
@@ -907,11 +908,11 @@ main(int argc, char *argv[])
                        stopb ^= 1; break;
                case 'l':
                        if (devset) {
-                               fprintf(stderr, "%s: cannot specify multiple devices\n", argv[0]);
+                               fprintf(stderr, "cannot specify multiple devices\n");
                                goto ustusage;
                        }
-                       if (strlen(optarg) > 10) {
-                               fprintf(stderr, "%s: device name too long\n", argv[0]);
+                       if (strlen(optarg) > 58) {
+                               fprintf(stderr, "device name too long\n");
                                goto ustusage;
                        }
                        if (strchr(optarg, '/')) {
@@ -949,8 +950,7 @@ main(int argc, char *argv[])
                                        " [--canonical|-c] [--echo|-h]\n"
                                        "           [--translation|-t option]"
                                        " [--input-translation|-T option]\n"
-                                       "           [--verbose|-v] [--backspace|-b]"
-                                       " [--timeout-s|-F #] [--timeout-ns|-f #]",
+                                       "           [--verbose|-v] [--backspace|-b]\n",
                                        argv[0]);
                        break;
                }
@@ -972,7 +972,6 @@ main(int argc, char *argv[])
        signal(SIGINT, sighandl);
        signal(SIGQUIT, sighandl);
        signal(SIGTERM, sighandl);
-       signal(SIGCHLD, SIG_DFL);
 
        fd = openport();