63 lines
1.9 KiB
Plaintext
63 lines
1.9 KiB
Plaintext
|
********************************************************************************
|
||
|
*
|
||
|
* Support of PR1ME INFORMATION subroutine '!GET.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.
|
||
|
* 09/23/93 12299 LA Initial implementation.
|
||
|
*
|
||
|
*******************************************************************************
|
||
|
* START-DESCRIPTION
|
||
|
*
|
||
|
* This routine forms a convenient way for users to extract the directory
|
||
|
* and entry name parts of pathnames. It provides similar functionality
|
||
|
* to the shell 'dirname' and 'basename' functions.
|
||
|
*
|
||
|
* CALL !GET.PATHNAME(PATHNAME, DIRECTORYNAME, ENTRYNAME, STATUS)
|
||
|
*
|
||
|
* where PATHNAME (I) the pathname to be broken down
|
||
|
* DIRECTORYNAME (O) the direcoty name portion of PATHNAME
|
||
|
* ENTRYNAME (O) the entryname portion of PATHNAME
|
||
|
* STATUS (O) status of the operation:
|
||
|
* 0 = Success
|
||
|
* IE$PAR = Bad parameters given (PATHNAME)
|
||
|
*
|
||
|
* END-DESCRIPTION
|
||
|
*
|
||
|
|
||
|
SUBROUTINE PR1ME(PATHNAME, DIRECTORY, ENTRYNAME, STATUS)
|
||
|
|
||
|
$OPTIONS DEFAULT
|
||
|
|
||
|
$INCLUDE UNIVERSE.INCLUDE UVKEYS.H
|
||
|
$INCLUDE UNIVERSE.INCLUDE INFO_ERRS.H
|
||
|
|
||
|
L.PATH = PATHNAME
|
||
|
DIRECTORY = ''
|
||
|
ENTRYNAME = ''
|
||
|
STATUS = 0
|
||
|
UVPATH = "*UVPATHNAME"
|
||
|
|
||
|
IF L.PATH THEN
|
||
|
CALL @UVPATH(UVK$EXTRACTDIR, L.PATH, '', DIRECTORY, STATUS)
|
||
|
IF STATUS = 0 THEN
|
||
|
CALL @UVPATH(UVK$EXTRACTENTRY, L.PATH, '', ENTRYNAME, STATUS)
|
||
|
END
|
||
|
END ELSE
|
||
|
STATUS = IE$PAR
|
||
|
END
|
||
|
RETURN
|
||
|
|
||
|
END
|