ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Convert-UUlib/uulib/uunconc.c
(Generate patch)

Comparing Convert-UUlib/uulib/uunconc.c (file contents):
Revision 1.22 by root, Tue Feb 25 21:10:01 2020 UTC vs.
Revision 1.23 by root, Thu Feb 27 04:05:44 2020 UTC

53#include <uudeview.h> 53#include <uudeview.h>
54#include <uuint.h> 54#include <uuint.h>
55#include <fptools.h> 55#include <fptools.h>
56#include <uustring.h> 56#include <uustring.h>
57 57
58char * uunconc_id = "$Id: uunconc.c,v 1.22 2020/02/25 21:10:01 root Exp $"; 58char * uunconc_id = "$Id: uunconc.c,v 1.23 2020/02/27 04:05:44 root Exp $";
59 59
60/* for braindead systems */ 60/* for braindead systems */
61#ifndef SEEK_SET 61#ifndef SEEK_SET
62#ifdef L_BEGIN 62#ifdef L_BEGIN
63#define SEEK_SET L_BEGIN 63#define SEEK_SET L_BEGIN
1137 } 1137 }
1138 } 1138 }
1139 1139
1140 if (*state == DATA && method == YENC_ENCODED && 1140 if (*state == DATA && method == YENC_ENCODED &&
1141 strncmp (line, "=yend ", 6) == 0) { 1141 strncmp (line, "=yend ", 6) == 0) {
1142 int lastpart = !yenotlastpart && (yepartends == 0 || yepartends >= yefilesize);
1142 if ((ptr = _FP_strstr (line, " pcrc32=")) != NULL) { 1143 if ((ptr = _FP_strstr (line, " pcrc32=")) != NULL) {
1143 crc32_t pcrc32 = strtoul (ptr + 8, NULL, 16); 1144 crc32_t pcrc32 = strtoul (ptr + 8, NULL, 16);
1144 if (pcrc32 != yepartcrc) { 1145 if (pcrc32 != yepartcrc) {
1145 UUMessage (uunconc_id, __LINE__, UUMSG_WARNING, 1146 UUMessage (uunconc_id, __LINE__, UUMSG_WARNING,
1146 uustring (S_PCRC_MISMATCH), progress.curfile, progress.partno); 1147 uustring (S_PCRC_MISMATCH), progress.curfile, progress.partno);
1147 } 1148 }
1149 } else if ((ptr = _FP_strstr (line, " pcrc=")) != NULL) {
1150 crc32_t pcrc32 = strtoul (ptr + 6, NULL, 16);
1151 if (pcrc32 != yepartcrc) {
1152 UUMessage (uunconc_id, __LINE__, UUMSG_WARNING,
1153 uustring (S_PCRC_MISMATCH), progress.curfile, progress.partno);
1154 }
1148 } 1155 }
1149 if ((ptr = _FP_strstr (line, " crc32=")) != NULL) 1156 if (lastpart && (ptr = _FP_strstr (line, " crc32=")) != NULL)
1150 { 1157 {
1151 crc32_t fcrc32 = strtoul (ptr + 7, NULL, 16); 1158 crc32_t fcrc32 = strtoul (ptr + 7, NULL, 16);
1152 if (fcrc32 != yefilecrc) { 1159 if (fcrc32 != yefilecrc) {
1153 UUMessage (uunconc_id, __LINE__, UUMSG_WARNING, 1160 UUMessage (uunconc_id, __LINE__, UUMSG_WARNING,
1154 uustring (S_CRC_MISMATCH), progress.curfile); 1161 uustring (S_CRC_MISMATCH), progress.curfile);
1166 UUMessage (uunconc_id, __LINE__, UUMSG_WARNING, 1173 UUMessage (uunconc_id, __LINE__, UUMSG_WARNING,
1167 uustring (S_SIZE_MISMATCH), progress.curfile, 1174 uustring (S_SIZE_MISMATCH), progress.curfile,
1168 yepartsize, size); 1175 yepartsize, size);
1169 } 1176 }
1170 } 1177 }
1171 if (!yenotlastpart && (yepartends == 0 || yepartends >= yefilesize)) { 1178 if (lastpart) {
1172 *state = DONE; 1179 *state = DONE;
1173 } 1180 }
1174 break; 1181 break;
1175 } 1182 }
1176 1183

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines