gih900@csc.anu.oz (Geoff Huston) (10/10/89)
$! ------------------ CUT HERE ----------------------- $ v='f$verify(f$trnlnm("SHARE_VERIFY"))' $! $! This archive created by VMS_SHARE Version 7.1-004 3-AUG-1989 $! On 10-OCT-1989 08:45:30.26 By user GIH900 $! $! This VMS_SHARE Written by: $! Andy Harper, Kings College London UK $! $! Acknowledgements to: $! James Gray - Original VMS_SHARE $! Michael Bednarek - Original Concept and implementation $! $!+ THIS PACKAGE DISTRIBUTED IN 3 PARTS, TO KEEP EACH PART $! BELOW 30 BLOCKS $! $! TO UNPACK THIS SHARE FILE, CONCATENATE ALL PARTS IN ORDER $! AND EXECUTE AS A COMMAND PROCEDURE ( @name ) $! $! THE FOLLOWING FILE(S) WILL BE CREATED AFTER UNPACKING: $! 1. AAREADME.TXT;1 $! 2. ADD_TRANSFORM.SLP;2 $! 3. MAILDEF.SLP;1 $! 4. NEWS.SLP;1 $! 5. NEWSADD.SLP;2 $! 6. NEWSBUILD.SLP;2 $! 7. NEWSCMD.SLP;2 $! 8. NEWSDEFINE.SLP;1 $! 9. NEWSDELETE.SLP;2 $! 10. NEWSDIR.SLP;2 $! 11. NEWSDISPLAY.SLP;2 $! 12. NEWSDIST.SLP;2 $! 13. NEWSEXTERN.SLP;2 $! 14. NEWSEXTRACT.SLP;2 $! 15. NEWSFILES.SLP;2 $! 16. NEWSFORWARD.SLP;2 $! 17. NEWSHELP.SLP;2 $! 18. NEWSINCLUDE.SLP;2 $! 19. NEWSMOD.SLP;2 $! 20. NEWSMODE.SLP;2 $! 21. NEWSPOST.SLP;2 $! 22. NEWSRC.SLP;2 $! 23. NEWSREAD.SLP;2 $! 24. NEWSREGISTER.SLP;2 $! 25. NEWSREMCLIENT.SLP;2 $! 26. NEWSRTL.SLP;2 $! 27. NEWSSEARCH.SLP;2 $! 28. NEWSSELECT.SLP;2 $! 29. NEWSSETSHOW.SLP;2 $! 30. NEWSSITE.SLP;2 $! 31. NEWSSITE_H.SLP;2 $! 32. NEWSSKIM.SLP;2 $! 33. NEWSSKIP.SLP;2 $! 34. NEWSUTILITY.SLP;2 $! 35. NEWSV58_UPGRADE.SLP;2 $! 36. NEWSVARIABLES.SLP;1 $! 37. NEWSVMSMAIL.SLP;2 $! 38. NEWS_HLP.SLP;1 $! 39. NNTP_CLIENT.SLP;1 $! 40. NNTP_DEC.SLP;1 $! 41. NNTP_DECM.SLP;1 $! 42. NNTP_FEED.SLP;2 $! 43. NNTP_SERVER.SLP;2 $! 44. NNTP_TCPCMU.SLP;2 $! 45. NNTP_TCPWIN.SLP;1 $! 46. NNTP_TTY.SLP;1 $! 47. NNTP_XFER.C;1 $! 48. OPTIONS_C_LINK.OPT;1 $! $set="set" $set symbol/scope=(nolocal,noglobal) $f=f$parse("SHARE_TEMP","SYS$SCRATCH:.TMP_"+f$getjpi("","PID")) $e="write sys$error ""%UNPACK"", " $w="write sys$output ""%UNPACK"", " $ if f$trnlnm("SHARE_LOG") then $ w = "!" $ if f$getsyi("version") .ges. "V4.4" then $ goto START $ e "-E-OLDVER, Must run at least VMS 4.4" $ v=f$verify(v) $ exit 44 $UNPACK: SUBROUTINE ! P1=filename, P2=checksum $ if f$search(P1) .eqs. "" then $ goto file_absent $ e "-W-EXISTS, File ''P1' exists. Skipped." $ delete/nolog 'f'* $ exit $file_absent: $ if f$parse(P1) .nes. "" then $ goto dirok $ dn=f$parse(P1,,,"DIRECTORY") $ w "-I-CREDIR, Creating directory ''dn'." $ create/dir 'dn' $ if $status then $ goto dirok $ e "-E-CREDIRFAIL, Unable to create ''dn'. File skipped." $ delete/nolog 'f'* $ exit $dirok: $ w "-I-PROCESS, Processing file ''P1'." $ define/user sys$output nl: $ EDIT/TPU/NOSEC/NODIS/COM=SYS$INPUT 'f'/OUT='P1' PROCEDURE Unpacker ON_ERROR ENDON_ERROR;SET(FACILITY_NAME,"UNPACK");SET( SUCCESS,OFF);SET(INFORMATIONAL,OFF);f:=GET_INFO(COMMAND_LINE,"file_name"); buff:=CREATE_BUFFER(f,f);p:=SPAN(" ")@r&LINE_END;POSITION(BEGINNING_OF(buff)) ;LOOP EXITIF SEARCH(p,FORWARD)=0;POSITION(r);ERASE(r);ENDLOOP;POSITION( BEGINNING_OF(buff));g:=0;LOOP EXITIF MARK(NONE)=END_OF(buff);x:= ERASE_CHARACTER(1);IF g = 0 THEN IF x="X" THEN MOVE_VERTICAL(1);ENDIF;IF x= "V" THEN APPEND_LINE;MOVE_HORIZONTAL(-CURRENT_OFFSET);MOVE_VERTICAL(1);ENDIF; IF x="+" THEN g:=1;ERASE_LINE;ENDIF;ELSE IF x="-" THEN g:=0;ENDIF;ERASE_LINE; ENDIF;ENDLOOP;p:="`";POSITION(BEGINNING_OF(buff));LOOP r:=SEARCH(p,FORWARD); EXITIF r=0;POSITION(r);ERASE(r);COPY_TEXT(ASCII(INT(ERASE_CHARACTER(3)))); ENDLOOP;o:=GET_INFO(COMMAND_LINE,"output_file");WRITE_FILE(buff,o); ENDPROCEDURE;Unpacker;EXIT; $ delete/nolog 'f'* $ CHECKSUM 'P1' $ IF CHECKSUM$CHECKSUM .eqs. P2 THEN $ EXIT $ e "-E-CHKSMFAIL, Checksum of ''P1' failed." $ ENDSUBROUTINE $START: $ create/nolog 'f' XRelease notes for NEWS V5.9A release. X XI have built V5.9A using the VAX C compiler V3.0. If you are using an earlie Vr Xversion of the compiler you'll need to keep the .h files which have been pos Vted Xto the anu-news mailing list in September 1989. I will not include these fil Ves Xin any subsequent releases. X Xa) File changes in V5.9a X`009DELETED`009 sortdef.h`009-- no longer referenced in any of the module Vs X`009RENAMED newsmail.c`009-- newsvmsmail.c X`009NEW FILE nntp X Xb) BEFORE applying the v5.9a patches RENAME NEWSMAIL.C to NEWSVMSMAIL.C X XGeoff Huston $ CALL UNPACK AAREADME.TXT;1 1918433 $ create/nolog 'f' X- 48, 48 X**`009`009*@*`009 gateway::in%"\001@\002" X- 116, 117 X`009`123"*@*",`009 "in\%\"\001@\002\""`125, X`009`123"*::*", "in\%\"\002@\001\""`125, X/ $ CALL UNPACK ADD_TRANSFORM.SLP;2 1411858633 $ create/nolog 'f' X/ $ CALL UNPACK MAILDEF.SLP;1 47 $ create/nolog 'f' X/ $ CALL UNPACK NEWS.SLP;1 47 $ create/nolog 'f' X- 1173, 1174 X net_sender`091132`093, X`009 save_itm_fname`091256`093; X X strcpy(save_itm_fname,itm_fname); X- 1195 X strcpy(itm_fname,save_itm_fname);`009/* new */ X/ $ CALL UNPACK NEWSADD.SLP;2 840437443 $ create/nolog 'f' X- 48 X twg$tcp:`091netdist.include.arpa`093,- X- 80, 80 X$ call compile "NEWSVMSMAIL" "DELOBJ" 'p1 X- 320 X$! NNTP_XFER X$! X$ if f$search("NNTP_XFER.OBJ").eqs."" then $ goto do9a X$ if f$cvtime(f$file_attributes("`091-.NEWS_SRC`093NNTP_XFER.C","rdt")).gts. V- X f$cvtime(f$file_attributes("NNTP_XFER.OBJ","rdt")) then $ goto do9a X$ goto past9a X$do9a: X$ set def `091-.news_src`093 X$ write sys$output "$ cc nntp_xfer" X$ cc/nolis/object=`091-.news_build`093nntp_xfer nntp_xfer X$ set def `091-.news_build`093 X$ purge nntp_xfer.*,`091-.news_src`093nntp_xfer.* X$past9a: X$ if f$search("`091-.NEWS_DIST`093NNTP_XFER.EXE").eqs."" then $ goto do18a X$ if f$cvtime(f$file_attributes("NNTP_XFER.OBJ","rdt")).gts.- X f$cvtime(f$file_attributes("`091-.NEWS_DIST`093NNTP_XFER.EXE","rdt")) then V $ goto do18a X$ goto past18a X$do18a: X$ write sys$output "$ link nntp_xfer" X$ link/notrace/nomap/exe=`091-.NEWS_DIST`093nntp_xfer nntp_xfer,`091-.news_s Vrc`093options_c_link/opt X$ purge nntp_xfer.*,`091-.news_dist`093nntp_xfer.* X$past18a: X$! X/ $ CALL UNPACK NEWSBUILD.SLP;2 2001158135 $ create/nolog 'f' X- 481, 481 X parameter P2 label=NOTEID X- 663, 670 X- 738 X qualifier UNREGISTERED nonnegatable X- 742, 742 X disallow any2 (ALL,ITEMS,NEW,NEWSGROUPS,REGISTER,SINCE,UNREGISTERED) X- 784 X synonym ANSWER X/ $ CALL UNPACK NEWSCMD.SLP;2 1786584076 $ create/nolog 'f' X- 48 X#define DIR_UNREGISTER 4 X/ $ CALL UNPACK NEWSDEFINE.SLP;1 139671331 $ create/nolog 'f' X- 931, 939 X mail_from`091256`093, X mail_cfrom`091256`093, X mail_groups`091256`093, X mail_dist`091256`093, X mail_id`091256`093, X post_path`091256`093, X post_dist`091256`093, X loc_id`091IDLEN`093, X id`091256`093, X ngroup`091256`093, X- 980, 980 X strcpy(mail_cfrom,mail_from); X s_to_lower(mail_cfrom); X- 988, 991 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- 999, 999 X if (!(wild_match(mail_cfrom,inpline))) `123 X/ $ CALL UNPACK NEWSDELETE.SLP;2 1231500617 $ create/nolog 'f' X- 143 X case DIR_UNREGISTER: X put_line("NEWS - Directory of UNRegistered Newsgroups",0); X break; X- 217 X else if (cli$present(c$dsc("UNREGISTERED")) == CLI$_PRESENT) X dir_type = DIR_UNREGISTER; X- 259 X case DIR_UNREGISTER: X incl_grp = (ga`091gindx`093->grp_reg == 0); X break; X/ $ CALL UNPACK NEWSDIR.SLP;2 1949595161 $ create/nolog 'f' X- 281, 281 X else if ( !strncmp(resp,"top",min(3,strlen(resp))) X && (*(resp + 1) == 'o') X && (strlen(resp) <= 3)) `123 X/ $ CALL UNPACK NEWSDISPLAY.SLP;2 1262879188 $ create/nolog 'f' X- 215 X int n; X- 219, 220 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); X if (!strlen(node)) return; `009`009/* handle the case of the string " " */ X- 224, 235 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/ $ CALL UNPACK NEWSDIST.SLP;2 1075586354 $ create/nolog 'f' X/ $ CALL UNPACK NEWSEXTERN.SLP;2 47 $ create/nolog 'f' X- 237, 239 X if (w_ok) `123 X sprintf(xfrbuf,"X-NEWS: %s %s: %d\n", X news_node,ga`091g`093->grp_name,ga`091g`093->grp_ia`091m`0 V93.itm_num); X fputs(xfrbuf,fpextract); X `125 X/ $ CALL UNPACK NEWSEXTRACT.SLP;2 1316375812 $ create/nolog 'f' X- 69 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/ $ CALL UNPACK NEWSFILES.SLP;2 705562367 $ create/nolog 'f' X/ $ CALL UNPACK NEWSFORWARD.SLP;2 47 $ create/nolog 'f' X/ $ CALL UNPACK NEWSHELP.SLP;2 47 $ create/nolog 'f' X/ $ CALL UNPACK NEWSINCLUDE.SLP;2 47 $ create/nolog 'f' X/ $ CALL UNPACK NEWSMOD.SLP;2 47 $ create/nolog 'f' X/ $ CALL UNPACK NEWSMODE.SLP;2 47 $ create/nolog 'f' X/ $ CALL UNPACK NEWSPOST.SLP;2 47 $ create/nolog 'f' X/ $ CALL UNPACK NEWSRC.SLP;2 47 $ create/nolog 'f' X/ $ CALL UNPACK NEWSREAD.SLP;2 47 $ create/nolog 'f' X/ $ CALL UNPACK NEWSREGISTER.SLP;2 47 $ create/nolog 'f' X- 349, 349 X if (!nntp_write("STAT") `124`124 (!(wait_net_response(RESP_TIMER,1)))) `12 V3 X/ $ CALL UNPACK NEWSREMCLIENT.SLP;2 1023703700 $ create/nolog 'f' X/ $ CALL UNPACK NEWSRTL.SLP;2 47 $ create/nolog 'f' X/ $ CALL UNPACK NEWSSEARCH.SLP;2 47 $ create/nolog 'f' X/ $ CALL UNPACK NEWSSELECT.SLP;2 47 $ create/nolog 'f' X- 1208, 1245 X char acline`091256`093, cknode`091132`093, mod`091132`093, X *cp, *ap, *op; X FILE *fpd; X X ga`091g`093->grp_flags `124= NEWS_M_ACCESS_CHECKED; X if (ga`091g`093->grp_flags & NEWS_M_MAILMODERATE) `123 X sprintf(mod,"%s@%s",usr_username,Node_address); X if (!strcmp(mod,moderator_address(ga`091g`093->grp_name))) `123 X ga`091g`093->grp_flags `124= (NEWS_M_MOD_USER `124 NEWS_M_WRITE_ACCESS V); X return; X `125 X `125 X if (!(ga`091g`093->grp_flags & NEWS_M_NOWRITE_SET)) X ga`091g`093->grp_flags `124= NEWS_M_WRITE_ACCESS; X sprintf(itm_fname,Access_template,util_dir(ga`091g`093->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 X if (substrcmp(cp," write ")) ga`091g`093->grp_flags `124= NEWS_M_WRI VTE_ACCESS; X if (substrcmp(cp," nowrite ")) ga`091g`093->grp_flags &= `126NEWS_M_ VWRITE_ACCESS; X if (substrcmp(cp," moderate ")) ga`091g`093->grp_flags `124= (NEWS_M V_MOD_USER `124 NEWS_M_WRITE_ACCESS); X `125 X `125 X fclose(fpd); X `125 X nosysprv(); X/ $ CALL UNPACK NEWSSETSHOW.SLP;2 1275210311 $ create/nolog 'f' X/ $ CALL UNPACK NEWSSITE.SLP;2 47 $ create/nolog 'f' X/ $ CALL UNPACK NEWSSITE_H.SLP;2 47 $ create/nolog 'f' X/ $ CALL UNPACK NEWSSKIM.SLP;2 47 $ create/nolog 'f' X/ $ CALL UNPACK NEWSSKIP.SLP;2 47 $ create/nolog 'f' X/ $ CALL UNPACK NEWSUTILITY.SLP;2 47 $ create/nolog 'f' X/ $ CALL UNPACK NEWSV58_UPGRADE.SLP;2 47 $ create/nolog 'f' X/ $ CALL UNPACK NEWSVARIABLES.SLP;1 47 $ create/nolog 'f' X- 4, 4 X** NEWSVMSMAIL X- 25, 25 X#module NEWSVMSMAIL "V5.8" X- 126 X tmp->fnext = 0; X- 731, 731 X all = ((news_context == 1) `124`124 (cli$present(c$dsc("ALL")) & 1)); X/ $ CALL UNPACK NEWSVMSMAIL.SLP;2 455178520 $ create/nolog 'f' X/ $ CALL UNPACK NEWS_HLP.SLP;1 47 $ create/nolog 'f' X/ $ CALL UNPACK NNTP_CLIENT.SLP;1 47 $ create/nolog 'f' X/ $ CALL UNPACK NNTP_DEC.SLP;1 47 $ create/nolog 'f' X/ $ CALL UNPACK NNTP_DECM.SLP;1 47 $ create/nolog 'f' X- 485, 485 X if (!nntp_write("STAT") `124`124 (!(wait_net_response(RESP_TIMER,1)))) ` V123 X/ $ CALL UNPACK NNTP_FEED.SLP;2 1902669267 $ create/nolog 'f' X- 93, 93 X#define NEWSBATCH "NEWS_MANAGER:NNTP_%X.BATCH" X- 262, 262 Xint mail_add_expiry, X ihave_size = 0; X- 1257, 1257 X char line`091BUFF_STRLEN`093, X batch`091FILE_STRLEN`093; X- 1265, 1265 X sprintf(batch,NEWSBATCH,getpid()); X if (!(fpw = fopen(batch,"a"))) `123 X- 1269, 1269 X fprintf(fpw,"#! rnews %d\n", (ihave_size > 0 ? ihave_size : 1)); X- 1273 X while (!delete(fn)); X- 1820, 1852 XFILE *openartbyid(id,msg_status,stm) X char *id; X int *msg_status; X int stm; X`123 X char l_id`091IDLEN + 4`093; X int i; X X ihave_size = 0; X *msg_status = M430; X for (i = 0; i < (IDLEN + 4); ++i) l_id`091i`093 = '\0'; X strncpy(l_id,id,IDLEN); X X grprab.rab$l_kbf = &(newsitm.itm_grp); X grprab.rab$b_ksz = 4; X grprab.rab$b_krf = 1; X grprab.rab$l_rop = RAB$M_RRL `124 RAB$M_NLK; X grprab.rab$b_rac = RAB$C_KEY; X X itmrab.rab$l_kbf = l_id; X itmrab.rab$b_ksz = IDLEN + 4; X itmrab.rab$b_krf = 1; +-+-+-+-+-+-+-+- END OF PART 1 +-+-+-+-+-+-+-+-