| 1 |
|
|---|
| 2 | /*
|
|---|
| 3 | *@@sourcefile nls.h:
|
|---|
| 4 | * header file for nls.c. See notes there.
|
|---|
| 5 | *
|
|---|
| 6 | * Note: Version numbering in this file relates to XWorkplace version
|
|---|
| 7 | * numbering.
|
|---|
| 8 | *
|
|---|
| 9 | *@@include #define INCL_DOSDATETIME
|
|---|
| 10 | *@@include #include <os2.h>
|
|---|
| 11 | *@@include #include "helpers\nls.h"
|
|---|
| 12 | */
|
|---|
| 13 |
|
|---|
| 14 | /*
|
|---|
| 15 | * Copyright (C) 1997-2001 Ulrich Mller.
|
|---|
| 16 | * This file is part of the "XWorkplace helpers" source package.
|
|---|
| 17 | * This is free software; you can redistribute it and/or modify
|
|---|
| 18 | * it under the terms of the GNU General Public License as published
|
|---|
| 19 | * by the Free Software Foundation, in version 2 as it comes in the
|
|---|
| 20 | * "COPYING" file of the XWorkplace main distribution.
|
|---|
| 21 | * This program is distributed in the hope that it will be useful,
|
|---|
| 22 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 23 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 24 | * GNU General Public License for more details.
|
|---|
| 25 | */
|
|---|
| 26 |
|
|---|
| 27 | #if __cplusplus
|
|---|
| 28 | extern "C" {
|
|---|
| 29 | #endif
|
|---|
| 30 |
|
|---|
| 31 | #ifndef NLS_HEADER_INCLUDED
|
|---|
| 32 | #define NLS_HEADER_INCLUDED
|
|---|
| 33 |
|
|---|
| 34 | /*
|
|---|
| 35 | *@@ COUNTRYSETTINGS:
|
|---|
| 36 | * structure used for returning country settings
|
|---|
| 37 | * with nlsQueryCountrySettings.
|
|---|
| 38 | */
|
|---|
| 39 |
|
|---|
| 40 | typedef struct _COUNTRYSETTINGS
|
|---|
| 41 | {
|
|---|
| 42 | ULONG ulDateFormat,
|
|---|
| 43 | // date format:
|
|---|
| 44 | // -- 0 mm.dd.yyyy (English)
|
|---|
| 45 | // -- 1 dd.mm.yyyy (e.g. German)
|
|---|
| 46 | // -- 2 yyyy.mm.dd (Japanese)
|
|---|
| 47 | // -- 3 yyyy.dd.mm
|
|---|
| 48 | ulTimeFormat;
|
|---|
| 49 | // time format:
|
|---|
| 50 | // -- 0 12-hour clock
|
|---|
| 51 | // -- >0 24-hour clock
|
|---|
| 52 | CHAR cDateSep,
|
|---|
| 53 | // date separator (e.g. '/')
|
|---|
| 54 | cTimeSep,
|
|---|
| 55 | // time separator (e.g. ':')
|
|---|
| 56 | cDecimal,
|
|---|
| 57 | // decimal separator (e.g. '.')
|
|---|
| 58 | cThousands;
|
|---|
| 59 | // thousands separator (e.g. ',')
|
|---|
| 60 | } COUNTRYSETTINGS, *PCOUNTRYSETTINGS;
|
|---|
| 61 |
|
|---|
| 62 | VOID XWPENTRY nlsQueryCountrySettings(PCOUNTRYSETTINGS pcs);
|
|---|
| 63 |
|
|---|
| 64 | PSZ XWPENTRY nlsThousandsULong(PSZ pszTarget, ULONG ul, CHAR cThousands);
|
|---|
| 65 | typedef PSZ XWPENTRY NLSTHOUSANDSULONG(PSZ pszTarget, ULONG ul, CHAR cThousands);
|
|---|
| 66 | typedef NLSTHOUSANDSULONG *PNLSTHOUSANDSULONG;
|
|---|
| 67 |
|
|---|
| 68 | PSZ XWPENTRY nlsThousandsDouble(PSZ pszTarget, double dbl, CHAR cThousands);
|
|---|
| 69 |
|
|---|
| 70 | PSZ XWPENTRY nlsVariableDouble(PSZ pszTarget, double dbl, PSZ pszUnits,
|
|---|
| 71 | CHAR cThousands);
|
|---|
| 72 |
|
|---|
| 73 | VOID XWPENTRY nlsFileDate(PSZ pszBuf,
|
|---|
| 74 | FDATE *pfDate,
|
|---|
| 75 | ULONG ulDateFormat,
|
|---|
| 76 | CHAR cDateSep);
|
|---|
| 77 |
|
|---|
| 78 | VOID XWPENTRY nlsFileTime(PSZ pszBuf,
|
|---|
| 79 | FTIME *pfTime,
|
|---|
| 80 | ULONG ulTimeFormat,
|
|---|
| 81 | CHAR cTimeSep);
|
|---|
| 82 |
|
|---|
| 83 | VOID XWPENTRY nlsDateTime(PSZ pszDate,
|
|---|
| 84 | PSZ pszTime,
|
|---|
| 85 | DATETIME *pDateTime,
|
|---|
| 86 | ULONG ulDateFormat,
|
|---|
| 87 | CHAR cDateSep,
|
|---|
| 88 | ULONG ulTimeFormat,
|
|---|
| 89 | CHAR cTimeSep);
|
|---|
| 90 | typedef VOID XWPENTRY NLSDATETIME(PSZ pszDate,
|
|---|
| 91 | PSZ pszTime,
|
|---|
| 92 | DATETIME *pDateTime,
|
|---|
| 93 | ULONG ulDateFormat,
|
|---|
| 94 | CHAR cDateSep,
|
|---|
| 95 | ULONG ulTimeFormat,
|
|---|
| 96 | CHAR cTimeSep);
|
|---|
| 97 | typedef NLSDATETIME *PNLSDATETIME;
|
|---|
| 98 |
|
|---|
| 99 | APIRET XWPENTRY nlsUpper(PSZ psz, ULONG ulLength);
|
|---|
| 100 |
|
|---|
| 101 | /*
|
|---|
| 102 | *@@ STRINGENTITY:
|
|---|
| 103 | *
|
|---|
| 104 | *@@added V0.9.16 (2001-09-29) [umoeller]
|
|---|
| 105 | */
|
|---|
| 106 |
|
|---|
| 107 | typedef struct _STRINGENTITY
|
|---|
| 108 | {
|
|---|
| 109 | PCSZ pcszEntity;
|
|---|
| 110 | PCSZ *ppcszString;
|
|---|
| 111 | } STRINGENTITY, *PSTRINGENTITY;
|
|---|
| 112 |
|
|---|
| 113 | typedef const struct _STRINGENTITY *PCSTRINGENTITY;
|
|---|
| 114 |
|
|---|
| 115 | VOID nlsInitStrings(HAB hab,
|
|---|
| 116 | HMODULE hmod,
|
|---|
| 117 | PCSTRINGENTITY paEntities,
|
|---|
| 118 | ULONG cEntities);
|
|---|
| 119 |
|
|---|
| 120 | PCSZ nlsGetString(ULONG ulStringID);
|
|---|
| 121 |
|
|---|
| 122 | #endif
|
|---|
| 123 |
|
|---|
| 124 | #if __cplusplus
|
|---|
| 125 | }
|
|---|
| 126 | #endif
|
|---|
| 127 |
|
|---|