home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c065 / 2.ddi / CLIB2.ZIP / COUNTRY.CAS < prev    next >
Encoding:
Text File  |  1990-06-07  |  2.0 KB  |  54 lines

  1. /*---------------------------------------------------------------------------
  2.  * filename - country.cas
  3.  *
  4.  * function(s)
  5.  *        country - returns country-dependent information
  6.  *--------------------------------------------------------------------------*/
  7.  
  8. /*[]------------------------------------------------------------[]*/
  9. /*|                                                              |*/
  10. /*|     Turbo C Run Time Library - Version 3.0                   |*/
  11. /*|                                                              |*/
  12. /*|                                                              |*/
  13. /*|     Copyright (c) 1987,1988,1990 by Borland International    |*/
  14. /*|     All Rights Reserved.                                     |*/
  15. /*|                                                              |*/
  16. /*[]------------------------------------------------------------[]*/
  17.  
  18. #pragma inline
  19. #include <asmrules.h>
  20. #include <dos.h>
  21.  
  22. /*--------------------------------------------------------------------------*
  23.  
  24. Name            country - returns country-dependent information
  25.  
  26. Usage           struct COUNTRY *country(int countrycode, struct COUNTRY *countryp);
  27.  
  28. Prototype in    dos.h
  29.  
  30. Description     specifies how certain country-dependent data, such as
  31.                 dates, times, and currency, will be formatted.
  32.  
  33.                 If countryp has a value of -1, the current country is set to
  34.                 the value of countrycode, which must be non-zero.  Otherwise
  35.                 the country structure pointed to by countryp is filled  with
  36.                 the country dependent information.
  37.  
  38. Return value    the pointer argument countryp, or NULL in case of error.
  39.  
  40. *---------------------------------------------------------------------------*/
  41. struct COUNTRY *country(int xcode, struct COUNTRY *cp)
  42. {
  43.         pushDS_
  44. asm     LDS_    dx, cp
  45. asm     mov     ah,38h
  46. asm     mov     al,xcode
  47. asm     int     21h
  48.         popDS_
  49. asm    jc    error
  50.         return(cp);
  51. error:
  52.     return(0);
  53. }
  54.