Octave-Forge - Extra packages for GNU Octave | |
Home · Packages · Developers · Documentation · FAQ · Bugs · Mailing Lists · Links · Code |
00001 /* 00002 00003 Copyright (C) 1992, 93, 94, 95, 96, 97 Free Software Foundation, Inc. 00004 Copyright (C) 1993, 94, 95, 96 Karl Berry. 00005 Copyright (C) 1997, 1998 Free Software Foundation, Inc. 00006 00007 This library is free software; you can redistribute it and/or 00008 modify it under the terms of the GNU Library General Public 00009 License as published by the Free Software Foundation; either 00010 version 2 of the License, or (at your option) any later version. 00011 00012 This library is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 Library General Public License for more details. 00016 00017 You should have received a copy of the GNU Library General Public 00018 License along with this library; if not, write to the Free Software 00019 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 00020 02110-1301, USA. */ 00021 00022 #if !defined (octave_kpse_xfns_h) 00023 #define octave_kpse_xfns_h 1 00024 00025 /* Define the characters which separate components of 00026 filenames and environment variable paths. */ 00027 00028 /* What separates filename components? */ 00029 #ifndef DIR_SEP 00030 #ifdef DOSISH 00031 /* Either \'s or 's work. Wayne Sullivan's web2pc prefers /, so we'll 00032 go with that. */ 00033 #define DIR_SEP '/' 00034 #define DIR_SEP_STRING "/" 00035 #define IS_DEVICE_SEP(ch) ((ch) == ':') 00036 #define NAME_BEGINS_WITH_DEVICE(name) ((name.length()>0) && IS_DEVICE_SEP((name)[1])) 00037 /* On DOS, it's good to allow both \ and / between directories. */ 00038 #define IS_DIR_SEP(ch) ((ch) == '/' || (ch) == '\\') 00039 #else 00040 #define DIR_SEP '/' 00041 #define DIR_SEP_STRING "/" 00042 #endif /* not DOSISH */ 00043 #endif /* not DIR_SEP */ 00044 00045 #ifndef IS_DIR_SEP 00046 #define IS_DIR_SEP(ch) ((ch) == DIR_SEP) 00047 #endif 00048 #ifndef IS_DEVICE_SEP /* No `devices' on, e.g., Unix. */ 00049 #define IS_DEVICE_SEP(ch) 0 00050 #endif 00051 #ifndef NAME_BEGINS_WITH_DEVICE 00052 #define NAME_BEGINS_WITH_DEVICE(name) 0 00053 #endif 00054 00055 #ifdef __cplusplus 00056 extern "C" { 00057 #endif 00058 00059 extern const char *octave_basename (const char *name); 00060 00061 #ifdef __cplusplus 00062 } 00063 #endif 00064 00065 #endif 00066 00067 /* 00068 ;;; Local Variables: *** 00069 ;;; mode: C *** 00070 ;;; End: *** 00071 */