]> the.earth.li Git - sersniff.git/blobdiff - disp_basic.c
Import sersniff 0.0.4
[sersniff.git] / disp_basic.c
index 39f4e36b6ecb54cf2a059eb7e2183340eb8288e8..d1c50150abe1d8380d5d01c795ca11b6bd766809 100644 (file)
@@ -52,7 +52,7 @@ void disp_outputstatus(char *string)
 
 /* Output a string from the port. */
 void disp_outputstr(int port, char *string,
-               long usec_threshold, long usec_waited)
+               long usec_threshold, long usec_waited, char *name1, char *name2)
 {
        if (usec_waited>usec_threshold) {
                /* report how long we waited between the last port */
@@ -66,7 +66,11 @@ void disp_outputstr(int port, char *string,
        if (last!=port) {
                /* If we didn't just send a CR, we need to now */
                if (wrap!=WRAPINIT) printf("\n");
-               printf("\nPort%d:\t", port);
+               //printf("\nPort%d:\t", port);
+               if (port == 1)
+                       printf("\n%s:\t",name1);
+               else
+                       printf("\n%s:\t",name2);
                last=port;
                wrap=WRAPINIT;
        } else if (wrap==WRAPINIT) {