home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c005 / 4.ddi / C / QYRETDAT.C < prev    next >
Encoding:
C/C++ Source or Header  |  1986-08-05  |  1004 b   |  42 lines

  1. /**
  2. *
  3. * Name        qyretdat -- Return the system date
  4. *
  5. * Synopsis    ret = qyretdat(pyear,pmonth,pday);
  6. *
  7. *        int ret       The returned value is always 0.
  8. *        int *pyear      The year (1980 - 2099)
  9. *        int *pmonth      The month (1 - 12)
  10. *        int *pday      The day (1 - 31)
  11. *
  12. * Description    The system date is returned in the variables specified.
  13. *        The value 0 is always returned as the functional value.
  14. *
  15. *        Use STSDATE to return the system date as a character
  16. *        string as well as as numbers.
  17. *
  18. * Returns    ret          The returned value is always 0.
  19. *        *pyear          The year (1980 - 2099)
  20. *        *pmonth       The month (1 - 12)
  21. *        *pday          The day (1 - 31)
  22. *
  23. * Version    3.0  (C)Copyright Blaise Computing Inc.  1983, 1984, 1986
  24. *
  25. **/
  26.  
  27. #include <bquery.h>
  28.  
  29. int qyretdat(pyear,pmonth,pday)
  30. int *pyear,*pmonth,*pday;
  31. {
  32.     DOSREG dos_reg;
  33.  
  34.     dos_reg.ax = 0x2a00;
  35.     dos(&dos_reg);
  36.     *pyear  = dos_reg.cx;
  37.     *pmonth = uthibyte(dos_reg.dx);
  38.     *pday   = utlobyte(dos_reg.dx);
  39.  
  40.     return(0);
  41. }
  42.