realloc_string

[ XITE Reference Manual | XITE home ]

Name

realloc_string - Reallocate string to ensure enough memory is available for an extension.

Syntax

 #include <xite/utils.h>

 char *realloc_string( char* path,
    int max_path_len, int extra_len,
    int step_len );

Description

If the length of path increased by extra_len exceeds max_path_len, then reallocate path such that the new string is extended by step_len (or by extra_len if greater than step_len).

If reallocated, the old memory space is not freed.

Author

Svein Bøe

Id

$Id: envfindfile.c,v 1.34 1996/12/12 19:40:08 svein Exp $