[news.software.anu-news] NEWS V5.9B diff/patch 6/11

gih900@csc.anu.oz (Geoff Huston) (11/25/89)

+-+-+-+ Beginning of part 6 +-+-+-+
X      err_line("\tSummary of posting [no Summary]\n");
X--- 685,699 -----
X            stm->tm_mday,p,stm->tm_year,stm->tm_hour,stm->tm_min,stm->tm_sec,
X            news_timezone);
X    if (*ref_line) fputs(ref_line,fpw);
X+   if (crosspost) `123
X+     if (*xnewsgroups) fprintf(fpw,"XNewsgroups: %s",xnewsgroups);
X+     fprintf(fpw,"Followup-To: ");
X+     if (*followup_groups) fprintf(fpw,"%s",followup_groups);
X+     else fprintf(fpw,"%s",ngroup);
X+     if (*xfollowgroups) fprintf(",%s",xfollowgroups);
X+     else if (*xnewsgroups) fprintf(fpw,",%s",xnewsgroups);
X+     else fprintf(fpw,"\n");
X+     `125
X `032
X    if (!use_default) `123
X      err_line("\tSummary of posting [no Summary]\n");
X**************
X*** 753,762
X      if (*distribution) fprintf(fpw,"Distribution: %s\n",distribution);
X      `125
X `032
X!   if (*profile_organization)
X!     fprintf(fpw,"Organization: %s\n",profile_organization);
X!   else if (*Organisation_name)
X!     fprintf(fpw,"Organization: %s\n",Organisation_name);
X `032
X    if (!sys_local_accept(ngroup,post_dist)) `123
V      err_line("\tPost - Distribution of item not accepted by local news filt
Xer\n");
X--- 812,823 -----
X      if (*distribution) fprintf(fpw,"Distribution: %s\n",distribution);
X      `125
X `032
X!   if (!crosspost) `123
X!     if (*profile_organization)
X!       fprintf(fpw,"Organization: %s\n",profile_organization);
X!     else if (*Organisation_name)
X!       fprintf(fpw,"Organization: %s\n",Organisation_name);
X!     `125
X `032
X    if (!sys_local_accept(ngroup,post_dist)) `123
V      err_line("\tPost - Distribution of item not accepted by local news filt
Xer\n");
X**************
X*** 812,818
X      `125
X    c$cks(1);
X `032
X!   if (approval_required) fprintf(fpw,"Approved: %s\n",mod_address);
X    if (*post_address)
X      fprintf(fpw,"News-Moderator: Approval required for posting to %s\n",
X              ga[g]->grp_name);
X--- 873,880 -----
X      `125
X    c$cks(1);
X `032
X!   if (approval_required && !add_approved)`032
X!     fprintf(fpw,"Approved: %s\n",mod_address);
X    if (*post_address)
X      fprintf(fpw,"News-Moderator: Approval required for posting to %s\n",
X              ga[g]->grp_name);
X**************
X*** 816,823
X    if (*post_address)
X      fprintf(fpw,"News-Moderator: Approval required for posting to %s\n",
X              ga[g]->grp_name);
X!   fprintf(fpw,"Lines: %d\n",line_count);
X!   fprintf(fpw,"\n");
X    while (fgets(xfrbuf,510,fpr)) fputs(xfrbuf,fpw);
X    fclose(fpr);
X    fclose(fpw);
X--- 878,887 -----
X    if (*post_address)
X      fprintf(fpw,"News-Moderator: Approval required for posting to %s\n",
X              ga[g]->grp_name);
X!   if (!crosspost) `123
X!     fprintf(fpw,"Lines: %d\n",line_count);
X!     fprintf(fpw,"\n");
X!     `125
X    while (fgets(xfrbuf,510,fpr)) fputs(xfrbuf,fpw);
X    fclose(fpr);
X    fclose(fpw);
X**************
X*** 918,924
X `032
X  do_post()
X  `123
X!   return(do_posting(1));
X  `125
X  `012
X  /*
X--- 982,988 -----
X `032
X  do_post()
X  `123
X!   return(do_posting(1,0));
X  `125
X  `012
X  /*
X**************
X*** 929,935
X `032
X  do_followup()
X  `123
X!   return(do_posting(0));
X  `125
X  `012
X  /*
X--- 993,1004 -----
X `032
X  do_followup()
X  `123
X!   return(do_posting(0,0));
X! `125
X!`032
X! do_xpost()
X! `123
X!   return(do_posting(0,1));
X  `125
X  `012
X  /*
$ GOSUB UNPACK_FILE

$ FILE_IS = "NEWSRC.DIFF"
$ CHECKSUM_IS = 2063922738
$ COPY SYS$INPUT VMS_SHARE_DUMMY.DUMMY
X*** [.news_v59_src]newsrc.c
X--- [.news_src]newsrc.c
X**************
X*** 44,50
X  globalref int newscmd;
X `032
X  int profile_auto = 0,
X!     profile_scansize = -1;
X `032
X  char profile_signature[256] = `123"@"`125,
X       profile_locsignature[256] = `123"@"`125,
X--- 44,53 -----
X  globalref int newscmd;
X `032
X  int profile_auto = 0,
X!     profile_scansize = -1,
X!     profile_filter = 0,
X!     include_all_groups = 0,
X!     reorder_groups = 0;
X `032
X  char profile_signature[256] = `123"@"`125,
X       profile_locsignature[256] = `123"@"`125,
X**************
X*** 161,166
X        l_itm,
X        g = 0,
X        i,
X        new_cg;
X    GRP_PTR l_ga;
X `032
X--- 164,170 -----
X        l_itm,
X        g = 0,
X        i,
X+       ca_i = 1,
X        new_cg;
X    GRP_PTR l_ga,
X            *ca;
X**************
X*** 162,168
X        g = 0,
X        i,
X        new_cg;
X!   GRP_PTR l_ga;
X `032
X    *profile_dirstr = '\0';
X    if (!(regr = fopen(news_register,"r"))) `123
X--- 166,173 -----
X        i,
X        ca_i = 1,
X        new_cg;
X!   GRP_PTR l_ga,
X!           *ca;
X `032
X    ca = (GRP_PTR *) malloc((ga_size + 1) * (sizeof *ca));
X `032
X**************
X*** 164,169
X        new_cg;
X    GRP_PTR l_ga;
X `032
X    *profile_dirstr = '\0';
X    if (!(regr = fopen(news_register,"r"))) `123
X      FILE *fpold;
X--- 169,180 -----
X    GRP_PTR l_ga,
X            *ca;
X `032
X+   ca = (GRP_PTR *) malloc((ga_size + 1) * (sizeof *ca));
X+`032
X+   for (g = 1; g <= ga_size ; ++g) `123
X+     ga[g]->grp_flags &= `126NEWS_M_OLDGROUP;
X+     `125
X+`032
X    *profile_dirstr = '\0';
X    if (!(regr = fopen(news_register,"r","mbc=40"))) `123
X      FILE *fpold;
X**************
X*** 165,171
X    GRP_PTR l_ga;
X `032
X    *profile_dirstr = '\0';
X!   if (!(regr = fopen(news_register,"r"))) `123
X      FILE *fpold;
X      char buff[512];
X      if (fpold = fopen("SYS$LOGIN:NEWS_GROUPS.REGISTER","r")) `123
X--- 176,182 -----
X      `125
X `032
X    *profile_dirstr = '\0';
X!   if (!(regr = fopen(news_register,"r","mbc=40"))) `123
X      FILE *fpold;
X      char buff[512];
X      if (fpold = fopen("SYS$LOGIN:NEWS_GROUPS.REGISTER","r","mbc=40")) `123
X**************
X*** 168,175
X    if (!(regr = fopen(news_register,"r"))) `123
X      FILE *fpold;
X      char buff[512];
X!     if (fpold = fopen("SYS$LOGIN:NEWS_GROUPS.REGISTER","r")) `123
X!       regr = fopen(news_register,"w");
X        while (fgets(buff,512,fpold)) fputs(buff,regr);
X        fclose(fpold);
X        fclose(regr);
X--- 179,186 -----
X    if (!(regr = fopen(news_register,"r","mbc=40"))) `123
X      FILE *fpold;
X      char buff[512];
X!     if (fpold = fopen("SYS$LOGIN:NEWS_GROUPS.REGISTER","r","mbc=40")) `123
X!       regr = fopen(news_register,"w","mbc=40");
X        while (fgets(buff,512,fpold)) fputs(buff,regr);
X        fclose(fpold);
X        fclose(regr);
X**************
X*** 173,179
X        while (fgets(buff,512,fpold)) fputs(buff,regr);
X        fclose(fpold);
X        fclose(regr);
X!       if (!(regr = fopen(news_register,"r"))) return(0);
X        while (!delete("SYS$LOGIN:NEWS_GROUPS.REGISTER"));
X        `125
X      else `123
X--- 184,190 -----
X        while (fgets(buff,512,fpold)) fputs(buff,regr);
X        fclose(fpold);
X        fclose(regr);
X!       if (!(regr = fopen(news_register,"r","mbc=40"))) return(0);
X        while (!delete("SYS$LOGIN:NEWS_GROUPS.REGISTER"));
X        `125
X      else `123
X**************
X*** 178,184
X        `125
X      else `123
X        sysprv();
X!       if (!(regr = fopen("NEWS_MANAGER:NEWSRC.TEMPLATE","r"))) `123
X          nosysprv();
X          return(0);
X          `125
X--- 189,195 -----
X        `125
X      else `123
X        sysprv();
V!       if (!(regr = fopen("NEWS_MANAGER:NEWSRC.TEMPLATE","r","mbc=40"))) `12
X3
X          nosysprv();
X          return(0);
X          `125
X**************
X*** 226,231
X        `125
X      if (!(g = ga_exact_name(inline))) continue;
X      l_ga = ga[g];
V      l_ga->grp_flags `124= NEWS_M_OLDGROUP;   /* flag this newsgroup as not
X new! */
X `032
X      if (!curr_g) curr_g = g;
X--- 237,245 -----
X        `125
X      if (!(g = ga_exact_name(inline))) continue;
X      l_ga = ga[g];
X+     if (!(l_ga->grp_flags & NEWS_M_OLDGROUP)) `123
X+       if (ca_i <= ga_size) ca[ca_i++] = l_ga;
X+       `125
V      l_ga->grp_flags `124= NEWS_M_OLDGROUP;   /* flag this newsgroup as not
X new! */
X `032
X      if (!curr_g) curr_g = g;
X**************
X*** 279,284
V    if ((new_vals >= 2) && (new_cg = ga_exact_name(new_name))) curr_g = new_c
Xg;
X    set_level(1);
X `032
X    for (g = 1; g <= ga_size ; ++g) `123
X      if (ga[g]->grp_flags & NEWS_M_LOCAL)
X        add_class_member("$LOCAL",ga[g]->grp_num);
X--- 293,306 -----
V    if ((new_vals >= 2) && (new_cg = ga_exact_name(new_name))) curr_g = new_c
Xg;
X    set_level(1);
X `032
X+   if (profile_filter && !reorder_groups) `123
X+     ca_i = 1;
X+     for (g = 1; g <= ga_size ; ++g) `123
X+       if ((ga[g]->grp_flags & NEWS_M_OLDGROUP) && (ca_i <= ga_size))
X+         ca[ca_i++] = l_ga;
X+       `125
X+     `125
X+`032
X    for (g = 1; g <= ga_size ; ++g) `123
X      if (   include_all_groups
X          && !(ga[g]->grp_flags & NEWS_M_OLDGROUP)
X**************
X*** 280,285
X    set_level(1);
X `032
X    for (g = 1; g <= ga_size ; ++g) `123
X      if (ga[g]->grp_flags & NEWS_M_LOCAL)
X        add_class_member("$LOCAL",ga[g]->grp_num);
X      else
X--- 302,311 -----
X      `125
X `032
X    for (g = 1; g <= ga_size ; ++g) `123
X+     if (   include_all_groups
X+         && !(ga[g]->grp_flags & NEWS_M_OLDGROUP)
X+         && (ca_i <= ga_size))
X+       ca[ca_i++] = l_ga;
X      if (ga[g]->grp_flags & NEWS_M_LOCAL)
X        add_class_member("$LOCAL",ga[g]->grp_num);
X      else
X**************
X*** 285,290
X      else
X        add_class_member("$NET",ga[g]->grp_num);
X      `125
X    sysprv();
X    if (regr = fopen("NEWS_MANAGER:NEWS.CLASSES","r")) `123
X      char class[132], *cp, *cp2, *cp3;
X--- 311,324 -----
X      else
X        add_class_member("$NET",ga[g]->grp_num);
X      `125
X+`032
X+   if (profile_filter `124`124 reorder_groups) `123
X+     for (g = 1; g <= ga_size ; ++g) `123
X+       if (g < ca_i) ga[g] = ca[g];
X+       `125
X+     ga_size = ca_i - 1;
X+     `125
X+`032
X    sysprv();
X    if (regr = fopen("NEWS_MANAGER:NEWS.CLASSES","r")) `123
X      char class[132], *cp, *cp2, *cp3;
X**************
X*** 403,409
X    GRP_PTR l_ga;
X `032
X                          /* open a new version of the register file */
X!   if (!(regr = fopen(news_register,"w"))) `123
X      err_line("Cannot access NEWS register file");
X      return(0);
X      `125
X--- 437,443 -----
X    GRP_PTR l_ga;
X `032
X                          /* open a new version of the register file */
X!   if (!(regr = fopen(news_register,"w","mbc=40"))) `123
X      err_line("Cannot access NEWS register file");
X      return(0);
X      `125
X**************
X*** 1352,1358
X `032
X      if (!(ks + kf + kh)) ks = 1;
X      dflt = ga[curr_g]->grp_name;
X!     parse_newsgroups(newslist,dflt,1,0);
V      if (!*newslist) return(err_line("\tError: Kill - No newsgroup specified
X\n"),0);
X      if (ks) `123
X          ks = 1;
X--- 1386,1392 -----
X `032
X      if (!(ks + kf + kh)) ks = 1;
X      dflt = ga[curr_g]->grp_name;
X!     parse_newsgroups(newslist,dflt,1,0,0);
V      if (!*newslist) return(err_line("\tError: Kill - No newsgroup specified
X\n"),0);
X      if (ks) `123
X          ks = 1;
X**************
X*** 1527,1533
X          kf = c->k_itm_from;
X          kh = c->k_itm_header;
X          err_line("\tNewsgroups to which this kill filter applies\n");
X!         parse_newsgroups(newslist,kng,1,0);
X          err_line("\tSubject: line to filter (empty line if not used)\n");
V          get_input_dflt(&kt_dsc,c$dsc("Kill_Subject: "),&kt_len,(kt ? c$dsc(
Xkt) : 0),&trm);
X          nkt[kt_len] = '\0';
X--- 1561,1567 -----
X          kf = c->k_itm_from;
X          kh = c->k_itm_header;
X          err_line("\tNewsgroups to which this kill filter applies\n");
X!         parse_newsgroups(newslist,kng,1,0,0);
X          err_line("\tSubject: line to filter (empty line if not used)\n");
V          get_input_dflt(&kt_dsc,c$dsc("Kill_Subject: "),&kt_len,(kt ? c$dsc(
Xkt) : 0),&trm);
X          nkt[kt_len] = '\0';
X**************
X*** 2241,2246
X        profile_flags `124= PROFILE_CLASS;
X        strcpy(profile_classstr,&inline[6]);
X        `125
X      else if (!strncmp(inline,"EDIT=",5)) `123
X        profile_flags `124= PROFILE_EDIT;
X        strcpy(profile_editstr,&inline[5]);
X--- 2275,2288 -----
X        profile_flags `124= PROFILE_CLASS;
X        strcpy(profile_classstr,&inline[6]);
X        `125
X+     else if (!strncmp(inline,"RC-ORDER",8)) `123
X+       reorder_groups = 1;
X+       if (!profile_filter) include_all_groups = 1;
X+       `125
X+     else if (!strncmp(inline,"RC-FILTER",9)) `123
X+       profile_filter = 1;
X+       include_all_groups = 0;
X+       `125
X      else if (!strncmp(inline,"EDIT=",5)) `123
X        profile_flags `124= PROFILE_EDIT;
X        strcpy(profile_editstr,&inline[5]);
X**************
X*** 2391,2396
X          putl(profile_autostr,f);
X          putl("\n",f);
X          `125
X      if (profile_flags & PROFILE_CLASS) `123
X          putl("CLASS=",f);
X          putl(profile_classstr,f);
X--- 2433,2440 -----
X          putl(profile_autostr,f);
X          putl("\n",f);
X          `125
X+     if (reorder_groups) putl("RC-ORDER\n",f);
X+     if (profile_filter) putl("RC-FILTER\n",f);
X      if (profile_flags & PROFILE_CLASS) `123
X          putl("CLASS=",f);
X          putl(profile_classstr,f);
X**************
X*** 2521,2526
X      sprintf(err_oline,"KeyDefs File: %s",profile_keydefs);
X      put_line(err_oline,0);
X      `125
X    put_line("",1);
X    return(0);
X  `125
X--- 2565,2574 -----
X      sprintf(err_oline,"KeyDefs File: %s",profile_keydefs);
X      put_line(err_oline,0);
X      `125
X+   if (reorder_groups)`032
V+     put_line("RCOrder: Newsgroup Display ordering taken from newsrc file",0
X);
X+   if (profile_filter)
X+     put_line("RCFilter: Newsgroups Filter based on  newsrc file",0);
X    put_line("",1);
X    return(0);
X  `125
X**************
X*** 2562,2567
X        ++errs;
X        `125
X      `125
X    if ((status = cli$present(c$dsc("CLASS"))) == CLI$_NEGATED) `123
X      if (!temp) profile_flags &= `126PROFILE_CLASS;
X      `125
X--- 2610,2622 -----
X        ++errs;
X        `125
X      `125
X+`032
V+   if ((status = cli$present(c$dsc("RCORDER"))) == CLI$_NEGATED) reorder_gro
Xups = 0;
X+   else if (status & 1) reorder_groups = 1;
X+`032
V+   if ((status = cli$present(c$dsc("RCFILTER"))) == CLI$_NEGATED) profile_fi
Xlter = 0;
X+   else if (status & 1) profile_filter = 1;
X+`032
X    if ((status = cli$present(c$dsc("CLASS"))) == CLI$_NEGATED) `123
X      if (!temp) profile_flags &= `126PROFILE_CLASS;
X      `125
X**************
X*** 2849,2855
X    if (gotenv = getenv("NEWSRC")) strcpy(news_register,gotenv);
X    else if (gotenv = getenv("NEWS_REGISTER")) strcpy(news_register,gotenv);
X    else strcpy(news_register,User_file);
X!   if (!(regr = fopen(news_register,"r"))) clsfiles(0);
X    if (!(inline = fgetl(regr))) clsallfiles(0);
X    while (inline = fgetl(regr)) `123
X      if (!(cp = strchr(inline,'('))) clsallfiles(no_new_news);
X--- 2904,2910 -----
X    if (gotenv = getenv("NEWSRC")) strcpy(news_register,gotenv);
X    else if (gotenv = getenv("NEWS_REGISTER")) strcpy(news_register,gotenv);
-+-+-+-+-+ End of part 6 +-+-+-+-+-

Mats.Sundvall@bio.embnet.se (11/27/89)

Diff file 5/11 never arrived to us. Can someone repost or mail me a version.

	Thanks,

	Mats Sundvall
	University of Uppsala
	Sweden

elsen@esat.kuleuven.ac.be (11/29/89)

In article <22.257146ca@bio.embnet.se>, Mats.Sundvall@bio.embnet.se writes:
> Diff file 5/11 never arrived to us. Can someone repost or mail me a version.
> 
> 	Thanks,
> 
> 	Mats Sundvall
> 	University of Uppsala
> 	Sweden

 We didn't get that part too,so I'd be even more happy to receive a copy...

-- 


  Marc Elsen (System Manager/Software Engineer)
  Katholieke Universiteit Leuven
  Dep. E.S.A.T.
  Kard. Mercierlaan 94
  3030 HEVERLEE
  Belgium
              tel. 32(0)16220931(ext. 1080)

               EMAIL : elsen@esat.kuleuven.ac.be

                       ...!kulcs!kulesat!elsen (UUCP)
                       elsen%kulesat.uucp@blekul60 (BITNET)
                       psi%02062166012::elsen  (PSI MAIL)