problem in Areas file

Pablo Saratxaga (srtxg@linux.chanae.stben.be)
Fri, 1 Aug 1997 16:56:24 +0200 (MET DST)

Hello,

Someone has forwarded me a problem he has whith the Areas file;
he receives some FTN echoes which have '#' on their name...
Of course ifmail at parsing thinks it is a comment and skip all the
remaining.

That person also submitted me a patch to solve that, here it is :

--- areas.c.old Sat Apr 26 18:42:28 1997
+++ areas.c Fri Aug 1 16:47:25 1997
@@ -200,7 +200,16 @@
}
while (fgets(buf,sizeof(buf)-1,fp))
{
+#if 0 /* some comment */
if ((p=strchr(buf,'#'))) *p='\0';
+#else
+ for (p=buf;(p=strchr(p, '#'));)
+ if (p>buf && *(p-1)=='\\')
+ strcpy(p-1,p); /* discard the '\\' */
+ /* this is illegal, p-1 and p overlap */
+ else
+ *p='\0';
+#endif /* # in areatag */
p=strtok(buf," \t\n");
q=strtok(NULL," \t\n");
r=strtok(NULL," \t\n");

-- 

A bientôt, Pablo Saratxaga

~ ~ :wq ;-) PGP Key available, key ID: 0x8F0E4975 -->