Ignore:
Timestamp:
Nov 1, 2001, 6:43:18 PM (24 years ago)
Author:
umoeller
Message:

More updates.

File:
1 edited

Legend:

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

    r113 r116  
    3939    // as unsigned char
    4040
     41#define INCL_DOSNLS
     42#define INCL_DOSERRORS
    4143#define INCL_WINSHELLDATA
    4244#include <os2.h>
     
    455457}
    456458
     459
     460/*
     461 *@@ nlsUpper:
     462 *      quick hack for upper-casing a string.
     463 *
     464 *      This uses DosMapCase with the default system country
     465 *      code and the process's codepage.
     466 *
     467 *@@added V0.9.16 (2001-10-25) [umoeller]
     468 */
     469
     470APIRET nlsUpper(PSZ psz,            // in/out: string
     471                ULONG ulLength)     // in: string length; if 0, we run strlen(psz)
     472{
     473    COUNTRYCODE cc;
     474
     475    if (psz)
     476    {
     477        if (!ulLength)
     478            ulLength = strlen(psz);
     479
     480        if (ulLength)
     481        {
     482            cc.country = 0;         // use system country code
     483            cc.codepage = 0;        // use process default codepage
     484            return (DosMapCase(ulLength,
     485                               &cc,
     486                               psz));
     487        }
     488    }
     489
     490    return (ERROR_INVALID_PARAMETER);
     491}
Note: See TracChangeset for help on using the changeset viewer.