Changeset 5355 for trunk/reader-videoguard-common.c
- Timestamp:
- 06/05/11 19:18:47 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/reader-videoguard-common.c
r5354 r5355 974 974 } 975 975 } 976 int year = (msg->date >> 8) / 12 + baseyear;977 int mon = (msg->date >> 8) % 12 + 1;978 int day = msg->date & 0x1f;976 int32_t year = (msg->date >> 8) / 12 + baseyear; 977 int32_t mon = (msg->date >> 8) % 12 + 1; 978 int32_t day = msg->date & 0x1f; 979 979 980 980 fprintf(fp, "%04X:%08X:%02d/%02d/%04d:%04X:\"%s\":\"%s\"\n", msg->caid, msg->serial, day, mon, year, … … 992 992 if (fp == 0) 993 993 return; 994 int year, mon, day;994 int32_t year, mon, day; 995 995 char buffer[2048]; 996 996 while (fgets(buffer, sizeof(buffer), fp)) … … 1025 1025 uint16_t msg_id = (data[2] << 8) | data[3]; 1026 1026 uint8_t index = data[4] & 0x0F; 1027 int msg_size = data[5] * 10 + 2;1027 int32_t msg_size = data[5] * 10 + 2; 1028 1028 uint16_t date = (data[9] << 8) | data[10]; 1029 int submsg_len = data[12] - 2;1029 int32_t submsg_len = data[12] - 2; 1030 1030 uint16_t submsg_idx = (data[13] << 8) | data[14]; 1031 1031 uint32_t serial = (rdr->hexserial[2]<<24) | (rdr->hexserial[3]<<16) | (rdr->hexserial[4]<<8) | rdr->hexserial[5];
Note:
See TracChangeset
for help on using the changeset viewer.