1 /* filename.h: Function manipulate file names
2    Was: find-suffix, extend-fname, make-suffix, remove-suffix  */
3 
4 /* remove-suffx.h: declarations for shared routines.
5 
6 Copyright (C) 1992 Free Software Foundation, Inc.
7 
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2, or (at your option)
11 any later version.
12 
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17 
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
21 
22 #ifndef FILENAME_H
23 #define FILENAME_H
24 #include "types.h"
25 
26 /* If NAME has a suffix, return a pointer to its first character (i.e.,
27    the one after the `.'); otherwise, return NULL.  */
28 extern at_string find_suffix (at_string name);
29 
30 /* If NAME has a suffix, simply return it; otherwise, return
31    `NAME.SUFFIX'.  */
32 extern at_string extend_filename (at_string name, at_string suffix);
33 
34 /* Return S with the suffix SUFFIX, removing any suffix already present.
35    For example, `make_suffix ("/foo/bar.baz", "karl")' returns
36    `/foo/bar.karl'.  Returns a string allocated with malloc.  */
37 extern at_string make_suffix (at_string s, at_string suffix);
38 
39 /* Return NAME with any suffix removed.  */
40 extern at_string remove_suffix (at_string name);
41 
42 #endif /* Not def: FILENAME_H */
43