Ignore:
Timestamp:
Dec 9, 2000, 8:19:42 PM (25 years ago)
Author:
umoeller
Message:

Major updates; timers, LVM, miscellaneous.

File:
1 edited

Legend:

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

    r13 r14  
    1919/*
    2020 *      Copyright (C) 1997-2000 Ulrich M”ller.
    21  *      This file is part of the XWorkplace source package.
    22  *      XWorkplace is free software; you can redistribute it and/or modify
     21 *      This file is part of the "XWorkplace helpers" source package.
     22 *      This is free software; you can redistribute it and/or modify
    2323 *      it under the terms of the GNU General Public License as published
    2424 *      by the Free Software Foundation, in version 2 as it comes in the
     
    3535    // as unsigned char
    3636
    37 #define INCL_DOS
    3837#define INCL_DOSERRORS
    39 #define INCL_WIN
     38#define INCL_WINSHELLDATA
    4039#include <os2.h>
    4140
     
    170169
    171170PSZ prfhQueryProfileData(HINI hIni,      // in: INI handle (can be HINI_USER or HINI_SYSTEM)
    172                         PSZ pszApp,      // in: application to query
    173                         PSZ pszKey,      // in: key to query
    174                         PULONG pcbBuf)   // out: size of the returned buffer
     171                         PSZ pszApp,     // in: application to query
     172                         PSZ pszKey,     // in: key to query
     173                         PULONG pcbBuf)  // out: size of the returned buffer; ptr can be NULL
    175174{
    176175    PSZ     pData = NULL;
     
    238237 *      --  cDateSep = '/' (date separator);
    239238 *      --  cTimeSep = ':' (time separator);
     239 *      --  cDecimal = '.' (decimal separator).
    240240 *      --  cThousands = ',' (thousands separator).
    241241 *
    242242 *@@added V0.9.0 [umoeller]
     243 *@@changed V0.9.7 (2000-12-02) [umoeller]: added cDecimal
    243244 */
    244245
     
    247248    if (pcs)
    248249    {
    249         pcs->ulDateFormat = PrfQueryProfileInt(HINI_USER, "PM_National", "iDate", 0);
    250         pcs->ulTimeFormat = PrfQueryProfileInt(HINI_USER, "PM_National", "iTime", 0);
    251         pcs->cDateSep = prfhQueryProfileChar(HINI_USER, "PM_National", "sDate", '/');
    252         pcs->cTimeSep = prfhQueryProfileChar(HINI_USER, "PM_National", "sTime", ':');
    253         pcs->cThousands = prfhQueryProfileChar(HINI_USER, "PM_National", "sThousand", ',');
     250        const char *pcszApp = "PM_National";
     251        pcs->ulDateFormat = PrfQueryProfileInt(HINI_USER, (PSZ)pcszApp, "iDate", 0);
     252        pcs->ulTimeFormat = PrfQueryProfileInt(HINI_USER, (PSZ)pcszApp, "iTime", 0);
     253        pcs->cDateSep = prfhQueryProfileChar(HINI_USER, (PSZ)pcszApp, "sDate", '/');
     254        pcs->cTimeSep = prfhQueryProfileChar(HINI_USER, (PSZ)pcszApp, "sTime", ':');
     255        pcs->cDecimal = prfhQueryProfileChar(HINI_USER, (PSZ)pcszApp, "sDecimal", '.');
     256        pcs->cThousands = prfhQueryProfileChar(HINI_USER, (PSZ)pcszApp, "sThousand", ',');
    254257    }
    255258}
Note: See TracChangeset for help on using the changeset viewer.