diff --git a/src/oping.c b/src/oping.c
index e3bbffc7e66559986d16c12c0df42411e3013023..0ec67947310e7b73d5d8ae1cb8afbf016bdc0577 100644 (file)
--- a/src/oping.c
+++ b/src/oping.c
static int opt_utf8 = 0;
#endif
static char *opt_outfile = NULL;
+static int opt_bell = 0;
static int host_num = 0;
static FILE *outfile = NULL;
while (1)
{
- optchar = getopt (argc, argv, "46c:hi:I:t:Q:f:D:Z:O:P:m:w:"
+ optchar = getopt (argc, argv, "46c:hi:I:t:Q:f:D:Z:O:P:m:w:b"
#if USE_NCURSES
"uUg:"
#endif
opt_utf8 = 1;
break;
#endif
+ case 'b':
+ opt_bell = 1;
+ break;
case 'Z':
{
#if USE_NCURSES
}
#endif
+ if (opt_bell) {
+#if USE_NCURSES
+ beep();
+#else
+ HOST_PRINTF ("\a");
+#endif
+ }
}
else /* if (!(latency > 0.0)) */
{
if ((sequence % 32) == 0)
fprintf (outfile, "#time,host,latency[ms]\n");
- fprintf (outfile, "%.3f \"%s\" %.2f\n", t, context->host, latency);
+ fprintf (outfile, "%.3f,\"%s\",%.2f\n", t, context->host, latency);
}
}