vn enhancement
Greg Lee
lee at uhccux.uhcc.hawaii.edu
Thu Nov 10 03:28:59 AEST 1988
I use vn all the time. My thanks to Bob McQueer. (I couldn't
get mail to him.)
I like vn to save articles in mail-type folders, and here's a
change I've made to add a line my mail ua recognizes as a piece-of-mail
separator.
Greg, lee at uhccux.uhcc.hawaii.edu
---------
in file svart.c:
#define ADDFROMNEWS
art_xfer(fn,list,mode,msg)
char *fn, *list, *mode, *msg;
{
char *p;
FILE *fout, *fin;
int count;
char buf[RECLEN];
char *strtok();
#ifdef ADDFROMNEWS
time_t timenow, time();
char *today, *ctime();
#endif
if (Saveopen != NULL && msg != NULL)
fout = (*Saveopen)(fn,msg,&mode);
else
fout = fopen(fn,mode);
if (fout == NULL)
return (-1);
count = 0;
for (p = strtok(list,List_sep); p != NULL; p = strtok(NULL,List_sep))
{
#ifdef ADDFROMNEWS
/* add line so mail program can tell a new aritcle starts here -- gl */
timenow = time((time_t)0);
today = ctime(&timenow);
fprintf(fout,"From news %s",today);
#endif
if (Digest)
{
if (Digsaver != NULL)
{
(*Digsaver)(p,fout,count,fn,mode);
++count;
continue;
}
fin = fopen(p,"r");
if (fin == NULL)
continue;
while (fgets(buf,RECLEN-1,fin) != NULL)
fputs(buf,fout);
fclose(fin);
continue;
}
vns_asave(atoi(p),fout,count,fn,mode);
++count;
}
fclose(fout);
return(0);
}
More information about the Comp.sources.bugs
mailing list