gih900@csc.anu.oz (Geoff Huston) (12/21/89)
+-+-+-+ Beginning of part 11 +-+-+-+ V printf("\tWorking on %s (Served on %s::)\n",reply->grpname,reply->grpno Xde); X if (open_rem_chan(reply->grpnode,reply->nproto)) `123 X+ time(&daytime); X+ if ( (reply->grptime > daytime) X+ `124`124 (reply->grptime < 0)) X+ `009 reply->grptime = daytime - WEEK; X stm = localtime(&(reply->grptime)); X sprintf(cmd,"XUPDGROUP %s %02d%02d%02d %02d%02d%02d",reply->grpname, X `009stm->tm_year,stm->tm_mon + 1,stm->tm_mday, X************** X*** 656,662 X `009stm->tm_year,stm->tm_mon + 1,stm->tm_mday, X `009stm->tm_hour,stm->tm_min,stm->tm_sec); X if (nntp_write(cmd)) `123 X! if (wait_net_response(CLIENT_TIMER,1) == 380) `123 X tmp = reply->ids; X while (tmp) `123 X sprintf(cmd,"%s",tmp->itmid); X--- 663,674 ----- X `009stm->tm_year,stm->tm_mon + 1,stm->tm_mday, X `009stm->tm_hour,stm->tm_min,stm->tm_sec); X if (nntp_write(cmd)) `123 X! if ((resp_val = wait_net_response(CLIENT_TIMER,1)) == 480) `123 X! printf("\t\tNewsgroup not defined on server\n"); X! reply = reply->grpsnext; X! continue; X! `125 X! if (resp_val == 380) `123 X tmp = reply->ids; X while (tmp) `123 X sprintf(cmd,"%s",tmp->itmid); $ GOSUB UNPACK_FILE $ FILE_IS = "NEWSRTL.DIFF" $ CHECKSUM_IS = 1075192793 $ COPY SYS$INPUT VMS_SHARE_DUMMY.DUMMY X*** [.news_v59_src]newsrtl.c X--- [.news_src]newsrtl.c X************** X*** 405,409 X return(1); X `125 X if ((*p == '%') `124`124 (*p == '?')) return(wild_match(l+1,p+1)); X return((*l == *p) && wild_match(l+1,p+1)); X `125 X--- 405,410 ----- X return(1); X `125 X if ((*p == '%') `124`124 (*p == '?')) return(wild_match(l+1,p+1)); X+ if (*p == '`094') return((*l == *(p+1)) && wild_match(l+1,p+2)); X return((*l == *p) && wild_match(l+1,p+1)); X `125 $ GOSUB UNPACK_FILE $ FILE_IS = "NEWSSEARCH.DIFF" $ CHECKSUM_IS = 1985493570 $ COPY SYS$INPUT VMS_SHARE_DUMMY.DUMMY X*** [.news_v59_src]newssearch.c X--- [.news_src]newssearch.c $ GOSUB UNPACK_FILE $ FILE_IS = "NEWSSELECT.DIFF" $ CHECKSUM_IS = 1409864608 $ COPY SYS$INPUT VMS_SHARE_DUMMY.DUMMY X*** [.news_v59_src]newsselect.c X--- [.news_src]newsselect.c X************** X*** 30,35 X #include "newsinclude.h" X #include "newsdefine.h" X #include "newsextern.h" X `012 X /* X * selnew X--- 30,37 ----- X #include "newsinclude.h" X #include "newsdefine.h" X #include "newsextern.h" X+`032 X+ #define CLASSES 1 X `012 X /* X * selnew X************** X*** 40,46 X selnew(lev) X int lev; X `123 X! int g, `032 X mg = 0, X mp = 0; X `032 X--- 42,48 ----- X selnew(lev) X int lev; X `123 X! int g, X mg = 0, X mp = 0; X `032 X************** X*** 50,56 X return(0); X `125 X `032 X! if ((curr_g) && (ga[curr_g]->grp_reg) && (ga[curr_g]->grp_unread)) `123 X if (news_context != 1) return(do_select("%",curr_g,lev),1); X else `123 X mg = curr_g; X--- 52,66 ----- X return(0); X `125 X `032 X! if ( curr_g X! && ga[curr_g]->grp_reg X! && ga[curr_g]->grp_unread X!`032 X! #if CLASSES X! && ga[curr_g]->grp_display_indx X! #endif X! ) `123 X!`032 X if (news_context != 1) return(do_select("%",curr_g,lev),1); X else `123 X mg = curr_g; X************** X*** 58,63 X `125 X `125 X `032 X g = 1; X for (g = 1; g <= ga_size; ++g) `123 X if ((ga[g]->grp_reg > mp) && (ga[g]->grp_unread)) `123 X--- 68,74 ----- X `125 X `125 X `032 X+ no_more_news = 1; X g = 1; X for (g = 1; g <= ga_size; ++g) `123 X if (ga[g]->grp_reg && ga[g]->grp_unread) `123 X************** X*** 60,68 X `032 X g = 1; X for (g = 1; g <= ga_size; ++g) `123 X! if ((ga[g]->grp_reg > mp) && (ga[g]->grp_unread)) `123 X! mp = ga[g]->grp_reg; X! mg = g; X `125 X `125 X `032 X--- 71,86 ----- X no_more_news = 1; X g = 1; X for (g = 1; g <= ga_size; ++g) `123 X! if (ga[g]->grp_reg && ga[g]->grp_unread) `123 X! no_more_news = 0; X! if ( (ga[g]->grp_reg > mp) X! #if CLASSES X! && ga[g]->grp_display_indx X! #endif `032 X! ) `123 X! mp = ga[g]->grp_reg; X! mg = g; X! `125 X `125 X `125 X `032 X************** X*** 77,84 X if (ga[curr_g]->grp_ia[i].itm_flags & NEWS_M_UNREAD) break; X cur_set_itm(curr_g,i); X return(1); X! `125 `032 X! else no_more_news = 1; X if (!ga_size) err_line("\tSelect - NEWS has no Newsgroups\n"); X else err_line("\tSelect - No new items in registered groups\n"); X return(0); X--- 95,101 ----- X if (ga[curr_g]->grp_ia[i].itm_flags & NEWS_M_UNREAD) break; X cur_set_itm(curr_g,i); X return(1); X! `125 X if (!ga_size) err_line("\tSelect - NEWS has no Newsgroups\n"); X else err_line("\tSelect - No new items\n"); X return(0); X************** X*** 80,86 X `125 `032 X else no_more_news = 1; X if (!ga_size) err_line("\tSelect - NEWS has no Newsgroups\n"); X! else err_line("\tSelect - No new items in registered groups\n"); X return(0); X `125 X `012 X--- 97,103 ----- X return(1); X `125 X if (!ga_size) err_line("\tSelect - NEWS has no Newsgroups\n"); X! else err_line("\tSelect - No new items\n"); X return(0); X `125 X `012 X************** X*** 90,96 X int i; X unsigned int g, X m, X! gm; `032 X char tg[80], X *tag = 0; X short tag_len; X--- 107,113 ----- X int i; X unsigned int g, X m, X! gm; X char tg[80], X *tag = 0; X short tag_len; X************** X*** 222,227 X s[s_l] = '\0'; X s_to_lower(s); X if (!strcmp(s,"mail")) return(do_open_mail()); X `125 X if (cli$present(c$dsc("CLASSNAME")) & 1) return(do_set_class()); X return(do_selgrp()); X--- 239,246 ----- X s[s_l] = '\0'; X s_to_lower(s); X if (!strcmp(s,"mail")) return(do_open_mail()); X+ if (do_select(s,0,2)) selgrp_action(); X+ return(0); X `125 X if (cli$present(c$dsc("CLASSNAME")) & 1) return(do_set_class()); X return(do_selgrp()); $ GOSUB UNPACK_FILE $ FILE_IS = "NEWSSETSHOW.DIFF" $ CHECKSUM_IS = 1947356532 $ COPY SYS$INPUT VMS_SHARE_DUMMY.DUMMY X*** [.news_v59_src]newssetshow.c X--- [.news_src]newssetshow.c X************** X*** 26,32 V ** - Alter SHOW NEWSGROUP output to be similar to that of newsgroup_ Xheader() X ** - Add SET NEWSGROUP/TITLE V ** - Due to code commonality, NEWSCREATE has been included in this m Xodule X! ** - Add support for SRI Multinet TCP (Mats Sundvall) X ** V5.9 9-June-1989 GIH X ** - If ADD MEMBER modifies an existing member then the confirmation X ** message indicates alteration rather than addition. X--- 26,32 ----- V ** - Alter SHOW NEWSGROUP output to be similar to that of newsgroup_ Xheader() X ** - Add SET NEWSGROUP/TITLE V ** - Due to code commonality, NEWSCREATE has been included in this m Xodule X! ** - Add support for MULTINET Multinet TCP (Mats Sundvall) X ** V5.9 9-June-1989 GIH X ** - If ADD MEMBER modifies an existing member then the confirmation X ** message indicates alteration rather than addition. X************** X*** 159,165 X if (!len) protocol_val = 0; X else if (!strncmp(tmpstr,"CMUTCP",len)) protocol_val= 1; X else if (!strncmp(tmpstr,"WINTCP",len)) protocol_val = 2; X! else if (!strncmp(tmpstr,"SRITCP",len)) protocol_val = 3; X else if (!strncmp(tmpstr,"TCP",len)) X `032 X #ifdef SRI X--- 159,165 ----- X if (!len) protocol_val = 0; X else if (!strncmp(tmpstr,"CMUTCP",len)) protocol_val= 1; X else if (!strncmp(tmpstr,"WINTCP",len)) protocol_val = 2; X! else if (!strncmp(tmpstr,"MULTINETTCP",len)) protocol_val = 3; X else if (!strncmp(tmpstr,"TCP",len)) X `032 X #ifdef MULTINET X************** X*** 162,168 X else if (!strncmp(tmpstr,"SRITCP",len)) protocol_val = 3; X else if (!strncmp(tmpstr,"TCP",len)) X `032 X! #ifdef SRI X protocol_val = 3; X #else X #ifdef TWG X--- 162,168 ----- X else if (!strncmp(tmpstr,"MULTINETTCP",len)) protocol_val = 3; X else if (!strncmp(tmpstr,"TCP",len)) X `032 X! #ifdef MULTINET X protocol_val = 3; X #else X #ifdef TWG X************** X*** 1205,1213 X check_access(g) X int g; X `123 X! char acline[256], cknode[132], mod[132], X! *cp, *ap, *op; X! FILE *fpd; X `032 X ga[g]->grp_flags `124= NEWS_M_ACCESS_CHECKED; X if (ga[g]->grp_flags & NEWS_M_MAILMODERATE) `123 X--- 1205,1213 ----- X check_access(g) X int g; X `123 X! char acline[256], cknode[132], mod[132], X! *cp, *ap, *op; X! FILE *fpd; X `032 X ga[g]->grp_flags `124= NEWS_M_ACCESS_CHECKED; X if (ga[g]->grp_flags & NEWS_M_MAILMODERATE) `123 X************** X*** 1209,1221 X *cp, *ap, *op; X FILE *fpd; X `032 X! ga[g]->grp_flags `124= NEWS_M_ACCESS_CHECKED; X! if (ga[g]->grp_flags & NEWS_M_MAILMODERATE) `123 X! sprintf(mod,"%s@%s",usr_username,Node_address); X! if (!strcmp(mod,moderator_address(ga[g]->grp_name))) `123 V! ga[g]->grp_flags `124= (NEWS_M_MOD_USER `124 NEWS_M_WRITE_ACCES XS); X! return; X! `125 X `125 V if (!(ga[g]->grp_flags & NEWS_M_NOWRITE_SET)) ga[g]->grp_flags `124= N XEWS_M_WRITE_ACCESS; X sprintf(itm_fname,Access_template,util_dir(ga[g]->grp_name)); X--- 1209,1246 ----- X *cp, *ap, *op; X FILE *fpd; X `032 X! ga[g]->grp_flags `124= NEWS_M_ACCESS_CHECKED; X! if (ga[g]->grp_flags & NEWS_M_MAILMODERATE) `123 X! sprintf(mod,"%s@%s",usr_username,Node_address); X! if (!strcmp(mod,moderator_address(ga[g]->grp_name))) `123 X! ga[g]->grp_flags `124= (NEWS_M_MOD_USER `124 NEWS_M_WRITE_ACCESS); X! return; X! `125 X! `125 X! if (!(ga[g]->grp_flags & NEWS_M_NOWRITE_SET)) X! ga[g]->grp_flags `124= NEWS_M_WRITE_ACCESS; X! sprintf(itm_fname,Access_template,util_dir(ga[g]->grp_name)); X! sysprv(); X! if (fpd = fopen(itm_fname,"r")) `123 X! while (fgets(acline,256,fpd)) `123 X! if (*acline == '#') continue; X! if (cp = strchr(acline,'\n')) *cp = ' '; X! s_to_lower(acline); X! if (cp = strchr(acline,' ')) *cp = '\0'; X! if (ap = strchr(acline,'@')) *ap = '\0'; X! if (op = strchr(acline,':')) *op = '\0'; X! if ( !strcmp(acline,usr_username) X! `124`124 wild_match(usr_username,acline) X! `124`124 idmatch(acline)) `123 X! if (cp) *cp = ' '; X! if (ap) *ap = '@'; X! if (strchr(acline,'@')) `123 X! sprintf(cknode,"@%s ",news_node); X! if (!substrcmp(cp,cknode)) continue; X! `125 V! if (substrcmp(cp," write ")) ga[g]->grp_flags `124= NEWS_M_WRITE_AC XCESS; V! if (substrcmp(cp," nowrite ")) ga[g]->grp_flags &= `126NEWS_M_WRITE X_ACCESS; V! if (substrcmp(cp," moderate ")) ga[g]->grp_flags `124= (NEWS_M_MOD_ XUSER `124 NEWS_M_WRITE_ACCESS); X `125 X `125 X fclose(fpd); X************** X*** 1217,1248 X return; X `125 X `125 V! if (!(ga[g]->grp_flags & NEWS_M_NOWRITE_SET)) ga[g]->grp_flags `124= N XEWS_M_WRITE_ACCESS; X! sprintf(itm_fname,Access_template,util_dir(ga[g]->grp_name)); X! sysprv(); X! if (fpd = fopen(itm_fname,"r")) `123 X! while (fgets(acline,256,fpd)) `123 X! if (*acline == '#') continue; X! if (cp = strchr(acline,'\n')) *cp = ' '; X! s_to_lower(acline); X! if (cp = strchr(acline,' ')) *cp = '\0'; X! if (ap = strchr(acline,'@')) *ap = '\0'; X! if (op = strchr(acline,':')) *op = '\0'; V! if (!strcmp(acline,usr_username) `124`124 wild_match(usr_userna Xme,acline) `124`124 idmatch(acline)) `123 X! if (cp) *cp = ' '; X! if (ap) *ap = '@'; X! if (strchr(acline,'@')) `123 X! sprintf(cknode,"@%s ",news_node); X! if (!substrcmp(cp,cknode)) continue; X! `125 V! if (substrcmp(cp," write ")) ga[g]->grp_flags `124= NEWS_M_ XWRITE_ACCESS; V! if (substrcmp(cp," nowrite ")) ga[g]->grp_flags &= `126NEWS X_M_WRITE_ACCESS; V! if (substrcmp(cp," moderate ")) ga[g]->grp_flags `124= (NEW XS_M_MOD_USER `124 NEWS_M_WRITE_ACCESS); X! `125 X! `125 X! fclose(fpd); X! `125 X! nosysprv(); X `125 X `012 X do_set_mod() X--- 1242,1251 ----- V if (substrcmp(cp," nowrite ")) ga[g]->grp_flags &= `126NEWS_M_WRITE X_ACCESS; V if (substrcmp(cp," moderate ")) ga[g]->grp_flags `124= (NEWS_M_MOD_ XUSER `124 NEWS_M_WRITE_ACCESS); X `125 X! `125 X! fclose(fpd); X! `125 X! nosysprv(); X `125 X `012 X do_set_mod() X************** X*** 1371,1377 X ga[0]->grp_itmlife); X `125 X if (!*hold) `123 X! if (ga[0]->grp_life == 65535) strcpy(hold,"[Permanent (Default)"); X else if (ga[0]->grp_life) sprintf(hold,"%u days (Default)", X ga[0]->grp_life); X hold_val = ga[0]->grp_life; X--- 1374,1380 ----- X ga[0]->grp_itmlife); X `125 X if (!*hold) `123 X! if (ga[0]->grp_life == 65535) strcpy(hold,"[Permanent (Default)]"); X else if (ga[0]->grp_life) sprintf(hold,"%u days (Default)", X ga[0]->grp_life); X hold_val = ga[0]->grp_life; X************** X*** 1425,1431 X `032 X if (ga[g]->grp_srvproto == 1) put_line("NNTP-Transport: TCP (CMU)",0); V else if (ga[g]->grp_srvproto == 2) put_line("NNTP-Transport: TCP (WIN) X",0); V! else if (ga[g]->grp_srvproto == 3) put_line("NNTP-Transport: TCP (SRI) X",0); X else put_line("NNTP-Transport: DECnet",0); X if (!(ga[g]->grp_flags & NEWS_M_NNTPCACHE)) X put_line("NNTP-Local-Note-Cache: Disabled",0); X--- 1428,1434 ----- X `032 X if (ga[g]->grp_srvproto == 1) put_line("NNTP-Transport: TCP (CMU)",0); V else if (ga[g]->grp_srvproto == 2) put_line("NNTP-Transport: TCP (WIN) X",0); V! else if (ga[g]->grp_srvproto == 3) put_line("NNTP-Transport: TCP (MULT XINET)",0); X else put_line("NNTP-Transport: DECnet",0); X if (!(ga[g]->grp_flags & NEWS_M_NNTPCACHE)) X put_line("NNTP-Local-Note-Cache: Disabled",0); X************** X*** 1514,1520 X old_lev = news_context; X `032 X if (upd_client) strcpy(s,"*"); X! else parse_newsgroups(s,"",0,0); -+-+-+-+-+ End of part 11 +-+-+-+-+-