Blame iftop-0.17-ncursesw.patch
|
![](https://seccdn.libravatar.org/avatar/ea064b89e87b1895a84759a4950a139e0016ae503bf0eb4304a2a809343a9d75?s=16&d=retro) |
8b21bd9 |
Patch by Robert Scheck <robert@fedoraproject.org> for iftop >= 0.17, which works
|
|
![](https://seccdn.libravatar.org/avatar/ea064b89e87b1895a84759a4950a139e0016ae503bf0eb4304a2a809343a9d75?s=16&d=retro) |
8b21bd9 |
around a PuTTY issue (doesn't honor vt100 line-drawing when in UTF-8 mode) to get
|
|
![](https://seccdn.libravatar.org/avatar/ea064b89e87b1895a84759a4950a139e0016ae503bf0eb4304a2a809343a9d75?s=16&d=retro) |
8b21bd9 |
sane lines drawn instead of letters. When using PuTTY in UTF-8 mode, you have to
|
|
![](https://seccdn.libravatar.org/avatar/ea064b89e87b1895a84759a4950a139e0016ae503bf0eb4304a2a809343a9d75?s=16&d=retro) |
8b21bd9 |
execute "NCURSES_NO_UTF8_ACS=1 iftop" in the future. Technically, relinking from
|
|
![](https://seccdn.libravatar.org/avatar/ea064b89e87b1895a84759a4950a139e0016ae503bf0eb4304a2a809343a9d75?s=16&d=retro) |
8b21bd9 |
curses to ncursesw is just half of the solution, calling setlocale() is the rest.
|
|
![](https://seccdn.libravatar.org/avatar/ea064b89e87b1895a84759a4950a139e0016ae503bf0eb4304a2a809343a9d75?s=16&d=retro) |
8b21bd9 |
For further information, please have a look to Red Hat Bugzilla, bug ID #546032:
|
|
![](https://seccdn.libravatar.org/avatar/ea064b89e87b1895a84759a4950a139e0016ae503bf0eb4304a2a809343a9d75?s=16&d=retro) |
8b21bd9 |
https://bugzilla.redhat.com/show_bug.cgi?id=546032
|
|
![](https://seccdn.libravatar.org/avatar/ea064b89e87b1895a84759a4950a139e0016ae503bf0eb4304a2a809343a9d75?s=16&d=retro) |
8b21bd9 |
|
|
![](https://seccdn.libravatar.org/avatar/ea064b89e87b1895a84759a4950a139e0016ae503bf0eb4304a2a809343a9d75?s=16&d=retro) |
8b21bd9 |
--- iftop-0.17/configure.in 2006-02-12 19:34:24.000000000 +0100
|
|
![](https://seccdn.libravatar.org/avatar/ea064b89e87b1895a84759a4950a139e0016ae503bf0eb4304a2a809343a9d75?s=16&d=retro) |
8b21bd9 |
+++ iftop-0.17/configure.in.ncursesw 2010-04-01 15:12:36.000000000 +0200
|
|
![](https://seccdn.libravatar.org/avatar/ea064b89e87b1895a84759a4950a139e0016ae503bf0eb4304a2a809343a9d75?s=16&d=retro) |
8b21bd9 |
@@ -352,7 +352,7 @@
|
|
![](https://seccdn.libravatar.org/avatar/ea064b89e87b1895a84759a4950a139e0016ae503bf0eb4304a2a809343a9d75?s=16&d=retro) |
8b21bd9 |
|
|
![](https://seccdn.libravatar.org/avatar/ea064b89e87b1895a84759a4950a139e0016ae503bf0eb4304a2a809343a9d75?s=16&d=retro) |
8b21bd9 |
AC_MSG_CHECKING([for a curses library containing mvchgat])
|
|
![](https://seccdn.libravatar.org/avatar/ea064b89e87b1895a84759a4950a139e0016ae503bf0eb4304a2a809343a9d75?s=16&d=retro) |
8b21bd9 |
oldLIBS=$LIBS
|
|
![](https://seccdn.libravatar.org/avatar/ea064b89e87b1895a84759a4950a139e0016ae503bf0eb4304a2a809343a9d75?s=16&d=retro) |
8b21bd9 |
-for curseslib in curses ncurses ; do
|
|
![](https://seccdn.libravatar.org/avatar/ea064b89e87b1895a84759a4950a139e0016ae503bf0eb4304a2a809343a9d75?s=16&d=retro) |
8b21bd9 |
+for curseslib in ncursesw curses ncurses ; do
|
|
![](https://seccdn.libravatar.org/avatar/ea064b89e87b1895a84759a4950a139e0016ae503bf0eb4304a2a809343a9d75?s=16&d=retro) |
8b21bd9 |
LIBS="$oldLIBS -l$curseslib"
|
|
![](https://seccdn.libravatar.org/avatar/ea064b89e87b1895a84759a4950a139e0016ae503bf0eb4304a2a809343a9d75?s=16&d=retro) |
8b21bd9 |
AC_TRY_LINK([
|
|
![](https://seccdn.libravatar.org/avatar/ea064b89e87b1895a84759a4950a139e0016ae503bf0eb4304a2a809343a9d75?s=16&d=retro) |
8b21bd9 |
#include <curses.h>
|
|
![](https://seccdn.libravatar.org/avatar/ea064b89e87b1895a84759a4950a139e0016ae503bf0eb4304a2a809343a9d75?s=16&d=retro) |
8b21bd9 |
--- iftop-0.17/iftop.c 2005-03-31 14:08:05.000000000 +0200
|
|
![](https://seccdn.libravatar.org/avatar/ea064b89e87b1895a84759a4950a139e0016ae503bf0eb4304a2a809343a9d75?s=16&d=retro) |
8b21bd9 |
+++ iftop-0.17/iftop.c.ncursesw 2010-04-01 15:11:50.000000000 +0200
|
|
![](https://seccdn.libravatar.org/avatar/ea064b89e87b1895a84759a4950a139e0016ae503bf0eb4304a2a809343a9d75?s=16&d=retro) |
8b21bd9 |
@@ -25,6 +25,7 @@
|
|
![](https://seccdn.libravatar.org/avatar/ea064b89e87b1895a84759a4950a139e0016ae503bf0eb4304a2a809343a9d75?s=16&d=retro) |
8b21bd9 |
#include <signal.h>
|
|
![](https://seccdn.libravatar.org/avatar/ea064b89e87b1895a84759a4950a139e0016ae503bf0eb4304a2a809343a9d75?s=16&d=retro) |
8b21bd9 |
#include <string.h>
|
|
![](https://seccdn.libravatar.org/avatar/ea064b89e87b1895a84759a4950a139e0016ae503bf0eb4304a2a809343a9d75?s=16&d=retro) |
8b21bd9 |
#include <unistd.h>
|
|
![](https://seccdn.libravatar.org/avatar/ea064b89e87b1895a84759a4950a139e0016ae503bf0eb4304a2a809343a9d75?s=16&d=retro) |
8b21bd9 |
+#include <locale.h>
|
|
![](https://seccdn.libravatar.org/avatar/ea064b89e87b1895a84759a4950a139e0016ae503bf0eb4304a2a809343a9d75?s=16&d=retro) |
8b21bd9 |
|
|
![](https://seccdn.libravatar.org/avatar/ea064b89e87b1895a84759a4950a139e0016ae503bf0eb4304a2a809343a9d75?s=16&d=retro) |
8b21bd9 |
#include "iftop.h"
|
|
![](https://seccdn.libravatar.org/avatar/ea064b89e87b1895a84759a4950a139e0016ae503bf0eb4304a2a809343a9d75?s=16&d=retro) |
8b21bd9 |
#include "addr_hash.h"
|
|
![](https://seccdn.libravatar.org/avatar/ea064b89e87b1895a84759a4950a139e0016ae503bf0eb4304a2a809343a9d75?s=16&d=retro) |
8b21bd9 |
@@ -563,6 +564,8 @@
|
|
![](https://seccdn.libravatar.org/avatar/ea064b89e87b1895a84759a4950a139e0016ae503bf0eb4304a2a809343a9d75?s=16&d=retro) |
8b21bd9 |
pthread_t thread;
|
|
![](https://seccdn.libravatar.org/avatar/ea064b89e87b1895a84759a4950a139e0016ae503bf0eb4304a2a809343a9d75?s=16&d=retro) |
8b21bd9 |
struct sigaction sa = {};
|
|
![](https://seccdn.libravatar.org/avatar/ea064b89e87b1895a84759a4950a139e0016ae503bf0eb4304a2a809343a9d75?s=16&d=retro) |
8b21bd9 |
|
|
![](https://seccdn.libravatar.org/avatar/ea064b89e87b1895a84759a4950a139e0016ae503bf0eb4304a2a809343a9d75?s=16&d=retro) |
8b21bd9 |
+ setlocale(LC_ALL, "");
|
|
![](https://seccdn.libravatar.org/avatar/ea064b89e87b1895a84759a4950a139e0016ae503bf0eb4304a2a809343a9d75?s=16&d=retro) |
8b21bd9 |
+
|
|
![](https://seccdn.libravatar.org/avatar/ea064b89e87b1895a84759a4950a139e0016ae503bf0eb4304a2a809343a9d75?s=16&d=retro) |
8b21bd9 |
/* TODO: tidy this up */
|
|
![](https://seccdn.libravatar.org/avatar/ea064b89e87b1895a84759a4950a139e0016ae503bf0eb4304a2a809343a9d75?s=16&d=retro) |
8b21bd9 |
/* read command line options and config file */
|
|
![](https://seccdn.libravatar.org/avatar/ea064b89e87b1895a84759a4950a139e0016ae503bf0eb4304a2a809343a9d75?s=16&d=retro) |
8b21bd9 |
config_init();
|