/* pathcode/fget_pathcode.h. Generated from pathcode.h.in by configure. */ /* ** Copyright 1998-2002 University of Illinois Board of Trustees ** Copyright 1998-2002 Mark D. Roth ** All rights reserved. ** ** fget_pathcode.h - header file for pathcode module ** ** Mark D. Roth ** Campus Information Technologies and Educational Services ** University of Illinois at Urbana-Champaign */ #ifndef fget_PATHCODE_H #define fget_PATHCODE_H #include #include /***** cleanpath.c ***********************************************************/ /* ** fget_cleanpath() - create a clean representation of path via string manipulation: ** - squeezes multiple '/' characters ** - removes previous directory with ".." (except at start of relative path) ** - removes "." (except where all path components cancel) ** arguments: path to clean, buf to write to, buf size */ int fget_cleanpath(char *, char *, size_t); /***** gsub.c ****************************************************************/ /* ** fget_gsub() - replace all instances of a substring in a ** given string with a different substring */ void fget_gsub(char *, char *, char *, char *, size_t); /***** mkdirhier.c ***********************************************************/ typedef void (fget_mkdirhier_printfunc_t)(void *, char *); /* ** fget_mkdirhier() - create all directories in a given path ** returns: ** 0 success ** 1 no directories needed to be created ** -1 (and sets errno) failure */ int fget_mkdirhier(char *, fget_mkdirhier_printfunc_t *, void *); /***** rmtree.c **************************************************************/ typedef void (fget_rmtree_printfunc_t)(void *, char *); /* ** fget_rmtree() - create all directories in a given path ** returns: ** 0 success ** -1 (and sets errno) failure */ int fget_rmtree(char *, fget_mkdirhier_printfunc_t *, void *); /***** relativepath.c ********************************************************/ /* ** fget_relativepath() - return a relative path from start_dir to finish_dir ** arguments: start dir, finish dir, result buffer, buffer size ** returns: ** 0 success ** -1 (and sets errno) failure */ int fget_relativepath(char *, char *, char *, size_t); #endif /* ! fget_PATHCODE_H */