Changeset 319


Ignore:
Timestamp:
May 31, 2006, 12:18:22 AM (19 years ago)
Author:
pr
Message:

Move doshIsWarp4 to dosh2 and query Syslevel to determine W4/MCP difference

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/helpers/nls.c

    r304 r319  
    2222
    2323/*
    24  *      Copyright (C) 1997-2002 Ulrich M”ller.
     24 *      Copyright (C) 1997-2006 Ulrich M”ller.
    2525 *      This file is part of the "XWorkplace helpers" source package.
    2626 *      This is free software; you can redistribute it and/or modify
     
    379379 *@@added V1.0.1 (2003-01-17) [umoeller]
    380380 *@@changed V1.0.4 (2005-10-15) [pr]: Added support for Locale object settings on MCP systems @@fixes 614
     381 *@@changed V1.0.5 (2006-05-29) [pr]: Read Country rather than Locale settings on Warp 4 FP13+ @@fixes 614
    381382 */
    382383
    383384VOID nlsGetAMPM(PCOUNTRYAMPM pampm)
    384385{
    385     PrfQueryProfileString(HINI_USER,
    386                           "PM_National",
    387                           "s2359",        // key
    388                           "PM",           // default
    389                           pampm->sz2359,
    390                           sizeof(pampm->sz2359));
    391 
    392     PrfQueryProfileString(HINI_USER,
    393                           "PM_National",
    394                           "s1159",        // key
    395                           "AM",           // default
    396                           pampm->sz1159,
    397                           sizeof(pampm->sz1159));
    398     if (doshIsWarp4()==2)
     386    if (doshIsWarp4()==3)       // V1.0.5 (2006-05-29) [pr]
    399387    {
    400388        UconvObject         uconv_object;
     
    465453        }
    466454    }
     455    else
     456    {
     457        PrfQueryProfileString(HINI_USER,
     458                              "PM_National",
     459                              "s2359",        // key
     460                              "PM",           // default
     461                              pampm->sz2359,
     462                              sizeof(pampm->sz2359));
     463
     464        PrfQueryProfileString(HINI_USER,
     465                              "PM_National",
     466                              "s1159",        // key
     467                              "AM",           // default
     468                              pampm->sz1159,
     469                              sizeof(pampm->sz1159));
     470    }
    467471}
    468472
     
    488492 *@@changed V1.0.4 (2005-10-15) [bvl]: Added support for Locale object settings on MCP systems @@fixes 614
    489493 *@@changed V1.0.4 (2005-10-29) [pr]: Rewritten to prevent memory leaks and errors
     494 *@@changed V1.0.5 (2006-05-29) [pr]: Read Country rather than Locale settings on Warp 4 FP13+ @@fixes 614
    490495 */
    491496
     
    495500    {
    496501        PCOUNTRYSETTINGS pcs = &pcs2->cs;
    497         pcs->ulDateFormat = PrfQueryProfileInt(HINI_USER,
    498                                                (PSZ)PMINIAPP_NATIONAL,
    499                                                "iDate",
    500                                                0);
    501         pcs->ulTimeFormat = PrfQueryProfileInt(HINI_USER,
    502                                                (PSZ)PMINIAPP_NATIONAL,
    503                                                "iTime",
    504                                                0);
    505         pcs->cDateSep = prfhQueryProfileChar(HINI_USER,
    506                                              (PSZ)PMINIAPP_NATIONAL,
    507                                              "sDate",
    508                                              '/');
    509         pcs->cTimeSep = prfhQueryProfileChar(HINI_USER,
    510                                              (PSZ)PMINIAPP_NATIONAL,
    511                                              "sTime",
    512                                              ':');
    513         pcs->cDecimal = prfhQueryProfileChar(HINI_USER,
    514                                              (PSZ)PMINIAPP_NATIONAL,
    515                                              "sDecimal",
    516                                              '.');
    517         pcs->cThousands = prfhQueryProfileChar(HINI_USER,
    518                                                (PSZ)PMINIAPP_NATIONAL,
    519                                                "sThousand",
    520                                                ',');
    521         if (doshIsWarp4()==2)
     502
     503        if (doshIsWarp4()==3)   // V1.0.5 (2006-05-29) [pr]
    522504        {
    523505            UconvObject         uconv_object;
     
    591573                UniFreeUconvObject(uconv_object);
    592574            }
     575        }
     576        else
     577        {
     578            pcs->ulDateFormat = PrfQueryProfileInt(HINI_USER,
     579                                                   (PSZ)PMINIAPP_NATIONAL,
     580                                                   "iDate",
     581                                                   0);
     582            pcs->ulTimeFormat = PrfQueryProfileInt(HINI_USER,
     583                                                   (PSZ)PMINIAPP_NATIONAL,
     584                                                   "iTime",
     585                                                   0);
     586            pcs->cDateSep = prfhQueryProfileChar(HINI_USER,
     587                                                 (PSZ)PMINIAPP_NATIONAL,
     588                                                 "sDate",
     589                                                 '/');
     590            pcs->cTimeSep = prfhQueryProfileChar(HINI_USER,
     591                                                 (PSZ)PMINIAPP_NATIONAL,
     592                                                 "sTime",
     593                                                 ':');
     594            pcs->cDecimal = prfhQueryProfileChar(HINI_USER,
     595                                                 (PSZ)PMINIAPP_NATIONAL,
     596                                                 "sDecimal",
     597                                                 '.');
     598            pcs->cThousands = prfhQueryProfileChar(HINI_USER,
     599                                                   (PSZ)PMINIAPP_NATIONAL,
     600                                                   "sThousand",
     601                                                   ',');
    593602        }
    594603
Note: See TracChangeset for help on using the changeset viewer.