tldm-universe/Ardent/UV/APP.PROGS/IS.FULLPATH

48 lines
1.3 KiB
Plaintext
Raw Permalink Normal View History

2024-09-09 21:51:08 +00:00
*******************************************************************************
*
* Function to determine if a specified filename is a an absolute pathname.
*
* Module %M% Version %I% Date %H%
*
* (c) Copyright 1998 Ardent Software Inc. - All Rights Reserved
* This is unpublished proprietary source code of Ardent Software Inc.
* The copyright notice above does not evidence any actual or intended
* publication of such source code.
*
*******************************************************************************
*
* Maintenence log - insert most recent change descriptions at top
*
* Date.... GTAR# WHO Description.........................................
* 10/14/98 23801 SAP Change copyrights.
* 01/24/96 17671 LAG Initial creation and sccs.
*
*******************************************************************************
** For Windows NT and Windows 95 this function normalizes
** all delimiters.
FUNCTION IS.FULLPATH(FILESPEC)
INCLUDE UNIVERSE.INCLUDE MACHINE.NAME
PATHNAME = FILESPEC
******************
** Windows NT port
**
IF OS.TYPE = "UNIX"
THEN
IS.ABSOLUTE = (PATHNAME[1,1] = "/")
END
ELSE
PATHNAME = CONVERT("\", "/", PATHNAME)
IS.ABSOLUTE = (PATHNAME[1,1] = "/") OR (PATHNAME[1,2] = "//") OR (PATHNAME[2,1] = ":")
END
**
******************
RETURN(IS.ABSOLUTE)
END