Mercurial > ~mikael > mcabber > hg
comparison mcabber/src/settings.c @ 282:87d6ac21cd1b
Fix "Cannot unset option" bug
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Wed, 06 Jul 2005 22:27:08 +0100 |
parents | f562b9af2de7 |
children | 1eea0fa0955e |
comparison
equal
deleted
inserted
replaced
281:f562b9af2de7 | 282:87d6ac21cd1b |
---|---|
106 // Remove leading and trailing spaces in option value: | 106 // Remove leading and trailing spaces in option value: |
107 for (val++; *val && isblank(*val) ; val++) ; | 107 for (val++; *val && isblank(*val) ; val++) ; |
108 for (t = val ; *t ; t++) ; | 108 for (t = val ; *t ; t++) ; |
109 for (t-- ; t >= val && isblank(*t) ; t--) ; | 109 for (t-- ; t >= val && isblank(*t) ; t--) ; |
110 | 110 |
111 if (t < val) return FALSE; // no value (variable reset for example) | 111 if (t < val) return TRUE; // no value (variable reset for example) |
112 | 112 |
113 *pval = g_strndup(val, t+1-val); | 113 *pval = g_strndup(val, t+1-val); |
114 return TRUE; | 114 return TRUE; |
115 } | 115 } |
116 | 116 |