#define generate(orderidx, name, function) \
do { \
- write_to_statusbar(order_to_str(order[orderidx], name), function, (j == (MAX_ORDER-1))); \
+ write_to_statusbar(order_to_str(order[orderidx], name), function, (j == (highest_order-1))); \
} while (0)
#define generate_order(condition, orderidx, name, function) \
/* socket file descriptor for general purposes */
extern int general_socket;
+extern int highest_order;
+
extern const char *wlan_interface;
extern const char *eth_interface;
extern const char *wmii_path;
#include "i3status.h"
+int highest_order = 0;
+
/*
* Reads the configuration from the given file
*
}
OPT("order")
{
- #define SET_ORDER(opt, idx) { if (strcasecmp(token, opt) == 0) order[idx] = c++; }
+ #define SET_ORDER(opt, idx) { if (strcasecmp(token, opt) == 0) order[idx] = highest_order++; }
char *walk, *token;
- int c = 0;
walk = token = dest_value;
while (*walk != '\0') {
while ((*walk != ',') && (*walk != '\0'))