Go to the source code of this file.
Function Documentation
M_INLINE char* get_token |
( |
char * |
line, |
|
|
char ** |
eof |
|
) |
| |
M_INLINE int is_space |
( |
char |
ch | ) |
|
Definition at line 12 of file sutils.h.
{
return ch == ' ' || ch == '\t';
}
M_INLINE char* skip_non_spaces |
( |
char * |
line | ) |
|
Definition at line 26 of file sutils.h.
{
char *pos;
for( pos = line; *pos != '\0' && ! is_space( *pos ) ; ++pos );
return pos;
}
M_INLINE char* skip_spaces |
( |
char * |
line | ) |
|
Definition at line 17 of file sutils.h.
{
char *pos;
for( pos = line; is_space( *pos ) ; ++pos );
return pos;
}
M_INLINE char* strdup_range |
( |
char * |
from, |
|
|
char * |
to |
|
) |
| |
Definition at line 48 of file sutils.h.
{
char *r;
r = malloc( to - from + 1 );
if (!r) {
return 0;
}
strncpy( r, from, to - from );
r[ to - from ] = '\0';
return r;
}