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

  1. /* RCS      -- $Header: /u5/dvadura/src/public/dmake/src/unix/RCS/dirbrk.c,v 1.1 1994/10/06 17:42:18 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.  Also provide a function
  7. --    to indicate if a given path begins at the root of the file system.
  8. --
  9. -- AUTHOR
  10. --      Dennis Vadura, dvadura@watdragon.uwaterloo.ca
  11. --      CS DEPT, University of Waterloo, Waterloo, Ont., Canada
  12. --
  13. -- COPYRIGHT
  14. --      Copyright (c) 1992,1994 by Dennis Vadura.  All rights reserved.
  15. -- 
  16. --      This program is free software; you can redistribute it and/or
  17. --      modify it under the terms of the GNU General Public License
  18. --      (version 1), as published by the Free Software Foundation, and
  19. --      found in the file 'LICENSE' included with this distribution.
  20. -- 
  21. --      This program is distributed in the hope that it will be useful,
  22. --      but WITHOUT ANY WARRANTY; without even the implied warrant of
  23. --      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  24. --      GNU General Public License for more details.
  25. -- 
  26. --      You should have received a copy of the GNU General Public License
  27. --      along with this program;  if not, write to the Free Software
  28. --      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  29. --
  30. -- LOG
  31. --     $Log: dirbrk.c,v $
  32.  * Revision 1.1  1994/10/06  17:42:18  dvadura
  33.  * dmake Release Version 4.0, Initial revision
  34.  *
  35. */
  36.  
  37. #include "extern.h"
  38.  
  39. /* Unix only uses / */
  40. char*    DirBrkStr = "/";
  41.  
  42. /*
  43. ** Return TRUE if the name is the full specification of a path name to a file
  44. ** starting at the root of the file system, otherwise return FALSE
  45. */
  46. PUBLIC int
  47. If_root_path(name)
  48. char *name;
  49. {
  50.    return( strchr(DirBrkStr, *name) != NIL(char) );
  51. }
  52.