root/libutil/path.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 /*
   2  * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2008, 2011
   3  *      Tama Communications Corporation
   4  *
   5  * This file is part of GNU GLOBAL.
   6  *
   7  * This program is free software: you can redistribute it and/or modify
   8  * it under the terms of the GNU General Public License as published by
   9  * the Free Software Foundation, either version 3 of the License, or
  10  * (at your option) any later version.
  11  * 
  12  * This program 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
  15  * GNU General Public License for more details.
  16  * 
  17  * You should have received a copy of the GNU General Public License
  18  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  19  */
  20 
  21 #ifndef _PATH_H_
  22 #define _PATH_H_
  23 
  24 #if (defined(_WIN32) && !defined(__CYGWIN__)) || defined(__DJGPP__)
  25 #include <unistd.h>
  26 #endif
  27 
  28 /**
  29  * #PATHSEP - Define OS-specific directory and path separators
  30  */
  31 #if (defined(_WIN32) && !defined(__CYGWIN__)) || defined(__DJGPP__)
  32 #define PATHSEP ";"
  33 #define NULL_DEVICE "NUL"
  34 #else
  35 #define PATHSEP ":"
  36 #define NULL_DEVICE "/dev/null"
  37 #endif
  38 
  39 #define isdrivechar(x) (((x) >= 'A' && (x) <= 'Z') || ((x) >= 'a' && (x) <= 'z'))
  40 
  41 int isabspath(const char *);
  42 char *canonpath(char *);
  43 #if (defined(_WIN32) && !defined(__CYGWIN__)) || defined(__DJGPP__)
  44 char *realpath(const char *, char *);
  45 #endif
  46 int makedirectories(const char *, const char *, int);
  47 const char *trimpath(const char *);
  48 
  49 #endif /* ! _PATH_H_ */

/* [previous][next][first][last][top][bottom][index][help] */