gih900@csc.anu.oz (Geoff Huston) (12/21/89)
+-+-+-+ Beginning of part 10 +-+-+-+ V! if (cli$present(c$dsc("FOLLOWUP")) & 1) return(do_readfollow(h,rot13,(cli X$present(c$dsc("NEW")) & 1)),0); X! if (cli$present(c$dsc("SUBJECT")) & 1) `123 X! if ( (cli$get_value(c$dsc("SUBJECT"),&item_dsc,&item_len) & 1) V! `124`124 (get_input_dflt(&item_dsc,c$dsc("Read/Subject="),&item_len X,c$dsc(subj),0) & 1)) `123 X! item[item_len] = '\0'; X! strcpy(subj,item); V! if (item_len) readtitle(h,rot13,subj,(cli$present(c$dsc("NEW")) & 1)) X; X! `125 X! return(0); X! `125 X! if (cli$present(c$dsc("TITLE")) & 1) `123 X! if ( (cli$get_value(c$dsc("TITLE"),&item_dsc,&item_len) & 1) V! && (get_input_dflt(&item_dsc,c$dsc("Read/Title="),&item_len,c$dsc(s Xubj),0) & 1)) `123 X! subj[item_len] = '\0'; X! strcpy(subj,item); V! if (item_len) readtitle(h,rot13,subj,(cli$present(c$dsc("NEW")) & 1)) X; X! `125 X! return(0); X! `125 X! if (cli$present(c$dsc("NEW")) & 1) return(do_readnew(h,rot13,0),0); V! if (cli$present(c$dsc("NEXT")) & 1) return(do_readnext(h,rot13,tpucall),0 X); X! if (cli$present(c$dsc("PARENT")) & 1) return(do_readparent(h,rot13),0); V! if (cli$present(c$dsc("TOPIC")) & 1) return(do_readancestor(h,rot13,tpuca Xll),0); V! if (cli$present(c$dsc("IDENTIFIER")) & 1) return(do_readident(h,rot13),0) X; X! if (cli$present(c$dsc("MARKER")) & 1) return(do_readmark(h,rot13),0); X! if (cli$present(c$dsc("PREV")) & 1) return(do_readprev(h,rot13),0); V! if ((cli$present(c$dsc("LAST")) & 1) `124`124 (cli$present(c$dsc("BACK")) X & 1)) `123 X! if ((news_context > 1) && curr_g && (curr_i > 0)) `123 X! if (cur_up_itm(curr_g,1,0) == 1) `123 X item_update(curr_g,curr_i); X do_display(h,tpucall,rot13); X `125 X************** X*** 782,787 X item_update(curr_g,curr_i); X do_display(h,tpucall,rot13); X `125 X return(0); X `125 X `012 X--- 829,835 ----- X item_update(curr_g,curr_i); X do_display(h,tpucall,rot13); X `125 X+ `125 X return(0); X `125 V if (cli$get_value(c$dsc("NEWSITEM"),&item_dsc,&item_len) != CLI$_ABSENT) X `123 X************** X*** 783,788 X do_display(h,tpucall,rot13); X `125 X return(0); X `125 X `012 X /* X--- 831,848 ----- X `125 X `125 X return(0); X+ `125 V+ if (cli$get_value(c$dsc("NEWSITEM"),&item_dsc,&item_len) != CLI$_ABSENT) X `123 X+ if (curr_g) `123 X+ item[item_len] = '\0'; X+ do_readfind(item,h,rot13); X+ `125 X+ `125 X+ else if ((curr_g) && (curr_i > 0) && (news_context > 1)) `123 X+ item_update(curr_g,curr_i); X+ do_display(h,tpucall,rot13); X+ `125 X+ return(0); X `125 X `012 X /* X************** X*** 869,876 X `012 X do_back_note() X `123 X! int h = 0, X! rot13 = 0; X `032 X tpucall = 0; X if (cli$present(c$dsc("HEADER")) & 1) h = 1; X--- 929,936 ----- X `012 X do_back_note() X `123 X! int h = 0, X! rot13 = 0; X `032 X tpucall = 0; X if (cli$present(c$dsc("HEADER")) & 1) h = 1; X************** X*** 872,891 X int h = 0, X rot13 = 0; X `032 X! tpucall = 0; X! if (cli$present(c$dsc("HEADER")) & 1) h = 1; X! if (cli$present(c$dsc("TPU")) & 1) tpucall = 1; X! if (cli$present(c$dsc("EDITOR")) & 1) tpucall = 1; X! else if (cli$present(c$dsc("ROT13")) & 1) rot13 = 1; X! if ((news_context > 1) && curr_g && (curr_i > 0)) `123 X! if (cur_up_itm(curr_g,1,0) == 1) `123 X! item_update(curr_g,curr_i); X! do_display(h,tpucall,rot13); X! `125 X! else err_line("\tBACK: No previous item\n"); X! `125 X! else err_line("\tBACK: No newsgroup open\n"); X! return(0); X `125 X `032 X do_back_reply() X--- 932,951 ----- X int h = 0, X rot13 = 0; X `032 X! tpucall = 0; X! if (cli$present(c$dsc("HEADER")) & 1) h = 1; X! if (cli$present(c$dsc("TPU")) & 1) tpucall = 1; X! if (cli$present(c$dsc("EDITOR")) & 1) tpucall = 1; X! else if (cli$present(c$dsc("ROT13")) & 1) rot13 = 1; X! if ((news_context > 1) && curr_g && (curr_i > 0)) `123 X! if (cur_up_itm(curr_g,1,0) == 1) `123 X! item_update(curr_g,curr_i); X! do_display(h,tpucall,rot13); X! `125 X! else err_line("\tBACK: No previous item\n"); X! `125 X! else err_line("\tBACK: No newsgroup open\n"); X! return(0); X `125 X `032 X do_back_reply() X************** X*** 890,897 X `032 X do_back_reply() X `123 X! int h = 0, X! rot13 = 0; X `032 X tpucall = 0; X if (cli$present(c$dsc("HEADER")) & 1) h = 1; X--- 950,957 ----- X `032 X do_back_reply() X `123 X! int h = 0, X! rot13 = 0; X `032 X tpucall = 0; X if (cli$present(c$dsc("HEADER")) & 1) h = 1; X************** X*** 893,907 X int h = 0, X rot13 = 0; X `032 X! tpucall = 0; X! if (cli$present(c$dsc("HEADER")) & 1) h = 1; X! if (cli$present(c$dsc("TPU")) & 1) tpucall = 1; X! if (cli$present(c$dsc("EDITOR")) & 1) tpucall = 1; X! else if (cli$present(c$dsc("ROT13")) & 1) rot13 = 1; X! if ((news_context > 1) && curr_g && (curr_i > 0)) X! return(do_readparent(h,rot13),0); X! else err_line("\tBACK: No newsgroup open\n"); X! return(0); X `125 X `032 X do_topic() X--- 953,967 ----- X int h = 0, X rot13 = 0; X `032 X! tpucall = 0; X! if (cli$present(c$dsc("HEADER")) & 1) h = 1; X! if (cli$present(c$dsc("TPU")) & 1) tpucall = 1; X! if (cli$present(c$dsc("EDITOR")) & 1) tpucall = 1; X! else if (cli$present(c$dsc("ROT13")) & 1) rot13 = 1; X! if ((news_context > 1) && curr_g && (curr_i > 0)) X! return(do_readparent(h,rot13),0); X! else err_line("\tBACK: No newsgroup open\n"); X! return(0); X `125 X `032 X do_topic() X************** X*** 906,913 X `032 X do_topic() X `123 X! int h = 0, X! rot13 = 0; X `032 X tpucall = 0; X if (cli$present(c$dsc("HEADER")) & 1) h = 1; X--- 966,973 ----- X `032 X do_topic() X `123 X! int h = 0, X! rot13 = 0; X `032 X tpucall = 0; X if (cli$present(c$dsc("HEADER")) & 1) h = 1; X************** X*** 909,923 X int h = 0, X rot13 = 0; X `032 X! tpucall = 0; X! if (cli$present(c$dsc("HEADER")) & 1) h = 1; X! if (cli$present(c$dsc("TPU")) & 1) tpucall = 1; X! if (cli$present(c$dsc("EDITOR")) & 1) tpucall = 1; X! else if (cli$present(c$dsc("ROT13")) & 1) rot13 = 1; X! if ((news_context > 1) && curr_g && (curr_i > 0)) X! return(do_readancestor(h,rot13,tpucall),0); X! else err_line("\tTOPIC: No newsgroup open\n"); X! return(0); X `125 X `032 X do_last() X--- 969,983 ----- X int h = 0, X rot13 = 0; X `032 X! tpucall = 0; X! if (cli$present(c$dsc("HEADER")) & 1) h = 1; X! if (cli$present(c$dsc("TPU")) & 1) tpucall = 1; X! if (cli$present(c$dsc("EDITOR")) & 1) tpucall = 1; X! else if (cli$present(c$dsc("ROT13")) & 1) rot13 = 1; X! if ((news_context > 1) && curr_g && (curr_i > 0)) X! return(do_readancestor(h,rot13,tpucall),0); X! else err_line("\tTOPIC: No newsgroup open\n"); X! return(0); X `125 X `032 X do_last() $ GOSUB UNPACK_FILE $ FILE_IS = "NEWSREGISTER.DIFF" $ CHECKSUM_IS = 1985494786 $ COPY SYS$INPUT VMS_SHARE_DUMMY.DUMMY X*** [.news_v59_src]newsregister.c X--- [.news_src]newsregister.c $ GOSUB UNPACK_FILE $ FILE_IS = "NEWSREMCLIENT.DIFF" $ CHECKSUM_IS = 1683540963 $ COPY SYS$INPUT VMS_SHARE_DUMMY.DUMMY X*** [.news_v59_src]newsremclient.c X--- [.news_src]newsremclient.c X************** X*** 38,44 X ** database at that time become inaccessible, even for subsequent X ** NEWS invocations (connection attempts to the remote server are X ** lost.) net_write() - Stuart McGraw X! ** - Add support for SRI Multinet - Mats Sundvall X **-- X **/ X `012 X--- 38,44 ----- X ** database at that time become inaccessible, even for subsequent X ** NEWS invocations (connection attempts to the remote server are X ** lost.) net_write() - Stuart McGraw X! ** - Add support for MULTINET Multinet - Mats Sundvall X **-- X **/ X `012 X************** X*** 50,55 X #include iodef X #include signal X `032 X #define CMUTCP 1 X #define WINTCP 2 X #define SRITCP 3 X--- 50,56 ----- X #include iodef X #include signal X `032 X+ #define WEEK`009`009(60*60*24*7) X #define CMUTCP 1 X #define WINTCP 2 X #define MULTINETTCP 3 X************** X*** 52,58 X `032 X #define CMUTCP 1 X #define WINTCP 2 X! #define SRITCP 3 X `032 X #ifdef SRI X #define SRI`009 1 X--- 53,59 ----- X #define WEEK`009`009(60*60*24*7) X #define CMUTCP 1 X #define WINTCP 2 X! #define MULTINETTCP 3 X `032 X #ifdef MULTINET X #define MULTINET`009 1 X************** X*** 54,61 X #define WINTCP 2 X #define SRITCP 3 X `032 X! #ifdef SRI X! #define SRI`009 1 X #else X #ifdef TWG X #define TWG 1 X--- 55,62 ----- X #define WINTCP 2 X #define MULTINETTCP 3 X `032 X! #ifdef MULTINET X! #define MULTINET`009 1 X #else X #ifdef TWG X #define TWG 1 X************** X*** 62,68 X #endif X #endif X `032 X! #if TWG `124`124 SRI X #include <types.h> X #include <socket.h> X #include <netdb.h> X--- 63,69 ----- X #endif X #endif X `032 X! #if TWG `124`124 MULTINET X #include <types.h> X #include <socket.h> X #include <netdb.h> X************** X*** 265,272 X #if TWG X else if (proto == WINTCP) `123 X if (sys$assign(c$dsc("INET:"),&net_chan,0,0) & 1) `123 X! #elif SRI X! else if (proto == SRITCP) `123 X if (sys$assign(c$dsc("INET0:"),&net_chan,0,0) & 1) `123 X #endif X #if TWG `124`124 SRI X--- 266,273 ----- X #if TWG X else if (proto == WINTCP) `123 X if (sys$assign(c$dsc("INET:"),&net_chan,0,0) & 1) `123 X! #elif MULTINET X! else if (proto == MULTINETTCP) `123 X if (sys$assign(c$dsc("INET0:"),&net_chan,0,0) & 1) `123 X #endif X #if TWG `124`124 MULTINET X************** X*** 269,275 X else if (proto == SRITCP) `123 X if (sys$assign(c$dsc("INET0:"),&net_chan,0,0) & 1) `123 X #endif X! #if TWG `124`124 SRI X if ( (sys$qiow(0,net_chan,IO$_SOCKET,&read_iosb,0,0, X AF_INET,SOCK_STREAM,0,0,0,0) & 1) X && (read_iosb.iostatus & 1)) `123 X--- 270,276 ----- X else if (proto == MULTINETTCP) `123 X if (sys$assign(c$dsc("INET0:"),&net_chan,0,0) & 1) `123 X #endif X! #if TWG `124`124 MULTINET X if ( (sys$qiow(0,net_chan,IO$_SOCKET,&read_iosb,0,0, X AF_INET,SOCK_STREAM,0,0,0,0) & 1) X && (read_iosb.iostatus & 1)) `123 X************** X*** 346,352 X `032 X toggle_link() X `123 V! if (!nntp_write("YCMND") `124`124 (!(wait_net_response(RESP_TIMER,1)))) ` X123 X if (*net_open_chan) `123 X char proto_type; X `032 X--- 347,353 ----- X `032 X toggle_link() X `123 V! if (!nntp_write("STAT") `124`124 (!(wait_net_response(RESP_TIMER,1)))) `1 X23 X if (*net_open_chan) `123 X char proto_type; X `032 X************** X*** 352,358 X `032 X if (net_proto == CMUTCP) proto_type = 'T'; X else if (net_proto == WINTCP) proto_type = 'W'; X! else if (net_proto == SRITCP) proto_type = 'S'; X else proto_type = 'D'; X close_net(); V sprintf(client_msg,"Lost connection to NEWS SERVER ([%c] %s)",proto_t Xype,net_open_chan); X--- 353,359 ----- X `032 X if (net_proto == CMUTCP) proto_type = 'T'; X else if (net_proto == WINTCP) proto_type = 'W'; X! else if (net_proto == MULTINETTCP) proto_type = 'M'; X else proto_type = 'D'; X close_net(); V sprintf(client_msg,"Lost connection to NEWS SERVER ([%c] %s)",proto_t Xype,net_open_chan); X************** X*** 366,372 X * open_rem_chan X * X * Open channel to remote NNTP server on host name node, using protocol X! * proto (3 = SRITCP, 2 == WINTCP, 1 == CMUTCP, 0 = DECNET) X */ X `032 X open_rem_chan(node,proto) X--- 367,373 ----- X * open_rem_chan X * X * Open channel to remote NNTP server on host name node, using protocol X! * proto (3 = MULTINETTCP, 2 == WINTCP, 1 == CMUTCP, 0 = DECNET) X */ X `032 X open_rem_chan(node,proto) X************** X*** 391,397 X `032 X if (net_proto == CMUTCP) proto_type = 'T'; X else if (net_proto == WINTCP) proto_type = 'W'; X! else if (net_proto == SRITCP) proto_type = 'S'; X else proto_type = 'D'; V sprintf(client_msg,"Cannot connect to NEWS SERVER ([%c] %s)",proto_ty Xpe,net_open_chan); X net_read_status = 0; X--- 392,398 ----- X `032 X if (net_proto == CMUTCP) proto_type = 'T'; X else if (net_proto == WINTCP) proto_type = 'W'; X! else if (net_proto == MULTINETTCP) proto_type = 'M'; X else proto_type = 'D'; V sprintf(client_msg,"Cannot connect to NEWS SERVER ([%c] %s)",proto_ty Xpe,net_open_chan); X net_read_status = 0; X************** X*** 404,410 X `032 X if (net_proto == CMUTCP) proto_type = 'T'; X else if (net_proto == WINTCP) proto_type = 'W'; X! else if (net_proto == SRITCP) proto_type = 'S'; X else proto_type = 'D'; X close_net(); X net_read_status = 0; X--- 405,411 ----- X `032 X if (net_proto == CMUTCP) proto_type = 'T'; X else if (net_proto == WINTCP) proto_type = 'W'; X! else if (net_proto == MULTINETTCP) proto_type = 'M'; X else proto_type = 'D'; X close_net(); X net_read_status = 0; X************** X*** 643,648 X server_check_ids(check_id_head) X struct grps *check_id_head; X `123`032 X struct grps *reply = check_id_head; X struct itms *tmp; X char cmd[132]; X--- 644,650 ----- X server_check_ids(check_id_head) X struct grps *check_id_head; X `123`032 X+ int daytime, resp_val; X struct grps *reply = check_id_head; X struct itms *tmp; X char cmd[132]; X************** X*** 649,654 X struct tm *stm; X `032 X while (reply) `123 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 stm = localtime(&(reply->grptime)); X--- 651,657 ----- X struct tm *stm; X `032 X while (reply) `123 X+ `032 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************** X*** 651,656 X while (reply) `123 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 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--- 654,663 ----- X `032 -+-+-+-+-+ End of part 10 +-+-+-+-+-