Files
Digital-Research-Source-Code/CPM OPERATING SYSTEMS/CPM 86/CONCURRENT/CCPM-86 3.1 SOURCE/D6/GETDRV.C
Sepp J Morris 31738079c4 Upload
Digital Research
2020-11-06 18:50:37 +01:00

31 lines
896 B
C
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*----------------------------------------------------------------------*\
| NAME : get_drv |
| CREATED : 5-August-83 LAST MODIFIED: 12-September-83 |
| FUNCTION: Get_drv extracts the drive code from the FCB passed |
| to it and converts it to an ASCII character that |
| that code represents. |
| INPUT : ptr to FCB to check. |
| OUTPUT : Returns A-P drive value. |
\*----------------------------------------------------------------------*/
#include <portab.h>
#include "utildef.h"
#include "cpmfunc.h"
/* THIS REFERENCE IS IN CPMFUNC.H
EXTERN WORD dir_get();
*/
BYTE get_drv( fcb )
BYTE fcb[]; /* ptr to current FCB */
{
BYTE drv; /* current drive (A-P) */
if( *fcb == 0 )
drv = dir_get() + 'A';
else
drv = fcb[0] + 'A' - 1;
return( drv );
}