[news.software.anu-news] NEWS V5.9C diff 04/21

gih900@csc.anu.oz (Geoff Huston) (12/21/89)

+-+-+-+ Beginning of part 4 +-+-+-+
X*** 862,868
X      routine do_post
X      parameter   P1,         label=INFILE,value(type=$infile)
X      qualifier   EDIT,       negatable,default
X!     qualifier   CONTROL,    negatable
X      qualifier   HEADERS,    negatable
X      qualifier   NEWSGROUPS, nonnegatable, value(required,list)
X      qualifier   SUBJECT,    nonnegatable, value(required)
X--- 861,867 -----
X      routine do_post
X      parameter   P1,         label=INFILE,value(type=$infile)
X      qualifier   EDIT,       negatable,default
X!     qualifier   CONTROL,    value, nonnegatable
X      qualifier   HEADERS,    negatable
X      qualifier   NEWSGROUPS, nonnegatable, value(required,list)
X      qualifier   SUBJECT,    nonnegatable, value(required)
X**************
X*** 938,943
X      qualifier   IDENTIFIER, value,nonnegatable
X      qualifier   MARKER,     value,nonnegatable
X      qualifier   FOLLOWUP,   value,nonnegatable
V      disallow    any2(PREV,BACK,NEXT,LAST,PARENT,TOPIC,IDENTIFIER,MARKER,FOL
XLOWUP)
X `032
X  define verb REFRESH
X--- 937,944 -----
X      qualifier   IDENTIFIER, value,nonnegatable
X      qualifier   MARKER,     value,nonnegatable
X      qualifier   FOLLOWUP,   value,nonnegatable
X+     qualifier   SUBJECT     value,nonnegatable
X+     qualifier   TITLE       value,nonnegatable
V      disallow    any2(PREV,BACK,NEXT,LAST,PARENT,TOPIC,IDENTIFIER,MARKER,FOL
XLOWUP)
X `032
X  define verb REFRESH
$ GOSUB UNPACK_FILE

$ FILE_IS = "NEWSDEFINE.DIFF"
$ CHECKSUM_IS = 1610839846
$ COPY SYS$INPUT VMS_SHARE_DUMMY.DUMMY
X*** [.news_v59_src]newsdefine.h
X--- [.news_src]newsdefine.h
X**************
X*** 46,51
X  #define DIR_DATE        1
X  #define DIR_NEW         2
X  #define DIR_REGISTER    3
X `032
X  #define HELP_FILE       "NEWS_ROOT:NEWS.HLB"
X `032
X--- 46,52 -----
X  #define DIR_DATE        1
X  #define DIR_NEW         2
X  #define DIR_REGISTER    3
X+ #define DIR_UNREGISTER  4
X `032
X  #define HELP_FILE       "NEWS_ROOT:NEWS.HLB"
X `032
X**************
X*** 71,77
X  #define Access_template "NEWS_DEVICE:[%s]ACCESS.NEWS"
X  #define News_ini        "NEWS_INI"
X `032
X! #define DISP_BUF_SIZE   500
X `032
X  #define IDLEN           60
X  #define SUBJLEN 50                  /* max length of newsgroup name */
X--- 72,78 -----
X  #define Access_template "NEWS_DEVICE:[%s]ACCESS.NEWS"
X  #define News_ini        "NEWS_INI"
X `032
X! #define DISP_BUF_SIZE   700
X `032
X  #define IDLEN           60
X  #define SUBJLEN 50                  /* max length of newsgroup name */
$ GOSUB UNPACK_FILE

$ FILE_IS = "NEWSDELETE.DIFF"
$ CHECKSUM_IS = 1734932688
$ COPY SYS$INPUT VMS_SHARE_DUMMY.DUMMY
X*** [.news_v59_src]newsdelete.c
X--- [.news_src]newsdelete.c
X**************
X*** 928,939
X  `123
X    int cur_time;
X    char inpline[256],
X!        mail_from[132],
X!        mail_groups[132],
X!        mail_dist[132],
X!        mail_id[132],
X!        post_path[132],
X!        post_dist[132],
X         loc_id[IDLEN],
X         id[132],
X         ngroup[132],
X--- 928,940 -----
X  `123
X    int cur_time;
X    char inpline[256],
X!        mail_from[256],
X!        mail_cfrom[256],
X!        mail_groups[256],
X!        mail_dist[256],
X!        mail_id[256],
X!        post_path[256],
X!        post_dist[256],
X         loc_id[IDLEN],
X         id[256],
X         ngroup[256],
X**************
X*** 935,942
X         post_path[132],
X         post_dist[132],
X         loc_id[IDLEN],
X!        id[132],
X!        ngroup[132],
X         *p,
X         *m_a;
X    struct tm *stm;
X--- 936,943 -----
X         post_path[256],
X         post_dist[256],
X         loc_id[IDLEN],
X!        id[256],
X!        ngroup[256],
X         *p,
X         *m_a;
X    struct tm *stm;
X**************
X*** 977,983
X      return(0);
X      `125
X `032
X!   s_to_lower(mail_from);
X    m_a = moderator_address(ga[curr_g]->grp_name);
X    s_to_lower(m_a);
X    sprintf(inpline,"%s@%s",mail_sig,Node_address);
X--- 978,985 -----
X      return(0);
X      `125
X `032
X!   strcpy(mail_cfrom,mail_from);
X!   s_to_lower(mail_cfrom);
X    m_a = moderator_address(ga[curr_g]->grp_name);
X    s_to_lower(m_a);
X    strcpy(inpline,mail_sig);
X**************
X*** 980,986
X    s_to_lower(mail_from);
X    m_a = moderator_address(ga[curr_g]->grp_name);
X    s_to_lower(m_a);
X!   sprintf(inpline,"%s@%s",mail_sig,Node_address);
X    s_to_lower(inpline);
X    if (strcmp(inpline,m_a)) `123
X      sprintf(inpline,"*%s@%s*\n",usr_username,Node_address);
X--- 982,988 -----
X    s_to_lower(mail_cfrom);
X    m_a = moderator_address(ga[curr_g]->grp_name);
X    s_to_lower(m_a);
X!   strcpy(inpline,mail_sig);
X    s_to_lower(inpline);
X    if (strcmp(inpline,m_a)) `123
X      sprintf(inpline,"*%s@%s*\n",usr_username,Node_address);
X**************
X*** 985,991
X    if (strcmp(inpline,m_a)) `123
X      sprintf(inpline,"*%s@%s*\n",usr_username,Node_address);
X      s_to_lower(inpline);
X!     if (!(wild_match(mail_from,inpline))) `123
X        sprintf(inpline,"%s@%s",usr_username,Node_address);
X        s_to_lower(inpline);
X        if (!(wild_match(mail_from,inpline))) `123
X--- 987,993 -----
X    if (strcmp(inpline,m_a)) `123
X      sprintf(inpline,"*%s@%s*\n",usr_username,Node_address);
X      s_to_lower(inpline);
X!     if (!(wild_match(mail_cfrom,inpline))) `123
X        sprintf(inpline,"%s@%s",usr_username,Node_address);
X        s_to_lower(inpline);
X        if (!(wild_match(mail_cfrom,inpline))) `123
X**************
X*** 988,994
X      if (!(wild_match(mail_from,inpline))) `123
X        sprintf(inpline,"%s@%s",usr_username,Node_address);
X        s_to_lower(inpline);
X!       if (!(wild_match(mail_from,inpline))) `123
X          if (no_priv() && !(ga[curr_g]->grp_flags & NEWS_M_MOD_ACCESS)) `123
V            err_line("\Error: Cancel - Only original poster may cancel items\
Xn");
X   `009  return(0);
X--- 990,996 -----
X      if (!(wild_match(mail_cfrom,inpline))) `123
X        sprintf(inpline,"%s@%s",usr_username,Node_address);
X        s_to_lower(inpline);
X!       if (!(wild_match(mail_cfrom,inpline))) `123
X          if (no_priv() && !(ga[curr_g]->grp_flags & NEWS_M_MOD_ACCESS)) `123
V            err_line("\Error: Cancel - Only original poster may cancel items\
Xn");
X   `009  return(0);
X**************
X*** 996,1002
X          else `123
X            sprintf(inpline,"*@%s*\n",Node_address);
X            s_to_lower(inpline);
X!           if (!(wild_match(mail_from,inpline))) `123
V              err_line("\Error: Cancel - Item was not posted from this node\n
X");
X              return(0);
X              `125
X--- 998,1004 -----
X          else `123
X            sprintf(inpline,"*@%s*\n",Node_address);
X            s_to_lower(inpline);
X!           if (!(wild_match(mail_cfrom,inpline))) `123
V              err_line("\Error: Cancel - Item was not posted from this node\n
X");
X              return(0);
X              `125
X**************
X*** 1010,1015
X    if (status == RMS$_EOF) return(0);
V    if ((status & 1) && (response_length) && (tolower(*response) == 'y')) `12
X3
X      if (fp = fopen(Post_file,"w")) `123
X        fprintf(fp,"Path: %s!%s\n",news_node,usr_username);
X        sprintf(post_path," %s!%s",news_node,usr_username);
X        fprintf(fp,mail_from);
X--- 1012,1020 -----
X    if (status == RMS$_EOF) return(0);
V    if ((status & 1) && (response_length) && (tolower(*response) == 'y')) `12
X3
X      if (fp = fopen(Post_file,"w")) `123
X+       int cre_grp[2];
X+       char subj_line[132];
X+`032
X        fprintf(fp,"Path: %s!%s\n",news_node,usr_username);
X        sprintf(post_path," %s!%s",news_node,usr_username);
X        fprintf(fp,mail_from);
X**************
X*** 1016,1021
X        sscanf(mail_groups,"Newsgroups: %s",ngroup);
X        fprintf(fp,mail_groups);
X        fprintf(fp,"Subject: cancel %s\n",id);
X        strcpy(loc_id,gen_id());
X        fprintf(fp,"Message-ID: %s\n",loc_id);
X        time(&cur_time);
X--- 1021,1027 -----
X        sscanf(mail_groups,"Newsgroups: %s",ngroup);
X        fprintf(fp,mail_groups);
X        fprintf(fp,"Subject: cancel %s\n",id);
X+       sprintf(subj_line,"cancel %s",id);
X        strcpy(loc_id,gen_id());
X        fprintf(fp,"Message-ID: %s\n",loc_id);
X        time(&cur_time);
X**************
X*** 1034,1040
X          `125
X        fprintf(fp,"Lines: 1\n\ncancel %s\n",id);
X        fclose(fp);
X!`032
X        sys_remote_send(post_path,ngroup,post_dist,Post_file,loc_id,0);
X        while (!(delete(Post_file)));
X        `125
X--- 1040,1047 -----
X          `125
X        fprintf(fp,"Lines: 1\n\ncancel %s\n",id);
X        fclose(fp);
X!       do_new_group("control",0,cre_grp);
V!       if (cre_grp[0]) do_new_item(cre_grp,loc_id,subj_line,Post_file,1,1,1)
X;
X        sys_remote_send(post_path,ngroup,post_dist,Post_file,loc_id,0);
X        while (!(delete(Post_file)));
X        `125
$ GOSUB UNPACK_FILE

$ FILE_IS = "NEWSDIR.DIFF"
$ CHECKSUM_IS = 124604378
$ COPY SYS$INPUT VMS_SHARE_DUMMY.DUMMY
X*** [.news_v59_src]newsdir.c
X--- [.news_src]newsdir.c
X**************
X*** 141,146
X          case DIR_REGISTER:
X              put_line("NEWS - Directory of Registered Newsgroups",0);
X              break;
X          `125
X      put_line(class_name(),0);
V      sprintf(err_oline,"  Number %-*.*s     Count  Unread",SUBJLEN,SUBJLEN,"
XGroup");
X--- 141,149 -----
X          case DIR_REGISTER:
X              put_line("NEWS - Directory of Registered Newsgroups",0);
X              break;
X+         case DIR_UNREGISTER:
X+             put_line("NEWS - Directory of UNRegistered Newsgroups",0);
X+             break;
X          `125
X      put_line(class_name(),0);
V      sprintf(err_oline,"  Number %-*.*s     Count  Unread",SUBJLEN,SUBJLEN,"
XGroup");
X**************
X*** 215,220
X        `125
X      else if (cli$present(c$dsc("NEW")) == CLI$_PRESENT) dir_type = DIR_NEW;
V      else if (cli$present(c$dsc("REGISTER")) == CLI$_PRESENT) dir_type = DIR
X_REGISTER;
X      else if (!class_len) `123
X        force_recalc = 0;
X        dir_type = cur_dir_type;
X--- 218,225 -----
X        `125
X      else if (cli$present(c$dsc("NEW")) == CLI$_PRESENT) dir_type = DIR_NEW;
V      else if (cli$present(c$dsc("REGISTER")) == CLI$_PRESENT) dir_type = DIR
X_REGISTER;
X+     else if (cli$present(c$dsc("UNREGISTERED")) == CLI$_PRESENT)
X+       dir_type = DIR_UNREGISTER;
X      else if (!class_len) `123
X        force_recalc = 0;
X        dir_type = cur_dir_type;
X**************
X*** 256,261
X          break;
X        case DIR_REGISTER:
X          incl_grp = (ga[gindx]->grp_reg);
X          break;
X        `125
X      if (incl_grp && class_check(gindx)) `123
X--- 261,269 -----
X          break;
X        case DIR_REGISTER:
X          incl_grp = (ga[gindx]->grp_reg);
X+         break;
X+       case DIR_UNREGISTER:
X+         incl_grp = (ga[gindx]->grp_reg == 0);
X          break;
X        `125
X      if (incl_grp && class_check(gindx)) `123
$ GOSUB UNPACK_FILE

$ FILE_IS = "NEWSDISPLAY.DIFF"
$ CHECKSUM_IS = 186376220
$ COPY SYS$INPUT VMS_SHARE_DUMMY.DUMMY
X*** [.news_v59_src]newsdisplay.c
X--- [.news_src]newsdisplay.c
X**************
X*** 278,284
X            strcpy(resp,"10000");
X            trm = SMG$K_TRM_DOWN;
X            `125
V!         else if (!strncmp(resp,"top",min(3,strlen(resp))) && (*(resp + 1) =
X= 'o')) `123
X            strcpy(resp,"10000");
X            trm = SMG$K_TRM_UP;
X            `125
X--- 278,286 -----
X            strcpy(resp,"10000");
X            trm = SMG$K_TRM_DOWN;
X            `125
X!         else if (   !strncmp(resp,"top",min(3,strlen(resp)))
X!                  && (*(resp + 1) == 'o')
X!                  && (strlen(resp) <= 3)) `123
X            strcpy(resp,"10000");
X            trm = SMG$K_TRM_UP;
X            `125
X**************
X*** 423,428
X   *  Perform a simple parse of the mail line, remove header lines
X   */
X `032
X  static put_parse(s,h,disp_h)
X      char *s;
X      int *h,
X--- 425,432 -----
X   *  Perform a simple parse of the mail line, remove header lines
X   */
X `032
X+ static int colon_expected = 0;
X+`032
X  static put_parse(s,h,disp_h)
X    char *s;
X    int *h,
X**************
X*** 424,432
X   */
X `032
X  static put_parse(s,h,disp_h)
X!     char *s;
X!     int *h,
X!         disp_h;
X  `123
X      int i = strlen(s),
X          colon,
X--- 428,436 -----
X  static int colon_expected = 0;
X `032
X  static put_parse(s,h,disp_h)
X!   char *s;
X!   int *h,
X!       disp_h;
X  `123
X    int i = strlen(s),
X        colon,
X**************
X*** 428,436
X      int *h,
X          disp_h;
X  `123
X!     int i = strlen(s),
X!         colon,
X!         space;
X `032
X      if ((!i) `124`124 (strspn(s," \t\r") == i)) `123
X          if (!disp_h) `123
X--- 432,440 -----
X    int *h,
X        disp_h;
X  `123
X!   int i = strlen(s),
X!       colon,
X!       space;
X `032
X    if ((!i) `124`124 (strspn(s," \t\r") == i)) `123
X      if (++(*h)) `123
X**************
X*** 432,454
X          colon,
X          space;
X `032
X!     if ((!i) `124`124 (strspn(s," \t\r") == i)) `123
X!         if (!disp_h) `123
X!             if (*subjline) put_line(subjline,0);
X!             if (*fromline) `123
X!                 if (*orgline) `123
X!                     strcat(fromline,",");
X!                     strcat(fromline,orgline);
X!                     `125
X!                 put_line(fromline,0);
X!                 `125
X!             if (!screen_active) put_line("",0);
X!             end_header();
X!             if (*summline) put_line(summline,0);
X!             if (*keywline) put_line(keywline,0);
X!             if (*markline) put_line(markline,0);
X!             if (*dateline) put_line(dateline,0);
X!             put_line("",0);
X              `125
X          else put_line(s,0);
X          *h = 1;
X--- 436,449 -----
X        colon,
X        space;
X `032
X!   if ((!i) `124`124 (strspn(s," \t\r") == i)) `123
X!     if (++(*h)) `123
X!       if (!disp_h) `123
X!         if (*subjline) put_line(subjline,0);
X!         if (*fromline) `123
X!           if (*orgline) `123
X!             strcat(fromline,",");
X!             strcat(fromline,orgline);
X              `125
X            put_line(fromline,0);
X            `125
X**************
X*** 450,458
X              if (*dateline) put_line(dateline,0);
X              put_line("",0);
X              `125
X!         else put_line(s,0);
X!         *h = 1;
X!         return;
X          `125
X `032
X      colon = strcspn(s,":");
X--- 445,459 -----
X              strcat(fromline,",");
X              strcat(fromline,orgline);
X              `125
X!           put_line(fromline,0);
X!           `125
X!         if (!screen_active) put_line("",0);
X!         end_header();
X!         if (*summline) put_line(summline,0);
X!         if (*keywline) put_line(keywline,0);
X!         if (*markline) put_line(markline,0);
X!         if (*dateline) put_line(dateline,0);
X!         put_line("",0);
X          `125
X        else put_line(s,0);
X        colon_expected = 0;
X**************
X*** 454,459
X          *h = 1;
X          return;
X          `125
X `032
-+-+-+-+-+ End of part 4 +-+-+-+-+-