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);
}