47 lines
1.2 KiB
Plaintext
Executable File
47 lines
1.2 KiB
Plaintext
Executable File
*******************************************************************************
|
|
*
|
|
* Function to return the basename of a specified 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 GET.BASENAME(FILESPEC)
|
|
|
|
INCLUDE UNIVERSE.INCLUDE MACHINE.NAME
|
|
|
|
BASENAME = FILESPEC
|
|
|
|
******************
|
|
** Windows NT port
|
|
**
|
|
IF OS.TYPE NE "UNIX"
|
|
THEN
|
|
BASENAME = CONVERT("\", "/", BASENAME)
|
|
END
|
|
**
|
|
******************
|
|
|
|
BASENAME = CONVERT("/", @FM, BASENAME)
|
|
BASENAME = BASENAME<DCOUNT(BASENAME, @FM)>
|
|
|
|
RETURN(BASENAME)
|
|
|
|
END
|