I had some ebay messages that would have a super long line included in base 64 code inside messages. When message is expanded it would contain a line that was too long from Pegasus to handle. Think Mr. Harris increased the size of buffer, so it handles longer line. Had a similar issue with an uucp gateway I wrote long long ago for Pegasus. A line isn't suppose to be longer than 998 characters, but MicroSoft Outlook would send paragraphs as a single line regardless of length. So, not being able to get MicroSoft to follow rules had to increase the buffer size to accept long lines.
With ebay messages sometimes it would include tracker code with similar super long lines. Wrote this little program at would simple remove this line from message. Would make no difference in display of message. Just tracking code.
#include <cstdio>
#include <cstring>
#include <cstdlib>
using namespace std;
int main(int argc,char* argv[])
{
FILE *fp1,*fp2;
char line[10001],rest[5001];
int x;
if((fp1=fopen(argv[1],"r"))==NULL) exit(1);
fp2=fopen("temp.xxx","w");
while(!feof(fp1))
{
fgets(line,499,fp1);
if(feof(fp1)) break;
x=strlen(line);
if(line[x-1]=='\n' && line[x-2]=='\r' && line[x-3]=='=')
{
line[strlen(line)-3]=0;
fprintf(fp2,"%s",line);
}
else
fprintf(fp2,"%s",line);
}
fclose(fp1);
fclose(fp2);
fp1=fopen("temp.xxx","r");
fp2=fopen(argv[1],"w");
while(!feof(fp1))
{
char *p1;
fgets(line,10000,fp1);
if(feof(fp1)) break;
if((p1=strstr(line,"https://rover.ebay.com/roverimp")))
{
fgets(line,10000,fp1);
while(line[0]!='<') fgets(line,10000,fp1);
}
x=strlen(line);
if(x<=1000) fprintf(fp2,"%s",line);
while(x>1000)
{
if((p1=strchr(line+1,'<')))
{
strcpy(rest,p1);
*p1=0;
fprintf(fp2,"%s\n",line);
strcpy(line,rest);
x=strlen(line);
}
if(x<1000)
{
fprintf(fp2,"%s\n",line);
break;
}
if((p1=strchr(line+4,' ')))
{
strcpy(rest,p1);
*p1=0;
fprintf(fp2,"%s\n",line);
strcpy(line,rest);
x=strlen(line);
}
if(x<1000 && x>0)
fprintf(fp2,"%s\n",line);
else
printf("%s\n",line);
}
}
fclose(fp1);
fclose(fp2);
remove("temp.xxx");
return 0;
}
I had some ebay messages that would have a super long line included in base 64 code inside messages. When message is expanded it would contain a line that was too long from Pegasus to handle. Think Mr. Harris increased the size of buffer, so it handles longer line. Had a similar issue with an uucp gateway I wrote long long ago for Pegasus. A line isn't suppose to be longer than 998 characters, but MicroSoft Outlook would send paragraphs as a single line regardless of length. So, not being able to get MicroSoft to follow rules had to increase the buffer size to accept long lines.
With ebay messages sometimes it would include tracker code with similar super long lines. Wrote this little program at would simple remove this line from message. Would make no difference in display of message. Just tracking code.
````
#include <cstdio>
#include <cstring>
#include <cstdlib>
using namespace std;
int main(int argc,char* argv[])
{
FILE *fp1,*fp2;
char line[10001],rest[5001];
int x;
if((fp1=fopen(argv[1],"r"))==NULL) exit(1);
// fp1=fopen(argv[1],"r");
fp2=fopen("temp.xxx","w");
while(!feof(fp1))
{
fgets(line,499,fp1);
if(feof(fp1)) break;
x=strlen(line);
if(line[x-1]=='\n' && line[x-2]=='\r' && line[x-3]=='=')
{
line[strlen(line)-3]=0;
fprintf(fp2,"%s",line);
}
else
fprintf(fp2,"%s",line);
}
fclose(fp1);
fclose(fp2);
fp1=fopen("temp.xxx","r");
fp2=fopen(argv[1],"w");
while(!feof(fp1))
{
char *p1;
fgets(line,10000,fp1);
if(feof(fp1)) break;
if((p1=strstr(line,"https://rover.ebay.com/roverimp")))
{
// continue;
fgets(line,10000,fp1);
while(line[0]!='<') fgets(line,10000,fp1);
}
x=strlen(line);
if(x<=1000) fprintf(fp2,"%s",line);
while(x>1000)
{
if((p1=strchr(line+1,'<')))
{
strcpy(rest,p1);
*p1=0;
fprintf(fp2,"%s\n",line);
strcpy(line,rest);
x=strlen(line);
}
if(x<1000)
{
fprintf(fp2,"%s\n",line);
break;
}
if((p1=strchr(line+4,' ')))
{
strcpy(rest,p1);
*p1=0;
fprintf(fp2,"%s\n",line);
strcpy(line,rest);
x=strlen(line);
}
if(x<1000 && x>0)
fprintf(fp2,"%s\n",line);
else
printf("%s\n",line);
}
}
fclose(fp1);
fclose(fp2);
remove("temp.xxx");
return 0;
}
````