From 0e89998ee48f19dcf5deeccbcfe374d730c9efa1 Mon Sep 17 00:00:00 2001 From: cousine Date: Wed, 10 Feb 2016 17:38:11 +0200 Subject: [PATCH] Add new mode to other platforms and indicate mac only support in README --- README.rst | 1 + freebsd/memory.cc | 2 +- linux/memory.cc | 2 +- netbsd/memory.cc | 2 +- openbsd/memory.cc | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index 1ab1fd9..eabffc2 100644 --- a/README.rst +++ b/README.rst @@ -124,6 +124,7 @@ The full usage:: Set how many lines should be drawn in a graph. Default: 10 -m , --mem-mode Set the memory presentation mode, 0 for used/total, 1 for free memory and 2 for percentage. + Currently supported only by OSX Default: 0 diff --git a/freebsd/memory.cc b/freebsd/memory.cc index 315b203..64f84d2 100644 --- a/freebsd/memory.cc +++ b/freebsd/memory.cc @@ -29,7 +29,7 @@ #include "luts.h" #include "conversions.h" -std::string mem_string( bool use_colors = false ) +std::string mem_string( bool use_colors = false, int mode = 0 ) { // These values are in bytes //u_int total; diff --git a/linux/memory.cc b/linux/memory.cc index 30a8eed..7ccd406 100644 --- a/linux/memory.cc +++ b/linux/memory.cc @@ -24,7 +24,7 @@ #include "luts.h" #include "conversions.h" -std::string mem_string( bool use_colors = false ) +std::string mem_string( bool use_colors = false, int mode = 0 ) { using std::string; using std::ifstream; diff --git a/netbsd/memory.cc b/netbsd/memory.cc index d27bb44..08444a3 100644 --- a/netbsd/memory.cc +++ b/netbsd/memory.cc @@ -28,7 +28,7 @@ #include "conversions.h" #include "memory.h" -std::string mem_string( bool use_colors = false ) +std::string mem_string( bool use_colors = false, int mode = 0 ) { std::ostringstream oss; diff --git a/openbsd/memory.cc b/openbsd/memory.cc index 625302f..c94eb5e 100644 --- a/openbsd/memory.cc +++ b/openbsd/memory.cc @@ -47,7 +47,7 @@ static int pageshift; #endif #define pagesh(size) ((size) << pageshift) -std::string mem_string( bool use_colors = false ) +std::string mem_string( bool use_colors = false, int mode = 0 ) { std::ostringstream oss;