home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / dmake40.zip / emx / dirbrk.c < prev    next >
C/C++ Source or Header  |  1992-01-23  |  2KB  |  52 lines

  1. /* RCS      -- $Header: /u2/dvadura/src/generic/dmake/src/msdos/dirbrk.c,v 1.1 1992/01/24 03:27:29 dvadura Exp $
  2. -- SYNOPSIS -- define the directory separator string.
  3. -- 
  4. -- DESCRIPTION
  5. --     Define this string for any character that may appear in a path name
  6. --    and can be used as a directory separator.
  7. --
  8. -- AUTHOR
  9. --      Dennis Vadura, dvadura@watdragon.uwaterloo.ca
  10. --      CS DEPT, University of Waterloo, Waterloo, Ont., Canada
  11. --
  12. -- COPYRIGHT
  13. --      Copyright (c) 1990 by Dennis Vadura.  All rights reserved.
  14. -- 
  15. --      This program is free software; you can redistribute it and/or
  16. --      modify it under the terms of the GNU General Public License
  17. --      (version 1), as published by the Free Software Foundation, and
  18. --      found in the file 'LICENSE' included with this distribution.
  19. -- 
  20. --      This program is distributed in the hope that it will be useful,
  21. --      but WITHOUT ANY WARRANTY; without even the implied warrant of
  22. --      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  23. --      GNU General Public License for more details.
  24. -- 
  25. --      You should have received a copy of the GNU General Public License
  26. --      along with this program;  if not, write to the Free Software
  27. --      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  28. --
  29. -- LOG
  30. --     $Log: dirbrk.c,v $
  31.  * Revision 1.1  1992/01/24  03:27:29  dvadura
  32.  * dmake Version 3.8, Initial revision
  33.  *
  34. */
  35.  
  36. #include "extern.h"
  37.  
  38. /* dos uses /, \, and : */
  39. char*    DirBrkStr = "/\\:";
  40.  
  41. /*
  42. ** Return TRUE if the name is the full specification of a path name to a file
  43. ** starting at the root of the file system, otherwise return FALSE
  44. */
  45. PUBLIC int
  46. If_root_path(name)
  47. char *name;
  48. {
  49.    return( (strchr(DirBrkStr, *name) != NIL(char)) ||
  50.            (isalpha(*name) && name[1] == ':') );
  51. }
  52.