4399
|
1 /* |
4379
|
2 |
|
3 Copyright (C) 1992, 93, 94, 95, 96, 97 Free Software Foundation, Inc. |
|
4 Copyright (C) 1993, 94, 95, 96 Karl Berry. |
|
5 Copyright (C) 1997, 1998 Free Software Foundation, Inc. |
|
6 |
|
7 This library is free software; you can redistribute it and/or |
|
8 modify it under the terms of the GNU Library General Public |
|
9 License as published by the Free Software Foundation; either |
|
10 version 2 of the License, or (at your option) any later version. |
|
11 |
|
12 This library is distributed in the hope that it will be useful, |
|
13 but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
15 Library General Public License for more details. |
|
16 |
|
17 You should have received a copy of the GNU Library General Public |
|
18 License along with this library; if not, write to the Free Software |
|
19 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ |
|
20 |
4399
|
21 #if !defined (octave_kpse_xfns_h) |
|
22 #define octave_kpse_xfns_h 1 |
|
23 |
|
24 /* Define the characters which separate components of |
4379
|
25 filenames and environment variable paths. */ |
|
26 |
|
27 /* What separates filename components? */ |
|
28 #ifndef DIR_SEP |
|
29 #ifdef DOSISH |
|
30 /* Either \'s or 's work. Wayne Sullivan's web2pc prefers /, so we'll |
|
31 go with that. */ |
|
32 #define DIR_SEP '/' |
|
33 #define DIR_SEP_STRING "/" |
|
34 #define IS_DEVICE_SEP(ch) ((ch) == ':') |
4433
|
35 #define NAME_BEGINS_WITH_DEVICE(name) ((name.length()>0) && IS_DEVICE_SEP((name)[1])) |
4379
|
36 /* On DOS, it's good to allow both \ and / between directories. */ |
|
37 #define IS_DIR_SEP(ch) ((ch) == '/' || (ch) == '\\') |
|
38 #else |
|
39 #define DIR_SEP '/' |
|
40 #define DIR_SEP_STRING "/" |
|
41 #endif /* not DOSISH */ |
|
42 #endif /* not DIR_SEP */ |
|
43 |
|
44 #ifndef IS_DIR_SEP |
|
45 #define IS_DIR_SEP(ch) ((ch) == DIR_SEP) |
|
46 #endif |
|
47 #ifndef IS_DEVICE_SEP /* No `devices' on, e.g., Unix. */ |
|
48 #define IS_DEVICE_SEP(ch) 0 |
|
49 #endif |
|
50 #ifndef NAME_BEGINS_WITH_DEVICE |
|
51 #define NAME_BEGINS_WITH_DEVICE(name) 0 |
|
52 #endif |
4399
|
53 |
|
54 #ifdef __cplusplus |
|
55 extern "C" { |
|
56 #endif |
|
57 |
|
58 extern const char *octave_basename (const char *name); |
|
59 |
|
60 #ifdef __cplusplus |
|
61 } |
|
62 #endif |
|
63 |
|
64 #endif |
|
65 |
|
66 /* |
|
67 ;;; Local Variables: *** |
|
68 ;;; mode: C *** |
|
69 ;;; End: *** |
|
70 */ |