gih900@csc.anu.oz (Geoff Huston) (12/21/89)
+-+-+-+ Beginning of part 5 +-+-+-+ X colon = strcspn(s,":"); X space = strcspn(s," \t"); X--- 455,466 ----- X if (*dateline) put_line(dateline,0); X put_line("",0); X `125 X+ else put_line(s,0); X+ colon_expected = 0; X+ `125 X+ else colon_expected = 1; X+ return; X+ `125 X `032 X colon = strcspn(s,":"); X space = strcspn(s," \t"); X************** X*** 455,476 X return; X `125 X `032 X! colon = strcspn(s,":"); X! space = strcspn(s," \t"); X!`032 X! if ((colon) && (space == (colon + 1)) && (space < i)) `123 X! if (!strncmp(s,"From:",5)) strcpy(fromline,s); X! else if (!strncmp(s,"Date:",5)) strcpy(dateline,s); X! else if (!strncmp(s,"Summary:",8)) strcpy(summline,s); X! else if (!strncmp(s,"Keywords:",9)) strcpy(keywline,s); X! else if (!strncmp(s,"Lines:",6)) `123 X! strcpy(lineline,s); X! if (!sscanf(s,"Lines: %d",&text_lines)) text_lines = 0; X! `125 X! else if (!strncmp(s,"Organization:",13)) strcpy(orgline,s + 13); X! else if (!strncmp(s,"Subj",4)) strcpy(subjline,s); X! `125 X! if (disp_h) put_line(s,0); X `125 X `012 X /* X--- 462,488 ----- X return; X `125 X `032 X! colon = strcspn(s,":"); X! space = strcspn(s," \t"); X! if ((colon) && (space == (colon + 1)) && (space < i)) `123 X! if (!strncmp(s,"From:",5)) strcpy(fromline,s); X! else if (!strncmp(s,"Date:",5)) strcpy(dateline,s); X! else if (!strncmp(s,"Summary:",8)) strcpy(summline,s); X! else if (!strncmp(s,"Keywords:",9)) strcpy(keywline,s); X! else if (!strncmp(s,"Lines:",6)) `123 X! strcpy(lineline,s); X! if (!sscanf(s,"Lines: %d",&text_lines)) text_lines = 0; X! `125 X! else if (!strncmp(s,"Organization:",13)) strcpy(orgline,s + 13); X! else if (!strncmp(s,"Subj",4)) strcpy(subjline,s); X! `125 X! else if (colon_expected) `123 X! colon_expected = 0; X! put_parse("",h,disp_h); X! put_line(s,0); X! `125 X! colon_expected = 0; X! if (disp_h) put_line(s,0); X `125 X `012 X /* X************** X*** 503,509 X `123 X char tpucallstr[256], inpline[100], X *p1; X! int line_cont = 0, i, first_loop = 0, fd, rd_body = 0, save_vd; X `032 X fdepth = 0; X if (!screen_active) printf("\n"); X--- 515,521 ----- X `123 X char tpucallstr[256], inpline[100], X *p1; V! int line_cont = 0, i, first_loop = 0, fd, rd_body = 0, save_vd, vmsmailre Xad; X `032 X fdepth = 0; X if (!screen_active) printf("\n"); X************** X*** 511,516 X news_context = 3; X rpush(curr_g,curr_i); X if (!tpucall) `123 X *subjline = *fromline = *dateline = '\0'; X *summline = *keywline = *lineline = *orgline = '\0'; X sprintf(inpline,"Group: %s, Item %d (Current Item Range #%d - #%d)", X--- 523,529 ----- X news_context = 3; X rpush(curr_g,curr_i); X if (!tpucall) `123 X+ if (ga[curr_g]->grp_ia[curr_i].itm_flags & NEWS_M_MAILITEM) --rd_body; X *subjline = *fromline = *dateline = '\0'; X *summline = *keywline = *lineline = *orgline = '\0'; X sprintf(inpline,"Group: %s, Item %d (Current Item Range #%d - #%d)", X************** X*** 556,562 X *p1 = '\0'; X `125 X `032 X! if (!rd_body) `123 X if (!line_cont) `123 X put_parse(inpline,&rd_body,h); X if (rd_body) text_cline = 0; X--- 569,575 ----- X *p1 = '\0'; X `125 X `032 X! if (rd_body < 1) `123 X if (!line_cont) `123 X put_parse(inpline,&rd_body,h); X if (rd_body > 0) text_cline = 0; X************** X*** 559,565 X if (!rd_body) `123 X if (!line_cont) `123 X put_parse(inpline,&rd_body,h); X! if (rd_body) text_cline = 0; X `125 X else if (h) put_line(inpline,0); X line_cont = next_line_cont; X--- 572,578 ----- X if (rd_body < 1) `123 X if (!line_cont) `123 X put_parse(inpline,&rd_body,h); X! if (rd_body > 0) text_cline = 0; X `125 X else if (h) put_line(inpline,0); X line_cont = next_line_cont; X************** X*** 569,575 X else put_line(inpline,0); V if ((!first_loop++) && profile_scansize > 0) fdepth = profile_scans Xize; X `125 X! if (rd_body && next_line_cont && text_lines) ++text_lines; X `125 X fclose(fp); X if (*fp_open > 1) while (!(delete(fp_open))); X--- 582,588 ----- X else put_line(inpline,0); V if ((!first_loop++) && profile_scansize > 0) fdepth = profile_scans Xize; X `125 X! if ((rd_body > 0) && next_line_cont && text_lines) ++text_lines; X `125 X fclose(fp); X if (*fp_open > 1) while (!(delete(fp_open))); $ GOSUB UNPACK_FILE $ FILE_IS = "NEWSDIST.DIFF" $ CHECKSUM_IS = 559246916 $ COPY SYS$INPUT VMS_SHARE_DUMMY.DUMMY X*** [.news_v59_src]newsdist.c X--- [.news_src]newsdist.c X************** X*** 213,218 X tolist[IO_SIZE], X *cp1, X *cp2; X sys_filter_t *fmp, *f1; X dist_entry_t *tmp, *t1 = distfile; X `032 X--- 213,219 ----- X tolist[IO_SIZE], X *cp1, X *cp2; X+ int n; X sys_filter_t *fmp, *f1; X dist_entry_t *tmp, *t1 = distfile; X `032 X************** X*** 216,223 X sys_filter_t *fmp, *f1; X dist_entry_t *tmp, *t1 = distfile; X `032 X! if (sscanf(s,"%s %s",node,tolist) != 2) return; X! cp1 = tolist; X tmp = malloc(sizeof *tmp); X strcpy((tmp->from_name = malloc(strlen(node) + 1)),node); X tmp->to_names = 0; X--- 217,228 ----- X sys_filter_t *fmp, *f1; X dist_entry_t *tmp, *t1 = distfile; X `032 X! cp1 = s;`009`009`009`009/* s is compressed, stripped string */ X! while (isgraph(*cp1)) cp1++; `009/* scan accross node word */ X! if (!*cp1) cp1 = 0; X! else *cp1++ = '\0'; `009/* and null terminate node word */ X! strcpy(node,s); V! if (!strlen(node)) return; `009`009/* handle the case of the string " " * X/ X tmp = malloc(sizeof *tmp); X strcpy((tmp->from_name = malloc(strlen(node) + 1)),node); X tmp->to_names = 0; X************** X*** 221,238 X tmp = malloc(sizeof *tmp); X strcpy((tmp->from_name = malloc(strlen(node) + 1)),node); X tmp->to_names = 0; X! do `123 X! if (cp2 = strchr(cp1,',')) *cp2++ = '\0'; X! fmp = malloc(sizeof *fmp); X! strcpy((fmp->sys_filtnam = malloc(strlen(cp1) + 1)),cp1); X! fmp->sys_fnext = 0; X! if (!tmp->to_names) tmp->to_names = f1 = fmp; X! else `123 X! f1->sys_fnext = fmp; X! f1 = fmp; X! `125 X! cp1 = cp2; X! `125 while (cp1); X tmp->next = 0; X if (!distfile) distfile = tmp; X else `123 X--- 226,250 ----- X tmp = malloc(sizeof *tmp); X strcpy((tmp->from_name = malloc(strlen(node) + 1)),node); X tmp->to_names = 0; X! if (cp1) `123 `009`009`009/* now handle following words */ X! while (cp2 = strchr(cp1,' ')) *cp2 = ','; `009/* convert ' ' -> ',' */ X! strcpy(tolist,cp1); X! cp1 = tolist; X! do `123 X! if (cp2 = strchr(cp1,',')) *cp2++ = '\0'; X! if (strlen(cp1)) `123 X! fmp = malloc(sizeof *fmp); X! strcpy((fmp->sys_filtnam = malloc(strlen(cp1) + 1)),cp1); X! fmp->sys_fnext = 0; X! if (!tmp->to_names) tmp->to_names = f1 = fmp; X! else `123 X! f1->sys_fnext = fmp; X! f1 = fmp; X! `125 X! `125 X! cp1 = cp2; X! `125 while (cp1); X! `125 X tmp->next = 0; X if (!distfile) distfile = tmp; X else `123 X************** X*** 559,565 X if (!strlen(s->sys_file)) continue; X if (test_accept(newsgroups,distribution,s->sys_f)) `123 X if (*s->sys_type == 'n') `123 X! if (fpo = fopen(s->sys_file,"a","rfm=var","rat=cr")) `123 X fprintf(fpo,"%s\n",message_id); X fclose(fpo); X `125 X--- 571,584 ----- X if (!strlen(s->sys_file)) continue; X if (test_accept(newsgroups,distribution,s->sys_f)) `123 X if (*s->sys_type == 'n') `123 X! if (!(fpo = fopen(s->sys_file,"a","rfm=var","rat=cr"))) `123 V! sleep(1); /* assume append open due to multiple write - wait a bi Xt - X! if the append still fails try to open a new version X! before giving up. */ X! if (!(fpo = fopen(s->sys_file,"a","rfm=var","rat=cr"))) X! fpo = fopen(s->sys_file,"w","rfm=var","rat=cr"); X! `125 X! if (fpo) `123 X fprintf(fpo,"%s\n",message_id); X fclose(fpo); X `125 X************** X*** 585,591 X `032 X n_char = (*(s->sys_type + 1) == 'n'); X if (*s->sys_type != 'b') X! fpo = fopen(s->sys_file,"w","rfm=var","rat=cr"); X else `123 X if (!stat(s->sys_file,&batfile_stat)) `123 V if ((batfile_stat.st_size + infile_stat.st_size) > NEWS_BATCH_S XIZE) X--- 604,610 ----- X `032 X n_char = (*(s->sys_type + 1) == 'n'); X if (*s->sys_type != 'b') V! fpo = fopen(s->sys_file,"w","rfm=var","rat=cr","alq=30","deq=30") X; X else `123 X if (!stat(s->sys_file,&batfile_stat)) `123 V if ((batfile_stat.st_size + infile_stat.st_size) > NEWS_BATCH_S XIZE) X************** X*** 589,596 X else `123 X if (!stat(s->sys_file,&batfile_stat)) `123 V if ((batfile_stat.st_size + infile_stat.st_size) > NEWS_BATCH_S XIZE) X! fpo = fopen(s->sys_file,"w","rfm=var","rat=cr"); X! else fpo = fopen(s->sys_file,"a"); X `125 X else fpo = fopen(s->sys_file,"w","rfm=var","rat=cr"); X if (!fpo) `123 X--- 608,618 ----- X else `123 X if (!stat(s->sys_file,&batfile_stat)) `123 V if ((batfile_stat.st_size + infile_stat.st_size) > NEWS_BATCH_S XIZE) V! fpo = fopen(s->sys_file,"w","rfm=var","rat=cr","alq=30","deq= X30"); X! else `123 X! if (!(fpo = fopen(s->sys_file,"a"))) V! fpo = fopen(s->sys_file,"w","rfm=var","rat=cr","alq=30","de Xq=30"); X! `125 X `125 V else fpo = fopen(s->sys_file,"w","rfm=var","rat=cr","alq=30","deq X=30"); X if (!fpo) `123 X************** X*** 592,598 X fpo = fopen(s->sys_file,"w","rfm=var","rat=cr"); X else fpo = fopen(s->sys_file,"a"); X `125 X! else fpo = fopen(s->sys_file,"w","rfm=var","rat=cr"); X if (!fpo) `123 X fclose(fpi); X continue; X--- 614,620 ----- V fpo = fopen(s->sys_file,"w","rfm=var","rat=cr","alq=30","de Xq=30"); X `125 X `125 V! else fpo = fopen(s->sys_file,"w","rfm=var","rat=cr","alq=30","deq X=30"); X if (!fpo) `123 X fclose(fpi); X continue; $ GOSUB UNPACK_FILE $ FILE_IS = "NEWSEXTERN.DIFF" $ CHECKSUM_IS = 1985495058 $ COPY SYS$INPUT VMS_SHARE_DUMMY.DUMMY X*** [.news_v59_src]newsextern.h X--- [.news_src]newsextern.h $ GOSUB UNPACK_FILE $ FILE_IS = "NEWSEXTRACT.DIFF" $ CHECKSUM_IS = 1181743897 $ COPY SYS$INPUT VMS_SHARE_DUMMY.DUMMY X*** [.news_v59_src]newsextract.c X--- [.news_src]newsextract.c X************** X*** 234,242 X `125 X if (append_ofile) fprintf(fpextract,"\f\n"); X append_ofile = 1; X! if (w_ok) sprintf(xfrbuf,"X-NEWS: %s %s: %d\n", V! news_node,ga[g]->grp_name,ga[g]->grp_ia[m].itm_nu Xm); X! fputs(xfrbuf,fpextract); X err_line(xfrbuf); X if (m_seen) item_update(g,m); X while (fgets(xfrbuf,510,fpr)) `123 X--- 234,244 ----- X `125 X if (append_ofile) fprintf(fpextract,"\f\n"); X append_ofile = 1; X! if (w_ok) `123 X! sprintf(xfrbuf,"X-NEWS: %s %s: %d\n", X! news_node,ga[g]->grp_name,ga[g]->grp_ia[m].itm_num); X! fputs(xfrbuf,fpextract); X! `125 X err_line(xfrbuf); X if (m_seen) item_update(g,m); X while (fgets(xfrbuf,510,fpr)) `123 $ GOSUB UNPACK_FILE $ FILE_IS = "NEWSFILES.DIFF" $ CHECKSUM_IS = 593120284 $ COPY SYS$INPUT VMS_SHARE_DUMMY.DUMMY X*** [.news_v59_src]newsfiles.c X--- [.news_src]newsfiles.c X************** X*** 67,72 X i->f.fab$b_org = FAB$C_SEQ; X i->f.fab$b_rat = FAB$M_CR; X i->f.fab$b_rfm = FAB$C_VAR; X i->f.fab$l_xab = &(i->p); X i->p = cc$rms_xabpro; X i->p.xab$w_pro = prot; X--- 67,75 ----- X i->f.fab$b_org = FAB$C_SEQ; X i->f.fab$b_rat = FAB$M_CR; X i->f.fab$b_rfm = FAB$C_VAR; X+ i->f.fab$l_alq = 4; X+ i->f.fab$w_deq = 32; X+ i->f.fab$l_fop `124= FAB$M_TEF; X i->f.fab$l_xab = &(i->p); X i->p = cc$rms_xabpro; X i->p.xab$w_pro = prot; X************** X*** 336,342 X `032 X ga[++ga_size] = malloc(sizeof newsgrp); X newsgrp.grp_unread = newsgrp.grp_count; X! newsgrp.grp_reg = 1; X newsgrp.grp_ia = newsgrp.grp_iasize = 0; X newsgrp.grp_iavd = newsgrp.grp_iavdsize = newsgrp.grp_iapaste = 0; X newsgrp.grp_c_itm = newsgrp.grp_reg_text = 0; X--- 339,345 ----- X `032 X ga[++ga_size] = malloc(sizeof newsgrp); X newsgrp.grp_unread = newsgrp.grp_count; X! newsgrp.grp_reg = NEWGROUP_REG; X newsgrp.grp_ia = newsgrp.grp_iasize = 0; X newsgrp.grp_iavd = newsgrp.grp_iavdsize = newsgrp.grp_iapaste = 0; X newsgrp.grp_c_itm = newsgrp.grp_reg_text = 0; $ GOSUB UNPACK_FILE $ FILE_IS = "NEWSFORWARD.DIFF" $ CHECKSUM_IS = 2105098294 $ COPY SYS$INPUT VMS_SHARE_DUMMY.DUMMY X*** [.news_v59_src]newsforward.c X--- [.news_src]newsforward.c X************** X*** 172,182 X ngroup[ngroup_len] = '\0'; X strcpy(subj,ngroup); X `032 X! /* X! if (cli$present(c$dsc("SELF")) == CLI$_PRESENT) X! sprintf(&xfrbuf[strlen(xfrbuf)],"/SELF"); X! else sprintf(&xfrbuf[strlen(xfrbuf)],"/NOSELF"); X! */ X `032 X *xfrbuf = '\0'; X if (cli$get_value(c$dsc("TO"),&ngroup_dsc,&ngroup_len) & 1) `123 X--- 172,179 ----- X ngroup[ngroup_len] = '\0'; X strcpy(subj,ngroup); X `032 X! if (cli$present(c$dsc("SELF")) == CLI$_PRESENT) mail_self_flag = 1; X! else mail_self_flag = 0; X `032 X *xfrbuf = '\0'; X if (cli$get_value(c$dsc("TO"),&ngroup_dsc,&ngroup_len) & 1) `123 X************** X*** 192,197 X else status = get_input(&ngroup_dsc,c$dsc("To: "),&ngroup_len); X if ((status == RMS$_EOF) `124`124 (status == SMG$_EOF)) `123 X while (!(delete(Mail_file))); X return(0); X `125 X ngroup[ngroup_len] = '\0'; X--- 189,195 ----- X else status = get_input(&ngroup_dsc,c$dsc("To: "),&ngroup_len); X if ((status == RMS$_EOF) `124`124 (status == SMG$_EOF)) `123 X while (!(delete(Mail_file))); X+ mail_self_flag = 0; X return(0); X `125 X ngroup[ngroup_len] = '\0'; X************** X*** 205,211 X xfrbuf[strlen(xfrbuf) - 1] = '\0'; X `032 X if ((!forward) `124`124 (cli$present(c$dsc("EDIT")) & 1)) `123 -+-+-+-+-+ End of part 5 +-+-+-+-+-