Back to index

tetex-bin  3.0
filenames.h
Go to the documentation of this file.
00001 /* FILE:      filenames.h
00002  * PURPOSE:   functions for handling file names
00003  * VERSION: 1.3 (August 1992)
00004  * VERSION: 1.4 (January 1994)
00005  * VERSION: 1.5 (September 1995)
00006  */
00007 
00008 /*
00009  * Determine extension of <str>.
00010  */
00011 char *extension(char *str);
00012 
00013 /* 
00014  * Basename is the functional equivalent of BSD's basename utility.
00015  * When the suffix is NULL no suffix removal is done. When needed
00016  * a new string is allocated so that the original value of str is
00017  * not changed.
00018  */   
00019 char *basename(char *str, char *suffix);
00020 
00021 /*
00022  * Newname builds a new filename by adding or replacing the extension
00023  * of the given <name> with the new supplied <ext>.
00024  */
00025 char *newname(char *name, char *ext);
00026 
00027 /*
00028  * ps_resource returns true if name can be treated as a PS resource
00029  */
00030 int ps_resource(char *name);