4word
getWord(
const void *buffer,
bool NeedsByteSwapping)
13 w = (p[1] | (p[0] << 8));
15 w = (p[0] | (p[1] << 8));
21dword
getDword(
const void *buffer,
bool NeedsByteSwapping)
30 d = (p[3] | (p[2] << 8) | (p[1] << 16) | (p[0] << 24));
32 d = (p[0] | (p[1] << 8) | (p[2] << 16) | (p[3] << 24));
51 Buffer[p + 0x0407] = 0;
64 char *pStart, *pEnd, *pDescr, *pInfo;
67 pStart = &Buffer[p + 0x0008];
70 while((*pDescr != 0) && (pDescr > pStart))
74 if(pDescr != pStart) pDescr++;
77 memcpy(pInfo, pDescr, pEnd - pDescr + 1);
78 pInfo += (pEnd - pDescr + 1);
79 memcpy(pInfo, pStart, pDescr - pStart + 1);
103 RECHeaderInfo->
SISatIndex = Buffer[p + 0x0000];
117 strncpy(RECHeaderInfo->
SISvcName, &Buffer[p + 0x000e], 24);
121 RECHeaderInfo->
TPSatIndex = Buffer[p + 0x0000];
123 TPFlags1 = Buffer[p + 0x0001];
125 RECHeaderInfo->
TPMode = (TPFlags1 >> 4) & 7;
127 memcpy(RECHeaderInfo->
TPUnknown3, &Buffer[p + 0x0002], 2);
131 memcpy(RECHeaderInfo->
TPUnknown5, &Buffer[p + 0x000c], 2);
137 RECHeaderInfo->
EventDuration = 60 * Buffer[p + 0x0002] + Buffer[p + 0x0003];
142 EventTextLength = Buffer[p + 0x0011];
144 strncpy(RECHeaderInfo->
EventEventName, &Buffer[p + 0x0013], EventTextLength);
145 strncpy(RECHeaderInfo->
EventEventDescription, &Buffer[p + 0x0013 + EventTextLength], 257 - EventTextLength);
147 memcpy(RECHeaderInfo->
EventUnknown2, &Buffer[p + 0x0116], 14);
155 RECHeaderInfo->
CryptFlag = Buffer[p + 0x0000];
156 memcpy(RECHeaderInfo->
CryptUnknown2, &Buffer[p + 0x0001], 3);
160 memcpy(RECHeaderInfo->
Bookmark, &Buffer[p + 0x0000], 64 *
sizeof(dword));
171 byte EventTextLength;
182 RECHeaderInfo->
SISatIndex = Buffer[p + 0x0000];
196 strncpy(RECHeaderInfo->
SISvcName, &Buffer[p + 0x000e], 24);
202 RECHeaderInfo->
TPUnknown2 = Buffer[p + 0x0003];
206 RECHeaderInfo->
TPUnknown4 = Buffer[p + 0x000b];
213 RECHeaderInfo->
EventDuration = 60 * Buffer[p + 0x0002] + Buffer[p + 0x0003];
218 EventTextLength = Buffer[p + 0x0011];
220 strncpy(RECHeaderInfo->
EventEventName, &Buffer[p + 0x0013], EventTextLength);
221 strncpy(RECHeaderInfo->
EventEventDescription, &Buffer[p + 0x0013 + EventTextLength], 257 - EventTextLength);
223 memcpy(RECHeaderInfo->
EventUnknown2, &Buffer[p + 0x0116], 14);
231 RECHeaderInfo->
CryptFlag = Buffer[p + 0x0000];
232 memcpy(RECHeaderInfo->
CryptUnknown2, &Buffer[p + 0x0001], 3);
236 memcpy(RECHeaderInfo->
Bookmark, &Buffer[p + 0x0000], 64 *
sizeof(dword));
247 byte EventTextLength;
258 RECHeaderInfo->
SISatIndex = Buffer[p + 0x0000];
272 strncpy(RECHeaderInfo->
SISvcName, &Buffer[p + 0x000e], 24);
281 RECHeaderInfo->
TPUnknown6 = Buffer[p + 0x000b];
286 RECHeaderInfo->
EventDuration = 60 * Buffer[p + 0x0002] + Buffer[p + 0x0003];
291 EventTextLength = Buffer[p + 0x0011];
293 strncpy(RECHeaderInfo->
EventEventName, &Buffer[p + 0x0013], EventTextLength);
294 strncpy(RECHeaderInfo->
EventEventDescription, &Buffer[p + 0x0013 + EventTextLength], 257 - EventTextLength);
296 memcpy(RECHeaderInfo->
EventUnknown2, &Buffer[p + 0x0116], 14);
304 RECHeaderInfo->
CryptFlag = Buffer[p + 0x0000];
305 memcpy(RECHeaderInfo->
CryptUnknown2, &Buffer[p + 0x0001], 3);
309 memcpy(RECHeaderInfo->
Bookmark, &Buffer[p + 0x0000], 64 *
sizeof(dword));
320 byte EventTextLength;
331 RECHeaderInfo->
SISatIndex = Buffer[p + 0x0000];
345 strncpy(RECHeaderInfo->
SISvcName, &Buffer[p + 0x000e], 24);
351 RECHeaderInfo->
TPUnknown2 = Buffer[p + 0x0003];
355 RECHeaderInfo->
TPUnknown4 = Buffer[p + 0x000b];
358 memcpy(RECHeaderInfo->
TPUnknown7, &Buffer[p + 0x0010], 8);
363 RECHeaderInfo->
EventDuration = 60 * Buffer[p + 0x0002] + Buffer[p + 3];
368 EventTextLength = Buffer[p + 0x0011];
370 strncpy(RECHeaderInfo->
EventEventName, &Buffer[p + 0x0013], EventTextLength);
371 strncpy(RECHeaderInfo->
EventEventDescription, &Buffer[p + 0x0013 + EventTextLength], 257 - EventTextLength);
373 memcpy(RECHeaderInfo->
EventUnknown2, &Buffer[p + 0x0116], 14);
381 RECHeaderInfo->
CryptFlag = Buffer[p + 0x0000];
382 memcpy(RECHeaderInfo->
CryptUnknown2, &Buffer[p + 0x0001], 3);
386 memcpy(RECHeaderInfo->
Bookmark, &Buffer[p + 0x0000], 64 *
sizeof(dword));
397 byte EventTextLength;
408 RECHeaderInfo->
SISatIndex = Buffer[p + 0x0000];
422 strncpy(RECHeaderInfo->
SISvcName, &Buffer[p + 0x000e], 28);
428 RECHeaderInfo->
TPUnknown2 = Buffer[p + 0x0003];
432 RECHeaderInfo->
TPUnknown4 = Buffer[p + 0x000b];
439 RECHeaderInfo->
EventDuration = 60 * Buffer[p + 0x0002] + Buffer[p + 3];
444 EventTextLength = Buffer[p + 0x0011];
446 strncpy(RECHeaderInfo->
EventEventName, &Buffer[p + 0x0013], EventTextLength);
447 strncpy(RECHeaderInfo->
EventEventDescription, &Buffer[p + 0x0013 + EventTextLength], 257 - EventTextLength);
449 memcpy(RECHeaderInfo->
EventUnknown2, &Buffer[p + 0x0116], 10);
457 RECHeaderInfo->
CryptFlag = Buffer[p + 0x0000];
458 memcpy(RECHeaderInfo->
CryptUnknown2, &Buffer[p + 0x0001], 3);
462 memcpy(RECHeaderInfo->
Bookmark, &Buffer[p + 0x0000], 64 *
sizeof(dword));
474 byte EventTextLength;
483 RECHeaderInfo->
CryptFlag = Buffer[p + 0x0010] & 0x03;
484 RECHeaderInfo->
HeaderFlags = Buffer[p + 0x0010] & 0xfc;
487 RECHeaderInfo->
HeaderTSFlag = Buffer[p + 0x0011] & 0x40;
488 RECHeaderInfo->
HeaderFlags2 = Buffer[p + 0x0011] & 0x3f;
494 RECHeaderInfo->
SISatIndex = Buffer[p + 0x0000];
498 RECHeaderInfo->
SITPIdx = Flags & 0x3ff;
499 RECHeaderInfo->
SITunerNum = (Flags >> 10) & 3;
500 RECHeaderInfo->
SIDelFlag = (Flags >> 12) & 1;
501 RECHeaderInfo->
SICASFlag = (Flags >> 13) & 1;
502 RECHeaderInfo->
SILockFlag = (Flags >> 14) & 1;
511 strncpy(RECHeaderInfo->
SISvcName, &Buffer[p + 0x000e], 24);
519 RECHeaderInfo->
EventDuration = 60 * Buffer[p + 3] + Buffer[p + 2];
524 EventTextLength = Buffer[p + 0x0011];
526 strncpy(RECHeaderInfo->
EventEventName, &Buffer[p + 0x0013], EventTextLength);
527 strncpy(RECHeaderInfo->
EventEventDescription, &Buffer[p + 0x0013 + EventTextLength], 273 - EventTextLength);
539 RECHeaderInfo->
TPMode = (Flags >> 1) & 0x07;
540 RECHeaderInfo->
TPSystem = (Flags >> 4) & 0x01;
542 RECHeaderInfo->
TPFEC = (Flags >> 7) & 0x0f;
543 RECHeaderInfo->
TPPilot = (Flags >> 11) & 0x01;
557 memcpy(RECHeaderInfo->
Bookmark, &Buffer[p + 0x0004], 177 *
sizeof(dword));
569 byte EventTextLength;
578 RECHeaderInfo->
CryptFlag = Buffer[p + 0x0010] & 0x03;
579 RECHeaderInfo->
HeaderFlags = Buffer[p + 0x0010] & 0xfc;
582 RECHeaderInfo->
HeaderTSFlag = Buffer[p + 0x0011] & 0x40;
583 RECHeaderInfo->
HeaderFlags2 = Buffer[p + 0x0011] & 0x3f;
590 RECHeaderInfo->
SISatIndex = Buffer[p + 0x0000];
594 RECHeaderInfo->
SITPIdx = Flags & 0x3ff;
595 RECHeaderInfo->
SITunerNum = (Flags >> 10) & 3;
596 RECHeaderInfo->
SIDelFlag = (Flags >> 12) & 1;
597 RECHeaderInfo->
SICASFlag = (Flags >> 13) & 1;
598 RECHeaderInfo->
SILockFlag = (Flags >> 14) & 1;
607 strncpy(RECHeaderInfo->
SISvcName, &Buffer[p + 0x000e], 24);
615 RECHeaderInfo->
EventDuration = 60 * Buffer[p + 3] + Buffer[p + 2];
620 EventTextLength = Buffer[p + 0x0011];
622 strncpy(RECHeaderInfo->
EventEventName, &Buffer[p + 0x0013], EventTextLength);
623 strncpy(RECHeaderInfo->
EventEventDescription, &Buffer[p + 0x0013 + EventTextLength], 273 - EventTextLength);
631 RECHeaderInfo->
TPSatIndex = Buffer[p + 0x0000];
634 RECHeaderInfo->
TPUnknown2 = Buffer[p + 0x0003];
638 RECHeaderInfo->
TPUnknown4 = Buffer[p + 0x000b];
647 memcpy(RECHeaderInfo->
Bookmark, &Buffer[p + 0x0004], 177 *
sizeof(dword));
659 byte EventTextLength;
668 RECHeaderInfo->
CryptFlag = Buffer[p + 0x0010] & 0x03;
669 RECHeaderInfo->
HeaderFlags = Buffer[p + 0x0010] & 0xfc;
672 RECHeaderInfo->
HeaderTSFlag = Buffer[p + 0x0011] & 0x40;
673 RECHeaderInfo->
HeaderFlags2 = Buffer[p + 0x0011] & 0x3f;
679 RECHeaderInfo->
SISatIndex = Buffer[p + 0x0000];
683 RECHeaderInfo->
SITPIdx = Flags & 0x3ff;
684 RECHeaderInfo->
SITunerNum = (Flags >> 10) & 3;
685 RECHeaderInfo->
SIDelFlag = (Flags >> 12) & 1;
686 RECHeaderInfo->
SICASFlag = (Flags >> 13) & 1;
687 RECHeaderInfo->
SILockFlag = (Flags >> 14) & 1;
696 strncpy(RECHeaderInfo->
SISvcName, &Buffer[p + 0x000e], 24);
704 RECHeaderInfo->
EventDuration = 60 * Buffer[p + 3] + Buffer[p + 2];
709 EventTextLength = Buffer[p + 0x0011];
711 strncpy(RECHeaderInfo->
EventEventName, &Buffer[p + 0x0013], EventTextLength);
712 strncpy(RECHeaderInfo->
EventEventDescription, &Buffer[p + 0x0013 + EventTextLength], 273 - EventTextLength);
725 RECHeaderInfo->
TPUnknown6 = Buffer[p + 0x000b];
732 memcpy(RECHeaderInfo->
Bookmark, &Buffer[p + 0x0004], 177 *
sizeof(dword));
744 byte EventTextLength;
755 RECHeaderInfo->
SISatIndex = Buffer[p + 0x0000];
759 RECHeaderInfo->
SITPIdx = TPFlags1 & 0x3ff;
760 RECHeaderInfo->
SITunerNum = (TPFlags1 >> 10) & 3;
761 RECHeaderInfo->
SISkipFlag = (TPFlags1 >> 12) & 1;
762 RECHeaderInfo->
SILockFlag = (TPFlags1 >> 13) & 1;
763 RECHeaderInfo->
SICASFlag = (TPFlags1 >> 14) & 1;
764 RECHeaderInfo->
SIDelFlag = (TPFlags1 >> 15) & 1;
771 strncpy(RECHeaderInfo->
SISvcName, &Buffer[p + 0x000e], 28);
775 RECHeaderInfo->
TPSatIndex = Buffer[p + 0x0000];
777 RECHeaderInfo->
TPFlags2 = Buffer[p + 0x0001];
782 memcpy(RECHeaderInfo->
TPUnknown3, &Buffer[p + 0x0002], 2);
786 memcpy(RECHeaderInfo->
TPUnknown5, &Buffer[p + 0x000c], 2);
792 RECHeaderInfo->
EventDuration = 60 * Buffer[p + 0x0003] + Buffer[p + 0x0002];
797 EventTextLength = Buffer[p + 0x0011];
799 strncpy(RECHeaderInfo->
EventEventName, &Buffer[p + 0x0013], EventTextLength);
800 strncpy(RECHeaderInfo->
EventEventDescription, &Buffer[p + 0x0013 + EventTextLength], 257 - EventTextLength);
802 memcpy(RECHeaderInfo->
EventUnknown2, &Buffer[p + 0x0116], 14);
810 RECHeaderInfo->
CryptFlag = Buffer[p + 0x0000];
811 memcpy(RECHeaderInfo->
CryptUnknown2, &Buffer[p + 0x0001], 3);
815 memcpy(RECHeaderInfo->
Bookmark, &Buffer[p + 0x0000], 64 *
sizeof(dword));
833 RECHeaderInfo->
HeaderMagic = (Buffer[0] << 24) | (Buffer[1] << 16) | (Buffer[2] << 8) | Buffer[3];
858 case ST_ST: ret = FALSE;
break;
859 case ST_CT: ret = FALSE;
break;
bool StrReplace(char *String, const char *Find, const char *Replace)
SYSTEM_TYPE GetSystemType(void)