| 1 | #include "DST_Common.h" |
|---|
| 2 | #include "DST_GlobalVariables.h" |
|---|
| 3 | #include "DST_HostInterface.h" |
|---|
| 4 | #include "DST_CommonAPI.h" |
|---|
| 5 | #include "DST_ChannelTune.h" |
|---|
| 6 | #include "DST_WindowType.h" |
|---|
| 7 | #include "DST_WindowEvent.h" |
|---|
| 8 | #include "DST_SignalMonitor.h" |
|---|
| 9 | #include "DST_DataStrings.h" |
|---|
| 10 | #include "DST_WinManagerTask.h" //ui |
|---|
| 11 | #include "DST_FontEngine.h" |
|---|
| 12 | #include "DST_UserInterface.h" |
|---|
| 13 | #include "DST_WinManager.h" |
|---|
| 14 | #include "DST_DB.h" |
|---|
| 15 | #include "DST_ChannelTune.h" |
|---|
| 16 | #include "DST_CC_Setup.h" |
|---|
| 17 | |
|---|
| 18 | bool DST_CC_Available(); |
|---|
| 19 | bool DST_FlashSync(); |
|---|
| 20 | |
|---|
| 21 | #if 0 |
|---|
| 22 | ____Channel_APIs___() |
|---|
| 23 | #endif |
|---|
| 24 | |
|---|
| 25 | |
|---|
| 26 | // °¡Àå ³·Àº Á֯ļö ¹øÈ£ |
|---|
| 27 | DS_U8 DST_MinRF() |
|---|
| 28 | { |
|---|
| 29 | return 0; |
|---|
| 30 | } |
|---|
| 31 | |
|---|
| 32 | // °¡Àå ³ôÀº Á֯ļö ¹øÈ£ |
|---|
| 33 | DS_U8 DST_MaxRF() |
|---|
| 34 | { |
|---|
| 35 | return RF_COUNT - DST_MinRF() - 1; // RF 85¹ø Index 83 |
|---|
| 36 | } |
|---|
| 37 | |
|---|
| 38 | #if 0 |
|---|
| 39 | ____Image_APIs___() |
|---|
| 40 | #endif |
|---|
| 41 | |
|---|
| 42 | // À̹ÌÁöÀÇ ÆøÀ» °¡Á®¿Â´Ù. |
|---|
| 43 | int DST_GetImageWidth(DS_U8 *Image) |
|---|
| 44 | { |
|---|
| 45 | return Image[1]*256+Image[2]; |
|---|
| 46 | } |
|---|
| 47 | |
|---|
| 48 | // À̹ÌÁöÀÇ ³ôÀ̸¦ °¡Á®¿Â´Ù. |
|---|
| 49 | int DST_GetImageHeight(DS_U8 *Image) |
|---|
| 50 | { |
|---|
| 51 | return Image[3]*256+Image[4]; |
|---|
| 52 | } |
|---|
| 53 | |
|---|
| 54 | #if 0 |
|---|
| 55 | ____EPG_APIs___() |
|---|
| 56 | #endif |
|---|
| 57 | |
|---|
| 58 | // ½Ã°£ ¹üÀ§¸¦ ³ªÅ¸³»´Â ¹®ÀÚ¿À» °¡Á®¿Â´Ù. |
|---|
| 59 | int DST_GetTimeDurationString(int date, int start, DS_U32 duration, DS_U16* strText) |
|---|
| 60 | { |
|---|
| 61 | // ½á¸ÓŸÀÓ+ŸÀÓÁ¸ Àû¿ë |
|---|
| 62 | start += (DST_GetTimeOffset()*60*60); |
|---|
| 63 | if (start < 0) start += (24*60*60); |
|---|
| 64 | |
|---|
| 65 | //int year = 0; |
|---|
| 66 | int month = 0; |
|---|
| 67 | int day = 0; |
|---|
| 68 | //int wday = 0; |
|---|
| 69 | int y = /*int*/((date-15078.2f)/365.25f); |
|---|
| 70 | int m = /*int*/((date-14956.1f - /*int*/(y*365.25f)) / 30.6001f); |
|---|
| 71 | int k = (m==14 || m==15) ? 1 : 0; |
|---|
| 72 | day = date-14956-/*int*/(y*365.25f)-/*int*/(m*30.6001f); |
|---|
| 73 | //year = 1900 + y + k; |
|---|
| 74 | month = m - 1 - k * 12; |
|---|
| 75 | //wday = ((date+3) % 7); // ÀÏ¿äÀÏÀÌ 0 ¿ù¿äÀÏÀÌ 1 |
|---|
| 76 | |
|---|
| 77 | char str[10] = {0,}; |
|---|
| 78 | sprintf(str, "%02d/%02d ",day,month); |
|---|
| 79 | str2uni(strText, str); |
|---|
| 80 | |
|---|
| 81 | DST_UI_GetTimeString(((start)/3600)%24, (start/60)%60, &strText[strlen16(strText)]); |
|---|
| 82 | str2uni(&strText[strlen16(strText)], (char*)"-"); |
|---|
| 83 | DST_UI_GetTimeString(((start+duration)/3600)%24, ((start+duration)/60)%60, &strText[strlen16(strText)]); |
|---|
| 84 | return strlen16(strText); |
|---|
| 85 | } |
|---|
| 86 | |
|---|
| 87 | // ½Ã°£À» ³ªÅ³»´Â ¹®ÀÚ¿À» °¡Á®¿Â´Ù. |
|---|
| 88 | //int DST_GetTimeString(DS_U32 bcd, DS_U32 duration, DS_U16* strText) |
|---|
| 89 | //{ |
|---|
| 90 | // STime_t st = DST_GetTime(bcd, duration); |
|---|
| 91 | // return DST_UI_GetTimeString(st.hour, st.min, strText); |
|---|
| 92 | //} |
|---|
| 93 | |
|---|
| 94 | //// ÇöÀç ¹æ¼ÛÁßÀÎ ÇÁ·Î±×·¥ÀÇ À̸§°ú ŸÀӵ෹À̼ÇÀ» ¹®ÀÚ¿·Î °¡Á®¿Â´Ù. |
|---|
| 95 | //void DST_GetProgramInfoString(DS_U8 *cur_info, DS_U16 *duration) |
|---|
| 96 | //{ |
|---|
| 97 | // int nCount = 0; |
|---|
| 98 | // EPG_DB* db = DST_EPG_DB_Get(&nCount); |
|---|
| 99 | // if (nCount == 0) return; |
|---|
| 100 | // DST_GetTimeDurationString(db[0].start_time, db[0].duration, duration); // À̺¥Æ®ÀÇ ½ÃÀ۽ð£°ú ³¡½Ã°£À» Ç¥½Ã |
|---|
| 101 | // int nLen = db[0].name_length[0]; |
|---|
| 102 | // memset(cur_info, 0, nLen+1); |
|---|
| 103 | // if (nLen > 0) memcpy(cur_info, db[0].p_name[0], nLen); |
|---|
| 104 | // DST_EPG_DB_Free(db, nCount); |
|---|
| 105 | //} |
|---|
| 106 | |
|---|
| 107 | #if 0 |
|---|
| 108 | ____Aspect_APIs___() |
|---|
| 109 | #endif |
|---|
| 110 | |
|---|
| 111 | // ÇöÀç ÇØ»óµµ Á¤º¸¸¦ °¡Á®¿Â´Ù. |
|---|
| 112 | // ¹Ýȯ°ªÀÌ 0À̸é ÇØ»óµµ Á¤º¸ ¾øÀ½ |
|---|
| 113 | int DST_GetResolutionInfo() |
|---|
| 114 | { |
|---|
| 115 | DS_U16 w = 0, h = 0, fps = 0; |
|---|
| 116 | bool bWide = false, bInterlace = false; |
|---|
| 117 | DST_GetVideoSize(&w, &h, &fps, &bInterlace, &bWide); |
|---|
| 118 | if (h == 0) return 0; |
|---|
| 119 | if (h < 180) return 1;// SQVGA 160x120 160x90 |
|---|
| 120 | if (h < 264) return 2;// QVGA 320x240 320x180 |
|---|
| 121 | if (h < 384) return 3;// CIF 352x288 |
|---|
| 122 | if (h < 528) return bWide ? 4 : 5;// 480p/i 720x480 |
|---|
| 123 | if (h < 648) return bWide ? 6 : 7;// 576p/i 720x576 |
|---|
| 124 | if (h < 900) return 8;// 720p 1280x720 |
|---|
| 125 | return 9; |
|---|
| 126 | } |
|---|
| 127 | |
|---|
| 128 | // ÇöÀç ºñµð¿À°¡ Ç÷¡ÀÌ ÁßÀÎÁö ¹ÝȯÇÑ´Ù. |
|---|
| 129 | bool DST_IsVideoPlay() |
|---|
| 130 | { |
|---|
| 131 | if (DST_IsWeakSignal()) return false; |
|---|
| 132 | if (DST_IsNoProgram()) return false; |
|---|
| 133 | if (DST_IsAudioOnly()) return false; |
|---|
| 134 | return true; |
|---|
| 135 | } |
|---|
| 136 | |
|---|
| 137 | // ÇöÀç ¹æ¼ÛÁßÀÎ ºñµð¿À°¡ HD ¹æ¼ÛÀΰ¡? |
|---|
| 138 | bool DST_GetHDInfo() |
|---|
| 139 | { |
|---|
| 140 | return (DST_GetResolutionInfo() >= 8); // 720p ÀÌ»óÀ̸é HD |
|---|
| 141 | } |
|---|
| 142 | |
|---|
| 143 | |
|---|
| 144 | #if 0 |
|---|
| 145 | ____CC_APIs___() |
|---|
| 146 | #endif |
|---|
| 147 | |
|---|
| 148 | // ÇöÀç CC º¸¿©ÁֱⰡ °¡´ÉÇѰ¡? |
|---|
| 149 | bool DST_GetCCInfo() |
|---|
| 150 | { |
|---|
| 151 | if (DST_IsWeakSignal()) return false; |
|---|
| 152 | if (DST_IsNoProgram()) return false; |
|---|
| 153 | return DST_CC_Available(); |
|---|
| 154 | } |
|---|
| 155 | |
|---|
| 156 | #if 0 |
|---|
| 157 | ____Date_Time_APIs___() |
|---|
| 158 | #endif |
|---|
| 159 | |
|---|
| 160 | // ¿äÀÏ ¹®ÀÚ¿À» °¡Á®¿Â´Ù. |
|---|
| 161 | // 0(ÀÏ¿äÀÏ)-6(Åä¿äÀ×) |
|---|
| 162 | DS_U16 *DST_GetDayOfWeakString(int nDayOfWeak) |
|---|
| 163 | { |
|---|
| 164 | switch (nDayOfWeak) |
|---|
| 165 | { |
|---|
| 166 | case 1: return pz_Mon[OSD_Lang]; |
|---|
| 167 | case 2: return pz_Tue[OSD_Lang]; |
|---|
| 168 | case 3: return pz_Wed[OSD_Lang]; |
|---|
| 169 | case 4: return pz_Thu[OSD_Lang]; |
|---|
| 170 | case 5: return pz_Fri[OSD_Lang]; |
|---|
| 171 | case 6: return pz_Sat[OSD_Lang]; |
|---|
| 172 | } |
|---|
| 173 | return pz_Sun[OSD_Lang]; |
|---|
| 174 | } |
|---|
| 175 | |
|---|
| 176 | // °¢ ´ÞÀÇ À̸§À» °¡Á®¿Â´Ù. |
|---|
| 177 | // 1-12 |
|---|
| 178 | DS_U16 *DST_GetMonthOfYearString(int nMonthOfYear) |
|---|
| 179 | { |
|---|
| 180 | switch (nMonthOfYear) |
|---|
| 181 | { |
|---|
| 182 | case 2: return pz_Feb[OSD_Lang]; |
|---|
| 183 | case 3: return pz_Mar[OSD_Lang]; |
|---|
| 184 | case 4: return pz_Apr[OSD_Lang]; |
|---|
| 185 | case 5: return pz_May[OSD_Lang]; |
|---|
| 186 | case 6: return pz_Jun[OSD_Lang]; |
|---|
| 187 | case 7: return pz_Jul[OSD_Lang]; |
|---|
| 188 | case 8: return pz_Aug[OSD_Lang]; |
|---|
| 189 | case 9: return pz_Sep[OSD_Lang]; |
|---|
| 190 | case 10: return pz_Oct[OSD_Lang]; |
|---|
| 191 | case 11: return pz_Nov[OSD_Lang]; |
|---|
| 192 | case 12: return pz_Dec[OSD_Lang]; |
|---|
| 193 | } |
|---|
| 194 | return pz_Jan[OSD_Lang]; |
|---|
| 195 | } |
|---|
| 196 | |
|---|
| 197 | #if 0 |
|---|
| 198 | ____Brightness_APIs___() |
|---|
| 199 | #endif |
|---|
| 200 | |
|---|
| 201 | // ¹à±â ¼³Á¤À» ÇÑ´Ù. |
|---|
| 202 | void DST_SetBrightness(DS_U8 value) |
|---|
| 203 | { |
|---|
| 204 | // DHL_DISP_SetLCDBacklight(value); |
|---|
| 205 | // DST_Printf("DHL_DISP_SetLCDBacklight %d\n", value); |
|---|
| 206 | } |
|---|
| 207 | |
|---|
| 208 | #if 0 |
|---|
| 209 | ____Power_APIs___() |
|---|
| 210 | #endif |
|---|
| 211 | |
|---|
| 212 | /*extern "C" */void DHL_SYS_Terminate(); |
|---|
| 213 | void DST_PowerDown(void) |
|---|
| 214 | { |
|---|
| 215 | DST_g_PowerOn = false; |
|---|
| 216 | DST_RemoveAllWindowExceptBasicWin(); |
|---|
| 217 | // AV °Á¦ ¹ÂÆ® |
|---|
| 218 | // DST_PowerOnMute(true); |
|---|
| 219 | //DHL_DISP_MuteMain(1); |
|---|
| 220 | DHL_VID_Mute(1); |
|---|
| 221 | DST_DB_Sync(); |
|---|
| 222 | int i; |
|---|
| 223 | for ( i = 0; i < 500; i++) |
|---|
| 224 | { |
|---|
| 225 | DST_OS_Delay(50); |
|---|
| 226 | T(); |
|---|
| 227 | if (DST_DB_IsSync() == false) continue; |
|---|
| 228 | break; |
|---|
| 229 | } |
|---|
| 230 | |
|---|
| 231 | DHL_SYS_Off(); |
|---|
| 232 | } |
|---|
| 233 | |
|---|
| 234 | #if 0 |
|---|
| 235 | ____Country_APIs___() |
|---|
| 236 | #endif |
|---|
| 237 | |
|---|
| 238 | DS_U16* DST_GetISOLanguageName(DS_U8 nNumber) |
|---|
| 239 | { |
|---|
| 240 | static DS_U16 strText16[20]; |
|---|
| 241 | strcpy16(strText16, pz_Unknown[OSD_Lang]); |
|---|
| 242 | // ¸ÖƼ ¸µ±¸¾ó Àü ÄÚµå |
|---|
| 243 | switch (nNumber) |
|---|
| 244 | { |
|---|
| 245 | case 0x01: str2uni(strText16, (char*)"Albanian"); break; |
|---|
| 246 | case 0x02: str2uni(strText16, (char*)"Breton"); break; |
|---|
| 247 | case 0x03: str2uni(strText16, (char*)"Catalan"); break; |
|---|
| 248 | case 0x04: str2uni(strText16, (char*)"Croatian"); break; |
|---|
| 249 | case 0x05: str2uni(strText16, (char*)"Welsh"); break; |
|---|
| 250 | case 0x06: str2uni(strText16, (char*)"Czech"); break; |
|---|
| 251 | case 0x07: str2uni(strText16, (char*)"Danish"); break; |
|---|
| 252 | //case 0x08: str2uni(strText16, (char*)"German"); break; |
|---|
| 253 | //case 0x09: str2uni(strText16, (char*)"English"); break; |
|---|
| 254 | //case 0x0A: str2uni(strText16, (char*)"Spanish"); break; |
|---|
| 255 | case 0x0B: str2uni(strText16, (char*)"Esperanto"); break; |
|---|
| 256 | case 0x0C: str2uni(strText16, (char*)"Estonian"); break; |
|---|
| 257 | case 0x0D: str2uni(strText16, (char*)"Basque"); break; |
|---|
| 258 | case 0x0E: str2uni(strText16, (char*)"Faroese"); break; |
|---|
| 259 | //case 0x0F: str2uni(strText16, "French"); break; |
|---|
| 260 | case 0x10: str2uni(strText16, (char*)"Frisian"); break; |
|---|
| 261 | case 0x11: str2uni(strText16, (char*)"Irish"); break; |
|---|
| 262 | case 0x12: str2uni(strText16, (char*)"Gaelic"); break; |
|---|
| 263 | case 0x13: str2uni(strText16, (char*)"Galician"); break; |
|---|
| 264 | case 0x14: str2uni(strText16, (char*)"Icelandic"); break; |
|---|
| 265 | case 0x15: str2uni(strText16, (char*)"Italian"); break; |
|---|
| 266 | case 0x16: str2uni(strText16, (char*)"Lappish"); break; |
|---|
| 267 | case 0x17: str2uni(strText16, (char*)"Latin"); break; |
|---|
| 268 | case 0x18: str2uni(strText16, (char*)"Latvian"); break; |
|---|
| 269 | case 0x19: str2uni(strText16, (char*)"Luxembourgian"); break; |
|---|
| 270 | case 0x1A: str2uni(strText16, (char*)"Lithuanian"); break; |
|---|
| 271 | case 0x1B: str2uni(strText16, (char*)"Hungarian"); break; |
|---|
| 272 | case 0x1C: str2uni(strText16, (char*)"Maltese"); break; |
|---|
| 273 | case 0x1D: str2uni(strText16, (char*)"Dutch"); break; |
|---|
| 274 | case 0x1E: str2uni(strText16, (char*)"Norwegian"); break; |
|---|
| 275 | case 0x1F: str2uni(strText16, (char*)"Occitan"); break; |
|---|
| 276 | case 0x20: str2uni(strText16, (char*)"Polish"); break; |
|---|
| 277 | //case 0x21: str2uni(strText16, (char*)"Portuguese"); break; |
|---|
| 278 | case 0x22: str2uni(strText16, (char*)"Romanian"); break; |
|---|
| 279 | case 0x23: str2uni(strText16, (char*)"Romansh"); break; |
|---|
| 280 | case 0x24: str2uni(strText16, (char*)"Serbian"); break; |
|---|
| 281 | case 0x25: str2uni(strText16, (char*)"Slovak"); break; |
|---|
| 282 | case 0x26: str2uni(strText16, (char*)"Slovene"); break; |
|---|
| 283 | case 0x27: str2uni(strText16, (char*)"Finnish"); break; |
|---|
| 284 | case 0x28: str2uni(strText16, (char*)"Swedish"); break; |
|---|
| 285 | case 0x29: str2uni(strText16, (char*)"Turkish"); break; |
|---|
| 286 | case 0x2A: str2uni(strText16, (char*)"Flemish"); break; |
|---|
| 287 | case 0x2B: str2uni(strText16, (char*)"Wallon"); break; |
|---|
| 288 | case 0x45: str2uni(strText16, (char*)"Zulu"); break; |
|---|
| 289 | case 0x46: str2uni(strText16, (char*)"Vietnamese"); break; |
|---|
| 290 | case 0x47: str2uni(strText16, (char*)"Uzbek"); break; |
|---|
| 291 | case 0x48: str2uni(strText16, (char*)"Urdu"); break; |
|---|
| 292 | case 0x49: str2uni(strText16, (char*)"Ukrainian"); break; |
|---|
| 293 | case 0x4A: str2uni(strText16, (char*)"Thai"); break; |
|---|
| 294 | case 0x4B: str2uni(strText16, (char*)"Telugu"); break; |
|---|
| 295 | case 0x4C: str2uni(strText16, (char*)"Tarar"); break; |
|---|
| 296 | case 0x4D: str2uni(strText16, (char*)"Tamil"); break; |
|---|
| 297 | case 0x4E: str2uni(strText16, (char*)"Tadzhik"); break; |
|---|
| 298 | case 0x4F: str2uni(strText16, (char*)"Swahili"); break; |
|---|
| 299 | case 0x50: str2uni(strText16, (char*)"Sranan Tongo"); break; |
|---|
| 300 | case 0x51: str2uni(strText16, (char*)"Somali"); break; |
|---|
| 301 | case 0x52: str2uni(strText16, (char*)"Sinhalese"); break; |
|---|
| 302 | case 0x53: str2uni(strText16, (char*)"Shona"); break; |
|---|
| 303 | case 0x54: str2uni(strText16, (char*)"Serbo-Croat"); break; |
|---|
| 304 | case 0x55: str2uni(strText16, (char*)"Ruthenian"); break; |
|---|
| 305 | case 0x56: str2uni(strText16, (char*)"Russian"); break; |
|---|
| 306 | case 0x57: str2uni(strText16, (char*)"Quechua"); break; |
|---|
| 307 | case 0x58: str2uni(strText16, (char*)"Pustu"); break; |
|---|
| 308 | case 0x59: str2uni(strText16, (char*)"Punjabi"); break; |
|---|
| 309 | case 0x5A: str2uni(strText16, (char*)"Persian"); break; |
|---|
| 310 | case 0x5B: str2uni(strText16, (char*)"Papamiento"); break; |
|---|
| 311 | case 0x5C: str2uni(strText16, (char*)"Oriya"); break; |
|---|
| 312 | case 0x5D: str2uni(strText16, (char*)"Nepali"); break; |
|---|
| 313 | case 0x5E: str2uni(strText16, (char*)"Ndebele"); break; |
|---|
| 314 | case 0x5F: str2uni(strText16, (char*)"Marathi"); break; |
|---|
| 315 | case 0x60: str2uni(strText16, (char*)"Moldavian"); break; |
|---|
| 316 | case 0x61: str2uni(strText16, (char*)"Malaysian"); break; |
|---|
| 317 | case 0x62: str2uni(strText16, (char*)"Malagasay"); break; |
|---|
| 318 | case 0x63: str2uni(strText16, (char*)"Macedonian"); break; |
|---|
| 319 | case 0x64: str2uni(strText16, (char*)"Laotian"); break; |
|---|
| 320 | //case 0x65: str2uni(strText16, (char*)"Korean"); break; |
|---|
| 321 | case 0x66: str2uni(strText16, (char*)"Khmer"); break; |
|---|
| 322 | case 0x67: str2uni(strText16, (char*)"Kazakh"); break; |
|---|
| 323 | case 0x68: str2uni(strText16, (char*)"Kannada"); break; |
|---|
| 324 | //case 0x69: str2uni(strText16, (char*)"Japanese"); break; |
|---|
| 325 | case 0x6A: str2uni(strText16, (char*)"Indonesian"); break; |
|---|
| 326 | case 0x6B: str2uni(strText16, (char*)"Hindi"); break; |
|---|
| 327 | case 0x6C: str2uni(strText16, (char*)"Hebrew"); break; |
|---|
| 328 | case 0x6D: str2uni(strText16, (char*)"Hausa"); break; |
|---|
| 329 | case 0x6E: str2uni(strText16, (char*)"Gurani"); break; |
|---|
| 330 | case 0x6F: str2uni(strText16, (char*)"Gujurati"); break; |
|---|
| 331 | case 0x70: str2uni(strText16, (char*)"Greek"); break; |
|---|
| 332 | case 0x71: str2uni(strText16, (char*)"Georigian"); break; |
|---|
| 333 | case 0x72: str2uni(strText16, (char*)"Fulani"); break; |
|---|
| 334 | case 0x73: str2uni(strText16, (char*)"Dari"); break; |
|---|
| 335 | case 0x74: str2uni(strText16, (char*)"Churash"); break; |
|---|
| 336 | //case 0x75: str2uni(strText16, (char*)"Chinese"); break; |
|---|
| 337 | case 0x76: str2uni(strText16, (char*)"Burmese"); break; |
|---|
| 338 | case 0x77: str2uni(strText16, (char*)"Bulgarian"); break; |
|---|
| 339 | case 0x78: str2uni(strText16, (char*)"Bengali"); break; |
|---|
| 340 | case 0x79: str2uni(strText16, (char*)"Belorussian"); break; |
|---|
| 341 | case 0x7A: str2uni(strText16, (char*)"Bambora"); break; |
|---|
| 342 | case 0x7B: str2uni(strText16, (char*)"Azerbijani"); break; |
|---|
| 343 | case 0x7C: str2uni(strText16, (char*)"Assamese"); break; |
|---|
| 344 | case 0x7D: str2uni(strText16, (char*)"Armenian"); break; |
|---|
| 345 | case 0x7E: str2uni(strText16, (char*)"Arabic"); break; |
|---|
| 346 | case 0x7F: str2uni(strText16, (char*)"Amharic"); break; |
|---|
| 347 | } |
|---|
| 348 | // ¸ÖƼ ¸µ±¸¾ó Àû¿ë |
|---|
| 349 | switch (nNumber) |
|---|
| 350 | { |
|---|
| 351 | case 0x65: strcpy16(strText16, pz_Korean[OSD_Lang]); break;// pz_Korean |
|---|
| 352 | case 0x75: strcpy16(strText16, pz_Chinese[OSD_Lang]); break;// pz_Chinese |
|---|
| 353 | case 0x08: strcpy16(strText16, pz_German[OSD_Lang]); break;// pz_German |
|---|
| 354 | case 0x09: strcpy16(strText16, pz_English[OSD_Lang]); break;// pz_English |
|---|
| 355 | case 0x0A: strcpy16(strText16, pz_Spanish[OSD_Lang]); break;// pz_Spanish |
|---|
| 356 | case 0x0F: strcpy16(strText16, pz_French[OSD_Lang]); break;// pz_French |
|---|
| 357 | case 0x21: strcpy16(strText16, pz_Portuguese[OSD_Lang]); break;// pz_Portuguese |
|---|
| 358 | case 0x69: strcpy16(strText16, pz_Japanese[OSD_Lang]); break;// pz_Japanese |
|---|
| 359 | } |
|---|
| 360 | return strText16; |
|---|
| 361 | } |
|---|
| 362 | |
|---|
| 363 | static bool DST_IsAlphabetCharacter(char c) |
|---|
| 364 | { |
|---|
| 365 | if ('A' <= c && c <= 'Z') return true; |
|---|
| 366 | if ('a' <= c && c <= 'z') return true; |
|---|
| 367 | return false; |
|---|
| 368 | } |
|---|
| 369 | |
|---|
| 370 | static char DST_ToLowerCharacter(char c) |
|---|
| 371 | { |
|---|
| 372 | if ('A' <= c && c <= 'Z') return c+0x20; |
|---|
| 373 | return c; |
|---|
| 374 | } |
|---|
| 375 | |
|---|
| 376 | DS_U8 DST_GetLangCodeFromISO639String(char* code) |
|---|
| 377 | { |
|---|
| 378 | if (code == 0) return 0; |
|---|
| 379 | // ¹®ÀÚ¿°ú ºñ±³ÇÏ¿© ¿Àµð¿À Äڵ带 ¹ÝȯÇÑ´Ù. |
|---|
| 380 | if (strcmp(code, "alb")==0) return 0x01; |
|---|
| 381 | if (strcmp(code, "bre")==0) return 0x02; |
|---|
| 382 | if (strcmp(code, "cat")==0) return 0x03; |
|---|
| 383 | if (strcmp(code, "scr")==0) return 0x04; |
|---|
| 384 | if (strcmp(code, "wel")==0) return 0x05; |
|---|
| 385 | if (strcmp(code, "cze")==0) return 0x06; |
|---|
| 386 | if (strcmp(code, "dan")==0) return 0x07; |
|---|
| 387 | |
|---|
| 388 | if (strcmp(code, "ger")==0) return 0x08; |
|---|
| 389 | if (strcmp(code, "eng")==0) return 0x09; |
|---|
| 390 | if (strcmp(code, "spa")==0 || strcmp(code, "esl")==0) return 0x0A; |
|---|
| 391 | if (strcmp(code, "epo")==0) return 0x0B; |
|---|
| 392 | if (strcmp(code, "est")==0) return 0x0C; |
|---|
| 393 | if (strcmp(code, "baq")==0) return 0x0D; |
|---|
| 394 | if (strcmp(code, "fao")==0) return 0x0E; |
|---|
| 395 | if (strcmp(code, "fre")==0 || strcmp(code, "fra")==0) return 0x0F; |
|---|
| 396 | |
|---|
| 397 | if (strcmp(code, "fry")==0) return 0x10; |
|---|
| 398 | if (strcmp(code, "gle")==0) return 0x11; |
|---|
| 399 | if (strcmp(code, "gla")==0) return 0x12; |
|---|
| 400 | if (strcmp(code, "glg")==0) return 0x13; |
|---|
| 401 | if (strcmp(code, "ice")==0) return 0x14; |
|---|
| 402 | if (strcmp(code, "ita")==0) return 0x15; |
|---|
| 403 | if (strcmp(code, "lat")==0) return 0x17; |
|---|
| 404 | |
|---|
| 405 | if (strcmp(code, "lav")==0) return 0x18; |
|---|
| 406 | if (strcmp(code, "lit")==0) return 0x1A; |
|---|
| 407 | if (strcmp(code, "hun")==0) return 0x1B; |
|---|
| 408 | if (strcmp(code, "mlt")==0) return 0x1C; |
|---|
| 409 | if (strcmp(code, "dut")==0) return 0x1D; |
|---|
| 410 | if (strcmp(code, "nor")==0) return 0x1E; |
|---|
| 411 | if (strcmp(code, "oci")==0) return 0x1F; |
|---|
| 412 | |
|---|
| 413 | if (strcmp(code, "pol")==0) return 0x20; |
|---|
| 414 | if (strcmp(code, "por")==0) return 0x21; |
|---|
| 415 | if (strcmp(code, "rum")==0) return 0x22; |
|---|
| 416 | if (strcmp(code, "scc")==0) return 0x24; |
|---|
| 417 | if (strcmp(code, "slo")==0) return 0x25; |
|---|
| 418 | if (strcmp(code, "fin")==0) return 0x27; |
|---|
| 419 | |
|---|
| 420 | if (strcmp(code, "swe")==0) return 0x28; |
|---|
| 421 | if (strcmp(code, "tur")==0) return 0x29; |
|---|
| 422 | |
|---|
| 423 | if (strcmp(code, "zul")==0) return 0x45; |
|---|
| 424 | if (strcmp(code, "vie")==0) return 0x46; |
|---|
| 425 | if (strcmp(code, "uzb")==0) return 0x47; |
|---|
| 426 | |
|---|
| 427 | if (strcmp(code, "urd")==0) return 0x48; |
|---|
| 428 | if (strcmp(code, "ukr")==0) return 0x49; |
|---|
| 429 | if (strcmp(code, "tha")==0) return 0x4A; |
|---|
| 430 | if (strcmp(code, "tel")==0) return 0x4B; |
|---|
| 431 | if (strcmp(code, "tat")==0) return 0x4C; |
|---|
| 432 | if (strcmp(code, "tam")==0) return 0x4D; |
|---|
| 433 | if (strcmp(code, "swa")==0) return 0x4F; |
|---|
| 434 | |
|---|
| 435 | if (strcmp(code, "som")==0) return 0x51; |
|---|
| 436 | if (strcmp(code, "sin")==0) return 0x52; |
|---|
| 437 | if (strcmp(code, "sna")==0) return 0x53; |
|---|
| 438 | if (strcmp(code, "rus")==0) return 0x56; |
|---|
| 439 | if (strcmp(code, "que")==0) return 0x57; |
|---|
| 440 | |
|---|
| 441 | if (strcmp(code, "pus")==0) return 0x58; |
|---|
| 442 | if (strcmp(code, "per")==0) return 0x5A; |
|---|
| 443 | if (strcmp(code, "pap")==0) return 0x5B; |
|---|
| 444 | if (strcmp(code, "ori")==0) return 0x5C; |
|---|
| 445 | if (strcmp(code, "nep")==0) return 0x5D; |
|---|
| 446 | if (strcmp(code, "nde")==0) return 0x5E; |
|---|
| 447 | if (strcmp(code, "mar")==0) return 0x5F; |
|---|
| 448 | |
|---|
| 449 | if (strcmp(code, "mol")==0) return 0x60; |
|---|
| 450 | if (strcmp(code, "may")==0) return 0x61; |
|---|
| 451 | if (strcmp(code, "mlg")==0) return 0x62; |
|---|
| 452 | if (strcmp(code, "mac")==0) return 0x63; |
|---|
| 453 | if (strcmp(code, "kor")==0) return 0x65; |
|---|
| 454 | if (strcmp(code, "khm")==0) return 0x66; |
|---|
| 455 | if (strcmp(code, "kaz")==0) return 0x67; |
|---|
| 456 | |
|---|
| 457 | if (strcmp(code, "kan")==0) return 0x68; |
|---|
| 458 | if (strcmp(code, "jpn")==0) return 0x69; |
|---|
| 459 | if (strcmp(code, "ind")==0) return 0x6A; |
|---|
| 460 | if (strcmp(code, "hin")==0) return 0x6B; |
|---|
| 461 | if (strcmp(code, "heb")==0) return 0x6C; |
|---|
| 462 | if (strcmp(code, "hau")==0) return 0x6D; |
|---|
| 463 | if (strcmp(code, "grn")==0) return 0x6E; |
|---|
| 464 | if (strcmp(code, "guj")==0) return 0x6F; |
|---|
| 465 | |
|---|
| 466 | if (strcmp(code, "gre")==0) return 0x70; |
|---|
| 467 | if (strcmp(code, "geo")==0) return 0x71; |
|---|
| 468 | if (strcmp(code, "chv")==0) return 0x74; |
|---|
| 469 | if (strcmp(code, "chi")==0 || strcmp(code, "zho")==0) return 0x75; |
|---|
| 470 | if (strcmp(code, "bur")==0) return 0x76; |
|---|
| 471 | if (strcmp(code, "bul")==0) return 0x77; |
|---|
| 472 | |
|---|
| 473 | if (strcmp(code, "ben")==0) return 0x78; |
|---|
| 474 | if (strcmp(code, "bel")==0) return 0x79; |
|---|
| 475 | if (strcmp(code, "bam")==0) return 0x7A; |
|---|
| 476 | if (strcmp(code, "aze")==0) return 0x7B; |
|---|
| 477 | if (strcmp(code, "asm")==0) return 0x7C; |
|---|
| 478 | if (strcmp(code, "arm")==0) return 0x7D; |
|---|
| 479 | if (strcmp(code, "ara")==0) return 0x7E; |
|---|
| 480 | if (strcmp(code, "amh")==0) return 0x7F; |
|---|
| 481 | |
|---|
| 482 | return 0; // Unknown |
|---|
| 483 | } |
|---|
| 484 | |
|---|
| 485 | DS_U8 DST_GetLangCodeFromISO639(DS_U32 iso639) |
|---|
| 486 | { |
|---|
| 487 | char code[4] = {0,0,0,0}; |
|---|
| 488 | code[0] = (iso639 >> 16) & 0xFF; |
|---|
| 489 | code[1] = (iso639 >> 8) & 0xFF; |
|---|
| 490 | code[2] = (iso639 >> 0) & 0xFF; |
|---|
| 491 | // ¼¼ ±ÛÀÚÀÇ ¾ËÆÄºªÀÎÁö È®ÀÎ |
|---|
| 492 | if (DST_IsAlphabetCharacter(code[0]) == false) return 0; |
|---|
| 493 | if (DST_IsAlphabetCharacter(code[1]) == false) return 0; |
|---|
| 494 | if (DST_IsAlphabetCharacter(code[2]) == false) return 0; |
|---|
| 495 | // ¼Ò¹®ÀÚ·Î Á¤±ÔÈ |
|---|
| 496 | code[0] = DST_ToLowerCharacter(code[0]); |
|---|
| 497 | code[1] = DST_ToLowerCharacter(code[1]); |
|---|
| 498 | code[2] = DST_ToLowerCharacter(code[2]); |
|---|
| 499 | |
|---|
| 500 | return DST_GetLangCodeFromISO639String(code); |
|---|
| 501 | } |
|---|
| 502 | |
|---|
| 503 | #if 0 |
|---|
| 504 | ____String_APIs___() |
|---|
| 505 | #endif |
|---|
| 506 | |
|---|
| 507 | void strcpy16(DS_U16* des, DS_U16* src) |
|---|
| 508 | { |
|---|
| 509 | unsigned i; |
|---|
| 510 | for ( i = 0; i < 4096; i++) |
|---|
| 511 | { |
|---|
| 512 | des[i] = src[i]; |
|---|
| 513 | if (des[i] == 0) break; |
|---|
| 514 | } |
|---|
| 515 | } |
|---|
| 516 | |
|---|
| 517 | int strcmp16(DS_U16* des, DS_U16* src) |
|---|
| 518 | { |
|---|
| 519 | int len_des = strlen16(des); |
|---|
| 520 | int len_src = strlen16(src); |
|---|
| 521 | if (len_des != len_src) return -1; |
|---|
| 522 | return memcmp(des, src, len_des); |
|---|
| 523 | } |
|---|
| 524 | |
|---|
| 525 | void strcpy32(DS_U32* des, DS_U32* src) |
|---|
| 526 | { |
|---|
| 527 | unsigned i; |
|---|
| 528 | for ( i = 0; i < 4096; i++) |
|---|
| 529 | { |
|---|
| 530 | des[i] = src[i]; |
|---|
| 531 | if (des[i] == 0) break; |
|---|
| 532 | } |
|---|
| 533 | } |
|---|
| 534 | |
|---|
| 535 | unsigned strlen16(DS_U16 *str) |
|---|
| 536 | { |
|---|
| 537 | if (str == 0) return 0; |
|---|
| 538 | unsigned i; |
|---|
| 539 | for ( i = 0; i < 4096; i++) if (str[i] == 0) return i; |
|---|
| 540 | return 0; |
|---|
| 541 | } |
|---|
| 542 | |
|---|
| 543 | unsigned strlen32(DS_U32 *str) |
|---|
| 544 | { |
|---|
| 545 | if (str == 0) return 0; |
|---|
| 546 | unsigned i; |
|---|
| 547 | for ( i = 0; i < 4096; i++) if (str[i] == 0) return i; |
|---|
| 548 | return 0; |
|---|
| 549 | } |
|---|
| 550 | |
|---|
| 551 | void str2uni(DS_U16* des, char* src) |
|---|
| 552 | { |
|---|
| 553 | unsigned nLen = strlen(src); |
|---|
| 554 | unsigned i; |
|---|
| 555 | for ( i = 0; i < nLen; i++) des[i] = (DS_U16)(DS_U8)src[i]; |
|---|
| 556 | des[nLen] = 0; |
|---|
| 557 | } |
|---|
| 558 | |
|---|
| 559 | void str232(DS_U32* des, char* src) |
|---|
| 560 | { |
|---|
| 561 | unsigned nLen = strlen(src); |
|---|
| 562 | unsigned i; |
|---|
| 563 | for ( i = 0; i < nLen; i++) des[i] = (DS_U32)(DS_U8)src[i]; |
|---|
| 564 | des[nLen] = 0; |
|---|
| 565 | } |
|---|
| 566 | |
|---|
| 567 | void uni232(DS_U32* des, DS_U16* src) |
|---|
| 568 | { |
|---|
| 569 | unsigned nLen = strlen16(src); |
|---|
| 570 | unsigned i; |
|---|
| 571 | for ( i = 0; i < nLen; i++) des[i] = (DS_U32)src[i]; |
|---|
| 572 | des[nLen] = 0; |
|---|
| 573 | } |
|---|
| 574 | |
|---|
| 575 | void strcat16(DS_U16* des, DS_U16* src) |
|---|
| 576 | { |
|---|
| 577 | unsigned desLen = strlen16(des); |
|---|
| 578 | unsigned srcLen = strlen16(src); |
|---|
| 579 | |
|---|
| 580 | unsigned i; |
|---|
| 581 | for ( i = 0 ; i < srcLen ; i++) |
|---|
| 582 | { |
|---|
| 583 | des[desLen + i] = src[i]; |
|---|
| 584 | if (des[desLen + i] == 0) break; |
|---|
| 585 | } |
|---|
| 586 | des[desLen + srcLen] = 0; |
|---|
| 587 | } |
|---|
| 588 | |
|---|
| 589 | void strcat16_8(DS_U16* des, char* src) |
|---|
| 590 | { |
|---|
| 591 | unsigned desLen = strlen16(des); |
|---|
| 592 | unsigned srcLen = strlen(src); |
|---|
| 593 | |
|---|
| 594 | unsigned i; |
|---|
| 595 | for ( i = 0 ; i < srcLen ; i++) |
|---|
| 596 | { |
|---|
| 597 | des[desLen + i] = (DS_U16)(DS_U8)src[i]; |
|---|
| 598 | if (des[desLen + i] == 0) break; |
|---|
| 599 | } |
|---|
| 600 | des[desLen + srcLen] = 0; |
|---|
| 601 | } |
|---|
| 602 | |
|---|
| 603 | #if 0 |
|---|
| 604 | ____Reset_APIs___() |
|---|
| 605 | #endif |
|---|
| 606 | |
|---|
| 607 | /*extern "C" */void DHL_SYS_Reset(); |
|---|
| 608 | void DST_Reset(const char * function) |
|---|
| 609 | { |
|---|
| 610 | DST_Printf("%s|%d by %s \n",__func__, __LINE__,function); |
|---|
| 611 | // DST_FlashSyncStart(); |
|---|
| 612 | DST_DB_Sync(); |
|---|
| 613 | int i; |
|---|
| 614 | for ( i = 0; i < 500; i++) |
|---|
| 615 | { |
|---|
| 616 | DST_OS_Delay(50); |
|---|
| 617 | T(); |
|---|
| 618 | if (DST_DB_IsSync() == false) continue; |
|---|
| 619 | break; |
|---|
| 620 | } |
|---|
| 621 | DHL_SYS_Reboot(); |
|---|
| 622 | } |
|---|
| 623 | |
|---|
| 624 | #if 0 |
|---|
| 625 | ____Item_Scroll_APIs____() |
|---|
| 626 | #endif |
|---|
| 627 | DS_U8 DST_IncreaseValue(DS_U16 min, DS_U16 max, DS_U16 *value, DS_U16 step/*=1*/) |
|---|
| 628 | { |
|---|
| 629 | if ((max-min+1) <= step) return *value; |
|---|
| 630 | |
|---|
| 631 | if((*value+step)>max) |
|---|
| 632 | { |
|---|
| 633 | *value = *value+step-(max-min+1); |
|---|
| 634 | } |
|---|
| 635 | else |
|---|
| 636 | { |
|---|
| 637 | *value = *value + step; |
|---|
| 638 | } |
|---|
| 639 | return *value; |
|---|
| 640 | } |
|---|
| 641 | |
|---|
| 642 | DS_U8 DST_DecreaseValue(DS_U16 min, DS_U16 max, DS_U16 *value, DS_U16 step/*=1*/) |
|---|
| 643 | { |
|---|
| 644 | if ((max-min+1) <= step) return *value; |
|---|
| 645 | |
|---|
| 646 | if((*value-step)<min) |
|---|
| 647 | { |
|---|
| 648 | *value = *value-step+(max-min+1); |
|---|
| 649 | } |
|---|
| 650 | else |
|---|
| 651 | { |
|---|
| 652 | *value = *value - step; |
|---|
| 653 | } |
|---|
| 654 | return *value; |
|---|
| 655 | } |
|---|
| 656 | |
|---|
| 657 | |
|---|
| 658 | void InitItemValues(DS_U16 listNum, DS_U16 select, DS_U16 *start, DS_U16 *cursor) |
|---|
| 659 | { |
|---|
| 660 | *start = 0; |
|---|
| 661 | if (select >= listNum) *start = select-listNum+1; |
|---|
| 662 | *cursor = select-*start; |
|---|
| 663 | } |
|---|
| 664 | |
|---|
| 665 | void ItemDecrease(DS_U16 itemNum, DS_U16 listNum, DS_U16 *start, DS_U16 *select, DS_U16 *cursor, DS_U16 step) |
|---|
| 666 | { |
|---|
| 667 | int i; |
|---|
| 668 | for( i=0;i<step;i++) |
|---|
| 669 | { |
|---|
| 670 | if (*cursor == 0) |
|---|
| 671 | DST_DecreaseValue(0, itemNum-listNum, start, 1); |
|---|
| 672 | DST_DecreaseValue(0, itemNum-1, select, 1); |
|---|
| 673 | *cursor = *select - *start; |
|---|
| 674 | } |
|---|
| 675 | } |
|---|
| 676 | |
|---|
| 677 | void ItemIncrease(DS_U16 itemNum, DS_U16 listNum, DS_U16 *start, DS_U16 *select, DS_U16 *cursor, DS_U16 step) |
|---|
| 678 | { |
|---|
| 679 | int i; |
|---|
| 680 | for( i=0;i<step;i++) |
|---|
| 681 | { |
|---|
| 682 | if (*cursor >= listNum-1) |
|---|
| 683 | DST_IncreaseValue(0, itemNum-listNum, start, 1); |
|---|
| 684 | DST_IncreaseValue(0, itemNum-1, select, 1); |
|---|
| 685 | *cursor = *select - *start; |
|---|
| 686 | } |
|---|
| 687 | } |
|---|
| 688 | |
|---|
| 689 | //static DS_U32 l_pdwCrc32Table[256] = |
|---|
| 690 | //{ |
|---|
| 691 | // 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, |
|---|
| 692 | // 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3, |
|---|
| 693 | // 0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988, |
|---|
| 694 | // 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91, |
|---|
| 695 | // 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE, |
|---|
| 696 | // 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7, |
|---|
| 697 | // 0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC, |
|---|
| 698 | // 0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5, |
|---|
| 699 | // 0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172, |
|---|
| 700 | // 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B, |
|---|
| 701 | // 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940, |
|---|
| 702 | // 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59, |
|---|
| 703 | // 0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116, |
|---|
| 704 | // 0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F, |
|---|
| 705 | // 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924, |
|---|
| 706 | // 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D, |
|---|
| 707 | // |
|---|
| 708 | // 0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A, |
|---|
| 709 | // 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433, |
|---|
| 710 | // 0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818, |
|---|
| 711 | // 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01, |
|---|
| 712 | // 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E, |
|---|
| 713 | // 0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457, |
|---|
| 714 | // 0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C, |
|---|
| 715 | // 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65, |
|---|
| 716 | // 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2, |
|---|
| 717 | // 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB, |
|---|
| 718 | // 0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0, |
|---|
| 719 | // 0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9, |
|---|
| 720 | // 0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086, |
|---|
| 721 | // 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F, |
|---|
| 722 | // 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4, |
|---|
| 723 | // 0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD, |
|---|
| 724 | // |
|---|
| 725 | // 0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A, |
|---|
| 726 | // 0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683, |
|---|
| 727 | // 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8, |
|---|
| 728 | // 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1, |
|---|
| 729 | // 0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE, |
|---|
| 730 | // 0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7, |
|---|
| 731 | // 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC, |
|---|
| 732 | // 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5, |
|---|
| 733 | // 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252, |
|---|
| 734 | // 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B, |
|---|
| 735 | // 0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60, |
|---|
| 736 | // 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79, |
|---|
| 737 | // 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236, |
|---|
| 738 | // 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F, |
|---|
| 739 | // 0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04, |
|---|
| 740 | // 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D, |
|---|
| 741 | // |
|---|
| 742 | // 0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A, |
|---|
| 743 | // 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713, |
|---|
| 744 | // 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38, |
|---|
| 745 | // 0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21, |
|---|
| 746 | // 0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E, |
|---|
| 747 | // 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777, |
|---|
| 748 | // 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C, |
|---|
| 749 | // 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45, |
|---|
| 750 | // 0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2, |
|---|
| 751 | // 0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB, |
|---|
| 752 | // 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0, |
|---|
| 753 | // 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9, |
|---|
| 754 | // 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6, |
|---|
| 755 | // 0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF, |
|---|
| 756 | // 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94, |
|---|
| 757 | // 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D, |
|---|
| 758 | //}; |
|---|
| 759 | // |
|---|
| 760 | //DS_U32 DST_crc32 (DS_U8 *data, int len) |
|---|
| 761 | //{ |
|---|
| 762 | // int i; |
|---|
| 763 | // DS_U32 crc = 0xffffffff; |
|---|
| 764 | // |
|---|
| 765 | // for (i=0; i<len; i++) |
|---|
| 766 | // crc = ((crc) >> 8) ^ l_pdwCrc32Table[(*data++) ^ ((crc) & 0x000000FF)]; |
|---|
| 767 | // |
|---|
| 768 | // crc = ~crc; |
|---|
| 769 | // |
|---|
| 770 | // return crc; |
|---|
| 771 | //} |
|---|