From ccc7cf81e560025520777118a00a4c041bd7a149 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 3 Oct 2008 11:50:42 +0200 Subject: [PATCH] use g_ascii_isspace() instead of IS_WHITESPACE() Don't duplicate code which is already provided by glib. --- src/conf.c | 22 +++++++++++----------- src/support.h | 2 -- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/src/conf.c b/src/conf.c index ff627e0..a39c493 100644 --- a/src/conf.c +++ b/src/conf.c @@ -23,7 +23,6 @@ #include "config.h" #include "defaults.h" #include "i18n.h" -#include "support.h" #include "command.h" #include "colors.h" #include "screen_list.h" @@ -37,6 +36,7 @@ #include #include #include +#include #define MAX_LINE_LENGTH 1024 #define COMMENT_TOKEN '#' @@ -173,7 +173,7 @@ parse_key_definition(char *str) i=0; j=0; memset(buf, 0, MAX_LINE_LENGTH); - while( i=0 && IS_WHITESPACE(line[i]) ) + while (i >= 0 && g_ascii_isspace(line[i])) { line[i] = '\0'; i--; @@ -407,7 +407,7 @@ read_rc_file(char *filename, options_t *options) { i = 0; /* skip whitespace */ - while( i