Tab chars (0x9) was replaced with spaces
This commit is contained in:
@@ -56,7 +56,7 @@
|
||||
#ifdef SYSTEM_WINDLL
|
||||
BOOL _export WINAPI
|
||||
DllEntryPoint (HINSTANCE hInstance, DWORD seginfo,
|
||||
LPVOID lpCmdLine)
|
||||
LPVOID lpCmdLine)
|
||||
{
|
||||
/* Don't do anything, so just return true */
|
||||
return TRUE;
|
||||
@@ -187,8 +187,8 @@ _FP_strstr (char *str1, char *str2)
|
||||
|
||||
while (*(ptr1=str1)) {
|
||||
for (ptr2=str2;
|
||||
*ptr1 && *ptr2 && *ptr1==*ptr2;
|
||||
ptr1++, ptr2++)
|
||||
*ptr1 && *ptr2 && *ptr1==*ptr2;
|
||||
ptr1++, ptr2++)
|
||||
/* empty loop */ ;
|
||||
|
||||
if (*ptr2 == '\0')
|
||||
@@ -211,7 +211,7 @@ _FP_strpbrk (char *str, char *accept)
|
||||
for (; *str; str++)
|
||||
for (ptr=accept; *ptr; ptr++)
|
||||
if (*str == *ptr)
|
||||
return str;
|
||||
return str;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@@ -237,10 +237,10 @@ _FP_strtok (char *str1, char *str2)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
while (*optr && strchr (str2, *optr)) /* look for beginning of token */
|
||||
while (*optr && strchr (str2, *optr)) /* look for beginning of token */
|
||||
optr++;
|
||||
|
||||
if (*optr == '\0') /* no token found */
|
||||
if (*optr == '\0') /* no token found */
|
||||
return NULL;
|
||||
|
||||
ptr = optr;
|
||||
@@ -269,8 +269,8 @@ _FP_stristr (char *str1, char *str2)
|
||||
|
||||
while (*(ptr1=str1)) {
|
||||
for (ptr2=str2;
|
||||
*ptr1 && *ptr2 && tolower(*ptr1)==tolower(*ptr2);
|
||||
ptr1++, ptr2++)
|
||||
*ptr1 && *ptr2 && tolower(*ptr1)==tolower(*ptr2);
|
||||
ptr1++, ptr2++)
|
||||
/* empty loop */ ;
|
||||
|
||||
if (*ptr2 == '\0')
|
||||
@@ -371,9 +371,9 @@ _FP_strmatch (char *string, char *pattern)
|
||||
}
|
||||
else if (*p2 == '*') {
|
||||
if (*++p2 == '\0')
|
||||
return 1;
|
||||
return 1;
|
||||
while (*p1 && *p1 != *p2)
|
||||
p1++;
|
||||
p1++;
|
||||
}
|
||||
else if (*p1 == *p2) {
|
||||
p1++; p2++;
|
||||
@@ -447,12 +447,12 @@ _FP_fgets (char *buf, int n, FILE *stream)
|
||||
while (--n) {
|
||||
if ((c = fgetc (stream)) == EOF) {
|
||||
if (ferror (stream))
|
||||
return NULL;
|
||||
return NULL;
|
||||
else {
|
||||
if (obp == buf)
|
||||
return NULL;
|
||||
*buf = '\0';
|
||||
return obp;
|
||||
if (obp == buf)
|
||||
return NULL;
|
||||
*buf = '\0';
|
||||
return obp;
|
||||
}
|
||||
}
|
||||
if (c == '\015') { /* CR */
|
||||
@@ -462,8 +462,8 @@ _FP_fgets (char *buf, int n, FILE *stream)
|
||||
* to the manual page
|
||||
*/
|
||||
if ((c = fgetc (stream)) != '\012')
|
||||
if (!feof (stream))
|
||||
ungetc (c, stream);
|
||||
if (!feof (stream))
|
||||
ungetc (c, stream);
|
||||
*buf++ = '\012';
|
||||
*buf = '\0';
|
||||
return obp;
|
||||
|
@@ -18,9 +18,9 @@
|
||||
|
||||
#ifndef _ANSI_ARGS_
|
||||
#ifdef PROTOTYPES
|
||||
#define _ANSI_ARGS_(c) c
|
||||
#define _ANSI_ARGS_(c) c
|
||||
#else
|
||||
#define _ANSI_ARGS_(c) ()
|
||||
#define _ANSI_ARGS_(c) ()
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -32,27 +32,27 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void TOOLEXPORT _FP_free _ANSI_ARGS_((void *));
|
||||
char * TOOLEXPORT _FP_strdup _ANSI_ARGS_((char *));
|
||||
char * TOOLEXPORT _FP_strncpy _ANSI_ARGS_((char *, char *, int));
|
||||
void * TOOLEXPORT _FP_memdup _ANSI_ARGS_((void *, int));
|
||||
int TOOLEXPORT _FP_stricmp _ANSI_ARGS_((char *, char *));
|
||||
int TOOLEXPORT _FP_strnicmp _ANSI_ARGS_((char *, char *, int));
|
||||
char * TOOLEXPORT _FP_strrstr _ANSI_ARGS_((char *, char *));
|
||||
char * TOOLEXPORT _FP_stoupper _ANSI_ARGS_((char *));
|
||||
char * TOOLEXPORT _FP_stolower _ANSI_ARGS_((char *));
|
||||
int TOOLEXPORT _FP_strmatch _ANSI_ARGS_((char *, char *));
|
||||
char * TOOLEXPORT _FP_strstr _ANSI_ARGS_((char *, char *));
|
||||
char * TOOLEXPORT _FP_stristr _ANSI_ARGS_((char *, char *));
|
||||
char * TOOLEXPORT _FP_strirstr _ANSI_ARGS_((char *, char *));
|
||||
char * TOOLEXPORT _FP_strrchr _ANSI_ARGS_((char *, int));
|
||||
char * TOOLEXPORT _FP_fgets _ANSI_ARGS_((char *, int, FILE *));
|
||||
char * TOOLEXPORT _FP_strpbrk _ANSI_ARGS_((char *, char *));
|
||||
char * TOOLEXPORT _FP_strtok _ANSI_ARGS_((char *, char *));
|
||||
char * TOOLEXPORT _FP_cutdir _ANSI_ARGS_((char *));
|
||||
void TOOLEXPORT _FP_free _ANSI_ARGS_((void *));
|
||||
char * TOOLEXPORT _FP_strdup _ANSI_ARGS_((char *));
|
||||
char * TOOLEXPORT _FP_strncpy _ANSI_ARGS_((char *, char *, int));
|
||||
void * TOOLEXPORT _FP_memdup _ANSI_ARGS_((void *, int));
|
||||
int TOOLEXPORT _FP_stricmp _ANSI_ARGS_((char *, char *));
|
||||
int TOOLEXPORT _FP_strnicmp _ANSI_ARGS_((char *, char *, int));
|
||||
char * TOOLEXPORT _FP_strrstr _ANSI_ARGS_((char *, char *));
|
||||
char * TOOLEXPORT _FP_stoupper _ANSI_ARGS_((char *));
|
||||
char * TOOLEXPORT _FP_stolower _ANSI_ARGS_((char *));
|
||||
int TOOLEXPORT _FP_strmatch _ANSI_ARGS_((char *, char *));
|
||||
char * TOOLEXPORT _FP_strstr _ANSI_ARGS_((char *, char *));
|
||||
char * TOOLEXPORT _FP_stristr _ANSI_ARGS_((char *, char *));
|
||||
char * TOOLEXPORT _FP_strirstr _ANSI_ARGS_((char *, char *));
|
||||
char * TOOLEXPORT _FP_strrchr _ANSI_ARGS_((char *, int));
|
||||
char * TOOLEXPORT _FP_fgets _ANSI_ARGS_((char *, int, FILE *));
|
||||
char * TOOLEXPORT _FP_strpbrk _ANSI_ARGS_((char *, char *));
|
||||
char * TOOLEXPORT _FP_strtok _ANSI_ARGS_((char *, char *));
|
||||
char * TOOLEXPORT _FP_cutdir _ANSI_ARGS_((char *));
|
||||
#if 0
|
||||
char * TOOLEXPORT _FP_strerror _ANSI_ARGS_((int));
|
||||
char * TOOLEXPORT _FP_tempnam _ANSI_ARGS_((char *, char *));
|
||||
char * TOOLEXPORT _FP_strerror _ANSI_ARGS_((int));
|
||||
char * TOOLEXPORT _FP_tempnam _ANSI_ARGS_((char *, char *));
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@@ -60,15 +60,15 @@ char * uucheck_id = "$Id$";
|
||||
* store for our have-parts and missing-parts lists
|
||||
*/
|
||||
|
||||
#define MAXPLIST 256
|
||||
#define MAXPLIST 256
|
||||
|
||||
|
||||
/*
|
||||
* forward declarations of local functions
|
||||
*/
|
||||
|
||||
static char * UUGetFileName _ANSI_ARGS_((char *, char *, char *));
|
||||
static int UUGetPartNo _ANSI_ARGS_((char *, char **, char **));
|
||||
static char * UUGetFileName _ANSI_ARGS_((char *, char *, char *));
|
||||
static int UUGetPartNo _ANSI_ARGS_((char *, char **, char **));
|
||||
|
||||
/*
|
||||
* State of Scanner function and PreProcessPart
|
||||
@@ -164,9 +164,9 @@ UUGetFileName (char *subject, char *ptonum, char *ptonend)
|
||||
iter++;
|
||||
count = length = alflag = 0;
|
||||
while (iter[count] &&
|
||||
(isalnum (iter[count]) || strchr (uufnchars, iter[count])!=NULL)) {
|
||||
(isalnum (iter[count]) || strchr (uufnchars, iter[count])!=NULL)) {
|
||||
if (isalpha (iter[count]))
|
||||
alflag++;
|
||||
alflag++;
|
||||
count++;
|
||||
}
|
||||
if (count<4 || alflag==0) {
|
||||
@@ -195,17 +195,17 @@ UUGetFileName (char *subject, char *ptonum, char *ptonend)
|
||||
ptr = subject;
|
||||
while ((iter = strchr (ptr, '/')) != NULL) {
|
||||
if (iter >= ptonum && iter <= ptonend) {
|
||||
ptr = iter + 1;
|
||||
continue;
|
||||
ptr = iter + 1;
|
||||
continue;
|
||||
}
|
||||
count = length = 0;
|
||||
iter++;
|
||||
while (iter[count] &&
|
||||
(isalnum(iter[count])||strchr(uufnchars, iter[count])!=NULL))
|
||||
count++;
|
||||
(isalnum(iter[count])||strchr(uufnchars, iter[count])!=NULL))
|
||||
count++;
|
||||
if (iter[count] == ' ' && length > 4) {
|
||||
length = count;
|
||||
break;
|
||||
length = count;
|
||||
break;
|
||||
}
|
||||
ptr = iter + ((count)?count:1);
|
||||
}
|
||||
@@ -223,83 +223,83 @@ UUGetFileName (char *subject, char *ptonum, char *ptonend)
|
||||
count = length = alflag = 0;
|
||||
|
||||
if (_FP_strnicmp (ptr, "ftp", 3) == 0) {
|
||||
/* hey, that's an ftp address */
|
||||
while (isalpha (*ptr) || isdigit (*ptr) || *ptr == '.')
|
||||
ptr++;
|
||||
continue;
|
||||
/* hey, that's an ftp address */
|
||||
while (isalpha (*ptr) || isdigit (*ptr) || *ptr == '.')
|
||||
ptr++;
|
||||
continue;
|
||||
}
|
||||
|
||||
while ((isalnum(*iter)||strchr(uufnchars, *iter)!=NULL||
|
||||
*iter=='/') && *iter && iter != ptonum && *iter != '.') {
|
||||
if (isalpha (*iter))
|
||||
alflag = 1;
|
||||
|
||||
count++; iter++;
|
||||
*iter=='/') && *iter && iter != ptonum && *iter != '.') {
|
||||
if (isalpha (*iter))
|
||||
alflag = 1;
|
||||
|
||||
count++; iter++;
|
||||
}
|
||||
if (*iter == '\0' || iter == ptonum) {
|
||||
if (iter == ptonum)
|
||||
ptr = ptonend;
|
||||
else
|
||||
ptr = iter;
|
||||
if (iter == ptonum)
|
||||
ptr = ptonend;
|
||||
else
|
||||
ptr = iter;
|
||||
|
||||
length = 0;
|
||||
continue;
|
||||
length = 0;
|
||||
continue;
|
||||
}
|
||||
if (*iter++ != '.' || count > 32 || alflag == 0) {
|
||||
ptr = iter;
|
||||
length = 0;
|
||||
continue;
|
||||
ptr = iter;
|
||||
length = 0;
|
||||
continue;
|
||||
}
|
||||
if (_FP_strnicmp (iter, "edu", 3) == 0 ||
|
||||
_FP_strnicmp (iter, "gov", 3) == 0) {
|
||||
/* hey, that's an ftp address */
|
||||
while (isalpha (*iter) || isdigit (*iter) || *iter == '.')
|
||||
iter++;
|
||||
ptr = iter;
|
||||
length = 0;
|
||||
continue;
|
||||
_FP_strnicmp (iter, "gov", 3) == 0) {
|
||||
/* hey, that's an ftp address */
|
||||
while (isalpha (*iter) || isdigit (*iter) || *iter == '.')
|
||||
iter++;
|
||||
ptr = iter;
|
||||
length = 0;
|
||||
continue;
|
||||
}
|
||||
|
||||
length += count + 1;
|
||||
count = 0;
|
||||
|
||||
while ((isalnum(iter[count])||strchr(uufnchars, iter[count])!=NULL||
|
||||
iter[count]=='/') && iter[count] && iter[count] != '.')
|
||||
count++;
|
||||
iter[count]=='/') && iter[count] && iter[count] != '.')
|
||||
count++;
|
||||
|
||||
if (iter[count]==':' && iter[count+1]=='/') {
|
||||
/* looks like stuff from a mail server */
|
||||
ptr = iter + 1;
|
||||
length = 0;
|
||||
continue;
|
||||
/* looks like stuff from a mail server */
|
||||
ptr = iter + 1;
|
||||
length = 0;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (count > 8 || iter == ptonum) {
|
||||
ptr = iter;
|
||||
length = 0;
|
||||
continue;
|
||||
ptr = iter;
|
||||
length = 0;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (iter[count] != '.') {
|
||||
length += count;
|
||||
break;
|
||||
length += count;
|
||||
break;
|
||||
}
|
||||
|
||||
while (iter[count] &&
|
||||
(isalnum(iter[count])||strchr(uufnchars, iter[count])!=NULL||
|
||||
iter[count]=='/'))
|
||||
count++;
|
||||
(isalnum(iter[count])||strchr(uufnchars, iter[count])!=NULL||
|
||||
iter[count]=='/'))
|
||||
count++;
|
||||
|
||||
if (iter[count]==':' && iter[count+1]=='/') {
|
||||
/* looks like stuff from a mail server */
|
||||
ptr = iter + 1;
|
||||
length = 0;
|
||||
continue;
|
||||
/* looks like stuff from a mail server */
|
||||
ptr = iter + 1;
|
||||
length = 0;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (count < 12 && iter != ptonum) {
|
||||
length += count;
|
||||
break;
|
||||
length += count;
|
||||
break;
|
||||
}
|
||||
|
||||
ptr = iter;
|
||||
@@ -314,22 +314,22 @@ UUGetFileName (char *subject, char *ptonum, char *ptonend)
|
||||
ptr++;
|
||||
|
||||
while ((isalnum(ptr[length])||strchr(uufnchars,ptr[length])!=NULL||
|
||||
ptr[length] == '/') &&
|
||||
ptr[length] && ptr+length!=part && ptr+length!=ptonum)
|
||||
ptr[length] == '/') &&
|
||||
ptr[length] && ptr+length!=part && ptr+length!=ptonum)
|
||||
length++;
|
||||
|
||||
if (length) {
|
||||
if (ptr[length] == '\0' || ptr[length] == 0x0a || ptr[length] == 0x0d) {
|
||||
length--;
|
||||
|
||||
/*
|
||||
* I used to cut off digits from the end of the string, but
|
||||
* let's try to live without. We want to distinguish
|
||||
* DUTCH951 from DUTCH952
|
||||
*
|
||||
/*
|
||||
* I used to cut off digits from the end of the string, but
|
||||
* let's try to live without. We want to distinguish
|
||||
* DUTCH951 from DUTCH952
|
||||
*
|
||||
* while ((ptr[length] == ' ' || isdigit (ptr[length])) && length > 0)
|
||||
* length--;
|
||||
*/
|
||||
*/
|
||||
}
|
||||
else {
|
||||
length--;
|
||||
@@ -348,7 +348,7 @@ UUGetFileName (char *subject, char *ptonum, char *ptonend)
|
||||
|
||||
if ((result = (char *) malloc (length + 1)) == NULL) {
|
||||
UUMessage (uucheck_id, __LINE__, UUMSG_ERROR,
|
||||
uustring (S_OUT_OF_MEMORY), length+1);
|
||||
uustring (S_OUT_OF_MEMORY), length+1);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -402,43 +402,43 @@ UUGetPartNo (char *subject, char **where, char **whend)
|
||||
count = length = 0; iter++;
|
||||
|
||||
while (*iter == ' ' || *iter == '#')
|
||||
iter++;
|
||||
iter++;
|
||||
|
||||
if (!isdigit (*iter)) {
|
||||
ptr = iter;
|
||||
continue;
|
||||
ptr = iter;
|
||||
continue;
|
||||
}
|
||||
while (isdigit (iter[count]))
|
||||
count++;
|
||||
count++;
|
||||
length = count;
|
||||
|
||||
if (iter[count] == '\0' || iter[count+1] == '\0') {
|
||||
iter += count;
|
||||
length = 0;
|
||||
break;
|
||||
iter += count;
|
||||
length = 0;
|
||||
break;
|
||||
}
|
||||
if (iter[count] == brackchr[uu_bracket_policy][bpc+1]) {
|
||||
*where = iter;
|
||||
bdel[0] = brackchr[uu_bracket_policy][bpc+1];
|
||||
delim = bdel;
|
||||
break;
|
||||
*where = iter;
|
||||
bdel[0] = brackchr[uu_bracket_policy][bpc+1];
|
||||
delim = bdel;
|
||||
break;
|
||||
}
|
||||
|
||||
while (iter[count] == ' ' || iter[count] == '#' ||
|
||||
iter[count] == '/' || iter[count] == '\\') count++;
|
||||
iter[count] == '/' || iter[count] == '\\') count++;
|
||||
|
||||
if (_FP_strnicmp (iter + count, "of", 2) == 0)
|
||||
count += 2;
|
||||
count += 2;
|
||||
|
||||
while (iter[count] == ' ') count++;
|
||||
while (isdigit (iter[count])) count++;
|
||||
while (iter[count] == ' ') count++;
|
||||
|
||||
if (iter[count] == brackchr[uu_bracket_policy][bpc+1]) {
|
||||
*where = iter;
|
||||
bdel[0] = brackchr[uu_bracket_policy][bpc+1];
|
||||
delim = bdel;
|
||||
break;
|
||||
*where = iter;
|
||||
bdel[0] = brackchr[uu_bracket_policy][bpc+1];
|
||||
delim = bdel;
|
||||
break;
|
||||
}
|
||||
|
||||
length = 0;
|
||||
@@ -458,33 +458,33 @@ UUGetPartNo (char *subject, char **where, char **whend)
|
||||
iter += 5;
|
||||
|
||||
while (isspace (*iter) || *iter == '.' || *iter == '-')
|
||||
iter++;
|
||||
iter++;
|
||||
|
||||
while (isdigit (iter[length]))
|
||||
length++;
|
||||
|
||||
if (length == 0) {
|
||||
if (_FP_strnicmp (iter, "one", 3) == 0) length = 1;
|
||||
else if (_FP_strnicmp (iter, "two", 3) == 0) length = 2;
|
||||
else if (_FP_strnicmp (iter, "three", 5) == 0) length = 3;
|
||||
else if (_FP_strnicmp (iter, "four", 4) == 0) length = 4;
|
||||
else if (_FP_strnicmp (iter, "five", 4) == 0) length = 5;
|
||||
else if (_FP_strnicmp (iter, "six", 3) == 0) length = 6;
|
||||
else if (_FP_strnicmp (iter, "seven", 5) == 0) length = 7;
|
||||
else if (_FP_strnicmp (iter, "eight", 5) == 0) length = 8;
|
||||
else if (_FP_strnicmp (iter, "nine", 4) == 0) length = 9;
|
||||
else if (_FP_strnicmp (iter, "ten", 3) == 0) length = 10;
|
||||
if (_FP_strnicmp (iter, "one", 3) == 0) length = 1;
|
||||
else if (_FP_strnicmp (iter, "two", 3) == 0) length = 2;
|
||||
else if (_FP_strnicmp (iter, "three", 5) == 0) length = 3;
|
||||
else if (_FP_strnicmp (iter, "four", 4) == 0) length = 4;
|
||||
else if (_FP_strnicmp (iter, "five", 4) == 0) length = 5;
|
||||
else if (_FP_strnicmp (iter, "six", 3) == 0) length = 6;
|
||||
else if (_FP_strnicmp (iter, "seven", 5) == 0) length = 7;
|
||||
else if (_FP_strnicmp (iter, "eight", 5) == 0) length = 8;
|
||||
else if (_FP_strnicmp (iter, "nine", 4) == 0) length = 9;
|
||||
else if (_FP_strnicmp (iter, "ten", 3) == 0) length = 10;
|
||||
|
||||
if (length && (*whend = strchr (iter, ' '))) {
|
||||
*where = iter;
|
||||
return length;
|
||||
}
|
||||
else
|
||||
length = 0;
|
||||
if (length && (*whend = strchr (iter, ' '))) {
|
||||
*where = iter;
|
||||
return length;
|
||||
}
|
||||
else
|
||||
length = 0;
|
||||
}
|
||||
else {
|
||||
*where = iter;
|
||||
delim = "of";
|
||||
*where = iter;
|
||||
delim = "of";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -499,33 +499,33 @@ UUGetPartNo (char *subject, char **where, char **whend)
|
||||
iter += 4;
|
||||
|
||||
while (isspace (*iter) || *iter == '.' || *iter == '-')
|
||||
iter++;
|
||||
iter++;
|
||||
|
||||
while (isdigit (iter[length]))
|
||||
length++;
|
||||
|
||||
if (length == 0) {
|
||||
if (_FP_strnicmp (iter, "one", 3) == 0) length = 1;
|
||||
else if (_FP_strnicmp (iter, "two", 3) == 0) length = 2;
|
||||
else if (_FP_strnicmp (iter, "three", 5) == 0) length = 3;
|
||||
else if (_FP_strnicmp (iter, "four", 4) == 0) length = 4;
|
||||
else if (_FP_strnicmp (iter, "five", 4) == 0) length = 5;
|
||||
else if (_FP_strnicmp (iter, "six", 3) == 0) length = 6;
|
||||
else if (_FP_strnicmp (iter, "seven", 5) == 0) length = 7;
|
||||
else if (_FP_strnicmp (iter, "eight", 5) == 0) length = 8;
|
||||
else if (_FP_strnicmp (iter, "nine", 4) == 0) length = 9;
|
||||
else if (_FP_strnicmp (iter, "ten", 3) == 0) length = 10;
|
||||
if (_FP_strnicmp (iter, "one", 3) == 0) length = 1;
|
||||
else if (_FP_strnicmp (iter, "two", 3) == 0) length = 2;
|
||||
else if (_FP_strnicmp (iter, "three", 5) == 0) length = 3;
|
||||
else if (_FP_strnicmp (iter, "four", 4) == 0) length = 4;
|
||||
else if (_FP_strnicmp (iter, "five", 4) == 0) length = 5;
|
||||
else if (_FP_strnicmp (iter, "six", 3) == 0) length = 6;
|
||||
else if (_FP_strnicmp (iter, "seven", 5) == 0) length = 7;
|
||||
else if (_FP_strnicmp (iter, "eight", 5) == 0) length = 8;
|
||||
else if (_FP_strnicmp (iter, "nine", 4) == 0) length = 9;
|
||||
else if (_FP_strnicmp (iter, "ten", 3) == 0) length = 10;
|
||||
|
||||
if (length && (*whend = strchr (iter, ' '))) {
|
||||
*where = iter;
|
||||
return length;
|
||||
}
|
||||
else
|
||||
length = 0;
|
||||
if (length && (*whend = strchr (iter, ' '))) {
|
||||
*where = iter;
|
||||
return length;
|
||||
}
|
||||
else
|
||||
length = 0;
|
||||
}
|
||||
else {
|
||||
*where = iter;
|
||||
delim = "of";
|
||||
*where = iter;
|
||||
delim = "of";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -537,19 +537,19 @@ UUGetPartNo (char *subject, char **where, char **whend)
|
||||
if (length == 0) {
|
||||
if ((iter = _FP_strirstr (subject, "of")) != NULL) {
|
||||
while (iter>subject && isspace (*(iter-1)))
|
||||
iter--;
|
||||
iter--;
|
||||
if (isdigit(*(iter-1))) {
|
||||
while (iter>subject && isdigit (*(iter-1)))
|
||||
iter--;
|
||||
if (!isdigit (*iter) && !isalpha (*iter) && *iter != '.')
|
||||
iter++;
|
||||
ptr = iter;
|
||||
while (iter>subject && isdigit (*(iter-1)))
|
||||
iter--;
|
||||
if (!isdigit (*iter) && !isalpha (*iter) && *iter != '.')
|
||||
iter++;
|
||||
ptr = iter;
|
||||
|
||||
while (isdigit (*ptr)) {
|
||||
ptr++; length++;
|
||||
}
|
||||
*where = iter;
|
||||
delim = "of";
|
||||
while (isdigit (*ptr)) {
|
||||
ptr++; length++;
|
||||
}
|
||||
*where = iter;
|
||||
delim = "of";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -563,23 +563,23 @@ UUGetPartNo (char *subject, char **where, char **whend)
|
||||
|
||||
while (*ptr && length==0) {
|
||||
while (*ptr && !isdigit (*ptr))
|
||||
ptr++;
|
||||
ptr++;
|
||||
if (isdigit (*ptr) && (ptr==subject || *ptr==' ' || *ptr=='/')) {
|
||||
while (isdigit (ptr[length]))
|
||||
length++;
|
||||
if (ptr[length]!='\0' && ptr[length]!=' ' && ptr[length]!='/') {
|
||||
ptr += length;
|
||||
length = 0;
|
||||
}
|
||||
else {
|
||||
iter = ptr;
|
||||
bdel[0] = ptr[length];
|
||||
delim = bdel;
|
||||
}
|
||||
while (isdigit (ptr[length]))
|
||||
length++;
|
||||
if (ptr[length]!='\0' && ptr[length]!=' ' && ptr[length]!='/') {
|
||||
ptr += length;
|
||||
length = 0;
|
||||
}
|
||||
else {
|
||||
iter = ptr;
|
||||
bdel[0] = ptr[length];
|
||||
delim = bdel;
|
||||
}
|
||||
}
|
||||
else {
|
||||
while (isdigit (*ptr))
|
||||
ptr++;
|
||||
while (isdigit (*ptr))
|
||||
ptr++;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -596,19 +596,19 @@ UUGetPartNo (char *subject, char **where, char **whend)
|
||||
|
||||
while (count > 0) {
|
||||
if (!isdigit(ptr[count])||isalpha(ptr[count+1])||ptr[count+1] == '.') {
|
||||
count--;
|
||||
continue;
|
||||
count--;
|
||||
continue;
|
||||
}
|
||||
length = 0;
|
||||
|
||||
while (count >= 0 && isdigit (ptr[count])) {
|
||||
count--; length++;
|
||||
count--; length++;
|
||||
}
|
||||
if (count>=0 && ((isalpha (ptr[count]) &&
|
||||
(ptr[count] != 's' || ptr[count+1] != 't') &&
|
||||
(ptr[count] != 'n' || ptr[count+1] != 'd')) ||
|
||||
ptr[count] == '/' || ptr[count] == '.' ||
|
||||
ptr[count] == '-' || ptr[count] == '_')) {
|
||||
(ptr[count] != 's' || ptr[count+1] != 't') &&
|
||||
(ptr[count] != 'n' || ptr[count+1] != 'd')) ||
|
||||
ptr[count] == '/' || ptr[count] == '.' ||
|
||||
ptr[count] == '-' || ptr[count] == '_')) {
|
||||
length = 0;
|
||||
continue;
|
||||
}
|
||||
@@ -616,8 +616,8 @@ UUGetPartNo (char *subject, char **where, char **whend)
|
||||
iter = ptr + count;
|
||||
|
||||
if (length > 4) {
|
||||
length = 0;
|
||||
continue;
|
||||
length = 0;
|
||||
continue;
|
||||
}
|
||||
*where = iter;
|
||||
delim = "of";
|
||||
@@ -656,7 +656,7 @@ UUGetPartNo (char *subject, char **where, char **whend)
|
||||
length = 0;
|
||||
}
|
||||
|
||||
if (iter == NULL || length == 0) /* should be equivalent */
|
||||
if (iter == NULL || length == 0) /* should be equivalent */
|
||||
return -1;
|
||||
|
||||
*where = iter;
|
||||
@@ -666,12 +666,12 @@ UUGetPartNo (char *subject, char **where, char **whend)
|
||||
ptr = (*whend += strlen (delim));
|
||||
|
||||
while (*ptr == ' ')
|
||||
ptr++;
|
||||
ptr++;
|
||||
|
||||
if (isdigit (*ptr)) {
|
||||
*whend = ptr;
|
||||
while (isdigit (**whend))
|
||||
*whend += 1;
|
||||
*whend = ptr;
|
||||
while (isdigit (**whend))
|
||||
*whend += 1;
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -697,7 +697,7 @@ UUPreProcessPart (fileread *data, int *ret)
|
||||
|
||||
if ((result = (uufile *) malloc (sizeof (uufile))) == NULL) {
|
||||
UUMessage (uucheck_id, __LINE__, UUMSG_ERROR,
|
||||
uustring (S_OUT_OF_MEMORY), sizeof (uufile));
|
||||
uustring (S_OUT_OF_MEMORY), sizeof (uufile));
|
||||
*ret = UURET_NOMEM;
|
||||
return NULL;
|
||||
}
|
||||
@@ -720,8 +720,8 @@ UUPreProcessPart (fileread *data, int *ret)
|
||||
if (data->filename != NULL) {
|
||||
if ((result->filename = _FP_strdup (data->filename)) == NULL) {
|
||||
UUMessage (uucheck_id, __LINE__, UUMSG_ERROR,
|
||||
uustring (S_OUT_OF_MEMORY),
|
||||
strlen (data->filename)+1);
|
||||
uustring (S_OUT_OF_MEMORY),
|
||||
strlen (data->filename)+1);
|
||||
*ret = UURET_NOMEM;
|
||||
UUkillfile (result);
|
||||
return NULL;
|
||||
@@ -754,11 +754,11 @@ UUPreProcessPart (fileread *data, int *ret)
|
||||
result->subfname = _FP_strdup (result->filename);
|
||||
|
||||
if (result->filename == NULL ||
|
||||
result->subfname == NULL) {
|
||||
result->subfname == NULL) {
|
||||
UUMessage (uucheck_id, __LINE__, UUMSG_ERROR,
|
||||
uustring (S_OUT_OF_MEMORY),
|
||||
(result->filename==NULL)?
|
||||
(strlen(temp)+1):(strlen(result->filename)+1));
|
||||
uustring (S_OUT_OF_MEMORY),
|
||||
(result->filename==NULL)?
|
||||
(strlen(temp)+1):(strlen(result->filename)+1));
|
||||
*ret = UURET_NOMEM;
|
||||
UUkillfile(result);
|
||||
return NULL;
|
||||
@@ -769,7 +769,7 @@ UUPreProcessPart (fileread *data, int *ret)
|
||||
else if (result->subfname == NULL && data->uudet &&
|
||||
(data->begin || result->partno == 1 ||
|
||||
(!uu_dumbness && result->partno == -1 &&
|
||||
(data->subject != NULL || result->filename != NULL)))) {
|
||||
(data->subject != NULL || result->filename != NULL)))) {
|
||||
/*
|
||||
* If it's the first part of something and has some valid data, but
|
||||
* no subject or anything, initialize lastvalid
|
||||
@@ -788,9 +788,9 @@ UUPreProcessPart (fileread *data, int *ret)
|
||||
*/
|
||||
if (result->subfname == NULL) {
|
||||
UUMessage (uucheck_id, __LINE__, UUMSG_ERROR,
|
||||
uustring (S_OUT_OF_MEMORY),
|
||||
(result->filename)?
|
||||
(strlen(result->filename)+1):(strlen(temp)+1));
|
||||
uustring (S_OUT_OF_MEMORY),
|
||||
(result->filename)?
|
||||
(strlen(result->filename)+1):(strlen(temp)+1));
|
||||
*ret = UURET_NOMEM;
|
||||
UUkillfile (result);
|
||||
return NULL;
|
||||
@@ -838,12 +838,12 @@ UUPreProcessPart (fileread *data, int *ret)
|
||||
result->subfname = _FP_strdup (temp);
|
||||
}
|
||||
if (result->subfname == NULL) {
|
||||
UUMessage (uucheck_id, __LINE__, UUMSG_ERROR,
|
||||
uustring (S_OUT_OF_MEMORY),
|
||||
(result->filename)?
|
||||
(strlen(result->filename)+1):(strlen(temp)+1));
|
||||
*ret = UURET_NOMEM;
|
||||
UUkillfile (result);
|
||||
UUMessage (uucheck_id, __LINE__, UUMSG_ERROR,
|
||||
uustring (S_OUT_OF_MEMORY),
|
||||
(result->filename)?
|
||||
(strlen(result->filename)+1):(strlen(temp)+1));
|
||||
*ret = UURET_NOMEM;
|
||||
UUkillfile (result);
|
||||
return NULL;
|
||||
}
|
||||
lastvalid = 0;
|
||||
@@ -856,7 +856,7 @@ UUPreProcessPart (fileread *data, int *ret)
|
||||
* if it's the last part, invalidate lastvalid
|
||||
*/
|
||||
if (data->end || (data->partno && data->partno == data->maxpno))
|
||||
lastvalid = 0;
|
||||
lastvalid = 0;
|
||||
}
|
||||
else if (data->partno != -1 && result->filename) {
|
||||
result->subfname = _FP_strdup (result->filename);
|
||||
@@ -919,7 +919,7 @@ UUPreProcessPart (fileread *data, int *ret)
|
||||
result->partno = ++lastpart;
|
||||
|
||||
if (data->end)
|
||||
lastvalid = 0;
|
||||
lastvalid = 0;
|
||||
}
|
||||
else {
|
||||
/*
|
||||
@@ -999,30 +999,30 @@ UUInsertPartToList (uufile *data)
|
||||
else if ((_FP_stricmp (data->subfname, iter->subfname) == 0 ||
|
||||
(data->mimeid && iter->mimeid &&
|
||||
strcmp (data->mimeid, iter->mimeid) == 0)) &&
|
||||
!(iter->begin && data->data->begin) &&
|
||||
!(iter->end && data->data->end) &&
|
||||
!(data->mimeid && iter->mimeid &&
|
||||
strcmp (data->mimeid, iter->mimeid) != 0) &&
|
||||
!(data->filename && iter->filename &&
|
||||
strcmp (data->filename, iter->filename) != 0) &&
|
||||
!(iter->flags & FL_SINGLE)) {
|
||||
!(iter->begin && data->data->begin) &&
|
||||
!(iter->end && data->data->end) &&
|
||||
!(data->mimeid && iter->mimeid &&
|
||||
strcmp (data->mimeid, iter->mimeid) != 0) &&
|
||||
!(data->filename && iter->filename &&
|
||||
strcmp (data->filename, iter->filename) != 0) &&
|
||||
!(iter->flags & FL_SINGLE)) {
|
||||
|
||||
/*
|
||||
* if we already have this part, don't try to insert it
|
||||
*/
|
||||
|
||||
for (fiter=iter->thisfile;
|
||||
fiter && (data->partno>fiter->partno) && !fiter->data->end;
|
||||
fiter=fiter->NEXT)
|
||||
/* empty loop */ ;
|
||||
fiter && (data->partno>fiter->partno) && !fiter->data->end;
|
||||
fiter=fiter->NEXT)
|
||||
/* empty loop */ ;
|
||||
if (fiter &&
|
||||
(data->partno==fiter->partno ||
|
||||
(data->partno > fiter->partno && fiter->data->end)))
|
||||
goto goahead;
|
||||
(data->partno==fiter->partno ||
|
||||
(data->partno > fiter->partno && fiter->data->end)))
|
||||
goto goahead;
|
||||
|
||||
if (iter->filename == NULL && data->filename != NULL) {
|
||||
if ((iter->filename = _FP_strdup (data->filename)) == NULL)
|
||||
return UURET_NOMEM;
|
||||
return UURET_NOMEM;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1031,18 +1031,18 @@ UUInsertPartToList (uufile *data)
|
||||
*/
|
||||
|
||||
if (data->data->uudet == B64ENCODED &&
|
||||
iter->uudet == XX_ENCODED && iter->begin) {
|
||||
data->data->uudet = XX_ENCODED;
|
||||
iter->uudet == XX_ENCODED && iter->begin) {
|
||||
data->data->uudet = XX_ENCODED;
|
||||
}
|
||||
else if (data->data->uudet == XX_ENCODED && data->data->begin &&
|
||||
iter->uudet == B64ENCODED) {
|
||||
iter->uudet = XX_ENCODED;
|
||||
iter->uudet == B64ENCODED) {
|
||||
iter->uudet = XX_ENCODED;
|
||||
|
||||
fiter = iter->thisfile;
|
||||
while (fiter) {
|
||||
fiter->data->uudet = XX_ENCODED;
|
||||
fiter = fiter->NEXT;
|
||||
}
|
||||
fiter = iter->thisfile;
|
||||
while (fiter) {
|
||||
fiter->data->uudet = XX_ENCODED;
|
||||
fiter = fiter->NEXT;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1050,14 +1050,14 @@ UUInsertPartToList (uufile *data)
|
||||
* iter->uudet from the first part
|
||||
*/
|
||||
if (data->data->flags & FL_PARTIAL) {
|
||||
if (data->partno == 1) {
|
||||
iter->uudet = data->data->uudet;
|
||||
iter->flags = data->data->flags;
|
||||
}
|
||||
if (data->partno == 1) {
|
||||
iter->uudet = data->data->uudet;
|
||||
iter->flags = data->data->flags;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (data->data->uudet) iter->uudet = data->data->uudet;
|
||||
if (data->data->flags) iter->flags = data->data->flags;
|
||||
if (data->data->uudet) iter->uudet = data->data->uudet;
|
||||
if (data->data->flags) iter->flags = data->data->flags;
|
||||
}
|
||||
|
||||
if (iter->mode == 0 && data->data->mode != 0)
|
||||
@@ -1066,8 +1066,8 @@ UUInsertPartToList (uufile *data)
|
||||
if (data->data->end) iter->end = (data->partno)?data->partno:1;
|
||||
|
||||
if (data->mimetype) {
|
||||
_FP_free (iter->mimetype);
|
||||
iter->mimetype = _FP_strdup (data->mimetype);
|
||||
_FP_free (iter->mimetype);
|
||||
iter->mimetype = _FP_strdup (data->mimetype);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1075,36 +1075,36 @@ UUInsertPartToList (uufile *data)
|
||||
*/
|
||||
|
||||
if (data->partno != -1 && data->partno < iter->thisfile->partno) {
|
||||
iter->state = UUFILE_READ;
|
||||
data->NEXT = iter->thisfile;
|
||||
iter->thisfile = data;
|
||||
return UURET_OK;
|
||||
iter->state = UUFILE_READ;
|
||||
data->NEXT = iter->thisfile;
|
||||
iter->thisfile = data;
|
||||
return UURET_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* insert part somewhere else
|
||||
*/
|
||||
|
||||
iter->state = UUFILE_READ; /* prepare for re-checking */
|
||||
iter->state = UUFILE_READ; /* prepare for re-checking */
|
||||
fiter = iter->thisfile;
|
||||
last = NULL;
|
||||
|
||||
while (fiter) {
|
||||
/*
|
||||
* if we find the same part no again, check which one looks better
|
||||
*/
|
||||
if (data->partno == fiter->partno) {
|
||||
/*
|
||||
* if we find the same part no again, check which one looks better
|
||||
*/
|
||||
if (data->partno == fiter->partno) {
|
||||
if (fiter->data->subject == NULL)
|
||||
return UURET_NODATA;
|
||||
else if (_FP_stristr (fiter->data->subject, "repost") != NULL &&
|
||||
_FP_stristr (data->data->subject, "repost") == NULL)
|
||||
return UURET_NODATA;
|
||||
else if (_FP_stristr (fiter->data->subject, "repost") != NULL &&
|
||||
_FP_stristr (data->data->subject, "repost") == NULL)
|
||||
return UURET_NODATA;
|
||||
else if (fiter->data->uudet && !data->data->uudet)
|
||||
return UURET_NODATA;
|
||||
else {
|
||||
/*
|
||||
* replace
|
||||
*/
|
||||
/*
|
||||
* replace
|
||||
*/
|
||||
data->NEXT = fiter->NEXT;
|
||||
fiter->NEXT = NULL;
|
||||
UUkillfile (fiter);
|
||||
@@ -1118,22 +1118,22 @@ UUInsertPartToList (uufile *data)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* if at the end of the part list, add it
|
||||
*/
|
||||
/*
|
||||
* if at the end of the part list, add it
|
||||
*/
|
||||
|
||||
if (fiter->NEXT == NULL ||
|
||||
(data->partno != -1 && data->partno < fiter->NEXT->partno)) {
|
||||
data->NEXT = fiter->NEXT;
|
||||
fiter->NEXT = data;
|
||||
if (fiter->NEXT == NULL ||
|
||||
(data->partno != -1 && data->partno < fiter->NEXT->partno)) {
|
||||
data->NEXT = fiter->NEXT;
|
||||
fiter->NEXT = data;
|
||||
|
||||
if (data->partno == -1)
|
||||
data->partno = fiter->partno + 1;
|
||||
if (data->partno == -1)
|
||||
data->partno = fiter->partno + 1;
|
||||
|
||||
return UURET_OK;
|
||||
}
|
||||
return UURET_OK;
|
||||
}
|
||||
last = fiter;
|
||||
fiter = fiter->NEXT;
|
||||
fiter = fiter->NEXT;
|
||||
}
|
||||
|
||||
return UURET_OK; /* Shouldn't get here */
|
||||
@@ -1249,12 +1249,12 @@ UUCheckGlobalList (void)
|
||||
continue;
|
||||
}
|
||||
else if ((liter->uudet == QP_ENCODED ||
|
||||
liter->uudet == PT_ENCODED) &&
|
||||
(liter->flags & FL_SINGLE)) {
|
||||
liter->uudet == PT_ENCODED) &&
|
||||
(liter->flags & FL_SINGLE)) {
|
||||
if ((liter->flags&FL_PROPER)==0)
|
||||
liter->size = -1;
|
||||
liter->size = -1;
|
||||
else
|
||||
liter->size = liter->thisfile->data->length;
|
||||
liter->size = liter->thisfile->data->length;
|
||||
|
||||
liter->state = UUFILE_OK;
|
||||
continue;
|
||||
@@ -1281,7 +1281,7 @@ UUCheckGlobalList (void)
|
||||
|
||||
while (fiter && !fiter->data->uudet) {
|
||||
if (havecount<MAXPLIST) {
|
||||
haveparts[havecount++] = fiter->partno;
|
||||
haveparts[havecount++] = fiter->partno;
|
||||
}
|
||||
fiter = fiter->NEXT;
|
||||
}
|
||||
@@ -1298,8 +1298,8 @@ UUCheckGlobalList (void)
|
||||
|
||||
if ((part = fiter->partno) > 1) {
|
||||
if (!fiter->data->begin) {
|
||||
for (count=1; count < part && miscount < MAXPLIST; count++)
|
||||
misparts[miscount++] = count;
|
||||
for (count=1; count < part && miscount < MAXPLIST; count++)
|
||||
misparts[miscount++] = count;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1314,8 +1314,8 @@ UUCheckGlobalList (void)
|
||||
}
|
||||
|
||||
if (liter->uudet == B64ENCODED ||
|
||||
liter->uudet == QP_ENCODED ||
|
||||
liter->uudet == PT_ENCODED)
|
||||
liter->uudet == QP_ENCODED ||
|
||||
liter->uudet == PT_ENCODED)
|
||||
flag |= 3; /* Don't need begin or end with Base64 or plain text*/
|
||||
|
||||
if (fiter->data->begin) flag |= 1;
|
||||
@@ -1346,12 +1346,12 @@ UUCheckGlobalList (void)
|
||||
|
||||
while (fiter != NULL) {
|
||||
for (count=part+1; count<fiter->partno && miscount<MAXPLIST; count++)
|
||||
misparts[miscount++] = count;
|
||||
misparts[miscount++] = count;
|
||||
|
||||
part = fiter->partno;
|
||||
|
||||
if (havecount<MAXPLIST)
|
||||
haveparts[havecount++]=part;
|
||||
haveparts[havecount++]=part;
|
||||
|
||||
if (fiter->data->begin) flag |= 1;
|
||||
if (fiter->data->end) flag |= 2;
|
||||
@@ -1360,22 +1360,22 @@ UUCheckGlobalList (void)
|
||||
switch (fiter->data->uudet) {
|
||||
case UU_ENCODED:
|
||||
case XX_ENCODED:
|
||||
thesize += 3*fiter->data->length/4;
|
||||
thesize -= 3*fiter->data->length/124; /* substract 2 of 62 chars */
|
||||
break;
|
||||
thesize += 3*fiter->data->length/4;
|
||||
thesize -= 3*fiter->data->length/124; /* substract 2 of 62 chars */
|
||||
break;
|
||||
case B64ENCODED:
|
||||
thesize += 3*fiter->data->length/4;
|
||||
thesize -= fiter->data->length/52; /* substract 2 of 78 chars */
|
||||
break;
|
||||
thesize += 3*fiter->data->length/4;
|
||||
thesize -= fiter->data->length/52; /* substract 2 of 78 chars */
|
||||
break;
|
||||
case QP_ENCODED:
|
||||
case PT_ENCODED:
|
||||
thesize += fiter->data->length;
|
||||
break;
|
||||
thesize += fiter->data->length;
|
||||
break;
|
||||
}
|
||||
|
||||
if (fiter->data->end)
|
||||
break;
|
||||
|
||||
break;
|
||||
|
||||
fiter = fiter->NEXT;
|
||||
}
|
||||
|
||||
@@ -1386,7 +1386,7 @@ UUCheckGlobalList (void)
|
||||
*/
|
||||
|
||||
if (uu_fast_scanning && (flag & 0x01) && (flag & 0x04) &&
|
||||
(liter->uudet == UU_ENCODED || liter->uudet == XX_ENCODED))
|
||||
(liter->uudet == UU_ENCODED || liter->uudet == XX_ENCODED))
|
||||
flag |= 2;
|
||||
|
||||
/*
|
||||
@@ -1401,15 +1401,15 @@ UUCheckGlobalList (void)
|
||||
|
||||
if (havecount) {
|
||||
if ((liter->haveparts=(int*)malloc((havecount+1)*sizeof(int)))!=NULL) {
|
||||
memcpy (liter->haveparts, haveparts, havecount*sizeof(int));
|
||||
liter->haveparts[havecount] = 0;
|
||||
memcpy (liter->haveparts, haveparts, havecount*sizeof(int));
|
||||
liter->haveparts[havecount] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (miscount) {
|
||||
if ((liter->misparts=(int*)malloc((miscount+1)*sizeof(int)))!=NULL) {
|
||||
memcpy (liter->misparts, misparts, miscount*sizeof(int));
|
||||
liter->misparts[miscount] = 0;
|
||||
memcpy (liter->misparts, misparts, miscount*sizeof(int));
|
||||
liter->misparts[miscount] = 0;
|
||||
}
|
||||
liter->state |= UUFILE_MISPART;
|
||||
}
|
||||
|
@@ -26,9 +26,9 @@
|
||||
|
||||
#ifndef _ANSI_ARGS_
|
||||
#ifdef PROTOTYPES
|
||||
#define _ANSI_ARGS_(c) c
|
||||
#define _ANSI_ARGS_(c) c
|
||||
#else
|
||||
#define _ANSI_ARGS_(c) ()
|
||||
#define _ANSI_ARGS_(c) ()
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -36,75 +36,75 @@
|
||||
* Message Types
|
||||
*/
|
||||
|
||||
#define UUMSG_MESSAGE (0) /* just a message, nothing important */
|
||||
#define UUMSG_NOTE (1) /* something that should be noticed */
|
||||
#define UUMSG_WARNING (2) /* important msg, processing continues */
|
||||
#define UUMSG_ERROR (3) /* processing has been terminated */
|
||||
#define UUMSG_FATAL (4) /* decoder cannot process further requests */
|
||||
#define UUMSG_PANIC (5) /* recovery impossible, app must terminate */
|
||||
#define UUMSG_MESSAGE (0) /* just a message, nothing important */
|
||||
#define UUMSG_NOTE (1) /* something that should be noticed */
|
||||
#define UUMSG_WARNING (2) /* important msg, processing continues */
|
||||
#define UUMSG_ERROR (3) /* processing has been terminated */
|
||||
#define UUMSG_FATAL (4) /* decoder cannot process further requests */
|
||||
#define UUMSG_PANIC (5) /* recovery impossible, app must terminate */
|
||||
|
||||
/*
|
||||
* Return Values
|
||||
*/
|
||||
|
||||
#define UURET_OK (0) /* everything went fine */
|
||||
#define UURET_IOERR (1) /* I/O Error - examine errno */
|
||||
#define UURET_NOMEM (2) /* not enough memory */
|
||||
#define UURET_ILLVAL (3) /* illegal value for operation */
|
||||
#define UURET_NODATA (4) /* decoder didn't find any data */
|
||||
#define UURET_NOEND (5) /* encoded data wasn't ended properly */
|
||||
#define UURET_UNSUP (6) /* unsupported function (encoding) */
|
||||
#define UURET_EXISTS (7) /* file exists (decoding) */
|
||||
#define UURET_CONT (8) /* continue -- special from ScanPart */
|
||||
#define UURET_CANCEL (9) /* operation canceled */
|
||||
#define UURET_OK (0) /* everything went fine */
|
||||
#define UURET_IOERR (1) /* I/O Error - examine errno */
|
||||
#define UURET_NOMEM (2) /* not enough memory */
|
||||
#define UURET_ILLVAL (3) /* illegal value for operation */
|
||||
#define UURET_NODATA (4) /* decoder didn't find any data */
|
||||
#define UURET_NOEND (5) /* encoded data wasn't ended properly */
|
||||
#define UURET_UNSUP (6) /* unsupported function (encoding) */
|
||||
#define UURET_EXISTS (7) /* file exists (decoding) */
|
||||
#define UURET_CONT (8) /* continue -- special from ScanPart */
|
||||
#define UURET_CANCEL (9) /* operation canceled */
|
||||
|
||||
/*
|
||||
* File states, may be OR'ed
|
||||
*/
|
||||
|
||||
#define UUFILE_READ (0) /* Read in, but not further processed */
|
||||
#define UUFILE_MISPART (1) /* Missing Part(s) detected */
|
||||
#define UUFILE_NOBEGIN (2) /* No 'begin' found */
|
||||
#define UUFILE_NOEND (4) /* No 'end' found */
|
||||
#define UUFILE_NODATA (8) /* File does not contain valid uudata */
|
||||
#define UUFILE_OK (16) /* All Parts found, ready to decode */
|
||||
#define UUFILE_ERROR (32) /* Error while decoding */
|
||||
#define UUFILE_DECODED (64) /* Successfully decoded */
|
||||
#define UUFILE_TMPFILE (128) /* Temporary decoded file exists */
|
||||
#define UUFILE_READ (0) /* Read in, but not further processed */
|
||||
#define UUFILE_MISPART (1) /* Missing Part(s) detected */
|
||||
#define UUFILE_NOBEGIN (2) /* No 'begin' found */
|
||||
#define UUFILE_NOEND (4) /* No 'end' found */
|
||||
#define UUFILE_NODATA (8) /* File does not contain valid uudata */
|
||||
#define UUFILE_OK (16) /* All Parts found, ready to decode */
|
||||
#define UUFILE_ERROR (32) /* Error while decoding */
|
||||
#define UUFILE_DECODED (64) /* Successfully decoded */
|
||||
#define UUFILE_TMPFILE (128) /* Temporary decoded file exists */
|
||||
|
||||
/*
|
||||
* Encoding Types
|
||||
*/
|
||||
|
||||
#define UU_ENCODED (1) /* UUencoded data */
|
||||
#define B64ENCODED (2) /* Mime-Base64 data */
|
||||
#define XX_ENCODED (3) /* XXencoded data */
|
||||
#define BH_ENCODED (4) /* Binhex encoded */
|
||||
#define PT_ENCODED (5) /* Plain-Text encoded (MIME) */
|
||||
#define QP_ENCODED (6) /* Quoted-Printable (MIME) */
|
||||
#define YENC_ENCODED (7) /* yEnc encoded */
|
||||
#define UU_ENCODED (1) /* UUencoded data */
|
||||
#define B64ENCODED (2) /* Mime-Base64 data */
|
||||
#define XX_ENCODED (3) /* XXencoded data */
|
||||
#define BH_ENCODED (4) /* Binhex encoded */
|
||||
#define PT_ENCODED (5) /* Plain-Text encoded (MIME) */
|
||||
#define QP_ENCODED (6) /* Quoted-Printable (MIME) */
|
||||
#define YENC_ENCODED (7) /* yEnc encoded */
|
||||
|
||||
/*
|
||||
* Option indices for GetOption / SetOption
|
||||
*/
|
||||
|
||||
#define UUOPT_VERSION (0) /* version number MAJOR.MINORplPATCH (ro) */
|
||||
#define UUOPT_FAST (1) /* assumes only one part per file */
|
||||
#define UUOPT_DUMBNESS (2) /* switch off the program's intelligence */
|
||||
#define UUOPT_BRACKPOL (3) /* give numbers in [] higher precendence */
|
||||
#define UUOPT_VERBOSE (4) /* generate informative messages */
|
||||
#define UUOPT_DESPERATE (5) /* try to decode incomplete files */
|
||||
#define UUOPT_IGNREPLY (6) /* ignore RE:plies (off by default) */
|
||||
#define UUOPT_OVERWRITE (7) /* whether it's OK to overwrite ex. files */
|
||||
#define UUOPT_SAVEPATH (8) /* prefix to save-files on disk */
|
||||
#define UUOPT_IGNMODE (9) /* ignore the original file mode */
|
||||
#define UUOPT_DEBUG (10) /* print messages with FILE/LINE info */
|
||||
#define UUOPT_ERRNO (14) /* get last error code for UURET_IOERR (ro) */
|
||||
#define UUOPT_PROGRESS (15) /* retrieve progress information */
|
||||
#define UUOPT_USETEXT (16) /* handle text messages */
|
||||
#define UUOPT_PREAMB (17) /* handle Mime preambles/epilogues */
|
||||
#define UUOPT_TINYB64 (18) /* detect short B64 outside of Mime */
|
||||
#define UUOPT_ENCEXT (19) /* extension for single-part encoded files */
|
||||
#define UUOPT_VERSION (0) /* version number MAJOR.MINORplPATCH (ro) */
|
||||
#define UUOPT_FAST (1) /* assumes only one part per file */
|
||||
#define UUOPT_DUMBNESS (2) /* switch off the program's intelligence */
|
||||
#define UUOPT_BRACKPOL (3) /* give numbers in [] higher precendence */
|
||||
#define UUOPT_VERBOSE (4) /* generate informative messages */
|
||||
#define UUOPT_DESPERATE (5) /* try to decode incomplete files */
|
||||
#define UUOPT_IGNREPLY (6) /* ignore RE:plies (off by default) */
|
||||
#define UUOPT_OVERWRITE (7) /* whether it's OK to overwrite ex. files */
|
||||
#define UUOPT_SAVEPATH (8) /* prefix to save-files on disk */
|
||||
#define UUOPT_IGNMODE (9) /* ignore the original file mode */
|
||||
#define UUOPT_DEBUG (10) /* print messages with FILE/LINE info */
|
||||
#define UUOPT_ERRNO (14) /* get last error code for UURET_IOERR (ro) */
|
||||
#define UUOPT_PROGRESS (15) /* retrieve progress information */
|
||||
#define UUOPT_USETEXT (16) /* handle text messages */
|
||||
#define UUOPT_PREAMB (17) /* handle Mime preambles/epilogues */
|
||||
#define UUOPT_TINYB64 (18) /* detect short B64 outside of Mime */
|
||||
#define UUOPT_ENCEXT (19) /* extension for single-part encoded files */
|
||||
#define UUOPT_REMOVE (20) /* remove input files after decoding */
|
||||
#define UUOPT_MOREMIME (21) /* strict MIME adherence */
|
||||
|
||||
@@ -112,11 +112,11 @@
|
||||
* Code for the "action" in the progress structure
|
||||
*/
|
||||
|
||||
#define UUACT_IDLE (0) /* we don't do anything */
|
||||
#define UUACT_SCANNING (1) /* scanning an input file */
|
||||
#define UUACT_DECODING (2) /* decoding into a temp file */
|
||||
#define UUACT_COPYING (3) /* copying temp to target */
|
||||
#define UUACT_ENCODING (4) /* encoding a file */
|
||||
#define UUACT_IDLE (0) /* we don't do anything */
|
||||
#define UUACT_SCANNING (1) /* scanning an input file */
|
||||
#define UUACT_DECODING (2) /* decoding into a temp file */
|
||||
#define UUACT_COPYING (3) /* copying temp to target */
|
||||
#define UUACT_ENCODING (4) /* encoding a file */
|
||||
|
||||
/*
|
||||
* forward definition
|
||||
@@ -132,30 +132,30 @@ struct _uufile;
|
||||
*/
|
||||
|
||||
typedef struct _uulist {
|
||||
short state; /* Status as described by the macros above */
|
||||
short mode; /* file mode as found on begin line */
|
||||
short state; /* Status as described by the macros above */
|
||||
short mode; /* file mode as found on begin line */
|
||||
|
||||
int begin; /* part number where begin was detected */
|
||||
int end; /* part number where end was detected */
|
||||
int begin; /* part number where begin was detected */
|
||||
int end; /* part number where end was detected */
|
||||
|
||||
short uudet; /* Encoding type (see macros above) */
|
||||
int flags; /* flags, especially for single-part files */
|
||||
short uudet; /* Encoding type (see macros above) */
|
||||
int flags; /* flags, especially for single-part files */
|
||||
|
||||
long size; /* approximate size of resulting file */
|
||||
char *filename; /* malloc'ed file name */
|
||||
char *subfname; /* malloc'ed ID from subject line */
|
||||
char *mimeid; /* malloc'ed MIME-ID, if available */
|
||||
char *mimetype; /* malloc'ed Content-Type, if available */
|
||||
long size; /* approximate size of resulting file */
|
||||
char *filename; /* malloc'ed file name */
|
||||
char *subfname; /* malloc'ed ID from subject line */
|
||||
char *mimeid; /* malloc'ed MIME-ID, if available */
|
||||
char *mimetype; /* malloc'ed Content-Type, if available */
|
||||
|
||||
char *binfile; /* name of temp file, if already decoded */
|
||||
char *binfile; /* name of temp file, if already decoded */
|
||||
|
||||
struct _uufile *thisfile; /* linked list of this file's parts */
|
||||
struct _uufile *thisfile; /* linked list of this file's parts */
|
||||
|
||||
int *haveparts; /* the parts we have (max. 256 are listed) */
|
||||
int *misparts; /* list of missing parts (max. 256) */
|
||||
int *haveparts; /* the parts we have (max. 256 are listed) */
|
||||
int *misparts; /* list of missing parts (max. 256) */
|
||||
|
||||
struct _uulist *NEXT; /* next item of the list */
|
||||
struct _uulist *PREV; /* previous item of the list */
|
||||
struct _uulist *NEXT; /* next item of the list */
|
||||
struct _uulist *PREV; /* previous item of the list */
|
||||
} uulist;
|
||||
|
||||
/*
|
||||
@@ -163,14 +163,14 @@ typedef struct _uulist {
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
int action; /* see UUACT_* definitions above */
|
||||
char curfile[256]; /* the file we are working on, incl. path */
|
||||
int partno; /* part we're currently decoding */
|
||||
int numparts; /* total number of parts of this file */
|
||||
long fsize; /* size of the current file */
|
||||
int percent; /* % of _current part_ */
|
||||
long foffset; /* file offset -- internal use only */
|
||||
long totsize; /* file total size -- internal use only */
|
||||
int action; /* see UUACT_* definitions above */
|
||||
char curfile[256]; /* the file we are working on, incl. path */
|
||||
int partno; /* part we're currently decoding */
|
||||
int numparts; /* total number of parts of this file */
|
||||
long fsize; /* size of the current file */
|
||||
int percent; /* % of _current part_ */
|
||||
long foffset; /* file offset -- internal use only */
|
||||
long totsize; /* file total size -- internal use only */
|
||||
} uuprogress;
|
||||
|
||||
|
||||
@@ -186,76 +186,76 @@ typedef struct {
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int UUEXPORT UUInitialize _ANSI_ARGS_((void));
|
||||
int UUEXPORT UUGetOption _ANSI_ARGS_((int, int *, char *, int));
|
||||
int UUEXPORT UUSetOption _ANSI_ARGS_((int, int, char *));
|
||||
char * UUEXPORT UUstrerror _ANSI_ARGS_((int));
|
||||
int UUEXPORT UUSetMsgCallback _ANSI_ARGS_((void *,
|
||||
void (*) (void *,
|
||||
char *,
|
||||
int)));
|
||||
int UUEXPORT UUSetBusyCallback _ANSI_ARGS_((void *,
|
||||
int (*) (void *,
|
||||
uuprogress *),
|
||||
long));
|
||||
int UUEXPORT UUSetFileCallback _ANSI_ARGS_((void *,
|
||||
int (*) (void *, char *,
|
||||
char *, int)));
|
||||
int UUEXPORT UUSetFNameFilter _ANSI_ARGS_((void *,
|
||||
char * (*) (void *,
|
||||
char *)));
|
||||
char * UUEXPORT UUFNameFilter _ANSI_ARGS_((char *));
|
||||
int UUEXPORT UULoadFile _ANSI_ARGS_((char *, char *, int));
|
||||
uulist *UUEXPORT UUGetFileListItem _ANSI_ARGS_((int));
|
||||
int UUEXPORT UURenameFile _ANSI_ARGS_((uulist *, char *));
|
||||
int UUEXPORT UUDecodeToTemp _ANSI_ARGS_((uulist *));
|
||||
int UUEXPORT UURemoveTemp _ANSI_ARGS_((uulist *));
|
||||
int UUEXPORT UUDecodeFile _ANSI_ARGS_((uulist *, char *));
|
||||
int UUEXPORT UUInfoFile _ANSI_ARGS_((uulist *, void *,
|
||||
int (*) (void *,
|
||||
char *)));
|
||||
int UUEXPORT UUSmerge _ANSI_ARGS_((int));
|
||||
int UUEXPORT UUCleanUp _ANSI_ARGS_((void));
|
||||
int UUEXPORT UUInitialize _ANSI_ARGS_((void));
|
||||
int UUEXPORT UUGetOption _ANSI_ARGS_((int, int *, char *, int));
|
||||
int UUEXPORT UUSetOption _ANSI_ARGS_((int, int, char *));
|
||||
char * UUEXPORT UUstrerror _ANSI_ARGS_((int));
|
||||
int UUEXPORT UUSetMsgCallback _ANSI_ARGS_((void *,
|
||||
void (*) (void *,
|
||||
char *,
|
||||
int)));
|
||||
int UUEXPORT UUSetBusyCallback _ANSI_ARGS_((void *,
|
||||
int (*) (void *,
|
||||
uuprogress *),
|
||||
long));
|
||||
int UUEXPORT UUSetFileCallback _ANSI_ARGS_((void *,
|
||||
int (*) (void *, char *,
|
||||
char *, int)));
|
||||
int UUEXPORT UUSetFNameFilter _ANSI_ARGS_((void *,
|
||||
char * (*) (void *,
|
||||
char *)));
|
||||
char * UUEXPORT UUFNameFilter _ANSI_ARGS_((char *));
|
||||
int UUEXPORT UULoadFile _ANSI_ARGS_((char *, char *, int));
|
||||
uulist *UUEXPORT UUGetFileListItem _ANSI_ARGS_((int));
|
||||
int UUEXPORT UURenameFile _ANSI_ARGS_((uulist *, char *));
|
||||
int UUEXPORT UUDecodeToTemp _ANSI_ARGS_((uulist *));
|
||||
int UUEXPORT UURemoveTemp _ANSI_ARGS_((uulist *));
|
||||
int UUEXPORT UUDecodeFile _ANSI_ARGS_((uulist *, char *));
|
||||
int UUEXPORT UUInfoFile _ANSI_ARGS_((uulist *, void *,
|
||||
int (*) (void *,
|
||||
char *)));
|
||||
int UUEXPORT UUSmerge _ANSI_ARGS_((int));
|
||||
int UUEXPORT UUCleanUp _ANSI_ARGS_((void));
|
||||
|
||||
int UUEXPORT UUQuickDecode _ANSI_ARGS_((FILE *, FILE *,
|
||||
char *, long));
|
||||
int UUEXPORT UUQuickDecode _ANSI_ARGS_((FILE *, FILE *,
|
||||
char *, long));
|
||||
|
||||
int UUEXPORT UUEncodeMulti _ANSI_ARGS_((FILE *, FILE *,
|
||||
char *, int,
|
||||
char *, char *, int));
|
||||
int UUEXPORT UUEncodePartial _ANSI_ARGS_((FILE *, FILE *,
|
||||
char *, int,
|
||||
char *, char *,
|
||||
int, int, long,
|
||||
unsigned long*));
|
||||
int UUEXPORT UUEncodeToStream _ANSI_ARGS_((FILE *, FILE *,
|
||||
char *, int,
|
||||
char *, int));
|
||||
int UUEXPORT UUEncodeToFile _ANSI_ARGS_((FILE *, char *, int,
|
||||
char *, char *, long));
|
||||
int UUEXPORT UUE_PrepSingle _ANSI_ARGS_((FILE *, FILE *,
|
||||
char *, int,
|
||||
char *, int,
|
||||
char *, char *,
|
||||
char *, int));
|
||||
int UUEXPORT UUE_PrepPartial _ANSI_ARGS_((FILE *, FILE *,
|
||||
char *, int,
|
||||
char *, int,
|
||||
int, long, long, char *,
|
||||
char *, char *, int));
|
||||
int UUEXPORT UUEncodeMulti _ANSI_ARGS_((FILE *, FILE *,
|
||||
char *, int,
|
||||
char *, char *, int));
|
||||
int UUEXPORT UUEncodePartial _ANSI_ARGS_((FILE *, FILE *,
|
||||
char *, int,
|
||||
char *, char *,
|
||||
int, int, long,
|
||||
unsigned long*));
|
||||
int UUEXPORT UUEncodeToStream _ANSI_ARGS_((FILE *, FILE *,
|
||||
char *, int,
|
||||
char *, int));
|
||||
int UUEXPORT UUEncodeToFile _ANSI_ARGS_((FILE *, char *, int,
|
||||
char *, char *, long));
|
||||
int UUEXPORT UUE_PrepSingle _ANSI_ARGS_((FILE *, FILE *,
|
||||
char *, int,
|
||||
char *, int,
|
||||
char *, char *,
|
||||
char *, int));
|
||||
int UUEXPORT UUE_PrepPartial _ANSI_ARGS_((FILE *, FILE *,
|
||||
char *, int,
|
||||
char *, int,
|
||||
int, long, long, char *,
|
||||
char *, char *, int));
|
||||
|
||||
int UUEXPORT UUE_PrepSingleExt _ANSI_ARGS_((FILE *, FILE *,
|
||||
char *, int,
|
||||
char *, int,
|
||||
char *, char *,
|
||||
char *, char *,
|
||||
int));
|
||||
int UUEXPORT UUE_PrepPartialExt _ANSI_ARGS_((FILE *, FILE *,
|
||||
char *, int,
|
||||
char *, int,
|
||||
int, long, long, char *,
|
||||
char *, char *, char *,
|
||||
int));
|
||||
int UUEXPORT UUE_PrepSingleExt _ANSI_ARGS_((FILE *, FILE *,
|
||||
char *, int,
|
||||
char *, int,
|
||||
char *, char *,
|
||||
char *, char *,
|
||||
int));
|
||||
int UUEXPORT UUE_PrepPartialExt _ANSI_ARGS_((FILE *, FILE *,
|
||||
char *, int,
|
||||
char *, int,
|
||||
int, long, long, char *,
|
||||
char *, char *, char *,
|
||||
int));
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -27,9 +27,9 @@
|
||||
|
||||
#ifndef _ANSI_ARGS_
|
||||
#ifdef PROTOTYPES
|
||||
#define _ANSI_ARGS_(c) c
|
||||
#define _ANSI_ARGS_(c) c
|
||||
#else
|
||||
#define _ANSI_ARGS_(c) ()
|
||||
#define _ANSI_ARGS_(c) ()
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -37,24 +37,24 @@
|
||||
* Busy Polls will be made after processing ... lines
|
||||
*/
|
||||
|
||||
#define BUSY_LINE_TICKS 50
|
||||
#define BUSY_LINE_TICKS 50
|
||||
|
||||
/*
|
||||
* States of MIME scanner
|
||||
*/
|
||||
|
||||
#define MS_HEADERS 1 /* still inside of headers */
|
||||
#define MS_BODY 2 /* body of `simple' messages */
|
||||
#define MS_PREAMBLE 3 /* preamble of Multipart/Mixed */
|
||||
#define MS_SUBPART 4 /* within one of the Multiparts */
|
||||
#define MS_EPILOGUE 5 /* epilogue of Multipart/Mixed */
|
||||
#define MS_HEADERS 1 /* still inside of headers */
|
||||
#define MS_BODY 2 /* body of `simple' messages */
|
||||
#define MS_PREAMBLE 3 /* preamble of Multipart/Mixed */
|
||||
#define MS_SUBPART 4 /* within one of the Multiparts */
|
||||
#define MS_EPILOGUE 5 /* epilogue of Multipart/Mixed */
|
||||
|
||||
/*
|
||||
* Number of subsequent encoded lines we require to believe this
|
||||
* is valid data.
|
||||
*/
|
||||
|
||||
#define ELC_COUNT 4
|
||||
#define ELC_COUNT 4
|
||||
|
||||
/*
|
||||
* Flags a part may have. FL_PROPER means that we are sure about the file's
|
||||
@@ -62,11 +62,11 @@
|
||||
* coding.
|
||||
*/
|
||||
|
||||
#define FL_NONE 0 /* no flag, just plain normal */
|
||||
#define FL_SINGLE 1 /* standalone MSG, do not mix */
|
||||
#define FL_PARTIAL 2 /* from Message/Partial */
|
||||
#define FL_PROPER 4 /* proper MIME part */
|
||||
#define FL_TOEND 8 /* part continues to EOF */
|
||||
#define FL_NONE 0 /* no flag, just plain normal */
|
||||
#define FL_SINGLE 1 /* standalone MSG, do not mix */
|
||||
#define FL_PARTIAL 2 /* from Message/Partial */
|
||||
#define FL_PROPER 4 /* proper MIME part */
|
||||
#define FL_TOEND 8 /* part continues to EOF */
|
||||
|
||||
/*
|
||||
* Auxiliary macro: compute the percentage of a against b.
|
||||
@@ -75,8 +75,8 @@
|
||||
* by zero for b<100 and the result doesn't become larger than 100%
|
||||
*/
|
||||
|
||||
#define UUPERCENT(a,b) ((int) ((unsigned long)(a) / \
|
||||
(((unsigned long)(b)/100)+1)))
|
||||
#define UUPERCENT(a,b) ((int) ((unsigned long)(a) / \
|
||||
(((unsigned long)(b)/100)+1)))
|
||||
|
||||
/*
|
||||
* Make the Busy Callback easier. The macro returns true if the BusyCallback
|
||||
@@ -93,9 +93,9 @@ extern unsigned long uuyctr;
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
int restart; /* restarting after a MIME body (not subpart) */
|
||||
int afterdata; /* after we had useful data in freestyle mode */
|
||||
int afternl; /* after an empty line in freestyle mode */
|
||||
int restart; /* restarting after a MIME body (not subpart) */
|
||||
int afterdata; /* after we had useful data in freestyle mode */
|
||||
int afternl; /* after an empty line in freestyle mode */
|
||||
} headercount;
|
||||
|
||||
extern headercount hlcount;
|
||||
@@ -107,18 +107,18 @@ extern headercount hlcount;
|
||||
*/
|
||||
|
||||
typedef struct _headers {
|
||||
char *from; /* From: */
|
||||
char *subject; /* Subject: */
|
||||
char *rcpt; /* To: */
|
||||
char *date; /* Date: */
|
||||
char *mimevers; /* MIME-Version: */
|
||||
char *ctype; /* Content-Type: */
|
||||
char *ctenc; /* Content-Transfer-Encoding: */
|
||||
char *fname; /* Potential Filename from Content-Type Parameter */
|
||||
char *boundary; /* MIME-Boundary from Content-Type Parameter */
|
||||
char *mimeid; /* MIME-Id for Message/Partial */
|
||||
int partno; /* part number for Message/Partial */
|
||||
int numparts; /* number of parts for Message/Partial */
|
||||
char *from; /* From: */
|
||||
char *subject; /* Subject: */
|
||||
char *rcpt; /* To: */
|
||||
char *date; /* Date: */
|
||||
char *mimevers; /* MIME-Version: */
|
||||
char *ctype; /* Content-Type: */
|
||||
char *ctenc; /* Content-Transfer-Encoding: */
|
||||
char *fname; /* Potential Filename from Content-Type Parameter */
|
||||
char *boundary; /* MIME-Boundary from Content-Type Parameter */
|
||||
char *mimeid; /* MIME-Id for Message/Partial */
|
||||
int partno; /* part number for Message/Partial */
|
||||
int numparts; /* number of parts for Message/Partial */
|
||||
} headers;
|
||||
|
||||
/*
|
||||
@@ -126,12 +126,12 @@ typedef struct _headers {
|
||||
*/
|
||||
|
||||
typedef struct _scanstate {
|
||||
int isfolder; /* if we think this is a valid email folder */
|
||||
int ismime; /* if we are within a valid MIME message */
|
||||
int mimestate; /* state of MIME scanner */
|
||||
int mimeenc; /* encoding of this MIME file */
|
||||
char *source; /* source filename */
|
||||
headers envelope; /* mail envelope headers */
|
||||
int isfolder; /* if we think this is a valid email folder */
|
||||
int ismime; /* if we are within a valid MIME message */
|
||||
int mimestate; /* state of MIME scanner */
|
||||
int mimeenc; /* encoding of this MIME file */
|
||||
char *source; /* source filename */
|
||||
headers envelope; /* mail envelope headers */
|
||||
} scanstate;
|
||||
|
||||
/*
|
||||
@@ -145,23 +145,23 @@ typedef struct _scanstate {
|
||||
**/
|
||||
|
||||
typedef struct _fileread {
|
||||
char *subject; /* Whole subject line */
|
||||
char *filename; /* Only filled in if begin detected */
|
||||
char *origin; /* Whole 'From:' line */
|
||||
char *mimeid; /* the ID for Mime-encoded files */
|
||||
char *mimetype; /* Content-Type */
|
||||
short mode; /* Mode of File (from 'begin') */
|
||||
int begin; /* begin detected */
|
||||
int end; /* end detected */
|
||||
int flags; /* associated flags */
|
||||
char *subject; /* Whole subject line */
|
||||
char *filename; /* Only filled in if begin detected */
|
||||
char *origin; /* Whole 'From:' line */
|
||||
char *mimeid; /* the ID for Mime-encoded files */
|
||||
char *mimetype; /* Content-Type */
|
||||
short mode; /* Mode of File (from 'begin') */
|
||||
int begin; /* begin detected */
|
||||
int end; /* end detected */
|
||||
int flags; /* associated flags */
|
||||
|
||||
short uudet; /* valid encoded data. value indicates encoding */
|
||||
short partno; /* Mime-files have a part number within */
|
||||
short maxpno; /* ... plus the total number of parts */
|
||||
short uudet; /* valid encoded data. value indicates encoding */
|
||||
short partno; /* Mime-files have a part number within */
|
||||
short maxpno; /* ... plus the total number of parts */
|
||||
|
||||
char *sfname; /* Associated source file */
|
||||
long startpos; /* ftell() position where data starts */
|
||||
long length; /* length of data */
|
||||
char *sfname; /* Associated source file */
|
||||
long startpos; /* ftell() position where data starts */
|
||||
long length; /* length of data */
|
||||
} fileread;
|
||||
|
||||
/*
|
||||
@@ -275,64 +275,64 @@ extern char * (*uu_FNameFilter) _ANSI_ARGS_((void *, char *));
|
||||
*/
|
||||
|
||||
#if defined(STDC_HEADERS) || defined(HAVE_STDARG_H)
|
||||
int UUMessage _ANSI_ARGS_((char *, int,
|
||||
int, char *, ...));
|
||||
int UUMessage _ANSI_ARGS_((char *, int,
|
||||
int, char *, ...));
|
||||
#else
|
||||
int UUMessage ();
|
||||
int UUMessage ();
|
||||
#endif
|
||||
int UUBusyPoll _ANSI_ARGS_((void));
|
||||
int UUBusyPoll _ANSI_ARGS_((void));
|
||||
|
||||
/*
|
||||
* Functions from uucheck.c
|
||||
*/
|
||||
|
||||
uufile * UUPreProcessPart _ANSI_ARGS_((fileread *, int *));
|
||||
int UUInsertPartToList _ANSI_ARGS_((uufile *));
|
||||
uulist * UUCheckGlobalList _ANSI_ARGS_((void));
|
||||
uufile * UUPreProcessPart _ANSI_ARGS_((fileread *, int *));
|
||||
int UUInsertPartToList _ANSI_ARGS_((uufile *));
|
||||
uulist * UUCheckGlobalList _ANSI_ARGS_((void));
|
||||
|
||||
/*
|
||||
* Functions from uuutil.c
|
||||
*/
|
||||
|
||||
void UUkillfread _ANSI_ARGS_((fileread *));
|
||||
void UUkillfile _ANSI_ARGS_((uufile *));
|
||||
void UUkilllist _ANSI_ARGS_((uulist *));
|
||||
void UUkillheaders _ANSI_ARGS_((headers *));
|
||||
void UUkillfread _ANSI_ARGS_((fileread *));
|
||||
void UUkillfile _ANSI_ARGS_((uufile *));
|
||||
void UUkilllist _ANSI_ARGS_((uulist *));
|
||||
void UUkillheaders _ANSI_ARGS_((headers *));
|
||||
|
||||
fileread * ScanPart _ANSI_ARGS_((FILE *, char *, int *));
|
||||
fileread * ScanPart _ANSI_ARGS_((FILE *, char *, int *));
|
||||
|
||||
int UUbhdecomp _ANSI_ARGS_((char *, char *,
|
||||
char *, int *,
|
||||
size_t, size_t,
|
||||
size_t *));
|
||||
size_t UUbhwrite _ANSI_ARGS_((char *, size_t, size_t,
|
||||
FILE *));
|
||||
int UUbhdecomp _ANSI_ARGS_((char *, char *,
|
||||
char *, int *,
|
||||
size_t, size_t,
|
||||
size_t *));
|
||||
size_t UUbhwrite _ANSI_ARGS_((char *, size_t, size_t,
|
||||
FILE *));
|
||||
|
||||
/*
|
||||
* Functions from uunconc.c
|
||||
*/
|
||||
|
||||
int UURepairData _ANSI_ARGS_((FILE *, char *,
|
||||
int, int *));
|
||||
int UURepairData _ANSI_ARGS_((FILE *, char *,
|
||||
int, int *));
|
||||
|
||||
void UUInitConc _ANSI_ARGS_((void));
|
||||
int UUValidData _ANSI_ARGS_((char *, int, int *));
|
||||
size_t UUDecodeLine _ANSI_ARGS_((char *, char *, int));
|
||||
int UUDecodePart _ANSI_ARGS_((FILE *, FILE *, int *,
|
||||
long, int, int, char *));
|
||||
int UUDecode _ANSI_ARGS_((uulist *));
|
||||
void UUInitConc _ANSI_ARGS_((void));
|
||||
int UUValidData _ANSI_ARGS_((char *, int, int *));
|
||||
size_t UUDecodeLine _ANSI_ARGS_((char *, char *, int));
|
||||
int UUDecodePart _ANSI_ARGS_((FILE *, FILE *, int *,
|
||||
long, int, int, char *));
|
||||
int UUDecode _ANSI_ARGS_((uulist *));
|
||||
|
||||
/*
|
||||
* Message retrieval from uustring.c
|
||||
*/
|
||||
|
||||
char * uustring _ANSI_ARGS_((int));
|
||||
char * uustring _ANSI_ARGS_((int));
|
||||
|
||||
/*
|
||||
* From uuscan.c
|
||||
*/
|
||||
|
||||
int UUScanHeader _ANSI_ARGS_((FILE *, headers *));
|
||||
int UUScanHeader _ANSI_ARGS_((FILE *, headers *));
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@@ -86,7 +86,7 @@ char * uulib_id = "$Id$";
|
||||
#ifdef SYSTEM_WINDLL
|
||||
BOOL _export WINAPI
|
||||
DllEntryPoint (HINSTANCE hInstance, DWORD seginfo,
|
||||
LPVOID lpCmdLine)
|
||||
LPVOID lpCmdLine)
|
||||
{
|
||||
/* Don't do anything, so just return true */
|
||||
return TRUE;
|
||||
@@ -128,24 +128,24 @@ void *uu_FFCBArg = NULL;
|
||||
* Global variables
|
||||
*/
|
||||
|
||||
int uu_fast_scanning = 0; /* assumes at most 1 part per file */
|
||||
int uu_bracket_policy = 0; /* gives part numbers in [] higher priority */
|
||||
int uu_verbose = 1; /* enables/disables messages¬es */
|
||||
int uu_desperate = 0; /* desperate mode */
|
||||
int uu_ignreply = 0; /* ignore replies */
|
||||
int uu_debug = 0; /* debugging mode (print __FILE__/__LINE__) */
|
||||
int uu_errno = 0; /* the errno that caused this UURET_IOERR */
|
||||
int uu_dumbness = 0; /* switch off the program's intelligence */
|
||||
int uu_overwrite = 1; /* whether it's ok to overwrite ex. files */
|
||||
int uu_ignmode = 0; /* ignore the original file mode */
|
||||
int uu_handletext = 0; /* do we want text/plain messages */
|
||||
int uu_usepreamble = 0; /* do we want Mime preambles/epilogues */
|
||||
int uu_tinyb64 = 0; /* detect short B64 outside of MIME */
|
||||
int uu_fast_scanning = 0; /* assumes at most 1 part per file */
|
||||
int uu_bracket_policy = 0; /* gives part numbers in [] higher priority */
|
||||
int uu_verbose = 1; /* enables/disables messages¬es */
|
||||
int uu_desperate = 0; /* desperate mode */
|
||||
int uu_ignreply = 0; /* ignore replies */
|
||||
int uu_debug = 0; /* debugging mode (print __FILE__/__LINE__) */
|
||||
int uu_errno = 0; /* the errno that caused this UURET_IOERR */
|
||||
int uu_dumbness = 0; /* switch off the program's intelligence */
|
||||
int uu_overwrite = 1; /* whether it's ok to overwrite ex. files */
|
||||
int uu_ignmode = 0; /* ignore the original file mode */
|
||||
int uu_handletext = 0; /* do we want text/plain messages */
|
||||
int uu_usepreamble = 0; /* do we want Mime preambles/epilogues */
|
||||
int uu_tinyb64 = 0; /* detect short B64 outside of MIME */
|
||||
int uu_remove_input = 0; /* remove input files after decoding */
|
||||
int uu_more_mime = 0; /* strictly adhere to MIME headers */
|
||||
|
||||
headercount hlcount = {
|
||||
3, /* restarting after a MIME body */
|
||||
3, /* restarting after a MIME body */
|
||||
2, /* after useful data in freestyle mode */
|
||||
1 /* after useful data and an empty line */
|
||||
};
|
||||
@@ -186,9 +186,9 @@ uulist *UUGlobalFileList = NULL;
|
||||
* time values for BusyCallback. msecs is MILLIsecs here
|
||||
*/
|
||||
|
||||
static long uu_busy_msecs = 0; /* call callback function each msecs */
|
||||
static long uu_last_secs = 0; /* secs of last call to callback */
|
||||
static long uu_last_usecs = 0; /* usecs of last call to callback */
|
||||
static long uu_busy_msecs = 0; /* call callback function each msecs */
|
||||
static long uu_last_secs = 0; /* secs of last call to callback */
|
||||
static long uu_last_usecs = 0; /* usecs of last call to callback */
|
||||
|
||||
/*
|
||||
* progress information
|
||||
@@ -228,7 +228,7 @@ typedef struct {
|
||||
static allomap toallocate[] = {
|
||||
{ &uugen_fnbuffer, 1024 }, /* generic filename buffer */
|
||||
{ &uugen_inbuffer, 1024 }, /* generic input data buffer */
|
||||
{ &uucheck_lastname, 256 }, /* from uucheck.c */
|
||||
{ &uucheck_lastname, 256 }, /* from uucheck.c */
|
||||
{ &uucheck_tempname, 256 },
|
||||
{ &uuestr_itemp, 256 }, /* from uuencode.c:UUEncodeStream() */
|
||||
{ &uuestr_otemp, 1024 },
|
||||
@@ -392,7 +392,7 @@ UUInitialize (void)
|
||||
* areas (uulib_msgstring) in UUMessage()
|
||||
*/
|
||||
for (aiter=toallocate; aiter->ptr; aiter++) {
|
||||
_FP_free (*(aiter->ptr));
|
||||
_FP_free (*(aiter->ptr));
|
||||
}
|
||||
return UURET_NOMEM;
|
||||
}
|
||||
@@ -575,7 +575,7 @@ UUstrerror (int code)
|
||||
|
||||
int UUEXPORT
|
||||
UUSetMsgCallback (void *opaque,
|
||||
void (*func) _ANSI_ARGS_((void *, char *, int)))
|
||||
void (*func) _ANSI_ARGS_((void *, char *, int)))
|
||||
{
|
||||
uu_MsgCallback = func;
|
||||
uu_MsgCBArg = opaque;
|
||||
@@ -585,8 +585,8 @@ UUSetMsgCallback (void *opaque,
|
||||
|
||||
int UUEXPORT
|
||||
UUSetBusyCallback (void *opaque,
|
||||
int (*func) _ANSI_ARGS_((void *, uuprogress *)),
|
||||
long msecs)
|
||||
int (*func) _ANSI_ARGS_((void *, uuprogress *)),
|
||||
long msecs)
|
||||
{
|
||||
uu_BusyCallback = func;
|
||||
uu_BusyCBArg = opaque;
|
||||
@@ -597,7 +597,7 @@ UUSetBusyCallback (void *opaque,
|
||||
|
||||
int UUEXPORT
|
||||
UUSetFileCallback (void *opaque,
|
||||
int (*func) _ANSI_ARGS_((void *, char *, char *, int)))
|
||||
int (*func) _ANSI_ARGS_((void *, char *, char *, int)))
|
||||
{
|
||||
uu_FileCallback = func;
|
||||
uu_FileCBArg = opaque;
|
||||
@@ -607,7 +607,7 @@ UUSetFileCallback (void *opaque,
|
||||
|
||||
int UUEXPORT
|
||||
UUSetFNameFilter (void *opaque,
|
||||
char * (*func) _ANSI_ARGS_((void *, char *)))
|
||||
char * (*func) _ANSI_ARGS_((void *, char *)))
|
||||
{
|
||||
uu_FNameFilter = func;
|
||||
uu_FFCBArg = opaque;
|
||||
@@ -664,15 +664,15 @@ UULoadFile (char *filename, char *fileid, int delflag)
|
||||
|
||||
if ((datei = fopen (filename, "rb")) == NULL) {
|
||||
UUMessage (uulib_id, __LINE__, UUMSG_ERROR,
|
||||
uustring (S_NOT_OPEN_SOURCE),
|
||||
filename, strerror (uu_errno = errno));
|
||||
uustring (S_NOT_OPEN_SOURCE),
|
||||
filename, strerror (uu_errno = errno));
|
||||
return UURET_IOERR;
|
||||
}
|
||||
|
||||
if (fstat (fileno(datei), &finfo) == -1) {
|
||||
UUMessage (uulib_id, __LINE__, UUMSG_ERROR,
|
||||
uustring (S_NOT_STAT_FILE),
|
||||
filename, strerror (uu_errno = errno));
|
||||
uustring (S_NOT_STAT_FILE),
|
||||
filename, strerror (uu_errno = errno));
|
||||
fclose (datei);
|
||||
return UURET_IOERR;
|
||||
}
|
||||
@@ -684,11 +684,11 @@ UULoadFile (char *filename, char *fileid, int delflag)
|
||||
if (delflag && fileid==NULL) {
|
||||
if ((killem = (itbd *) malloc (sizeof (itbd))) == NULL) {
|
||||
UUMessage (uulib_id, __LINE__, UUMSG_WARNING,
|
||||
uustring (S_OUT_OF_MEMORY), sizeof (itbd));
|
||||
uustring (S_OUT_OF_MEMORY), sizeof (itbd));
|
||||
}
|
||||
else if ((killem->fname = _FP_strdup (filename)) == NULL) {
|
||||
UUMessage (uulib_id, __LINE__, UUMSG_WARNING,
|
||||
uustring (S_OUT_OF_MEMORY), strlen(filename)+1);
|
||||
uustring (S_OUT_OF_MEMORY), strlen(filename)+1);
|
||||
_FP_free (killem);
|
||||
}
|
||||
else {
|
||||
@@ -704,9 +704,9 @@ UULoadFile (char *filename, char *fileid, int delflag)
|
||||
progress.percent = 0;
|
||||
progress.foffset = 0;
|
||||
_FP_strncpy (progress.curfile,
|
||||
(strlen(filename)>255)?
|
||||
(filename+strlen(filename)-255):filename,
|
||||
256);
|
||||
(strlen(filename)>255)?
|
||||
(filename+strlen(filename)-255):filename,
|
||||
256);
|
||||
progress.action = UUACT_SCANNING;
|
||||
|
||||
if (fileid == NULL)
|
||||
@@ -724,24 +724,24 @@ UULoadFile (char *filename, char *fileid, int delflag)
|
||||
|
||||
if ((loaded = ScanPart (datei, fileid, &sr)) == NULL) {
|
||||
if (sr != UURET_NODATA && sr != UURET_OK && sr != UURET_CONT) {
|
||||
UUkillfread (loaded);
|
||||
if (sr != UURET_CANCEL) {
|
||||
UUMessage (uulib_id, __LINE__, UUMSG_ERROR,
|
||||
uustring (S_READ_ERROR), filename,
|
||||
strerror (uu_errno));
|
||||
}
|
||||
UUCheckGlobalList ();
|
||||
progress.action = 0;
|
||||
fclose (datei);
|
||||
return sr;
|
||||
UUkillfread (loaded);
|
||||
if (sr != UURET_CANCEL) {
|
||||
UUMessage (uulib_id, __LINE__, UUMSG_ERROR,
|
||||
uustring (S_READ_ERROR), filename,
|
||||
strerror (uu_errno));
|
||||
}
|
||||
UUCheckGlobalList ();
|
||||
progress.action = 0;
|
||||
fclose (datei);
|
||||
return sr;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
if (ferror (datei)) {
|
||||
UUMessage (uulib_id, __LINE__, UUMSG_ERROR,
|
||||
uustring (S_READ_ERROR), filename,
|
||||
strerror (uu_errno = errno));
|
||||
uustring (S_READ_ERROR), filename,
|
||||
strerror (uu_errno = errno));
|
||||
UUCheckGlobalList ();
|
||||
progress.action = 0;
|
||||
fclose (datei);
|
||||
@@ -749,8 +749,8 @@ UULoadFile (char *filename, char *fileid, int delflag)
|
||||
}
|
||||
|
||||
if ((loaded->uudet == QP_ENCODED || loaded->uudet == PT_ENCODED) &&
|
||||
(loaded->filename == NULL || *(loaded->filename) == '\0') &&
|
||||
!uu_handletext && (loaded->flags&FL_PARTIAL)==0) {
|
||||
(loaded->filename == NULL || *(loaded->filename) == '\0') &&
|
||||
!uu_handletext && (loaded->flags&FL_PARTIAL)==0) {
|
||||
/*
|
||||
* Don't want text
|
||||
*/
|
||||
@@ -759,9 +759,9 @@ UULoadFile (char *filename, char *fileid, int delflag)
|
||||
}
|
||||
|
||||
if ((loaded->subject == NULL || *(loaded->subject) == '\0') &&
|
||||
(loaded->mimeid == NULL || *(loaded->mimeid) == '\0') &&
|
||||
(loaded->filename== NULL || *(loaded->filename)== '\0') &&
|
||||
(loaded->uudet == 0)) {
|
||||
(loaded->mimeid == NULL || *(loaded->mimeid) == '\0') &&
|
||||
(loaded->filename== NULL || *(loaded->filename)== '\0') &&
|
||||
(loaded->uudet == 0)) {
|
||||
/*
|
||||
* no useful data here
|
||||
*/
|
||||
@@ -775,9 +775,9 @@ UULoadFile (char *filename, char *fileid, int delflag)
|
||||
* no useful data found
|
||||
*/
|
||||
if (res != UURET_NODATA) {
|
||||
UUMessage (uulib_id, __LINE__, UUMSG_ERROR,
|
||||
uustring (S_READ_ERROR), filename,
|
||||
(res==UURET_IOERR)?strerror(uu_errno):UUstrerror(res));
|
||||
UUMessage (uulib_id, __LINE__, UUMSG_ERROR,
|
||||
uustring (S_READ_ERROR), filename,
|
||||
(res==UURET_IOERR)?strerror(uu_errno):UUstrerror(res));
|
||||
}
|
||||
UUkillfread (loaded);
|
||||
if (uu_fast_scanning && sr != UURET_CONT) break;
|
||||
@@ -785,19 +785,19 @@ UULoadFile (char *filename, char *fileid, int delflag)
|
||||
}
|
||||
|
||||
if ((loaded->subject && *(loaded->subject)) ||
|
||||
(loaded->mimeid && *(loaded->mimeid)) ||
|
||||
(loaded->filename&& *(loaded->filename))||
|
||||
(loaded->uudet)) {
|
||||
(loaded->mimeid && *(loaded->mimeid)) ||
|
||||
(loaded->filename&& *(loaded->filename))||
|
||||
(loaded->uudet)) {
|
||||
UUMessage (uulib_id, __LINE__, UUMSG_MESSAGE,
|
||||
uustring (S_LOADED_PART),
|
||||
filename,
|
||||
(loaded->subject) ? loaded->subject : "",
|
||||
(fload->subfname) ? fload->subfname : "",
|
||||
(loaded->filename) ? loaded->filename : "",
|
||||
fload->partno,
|
||||
(loaded->begin) ? "begin" : "",
|
||||
(loaded->end) ? "end" : "",
|
||||
codenames[loaded->uudet]);
|
||||
uustring (S_LOADED_PART),
|
||||
filename,
|
||||
(loaded->subject) ? loaded->subject : "",
|
||||
(fload->subfname) ? fload->subfname : "",
|
||||
(loaded->filename) ? loaded->filename : "",
|
||||
fload->partno,
|
||||
(loaded->begin) ? "begin" : "",
|
||||
(loaded->end) ? "end" : "",
|
||||
codenames[loaded->uudet]);
|
||||
}
|
||||
|
||||
if ((res = UUInsertPartToList (fload))) {
|
||||
@@ -807,13 +807,13 @@ UULoadFile (char *filename, char *fileid, int delflag)
|
||||
UUkillfile (fload);
|
||||
|
||||
if (res != UURET_NODATA) {
|
||||
UUCheckGlobalList ();
|
||||
progress.action = 0;
|
||||
fclose (datei);
|
||||
return res;
|
||||
UUCheckGlobalList ();
|
||||
progress.action = 0;
|
||||
fclose (datei);
|
||||
return res;
|
||||
}
|
||||
if (uu_fast_scanning && sr != UURET_CONT)
|
||||
break;
|
||||
break;
|
||||
|
||||
continue;
|
||||
}
|
||||
@@ -833,7 +833,7 @@ UULoadFile (char *filename, char *fileid, int delflag)
|
||||
|
||||
if (!uu_fast_scanning && count==0) {
|
||||
UUMessage (uulib_id, __LINE__, UUMSG_NOTE,
|
||||
uustring (S_NO_DATA_FOUND), filename);
|
||||
uustring (S_NO_DATA_FOUND), filename);
|
||||
}
|
||||
|
||||
progress.action = 0;
|
||||
@@ -873,14 +873,14 @@ UUDecodeFile (uulist *thefile, char *destname)
|
||||
|
||||
if (thefile->binfile == NULL) {
|
||||
UUMessage (uulib_id, __LINE__, UUMSG_ERROR,
|
||||
uustring (S_NO_BIN_FILE));
|
||||
uustring (S_NO_BIN_FILE));
|
||||
return UURET_IOERR;
|
||||
}
|
||||
|
||||
if ((source = fopen (thefile->binfile, "rb")) == NULL) {
|
||||
UUMessage (uulib_id, __LINE__, UUMSG_ERROR,
|
||||
uustring (S_NOT_OPEN_FILE),
|
||||
thefile->binfile, strerror (uu_errno = errno));
|
||||
uustring (S_NOT_OPEN_FILE),
|
||||
thefile->binfile, strerror (uu_errno = errno));
|
||||
return UURET_IOERR;
|
||||
}
|
||||
|
||||
@@ -890,8 +890,8 @@ UUDecodeFile (uulist *thefile, char *destname)
|
||||
|
||||
if ((thefile->mode & 0777) != thefile->mode) {
|
||||
UUMessage (uulib_id, __LINE__, UUMSG_NOTE,
|
||||
uustring (S_STRIPPED_SETUID),
|
||||
destname, (int)thefile->mode);
|
||||
uustring (S_STRIPPED_SETUID),
|
||||
destname, (int)thefile->mode);
|
||||
thefile->mode &= 0777;
|
||||
}
|
||||
|
||||
@@ -910,9 +910,9 @@ UUDecodeFile (uulist *thefile, char *destname)
|
||||
strcpy (uugen_fnbuffer, destname);
|
||||
else {
|
||||
sprintf (uugen_fnbuffer, "%s%s",
|
||||
(uusavepath)?uusavepath:"",
|
||||
UUFNameFilter ((thefile->filename)?
|
||||
thefile->filename:"unknown.xxx"));
|
||||
(uusavepath)?uusavepath:"",
|
||||
UUFNameFilter ((thefile->filename)?
|
||||
thefile->filename:"unknown.xxx"));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -922,7 +922,7 @@ UUDecodeFile (uulist *thefile, char *destname)
|
||||
if (!uu_overwrite) {
|
||||
if (stat (uugen_fnbuffer, &finfo) == 0) {
|
||||
UUMessage (uulib_id, __LINE__, UUMSG_ERROR,
|
||||
uustring (S_TARGET_EXISTS), uugen_fnbuffer);
|
||||
uustring (S_TARGET_EXISTS), uugen_fnbuffer);
|
||||
fclose (source);
|
||||
return UURET_EXISTS;
|
||||
}
|
||||
@@ -930,17 +930,17 @@ UUDecodeFile (uulist *thefile, char *destname)
|
||||
|
||||
if (fstat (fileno(source), &finfo) == -1) {
|
||||
UUMessage (uulib_id, __LINE__, UUMSG_ERROR,
|
||||
uustring (S_NOT_STAT_FILE),
|
||||
thefile->binfile, strerror (uu_errno = errno));
|
||||
uustring (S_NOT_STAT_FILE),
|
||||
thefile->binfile, strerror (uu_errno = errno));
|
||||
fclose (source);
|
||||
return UURET_IOERR;
|
||||
}
|
||||
|
||||
progress.action = 0;
|
||||
_FP_strncpy (progress.curfile,
|
||||
(strlen(uugen_fnbuffer)>255)?
|
||||
(uugen_fnbuffer+strlen(uugen_fnbuffer)-255):uugen_fnbuffer,
|
||||
256);
|
||||
(strlen(uugen_fnbuffer)>255)?
|
||||
(uugen_fnbuffer+strlen(uugen_fnbuffer)-255):uugen_fnbuffer,
|
||||
256);
|
||||
progress.partno = 0;
|
||||
progress.numparts = 1;
|
||||
progress.fsize = (long) ((finfo.st_size)?finfo.st_size:-1);
|
||||
@@ -953,8 +953,8 @@ UUDecodeFile (uulist *thefile, char *destname)
|
||||
(uu_ignmode)?0666:thefile->mode)) == -1) {
|
||||
progress.action = 0;
|
||||
UUMessage (uulib_id, __LINE__, UUMSG_ERROR,
|
||||
uustring (S_NOT_OPEN_TARGET),
|
||||
uugen_fnbuffer, strerror (uu_errno = errno));
|
||||
uustring (S_NOT_OPEN_TARGET),
|
||||
uugen_fnbuffer, strerror (uu_errno = errno));
|
||||
fclose (source);
|
||||
return UURET_IOERR;
|
||||
}
|
||||
@@ -962,8 +962,8 @@ UUDecodeFile (uulist *thefile, char *destname)
|
||||
if ((target = fdopen (fildes, "wb")) == NULL) {
|
||||
progress.action = 0;
|
||||
UUMessage (uulib_id, __LINE__, UUMSG_ERROR,
|
||||
uustring (S_IO_ERR_TARGET),
|
||||
uugen_fnbuffer, strerror (uu_errno = errno));
|
||||
uustring (S_IO_ERR_TARGET),
|
||||
uugen_fnbuffer, strerror (uu_errno = errno));
|
||||
fclose (source);
|
||||
close (fildes);
|
||||
return UURET_IOERR;
|
||||
@@ -973,7 +973,7 @@ UUDecodeFile (uulist *thefile, char *destname)
|
||||
|
||||
if (UUBUSYPOLL(ftell(source),progress.fsize)) {
|
||||
UUMessage (uulib_id, __LINE__, UUMSG_NOTE,
|
||||
uustring (S_DECODE_CANCEL));
|
||||
uustring (S_DECODE_CANCEL));
|
||||
fclose (source);
|
||||
fclose (target);
|
||||
unlink (uugen_fnbuffer);
|
||||
@@ -985,8 +985,8 @@ UUDecodeFile (uulist *thefile, char *destname)
|
||||
if (ferror (source) || (bytes == 0 && !feof (source))) {
|
||||
progress.action = 0;
|
||||
UUMessage (uulib_id, __LINE__, UUMSG_ERROR,
|
||||
uustring (S_READ_ERROR),
|
||||
thefile->binfile, strerror (uu_errno = errno));
|
||||
uustring (S_READ_ERROR),
|
||||
thefile->binfile, strerror (uu_errno = errno));
|
||||
fclose (source);
|
||||
fclose (target);
|
||||
unlink (uugen_fnbuffer);
|
||||
@@ -995,8 +995,8 @@ UUDecodeFile (uulist *thefile, char *destname)
|
||||
if (fwrite (uugen_inbuffer, 1, bytes, target) != bytes) {
|
||||
progress.action = 0;
|
||||
UUMessage (uulib_id, __LINE__, UUMSG_ERROR,
|
||||
uustring (S_WR_ERR_TARGET),
|
||||
uugen_fnbuffer, strerror (uu_errno = errno));
|
||||
uustring (S_WR_ERR_TARGET),
|
||||
uugen_fnbuffer, strerror (uu_errno = errno));
|
||||
fclose (source);
|
||||
fclose (target);
|
||||
unlink (uugen_fnbuffer);
|
||||
@@ -1013,9 +1013,9 @@ UUDecodeFile (uulist *thefile, char *destname)
|
||||
|
||||
if (unlink (thefile->binfile)) {
|
||||
UUMessage (uulib_id, __LINE__, UUMSG_WARNING,
|
||||
uustring (S_TMP_NOT_REMOVED),
|
||||
thefile->binfile,
|
||||
strerror (uu_errno = errno));
|
||||
uustring (S_TMP_NOT_REMOVED),
|
||||
thefile->binfile,
|
||||
strerror (uu_errno = errno));
|
||||
}
|
||||
_FP_free (thefile->binfile);
|
||||
thefile->binfile = NULL;
|
||||
@@ -1033,7 +1033,7 @@ UUDecodeFile (uulist *thefile, char *destname)
|
||||
|
||||
int UUEXPORT
|
||||
UUInfoFile (uulist *thefile, void *opaque,
|
||||
int (*func) _ANSI_ARGS_((void *, char *)))
|
||||
int (*func) _ANSI_ARGS_((void *, char *)))
|
||||
{
|
||||
int errflag=0, res, bhflag=0, dd;
|
||||
long maxpos;
|
||||
@@ -1045,25 +1045,25 @@ UUInfoFile (uulist *thefile, void *opaque,
|
||||
|
||||
if (uu_FileCallback) {
|
||||
if ((res = (*uu_FileCallback) (uu_FileCBArg,
|
||||
thefile->thisfile->data->sfname,
|
||||
uugen_fnbuffer,
|
||||
1)) != UURET_OK)
|
||||
thefile->thisfile->data->sfname,
|
||||
uugen_fnbuffer,
|
||||
1)) != UURET_OK)
|
||||
return res;
|
||||
if ((inpfile = fopen (uugen_fnbuffer, "rb")) == NULL) {
|
||||
(*uu_FileCallback) (uu_FileCBArg, thefile->thisfile->data->sfname,
|
||||
uugen_fnbuffer, 0);
|
||||
uugen_fnbuffer, 0);
|
||||
UUMessage (uulib_id, __LINE__, UUMSG_ERROR,
|
||||
uustring (S_NOT_OPEN_FILE), uugen_fnbuffer,
|
||||
strerror (uu_errno = errno));
|
||||
uustring (S_NOT_OPEN_FILE), uugen_fnbuffer,
|
||||
strerror (uu_errno = errno));
|
||||
return UURET_IOERR;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ((inpfile = fopen (thefile->thisfile->data->sfname, "rb")) == NULL) {
|
||||
UUMessage (uulib_id, __LINE__, UUMSG_ERROR,
|
||||
uustring (S_NOT_OPEN_FILE),
|
||||
thefile->thisfile->data->sfname,
|
||||
strerror (uu_errno=errno));
|
||||
uustring (S_NOT_OPEN_FILE),
|
||||
thefile->thisfile->data->sfname,
|
||||
strerror (uu_errno=errno));
|
||||
return UURET_IOERR;
|
||||
}
|
||||
_FP_strncpy (uugen_fnbuffer, thefile->thisfile->data->sfname, 1024);
|
||||
@@ -1077,7 +1077,7 @@ UUInfoFile (uulist *thefile, void *opaque,
|
||||
maxpos = thefile->thisfile->data->startpos + thefile->thisfile->data->length;
|
||||
|
||||
while (!feof (inpfile) &&
|
||||
(uu_fast_scanning || ftell(inpfile) < maxpos)) {
|
||||
(uu_fast_scanning || ftell(inpfile) < maxpos)) {
|
||||
if (_FP_fgets (uugen_inbuffer, 511, inpfile) == NULL)
|
||||
break;
|
||||
uugen_inbuffer[511] = '\0';
|
||||
@@ -1092,10 +1092,10 @@ UUInfoFile (uulist *thefile, void *opaque,
|
||||
else if (thefile->uudet == BH_ENCODED && bhflag)
|
||||
break;
|
||||
else if ((thefile->uudet == UU_ENCODED || thefile->uudet == XX_ENCODED) &&
|
||||
strncmp (uugen_inbuffer, "begin ", 6) == 0)
|
||||
strncmp (uugen_inbuffer, "begin ", 6) == 0)
|
||||
break;
|
||||
else if (thefile->uudet == YENC_ENCODED &&
|
||||
strncmp (uugen_inbuffer, "=ybegin ", 8) == 0)
|
||||
strncmp (uugen_inbuffer, "=ybegin ", 8) == 0)
|
||||
break;
|
||||
|
||||
if ((*func) (opaque, uugen_inbuffer))
|
||||
@@ -1104,8 +1104,8 @@ UUInfoFile (uulist *thefile, void *opaque,
|
||||
|
||||
if (ferror (inpfile)) {
|
||||
UUMessage (uulib_id, __LINE__, UUMSG_ERROR,
|
||||
uustring (S_READ_ERROR),
|
||||
uugen_fnbuffer, strerror (uu_errno = errno));
|
||||
uustring (S_READ_ERROR),
|
||||
uugen_fnbuffer, strerror (uu_errno = errno));
|
||||
errflag = 1;
|
||||
}
|
||||
|
||||
@@ -1113,15 +1113,15 @@ UUInfoFile (uulist *thefile, void *opaque,
|
||||
|
||||
if (uu_FileCallback)
|
||||
(*uu_FileCallback) (uu_FileCBArg,
|
||||
thefile->thisfile->data->sfname,
|
||||
uugen_fnbuffer, 0);
|
||||
thefile->thisfile->data->sfname,
|
||||
uugen_fnbuffer, 0);
|
||||
|
||||
if (errflag)
|
||||
return UURET_IOERR;
|
||||
|
||||
return UURET_OK;
|
||||
}
|
||||
|
||||
|
||||
int UUEXPORT
|
||||
UURenameFile (uulist *thefile, char *newname)
|
||||
{
|
||||
@@ -1134,8 +1134,8 @@ UURenameFile (uulist *thefile, char *newname)
|
||||
|
||||
if ((thefile->filename = _FP_strdup (newname)) == NULL) {
|
||||
UUMessage (uulib_id, __LINE__, UUMSG_ERROR,
|
||||
uustring (S_NOT_RENAME),
|
||||
oldname, newname);
|
||||
uustring (S_NOT_RENAME),
|
||||
oldname, newname);
|
||||
thefile->filename = oldname;
|
||||
return UURET_NOMEM;
|
||||
}
|
||||
@@ -1152,9 +1152,9 @@ UURemoveTemp (uulist *thefile)
|
||||
if (thefile->binfile) {
|
||||
if (unlink (thefile->binfile)) {
|
||||
UUMessage (uulib_id, __LINE__, UUMSG_WARNING,
|
||||
uustring (S_TMP_NOT_REMOVED),
|
||||
thefile->binfile,
|
||||
strerror (uu_errno = errno));
|
||||
uustring (S_TMP_NOT_REMOVED),
|
||||
thefile->binfile,
|
||||
strerror (uu_errno = errno));
|
||||
}
|
||||
_FP_free (thefile->binfile);
|
||||
thefile->binfile = NULL;
|
||||
@@ -1178,8 +1178,8 @@ UUCleanUp (void)
|
||||
while (iter) {
|
||||
if (unlink (iter->fname)) {
|
||||
UUMessage (uulib_id, __LINE__, UUMSG_WARNING,
|
||||
uustring (S_TMP_NOT_REMOVED),
|
||||
iter->fname, strerror (uu_errno = errno));
|
||||
uustring (S_TMP_NOT_REMOVED),
|
||||
iter->fname, strerror (uu_errno = errno));
|
||||
}
|
||||
_FP_free (iter->fname);
|
||||
ptr = iter;
|
||||
@@ -1197,17 +1197,17 @@ UUCleanUp (void)
|
||||
liter = UUGlobalFileList;
|
||||
while (liter) {
|
||||
if (liter->state & UUFILE_DECODED) {
|
||||
fiter = liter->thisfile;
|
||||
while (fiter) {
|
||||
if (fiter->data && fiter->data->sfname) {
|
||||
/*
|
||||
* Error code ignored. We might want to delete a file multiple
|
||||
* times
|
||||
*/
|
||||
unlink (fiter->data->sfname);
|
||||
}
|
||||
fiter = fiter->NEXT;
|
||||
}
|
||||
fiter = liter->thisfile;
|
||||
while (fiter) {
|
||||
if (fiter->data && fiter->data->sfname) {
|
||||
/*
|
||||
* Error code ignored. We might want to delete a file multiple
|
||||
* times
|
||||
*/
|
||||
unlink (fiter->data->sfname);
|
||||
}
|
||||
fiter = fiter->NEXT;
|
||||
}
|
||||
}
|
||||
liter = liter->NEXT;
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -124,7 +124,7 @@ char *uuretcodes[] = {
|
||||
"Unexpected End of File",
|
||||
"Unsupported function",
|
||||
"File exists",
|
||||
"Continue -- no error", /* only to be seen internally */
|
||||
"Continue -- no error", /* only to be seen internally */
|
||||
"Operation Canceled"
|
||||
};
|
||||
|
||||
@@ -162,8 +162,8 @@ uustring (int codeno)
|
||||
}
|
||||
|
||||
UUMessage (uustring_id, __LINE__, UUMSG_ERROR,
|
||||
"Could not retrieve string no %d",
|
||||
codeno);
|
||||
"Could not retrieve string no %d",
|
||||
codeno);
|
||||
|
||||
return faileddef;
|
||||
}
|
||||
|
@@ -76,8 +76,8 @@ static char *knownexts[] = {
|
||||
* forward declarations of local functions
|
||||
*/
|
||||
|
||||
static int UUSMPKnownExt _ANSI_ARGS_((char *filename));
|
||||
static uulist * UU_smparts_r _ANSI_ARGS_((uulist *, int));
|
||||
static int UUSMPKnownExt _ANSI_ARGS_((char *filename));
|
||||
static uulist * UU_smparts_r _ANSI_ARGS_((uulist *, int));
|
||||
|
||||
/*
|
||||
* mallocable areas
|
||||
@@ -129,9 +129,9 @@ UUkilllist (uulist *data)
|
||||
while (data) {
|
||||
if (data->binfile != NULL)
|
||||
if (unlink (data->binfile))
|
||||
UUMessage (uuutil_id, __LINE__, UUMSG_WARNING,
|
||||
uustring (S_TMP_NOT_REMOVED),
|
||||
data->binfile, strerror (errno));
|
||||
UUMessage (uuutil_id, __LINE__, UUMSG_WARNING,
|
||||
uustring (S_TMP_NOT_REMOVED),
|
||||
data->binfile, strerror (errno));
|
||||
|
||||
_FP_free (data->filename);
|
||||
_FP_free (data->subfname);
|
||||
@@ -219,7 +219,7 @@ UUSMPKnownExt (char *filename)
|
||||
|
||||
int
|
||||
UUbhdecomp (char *in, char *out, char *last, int *rpc,
|
||||
size_t inc, size_t max, size_t *opc)
|
||||
size_t inc, size_t max, size_t *opc)
|
||||
{
|
||||
size_t count, used=0, dummy;
|
||||
char marker = '\220' /* '\x90' */;
|
||||
@@ -257,18 +257,18 @@ UUbhdecomp (char *in, char *out, char *last, int *rpc,
|
||||
if (*in == marker) {
|
||||
used++; in++;
|
||||
if (used == inc) {
|
||||
*rpc = -256;
|
||||
return used;
|
||||
*rpc = -256;
|
||||
return used;
|
||||
}
|
||||
*rpc = (int) (unsigned char) *in++; used++;
|
||||
|
||||
if (*rpc == 0) {
|
||||
*last = *out++ = marker;
|
||||
max--; *opc+=1;
|
||||
continue;
|
||||
*last = *out++ = marker;
|
||||
max--; *opc+=1;
|
||||
continue;
|
||||
}
|
||||
else
|
||||
*rpc -= 1;
|
||||
*rpc -= 1;
|
||||
|
||||
count = (max > (size_t) *rpc) ? (size_t) *rpc : max;
|
||||
memset (out, *last, count);
|
||||
@@ -307,7 +307,7 @@ UUbhwrite (char *ptr, size_t sel, size_t nel, FILE *file)
|
||||
|
||||
while (nel || (rpc != 0 && rpc != -256)) {
|
||||
count = UUbhdecomp (ptr, tmpstring, &lc, &rpc,
|
||||
nel, 256, &opc);
|
||||
nel, 256, &opc);
|
||||
if (fwrite (tmpstring, 1, opc, file) != opc)
|
||||
return 0;
|
||||
if (ferror (file))
|
||||
@@ -337,7 +337,7 @@ UU_smparts_r (uulist *addit, int pass)
|
||||
continue;
|
||||
}
|
||||
if ((iter->begin && addit->begin) || (iter->end && addit->end) ||
|
||||
(iter->uudet != addit->uudet)) {
|
||||
(iter->uudet != addit->uudet)) {
|
||||
iter = iter->NEXT;
|
||||
continue;
|
||||
}
|
||||
@@ -355,8 +355,8 @@ UU_smparts_r (uulist *addit, int pass)
|
||||
|
||||
while (temp) {
|
||||
if (!(temp->data->uudet)) {
|
||||
temp = temp->NEXT;
|
||||
continue;
|
||||
temp = temp->NEXT;
|
||||
continue;
|
||||
}
|
||||
|
||||
while (fiter && fiter->partno < temp->partno) {
|
||||
@@ -368,7 +368,7 @@ UU_smparts_r (uulist *addit, int pass)
|
||||
break;
|
||||
}
|
||||
else {
|
||||
flag = 1;
|
||||
flag = 1;
|
||||
count += ((dest) ? temp->partno - dest->partno - 1 : 0) +
|
||||
((fiter) ? fiter->partno - temp->partno - 1 : 0);
|
||||
}
|
||||
@@ -398,33 +398,33 @@ UU_smparts_r (uulist *addit, int pass)
|
||||
flag = 0;
|
||||
|
||||
if (fiter->partno == iter->thisfile->partno ||
|
||||
(dest->NEXT != NULL && fiter->partno == dest->NEXT->partno)) {
|
||||
temp = fiter->NEXT;
|
||||
fiter->NEXT = NULL;
|
||||
(dest->NEXT != NULL && fiter->partno == dest->NEXT->partno)) {
|
||||
temp = fiter->NEXT;
|
||||
fiter->NEXT = NULL;
|
||||
|
||||
UUkillfile (fiter);
|
||||
UUkillfile (fiter);
|
||||
|
||||
addit->thisfile= temp;
|
||||
fiter = temp;
|
||||
continue;
|
||||
addit->thisfile= temp;
|
||||
fiter = temp;
|
||||
continue;
|
||||
}
|
||||
if (fiter->partno < iter->thisfile->partno) {
|
||||
temp = fiter->NEXT;
|
||||
fiter->NEXT = iter->thisfile;
|
||||
iter->thisfile = fiter;
|
||||
dest = fiter;
|
||||
addit->thisfile= temp;
|
||||
fiter = temp;
|
||||
temp = fiter->NEXT;
|
||||
fiter->NEXT = iter->thisfile;
|
||||
iter->thisfile = fiter;
|
||||
dest = fiter;
|
||||
addit->thisfile= temp;
|
||||
fiter = temp;
|
||||
}
|
||||
else if (dest->NEXT == NULL || fiter->partno < dest->NEXT->partno) {
|
||||
temp = fiter->NEXT;
|
||||
fiter->NEXT = dest->NEXT;
|
||||
dest->NEXT = fiter;
|
||||
addit->thisfile= temp;
|
||||
fiter = temp;
|
||||
temp = fiter->NEXT;
|
||||
fiter->NEXT = dest->NEXT;
|
||||
dest->NEXT = fiter;
|
||||
addit->thisfile= temp;
|
||||
fiter = temp;
|
||||
}
|
||||
else {
|
||||
dest = dest->NEXT;
|
||||
dest = dest->NEXT;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -446,9 +446,9 @@ UUSmerge (int pass)
|
||||
}
|
||||
if ((res = UU_smparts_r (iter, pass)) != NULL) {
|
||||
UUMessage (uuutil_id, __LINE__, UUMSG_MESSAGE,
|
||||
uustring (S_SMERGE_MERGED),
|
||||
(iter->subfname) ? iter->subfname : "",
|
||||
(res->subfname) ? res->subfname : "", pass);
|
||||
uustring (S_SMERGE_MERGED),
|
||||
(iter->subfname) ? iter->subfname : "",
|
||||
(res->subfname) ? res->subfname : "", pass);
|
||||
|
||||
temp = iter->NEXT;
|
||||
iter->NEXT = NULL;
|
||||
@@ -457,12 +457,12 @@ UUSmerge (int pass)
|
||||
flag++;
|
||||
|
||||
if (last == NULL) {
|
||||
UUGlobalFileList = temp;
|
||||
iter = temp;
|
||||
UUGlobalFileList = temp;
|
||||
iter = temp;
|
||||
}
|
||||
else {
|
||||
last->NEXT = temp;
|
||||
iter = temp;
|
||||
last->NEXT = temp;
|
||||
iter = temp;
|
||||
}
|
||||
|
||||
continue;
|
||||
|
Reference in New Issue
Block a user