Changeset 174 for trunk/include/helpers/nls.h
- Timestamp:
- Jun 14, 2002, 2:20:11 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/helpers/nls.h
r147 r174 32 32 #define NLS_HEADER_INCLUDED 33 33 34 /* 35 *@@ COUNTRYSETTINGS: 36 * structure used for returning country settings 37 * with nlsQueryCountrySettings. 38 */ 34 #include "helpers\simples.h" 35 // V0.9.19 (2002-06-13) [umoeller] 39 36 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; 37 /* ****************************************************************** 38 * 39 * DBCS support 40 * 41 ********************************************************************/ 61 42 62 VOID XWPENTRY nlsQueryCountrySettings(PCOUNTRYSETTINGS pcs); 43 #define TYPE_SBCS 0x0000 44 #define TYPE_DBCS_1ST 0x0001 45 #define TYPE_DBCS_2ND 0x0002 63 46 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; 47 BOOL XWPENTRY nlsDBCS(VOID); 67 48 68 PSZ XWPENTRY nlsThousandsDouble(PSZ pszTarget, double dbl, CHAR cThousands); 49 ULONG XWPENTRY nlsQueryDBCSChar(PCSZ pcszString, 50 ULONG ulOfs); 69 51 70 PSZ XWPENTRY nlsVariableDouble(PSZ pszTarget, double dbl, PSZ pszUnits, 71 CHAR cThousands); 52 PSZ XWPENTRY nlschr(PCSZ p, char c); 72 53 73 VOID XWPENTRY nlsFileDate(PSZ pszBuf, 74 FDATE *pfDate, 75 ULONG ulDateFormat, 76 CHAR cDateSep); 54 PSZ XWPENTRY nlsrchr(PCSZ p, char c); 77 55 78 VOID XWPENTRY nlsFileTime(PSZ pszBuf, 79 FTIME *pfTime, 80 ULONG ulTimeFormat, 81 CHAR cTimeSep); 56 /* ****************************************************************** 57 * 58 * Country-dependent formatting 59 * 60 ********************************************************************/ 82 61 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; 62 #ifdef OS2_INCLUDED 98 63 99 APIRET XWPENTRY nlsUpper(PSZ psz, ULONG ulLength); 64 /* 65 *@@ COUNTRYSETTINGS: 66 * structure used for returning country settings 67 * with nlsQueryCountrySettings. 68 */ 100 69 101 /* 102 *@@ STRINGENTITY: 103 * 104 *@@added V0.9.16 (2001-09-29) [umoeller] 105 */ 70 typedef struct _COUNTRYSETTINGS 71 { 72 ULONG ulDateFormat, 73 // date format: 74 // -- 0 mm.dd.yyyy (English) 75 // -- 1 dd.mm.yyyy (e.g. German) 76 // -- 2 yyyy.mm.dd (Japanese) 77 // -- 3 yyyy.dd.mm 78 ulTimeFormat; 79 // time format: 80 // -- 0 12-hour clock 81 // -- >0 24-hour clock 82 CHAR cDateSep, 83 // date separator (e.g. '/') 84 cTimeSep, 85 // time separator (e.g. ':') 86 cDecimal, 87 // decimal separator (e.g. '.') 88 cThousands; 89 // thousands separator (e.g. ',') 90 } COUNTRYSETTINGS, *PCOUNTRYSETTINGS; 106 91 107 typedef struct _STRINGENTITY 108 { 109 PCSZ pcszEntity; 110 PCSZ *ppcszString; 111 } STRINGENTITY, *PSTRINGENTITY; 92 VOID XWPENTRY nlsQueryCountrySettings(PCOUNTRYSETTINGS pcs); 112 93 113 typedef const struct _STRINGENTITY *PCSTRINGENTITY; 94 PSZ XWPENTRY nlsThousandsULong(PSZ pszTarget, ULONG ul, CHAR cThousands); 95 typedef PSZ XWPENTRY NLSTHOUSANDSULONG(PSZ pszTarget, ULONG ul, CHAR cThousands); 96 typedef NLSTHOUSANDSULONG *PNLSTHOUSANDSULONG; 114 97 115 VOID nlsInitStrings(HAB hab, 116 HMODULE hmod, 117 PCSTRINGENTITY paEntities, 118 ULONG cEntities); 98 PSZ XWPENTRY nlsThousandsDouble(PSZ pszTarget, double dbl, CHAR cThousands); 119 99 120 PCSZ nlsGetString(ULONG ulStringID); 100 PSZ XWPENTRY nlsVariableDouble(PSZ pszTarget, 101 double dbl, 102 PSZ pszUnits, 103 CHAR cThousands); 104 105 VOID XWPENTRY nlsFileDate(PSZ pszBuf, 106 FDATE *pfDate, 107 ULONG ulDateFormat, 108 CHAR cDateSep); 109 110 VOID XWPENTRY nlsFileTime(PSZ pszBuf, 111 FTIME *pfTime, 112 ULONG ulTimeFormat, 113 CHAR cTimeSep); 114 115 VOID XWPENTRY nlsDateTime(PSZ pszDate, 116 PSZ pszTime, 117 DATETIME *pDateTime, 118 ULONG ulDateFormat, 119 CHAR cDateSep, 120 ULONG ulTimeFormat, 121 CHAR cTimeSep); 122 typedef VOID XWPENTRY NLSDATETIME(PSZ pszDate, 123 PSZ pszTime, 124 DATETIME *pDateTime, 125 ULONG ulDateFormat, 126 CHAR cDateSep, 127 ULONG ulTimeFormat, 128 CHAR cTimeSep); 129 typedef NLSDATETIME *PNLSDATETIME; 130 131 APIRET XWPENTRY nlsUpper(PSZ psz, ULONG ulLength); 132 133 #endif 121 134 122 135 #endif
Note:
See TracChangeset
for help on using the changeset viewer.