(wrong string) ński

From: <git_AT_suckless.org>
Date: Sun, 10 Sep 2017 14:08:44 +0200 (CEST)

commit b7d7ce9c5f9ea360955325526e7f8010ae5b1347
Author: Kamil Cholewiński <harry666t_AT_gmail.com>
AuthorDate: Fri Sep 8 23:08:28 2017 +0200
Commit: Aaron Marcher <me_AT_drkhsh.at>
CommitDate: Sun Sep 10 14:08:20 2017 +0200

    slstatus load_avg format string

diff --git a/config.def.h b/config.def.h
index f4a6bed..0e28d1e 100644
--- a/config.def.h
+++ b/config.def.h
_AT_@ -29,7 +29,7 @@ static const char unknown_str[] = "n/a";
  * ipv6 IPv6 address interface name
  * kernel_release `uname -r` NULL
  * keyboard_indicators caps/num lock indicators NULL
- * load_avg load average NULL
+ * load_avg load average format string
  * num_files number of files in a directory path
  * ram_free free memory in GB NULL
  * ram_perc memory usage in percent NULL
diff --git a/slstatus.c b/slstatus.c
index d0d1767..e69423b 100644
--- a/slstatus.c
+++ b/slstatus.c
_AT_@ -52,7 +52,7 @@ static const char *ipv4(const char *iface);
 static const char *ipv6(const char *iface);
 static const char *kernel_release(void);
 static const char *keyboard_indicators(void);
-static const char *load_avg(void);
+static const char *load_avg(const char *fmt);
 static const char *num_files(const char *dir);
 static const char *ram_free(void);
 static const char *ram_perc(void);
_AT_@ -394,7 +394,7 @@ keyboard_indicators(void)
 }
 
 static const char *
-load_avg(void)
+load_avg(const char *fmt)
 {
         double avgs[3];
 
_AT_@ -403,7 +403,7 @@ load_avg(void)
                 return unknown_str;
         }
 
- return bprintf("%.2f %.2f %.2f", avgs[0], avgs[1], avgs[2]);
+ return bprintf(fmt, avgs[0], avgs[1], avgs[2]);
 }
 
 static const char *
Received on Sun Sep 10 2017 - 14:08:44 CEST

This archive was generated by hypermail 2.3.0 : Sun Sep 10 2017 - 14:12:24 CEST