Name

mangle_path — mangle and copy path to buffer beginning

Synopsis

char * mangle_path (char * s,
 const char * p,
 const char * esc);
 

Arguments

char * s

buffer start

const char * p

beginning of path in above buffer

const char * esc

set of characters that need escaping

Description

Copy the path from p to s, replacing each occurrence of character from esc with usual octal escape. Returns pointer past last written character in s, or NULL in case of failure.