home *** CD-ROM | disk | FTP | other *** search
- /*********
- *
- * LASTDRIV.C
- *
- * by Ralph Davis
- * modified by Tom Rettig, Leonard Zerman
- *
- * Placed in the public domain by Tom Rettig Associates, 10/22/1990.
- *
- * Syntax: LASTDRIVE()
- * Return: <expC> indicating lastdrive on LASTDRIVE= line in CONFIG.SYS
- *********/
-
- #include "trlib.h"
-
- TRTYPE lastdrive()
- {
- char *confparm = "LASTDRIVE";
- static char drivestr[3];
- int temp;
-
- /* _tr_doscnf can return either a char value or an int error code */
- temp = (int) _tr_doscnf(confparm);
- switch ( temp )
- {
- case -1:
- drivestr[0] = '-';
- drivestr[1] = '1';
- break;
- case 0:
- drivestr[0] = '0';
- drivestr[1] = NULLC;
- break;
- default:
- drivestr[0] = temp;
- drivestr[1] = NULLC;
- }
- drivestr[2] = NULLC;
- _retc(drivestr);
- }
-
-