Mercurial > hg > xmms-sid
diff src/xs_support.c @ 109:578b71b62eeb
Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Some bugs probably remain.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 12 Jan 2004 01:45:04 +0000 |
parents | 94497283affa |
children | fe684a2ccdc7 |
line wrap: on
line diff
--- a/src/xs_support.c Mon Jan 12 00:58:01 2004 +0000 +++ b/src/xs_support.c Mon Jan 12 01:45:04 2004 +0000 @@ -74,17 +74,21 @@ } -inline void xs_findnext(gchar *pcStr, gint *piPos) +inline void xs_findnext(gchar *pcStr, guint *piPos) { - /* Terminating NULL-character is not whitespace! */ - while (isspace(pcStr[*piPos])) (*piPos)++; + while (pcStr[*piPos] && isspace(pcStr[*piPos])) (*piPos)++; } -inline void xs_findnum(gchar *pcStr, gint *piPos) +inline void xs_findeol(gchar *pcStr, guint *piPos) { - /* Terminating NULL-character is not digit! */ - while (isdigit(pcStr[*piPos])) (*piPos)++; + while (pcStr[*piPos] && (pcStr[*piPos] != '\n') && (pcStr[*piPos] != '\r')) (*piPos)++; } +inline void xs_findnum(gchar *pcStr, guint *piPos) +{ + while (pcStr[*piPos] && isdigit(pcStr[*piPos])) (*piPos)++; +} + +