Made skipspace() an inline function and changed it to handle the most common case of 'no leading space' very fast, and avoid calling isspace()

This commit is contained in:
Klaus Schmidinger
2007-07-21 13:39:02 +02:00
parent 214c12289f
commit 4c90306502
4 changed files with 15 additions and 11 deletions

View File

@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: tools.c 1.133 2007/07/20 14:25:46 kls Exp $
* $Id: tools.c 1.134 2007/07/21 13:02:45 kls Exp $
*/
#include "tools.h"
@@ -167,13 +167,6 @@ char *strreplace(char *s, const char *s1, const char *s2)
return s;
}
char *skipspace(const char *s)
{
while (*s && isspace(*s))
s++;
return (char *)s;
}
char *stripspace(char *s)
{
if (s && *s) {