projects
/
liboping.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
000eb20
)
Add documentation for the "-u" and "-U" options.
author
Florian Forster
<ff@octo.it>
Fri, 6 Dec 2013 10:02:35 +0000
(11:02 +0100)
committer
Florian Forster
<ff@octo.it>
Fri, 6 Dec 2013 10:02:35 +0000
(11:02 +0100)
src/mans/oping.pod
patch
|
blob
|
history
src/oping.c
patch
|
blob
|
history
diff --git
a/src/mans/oping.pod
b/src/mans/oping.pod
index
56712fd
..
aedb728
100644
(file)
--- a/
src/mans/oping.pod
+++ b/
src/mans/oping.pod
@@
-166,6
+166,11
@@
I<Explicit Congestion Notification> (ECN), even if the deprecated
I<Type of Service> (ToS) aliases were used to specify the bits of outgoing
packets.
I<Type of Service> (ToS) aliases were used to specify the bits of outgoing
packets.
+=item B<-u>|B<-U>
+
+I<noping only> B<-u> forces UTF-8 output, B<-U> disables UTF-8 output. If
+neither is given, the codeset is automatically determined from the locale.
+
=back
=head1 COLORS
=back
=head1 COLORS
diff --git
a/src/oping.c
b/src/oping.c
index
eb16469
..
a19c420
100644
(file)
--- a/
src/oping.c
+++ b/
src/oping.c
@@
-155,7
+155,9
@@
static char *opt_filename = NULL;
static int opt_count = -1;
static int opt_send_ttl = 64;
static uint8_t opt_send_qos = 0;
static int opt_count = -1;
static int opt_send_ttl = 64;
static uint8_t opt_send_qos = 0;
+#if USE_NCURSES
static int opt_utf8 = 0;
static int opt_utf8 = 0;
+#endif
static int host_num = 0;
static int host_num = 0;
@@
-300,6
+302,9
@@
static void usage_exit (const char *name, int status) /* {{{ */
" -I srcaddr source address\n"
" -D device outgoing interface name\n"
" -f filename filename to read hosts from\n"
" -I srcaddr source address\n"
" -D device outgoing interface name\n"
" -f filename filename to read hosts from\n"
+#if USE_NCURSES
+ " -u / -U force / disable UTF-8 output\n"
+#endif
"\noping "PACKAGE_VERSION", http://verplant.org/liboping/\n"
"by Florian octo Forster <octo@verplant.org>\n"
"\noping "PACKAGE_VERSION", http://verplant.org/liboping/\n"
"by Florian octo Forster <octo@verplant.org>\n"
@@
-502,7
+507,11
@@
static int read_options (int argc, char **argv) /* {{{ */
while (1)
{
while (1)
{
- optchar = getopt (argc, argv, "46uUc:hi:I:t:Q:f:D:");
+ optchar = getopt (argc, argv, "46c:hi:I:t:Q:f:D:"
+#if USE_NCURSES
+ "uU"
+#endif
+ );
if (optchar == -1)
break;
if (optchar == -1)
break;
@@
-514,13
+523,6
@@
static int read_options (int argc, char **argv) /* {{{ */
opt_addrfamily = (optchar == '4') ? AF_INET : AF_INET6;
break;
opt_addrfamily = (optchar == '4') ? AF_INET : AF_INET6;
break;
- case 'u':
- opt_utf8 = 2;
- break;
- case 'U':
- opt_utf8 = 1;
- break;
-
case 'c':
{
int new_count;
case 'c':
{
int new_count;
@@
-580,6
+582,15
@@
static int read_options (int argc, char **argv) /* {{{ */
set_opt_send_qos (optarg);
break;
set_opt_send_qos (optarg);
break;
+#if USE_NCURSES
+ case 'u':
+ opt_utf8 = 2;
+ break;
+ case 'U':
+ opt_utf8 = 1;
+ break;
+#endif
+
case 'h':
usage_exit (argv[0], 0);
break;
case 'h':
usage_exit (argv[0], 0);
break;