From: mquinson Date: Thu, 26 Apr 2007 10:50:16 +0000 (+0000) Subject: remove _cleanup_double_spaces() since it's now exported as xbt_str_strip_spaces() X-Git-Tag: v3.3~1904 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/16894e8e53dfc85b8bdc64d87eeb476f2f44c402 remove _cleanup_double_spaces() since it's now exported as xbt_str_strip_spaces() git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@3456 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/xbt/log.c b/src/xbt/log.c index 123ad9dd84..c7418f924a 100644 --- a/src/xbt/log.c +++ b/src/xbt/log.c @@ -679,38 +679,6 @@ static xbt_log_category_t _xbt_log_cat_searchsub(xbt_log_category_t cat,char *na THROW0(not_found_error,0,"No such category"); } -static void _cleanup_double_spaces(char *s) { - char *p = s; - int e = 0; - - while (1) { - if (!*p) - goto end; - - if (!isspace(*p)) - break; - - p++; - } - - e = 1; - - do { - if (e) - *s++ = *p; - - if (!*++p) - goto end; - - if (e ^ !isspace(*p)) - if ((e = !e)) - *s++ = ' '; - } while (1); - - end: - *s = '\0'; -} - /** * \ingroup XBT_log * \param control_string What to parse @@ -749,7 +717,7 @@ void xbt_log_control_set(const char* control_string) { set = xbt_new(s_xbt_log_setting_t,1); cs=xbt_strdup(control_string); - _cleanup_double_spaces(cs); + xbt_str_strip_spaces(cs); while (!done) { xbt_log_category_t cat=NULL;