Changeset 1391 for trunk/dll/codepage.c
- Timestamp:
- Jan 12, 2009, 12:55:53 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/codepage.c
r1346 r1391 11 11 14 Jul 06 SHL Use Runtime_Error 12 12 20 Aug 07 GKY Move #pragma alloc_text to end for OpenWatcom compat 13 11 Jan 09 GKY Moved codepage names to a character array here from the string file. 13 14 14 15 ***********************************************************************/ … … 35 36 36 37 static PSZ pszSrcFile = __FILE__; 38 static CHAR *CodePage[23] = {"437 USA", 39 "850 Multilingual", 40 "852 Latin 2", 41 "857 Turkish", 42 "860 Portuguese", 43 "861 Iceland", 44 "863 French-Canadian", 45 "865 Nordic", 46 "866 Russian OS/2", 47 "878 Russian KOI8-R", 48 "932 Japan", 49 "934 Korea", 50 "936 China", 51 "938 Taiwan", 52 "942 Japan SAA", 53 "944 Korea SAA", 54 "946 China SAA", 55 "948 Taiwan SAA", 56 "949 Korea KS", 57 "950 Taiwan (Big 5)", 58 "1004 DTP/Win", 59 "1251 Russian Win", 60 "1381 China GB"}; 37 61 38 62 MRESULT EXPENTRY PickCodePageDlgBox(HWND hwnd, ULONG msg, MPARAM mp1, … … 50 74 51 75 cp = WinQueryCp(WinQueryWindowULong(hwnd, QWL_HMQ)); 52 for (sSelect = 0; 53 (p = GetPString(IDS_CODEPAGES1 + sSelect)) != NULL; sSelect++) { 54 if (!strcmp(p, "0")) 55 break; 76 for (sSelect = 0; sSelect < 23; sSelect++) { 77 p = CodePage[sSelect]; 56 78 WinSendDlgItemMsg(hwnd, 57 79 PICK_LISTBOX, … … 127 149 MPFROMSHORT(LIT_FIRST), MPVOID); 128 150 if (sSelect >= 0) 129 WinSetDlgItemText(hwnd, 130 PICK_INPUT, GetPString(IDS_CODEPAGES1 + sSelect)); 151 WinSetDlgItemText(hwnd, PICK_INPUT, CodePage[sSelect]); 131 152 break; 132 153 case LN_ENTER: … … 150 171 Runtime_Error(pszSrcFile, __LINE__, "no input"); 151 172 else { 152 for (x = 0; (p = GetPString(IDS_CODEPAGES1 + x)) != NULL; x++) { 173 for (x = 0; x < 23; x++) { 174 p = CodePage[x]; 153 175 if (!stricmp(s, p)) { 154 176 WinDismissDlg(hwnd, atoi(p));
Note:
See TracChangeset
for help on using the changeset viewer.