UUE decoder fix
This commit is contained in:
@@ -44,10 +44,11 @@
|
||||
#undef SMBEXPORT
|
||||
#endif
|
||||
|
||||
#ifndef __FLAT__
|
||||
#define __FLAT__ /* only supporting 32-bit targets now */
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#ifndef __FLAT__
|
||||
#define __FLAT__
|
||||
#endif
|
||||
#ifdef __BORLANDC__
|
||||
#define SMBCALL __stdcall
|
||||
#else
|
||||
@@ -62,10 +63,7 @@
|
||||
#else /* self-contained executable */
|
||||
#define SMBEXPORT
|
||||
#endif
|
||||
#elif defined(__unix__) || defined(__GNUC__)
|
||||
#ifndef __FLAT__
|
||||
#define __FLAT__
|
||||
#endif
|
||||
#elif defined __unix__
|
||||
#define SMBCALL
|
||||
#define SMBEXPORT
|
||||
#else
|
||||
@@ -133,9 +131,10 @@ SMBEXPORT int SMBCALL smb_incdat(smb_t* smb, ulong offset, ulong length, ushort
|
||||
SMBEXPORT int SMBCALL smb_freemsg(smb_t* smb, smbmsg_t* msg);
|
||||
SMBEXPORT int SMBCALL smb_freemsgdat(smb_t* smb, ulong offset, ulong length, ushort headers);
|
||||
SMBEXPORT int SMBCALL smb_freemsghdr(smb_t* smb, ulong offset, ulong length);
|
||||
SMBEXPORT void SMBCALL smb_freemsgtxt(char HUGE16* buf);
|
||||
SMBEXPORT void SMBCALL smb_freemsgtxt(char* buf);
|
||||
SMBEXPORT int SMBCALL smb_copymsgmem(smbmsg_t* destmsg, smbmsg_t* srcmsg);
|
||||
SMBEXPORT char HUGE16* SMBCALL smb_getmsgtxt(smb_t* smb, smbmsg_t* msg, ulong mode);
|
||||
SMBEXPORT char* SMBCALL smb_getmsgtxt(smb_t* smb, smbmsg_t* msg, ulong mode);
|
||||
SMBEXPORT int SMBCALL smb_tzutc(short timezone);
|
||||
|
||||
/* FILE pointer I/O functions */
|
||||
|
||||
|
@@ -448,6 +448,7 @@ UUGetPartNo (char *subject, char **where, char **whend)
|
||||
break;
|
||||
}
|
||||
|
||||
#if 0 /* asa */
|
||||
/*
|
||||
* look for the string "part " followed by a number
|
||||
*/
|
||||
@@ -487,6 +488,7 @@ UUGetPartNo (char *subject, char **where, char **whend)
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* asa */
|
||||
|
||||
/*
|
||||
* look for the string "part" followed by a number
|
||||
|
@@ -688,13 +688,18 @@ ScanData (FILE *datei, char *fname, int *errcode,
|
||||
* Detect a UUDeview-Style header
|
||||
*/
|
||||
|
||||
if (_FP_strnicmp (line, "_=_ Part ", 9) == 0 &&
|
||||
if ((_FP_strnicmp (line, "_=_ Part ", 9) == 0 ||
|
||||
_FP_strnicmp (line, "section ", 8) == 0) &&
|
||||
result->uudet != YENC_ENCODED) {
|
||||
if (result->uudet) {
|
||||
fseek (datei, oldposition, SEEK_SET);
|
||||
break;
|
||||
}
|
||||
result->partno = atoi (line + 8);
|
||||
if ((ptr = _FP_stristr (line, " of ")) != NULL) {
|
||||
int maxpno = atoi (ptr + 4);
|
||||
if(maxpno != 0) result->maxpno = maxpno;
|
||||
}
|
||||
if ((ptr = _FP_stristr (line, "of file ")) != NULL) {
|
||||
ptr += 8;
|
||||
while (isspace (*ptr)) ptr++;
|
||||
|
Reference in New Issue
Block a user