author | Florian Forster <ff@octo.it> | |
Thu, 18 Aug 2016 04:58:53 +0000 (06:58 +0200) | ||
committer | Florian Forster <ff@octo.it> | |
Thu, 18 Aug 2016 04:58:53 +0000 (06:58 +0200) |
1 | 2 | |||
---|---|---|---|---|
src/oping.c | patch | | diff1 | | diff2 | | blob | history |
diff --combined src/oping.c
index 883c86227c6713f33247548136ee3d81c899aefa,0ec67947310e7b73d5d8ae1cb8afbf016bdc0577..0cfe64672065c0a99dd3a1d2e9ca8bc9bd5763ce
--- 1/src/oping.c
--- 2/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
free (opt_outfile);
opt_outfile = strdup (optarg);
}
+ break;
case 'P':
{
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)) */
{