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 |
7016
|
10 version 2 of the License, or (at your option) any later version. |
4379
|
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 |
5307
|
19 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
|
20 02110-1301, USA. */ |
4379
|
21 |
4399
|
22 #if !defined (octave_kpse_xfns_h) |
|
23 #define octave_kpse_xfns_h 1 |
|
24 |
|
25 /* Define the characters which separate components of |
4379
|
26 filenames and environment variable paths. */ |
|
27 |
|
28 /* What separates filename components? */ |
|
29 #ifndef DIR_SEP |
|
30 #ifdef DOSISH |
|
31 /* Either \'s or 's work. Wayne Sullivan's web2pc prefers /, so we'll |
|
32 go with that. */ |
|
33 #define DIR_SEP '/' |
|
34 #define DIR_SEP_STRING "/" |
|
35 #define IS_DEVICE_SEP(ch) ((ch) == ':') |
4433
|
36 #define NAME_BEGINS_WITH_DEVICE(name) ((name.length()>0) && IS_DEVICE_SEP((name)[1])) |
4379
|
37 /* On DOS, it's good to allow both \ and / between directories. */ |
|
38 #define IS_DIR_SEP(ch) ((ch) == '/' || (ch) == '\\') |
|
39 #else |
|
40 #define DIR_SEP '/' |
|
41 #define DIR_SEP_STRING "/" |
|
42 #endif /* not DOSISH */ |
|
43 #endif /* not DIR_SEP */ |
|
44 |
|
45 #ifndef IS_DIR_SEP |
|
46 #define IS_DIR_SEP(ch) ((ch) == DIR_SEP) |
|
47 #endif |
|
48 #ifndef IS_DEVICE_SEP /* No `devices' on, e.g., Unix. */ |
|
49 #define IS_DEVICE_SEP(ch) 0 |
|
50 #endif |
|
51 #ifndef NAME_BEGINS_WITH_DEVICE |
|
52 #define NAME_BEGINS_WITH_DEVICE(name) 0 |
|
53 #endif |
4399
|
54 |
|
55 #ifdef __cplusplus |
|
56 extern "C" { |
|
57 #endif |
|
58 |
|
59 extern const char *octave_basename (const char *name); |
|
60 |
|
61 #ifdef __cplusplus |
|
62 } |
|
63 #endif |
|
64 |
|
65 #endif |