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

48 lines
1.4 KiB
Plaintext
Raw Permalink Normal View History

2024-09-09 21:51:08 +00:00
*******************************************************************************
*
* Function to determine if the specified pathnames are equal.
*
* 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 performs a case
** independent comparison with all delimiters normalized.
FUNCTION IS.EQPATHS(FILESPEC.A, FILESPEC.B)
INCLUDE UNIVERSE.INCLUDE MACHINE.NAME
PATHNAME.A = FILESPEC.A
PATHNAME.B = FILESPEC.B
******************
** Windows NT port
**
IF OS.TYPE NE "UNIX"
THEN
PATHNAME.A = DOWNCASE(CONVERT("\", "/", PATHNAME.A))
PATHNAME.B = DOWNCASE(CONVERT("\", "/", PATHNAME.B))
END
**
******************
IS.EQUAL = (PATHNAME.A = PATHNAME.B)
RETURN(IS.EQUAL)
END