BOOTSTRAP (kutils) functions


LIBRARY ROUTINE

kstring_detab - remove tabs from a string

LIBRARY CALL

char *kstring_detab(
   const char *istr,
   char       *ostr)

INPUT

OUTPUT

RETURN VALUE

The variable 'ostr' if it is non-NULL, or the allocated string if 'ostr' is NULL. If 'istr' is NULL or an error occurs, NULL is returned.

DESCRIPTION

This routine converts tab, '\t', characters into the appropriate number of spaces to make it fall onto modulo eight boundary.

Note that if 'ostr' is non-NULL, the calling routine must ensure that 'ostr' points to a memory buffer large enough to hold the detab string and terminating null character. If the buffer is not large enough, memory will be overwritten resulting in unpredicable program failure.

ADDITIONAL INFORMATION

none

EXAMPLES

none

SIDE EFFECTS

This routine uses kmalloc to create a string that holds the result, if 'ostr' is NULL.

RESTRICTIONS

none

MODIFICATION

none

FILES

$BOOTSTRAP/objects/library/kutils/src/strings.c

SEE ALSO

kutils(3)

COPYRIGHT

Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.