home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c082_144 / 1.ddi / CLIBSRC1.ZIP / COUNTRY.CAS < prev    next >
Encoding:
Text File  |  1992-06-10  |  1.5 KB  |  53 lines

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