When building nethogs inside another git repo (as is i.e. done as part
of a buildroot build) the version is picked up from the outer git repo,
which is confusing as well as introducing reproducibility problems when
rebuilding the same nethogs version produces different results if the
outer repository changes.
Without the ref only the last element of __devicenames is stored in
_devicenames: The temporary is deleted at the end of the for body,
therefore the pointer to the c_str is no longer valid and might be
reused by the implementation. By using a reference in the for head
the c_str does not return a ref to the temporary but to the original
array wich's lifetime is till the end of the function.
On the internet the usage of b and B for bits or bytes is inconsistent.
Lowercase b seems to be used for either, and upperace B is more often
used to mean bytes but usege for bits also exists.
I am not aware of any standard that would mandate one or other use.
Consequently, spelling out the whole word in the output or adding
explanation in documentation is the only way to make sure the output is
interpreted correctly.
To save space on small screens only alter documentation and the bytes
label without prefixes/suffixes.
While at it change uppercase K to lowercase k to correctly spell the
kilo- prefix.
Fixes: #261
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
On the internet the usage of b and B for bits or bytes is inconsistent.
Lowercase b seems to be used for either, and upperace B is more often
used to mean bytes but usege for bits also exists.
I am not aware of any standard that would mandate one or other use.
Consequently, spelling out the whole word in the output or adding
explanation in documentation is the only way to make sure the output is
interpreted correctly.
To save space on small screens only alter documentation and the bytes
label without prefixes/suffixes.
While at it change uppercase K to lowercase k to correctly spell the
kilo- prefix.
Fixes: #261
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Showing the cursor while running (especially on terminals where it
blinks) is a bit visually distracting, and doesn't serve much purpose;
make it invisible in init_ui() and restore the original state in
exit_ui().
To address:
https://github.com/raboof/nethogs/issues/225
add the `-std=c++14` flag when building the application.
This then compiles properly with the Apple version of the Clang
compiler:
Apple clang version 11.0.0 (clang-1100.0.33.17)
Additionally, this removed some warning noise regarding C++11
extensions used without the appropriate `-std=c++11` (or greater)
flag:
./process.h:38:26: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
connection.cpp:107:3: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
connection.cpp:108:8: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
connection.cpp:162:3: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
connection.cpp:187:3: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]