home *** CD-ROM | disk | FTP | other *** search
/ PC Extra Super CD 1998 January / PCPLUS131.iso / DJGPP / V2 / DJLSR201.ZIP / src / libc / dos / compat / d_getdrv.txh < prev    next >
Encoding:
Text File  |  1995-10-09  |  524 b   |  30 lines

  1. @node _dos_getdrive, dos
  2. @heading @code{_dos_getdrive}
  3. @subheading Syntax
  4.  
  5. @example
  6. #include <dos.h>
  7.  
  8. void _dos_getdrive(unsigned int *p_drive);
  9. @end example
  10.  
  11. @subheading Description
  12.  
  13. This function determine the current default drive and writes this value
  14. into @var{p_drive} (1=A:, 2=B:, etc.).
  15.  
  16. @xref{_dos_setdrive}.
  17.  
  18. @subheading Return Value
  19.  
  20. None.
  21.  
  22. @subheading Example
  23.  
  24. @example
  25. unsigned int drive;
  26.  
  27. _dos_getdrive(&drive);
  28. printf("The current drive is %c:.\n", 'A' - 1 + drive);
  29. @end example
  30.