Fix serialdump code style
#define _GNU_SOURCE
+/*---------------------------------------------------------------------------*/
#include <stdio.h>
#include <fcntl.h>
#include <termios.h>
#include <string.h>
#include <time.h>
#include <signal.h>
-
+/*---------------------------------------------------------------------------*/
#define BAUDRATE B115200
#define BAUDRATE_S "115200"
+/*---------------------------------------------------------------------------*/
#ifdef linux
#define MODEMDEVICE "/dev/ttyS0"
#else
#define MODEMDEVICE "/dev/com1"
#endif /* linux */
-
+/*---------------------------------------------------------------------------*/
#define SLIP_END 0300
#define SLIP_ESC 0333
#define SLIP_ESC_END 0334
#define MODE_SLIP_AUTO 6
#define MODE_SLIP 7
#define MODE_SLIP_HIDE 8
+/*---------------------------------------------------------------------------*/
-static unsigned char rxbuf[2048];
+static unsigned char rxbuf[2048];
+/*---------------------------------------------------------------------------*/
static int
usage(int result)
{
@@ -54,7 +58,7 @@ usage(int result)
printf(" (see man page for strftime() for format description)\n");
return result;
}
-
+/*---------------------------------------------------------------------------*/
static void
print_hex_line(char *prefix, unsigned char *outbuf, int index)
{
@@ -82,13 +86,13 @@ print_hex_line(char *prefix, unsigned char *outbuf, int index)
}
}
}
-
+/*---------------------------------------------------------------------------*/
static void
intHandler(int sig)
{
exit(0);
}
-
+/*---------------------------------------------------------------------------*/
int
main(int argc, char **argv)
{
@@ -174,8 +178,6 @@ main(int argc, char **argv)
}
fprintf(stderr, "connecting to %s (%s)", device, speedname);
-
-
#ifndef O_SYNC
#define O_SYNC 0
#endif
