Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Turbo C - <b>country() return country-dependent information</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
country()                Return Country-Dependent Information

 #include   <dos.h>

 struct     country *country(countrycode,countryp);
 int        countrycode;                 Current country
 country    *countryp;                   Pointer to country information

    country() specifies how certain country-dependent data will be
    formatted.  Country-dependent data refers to information such as
    dates, times, and currency.

    If 'countryp' is -1, the current country is set to the value of
    'countrycode', which must be non-zero.

    Otherwise, 'countryp' points to the 'country' structure which is
    filled with the country-dependent information of

                the current country (if 'countrycode' = 0) or
                the country given by 'countrycode'.

    The structure 'country' is defined as follows:

           struct country  {
               int co_date;             /*Date format*/
               char co_curr[5];         /*Currency symbol*/
               char co_thsep[2];        /*Thousand separator*/
               char co_desep[2];        /*Decimal separator*/
               char co_dtsep[2];        /*Date separator*/
               char co_tmsep[2];        /*Time separator*/
               char co_currstyle;       /*Currency style */
               char co_digits;          /*Number of significant */
                                        /*  digits in currency */
               int(far *co_case)();     /*Case map function*/
               char co_dasep;           /*Data separator*/
               char co_fill[10];        /*Filler*/
           };

    The date format in 'co_date' is:

           0    for the USA style of month, day, year
           1    for the European style of day, month, year
           2    for the Japanese style of year, month, day

    The value in 'co_currstyle' sets the currency display style to:

           0    Currency symbol precedes value with no spaces between the
                symbol and the number.
           1    Currency symbol follows value with no spaces between the
                number and the symbol.
           2    Currency symbol precedes value with a space after the
                symbol.
           3    Currency symbol follows the number with a space before
                the symbol.

    Returns:    The pointer argument 'countryp'.

      Notes:    The values set by country() depend on the version of DOS
                being used.

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson