From: Peter Baker Date: Wed, 29 Jun 2011 03:59:15 +0000 (-0700) Subject: Update code to compile under Mac OS X. X-Git-Tag: sersniff-0.0.5~6 X-Git-Url: https://the.earth.li/gitweb/?p=sersniff.git;a=commitdiff_plain;h=ae4ffd933db55029b0f5b5fbc8e1e8a0cc265c38 Update code to compile under Mac OS X. --- diff --git a/disp_basic.c b/disp_basic.c index d1c5015..f1f97ca 100644 --- a/disp_basic.c +++ b/disp_basic.c @@ -21,6 +21,7 @@ */ #include +#include #include "disp_basic.h" diff --git a/sersniff.c b/sersniff.c index 52db00d..f12faf4 100644 --- a/sersniff.c +++ b/sersniff.c @@ -228,26 +228,26 @@ void mainloop(int port1, int port2, int silent, int alpha, long usec_threshold, void usage() { - fprintf(stderr,"sersniff v%s - -Usage: -sersniff [-h] [-i DEV | -l PORT] [-o DEV | -c HOST:PORT] [-b BAUD] [-w USEC] --h This help --x Show hex characters instead of alpha --f PRINTF_OPTS printf style options for printing hex characters - when '-x' switch is given (default \"<%%02hX>\") --i DEVICE Port 1 device (defaults to /dev/ttyS0). Use host:port for - TCP. --1 PORT1_NAME Port 1 name to be printed (defaults to 'Port1') --o DEVICE Port 2 device (defaults to /dev/ttyS1). Use :port for TCP. --2 PORT2_NAME Port 2 name to be printed (defaults to 'Port2') --b BAUD Baud rate (Defaults to 19200) --n No port configuration (do not set BAUD or change settings) --w USECS How many microsecs to wait before reporting a delay - (default is %d) --s Silent - don't pass data from port1 <=> port2, - just display what we see from them. -",VERSION,USEC); + fprintf(stderr,"sersniff v%s\n" + +"Usage:\n" +"sersniff [-h] [-i DEV | -l PORT] [-o DEV | -c HOST:PORT] [-b BAUD] [-w USEC]\n" +"-h This help\n" +"-x Show hex characters instead of alpha\n" +"-f PRINTF_OPTS printf style options for printing hex characters\n" +" when '-x' switch is given (default \"<%%02hX>\")\n" +"-i DEVICE Port 1 device (defaults to /dev/ttyS0). Use host:port for\n" +" TCP.\n" +"-1 PORT1_NAME Port 1 name to be printed (defaults to 'Port1')\n" +"-o DEVICE Port 2 device (defaults to /dev/ttyS1). Use :port for TCP.\n" +"-2 PORT2_NAME Port 2 name to be printed (defaults to 'Port2')\n" +"-b BAUD Baud rate (Defaults to 19200)\n" +"-n No port configuration (do not set BAUD or change settings)\n" +"-w USECS How many microsecs to wait before reporting a delay\n" +" (default is %d)\n" +"-s Silent - don't pass data from port1 <=> port2,\n" +" just display what we see from them.\n" +,VERSION,USEC); exit(1); }