Skip to content

Commit

Permalink
skipspace: move out of line
Browse files Browse the repository at this point in the history
Move skipspace() out of line since it triggers inlining warnings.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
  • Loading branch information
H. Peter Anvin committed Feb 25, 2011
1 parent 1207d0f commit b507068
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
9 changes: 3 additions & 6 deletions com32/include/ctype.h
Expand Up @@ -7,6 +7,8 @@
#ifndef _CTYPE_H
#define _CTYPE_H

#include <klibc/extern.h>

#ifndef __CTYPE_NO_INLINE
# define __ctype_inline static __inline__
#else
Expand Down Expand Up @@ -114,11 +116,6 @@ __ctype_inline int tolower(int __c)
return isupper(__c) ? _tolower(__c) : __c;
}

__ctype_inline char *skipspace(const char *p)
{
while (isspace((unsigned char)*p))
p++;
return (char *)p;
}
__extern char *skipspace(const char *p);

#endif /* _CTYPE_H */
1 change: 1 addition & 0 deletions com32/lib/Makefile
Expand Up @@ -27,6 +27,7 @@ LIBOBJS = \
strtoumax.o vfprintf.o vprintf.o vsnprintf.o vsprintf.o \
asprintf.o vasprintf.o strlcpy.o strlcat.o \
vsscanf.o zalloc.o \
skipspace.o \
\
lmalloc.o lstrdup.o \
\
Expand Down
8 changes: 8 additions & 0 deletions com32/lib/skipspace.c
@@ -0,0 +1,8 @@
#include <ctype.h>

char *skipspace(const char *p)
{
while (isspace((unsigned char)*p))
p++;
return (char *)p;
}

0 comments on commit b507068

Please sign in to comment.