gih900@csc.anu.oz (Geoff Huston) (12/21/89)
+-+-+-+ Beginning of part 6 +-+-+-+ X! if ((status = call_edit(Mail_file)) == 2) return(0); X if (!status) `123 X sprintf(err_oline,"Mail <%s>? [y]:",xfrbuf); X status = get_input(&command,c$dsc(err_oline),&response_length); X--- 203,212 ----- X xfrbuf[strlen(xfrbuf) - 1] = '\0'; X `032 X if ((!forward) `124`124 (cli$present(c$dsc("EDIT")) & 1)) `123 X! if ((status = call_edit(Mail_file)) == 2) `123 X! mail_self_flag = 0; X! return(0); X! `125 X if (!status) `123 X sprintf(err_oline,"Mail <%s>? [y]:",xfrbuf); X status = get_input(&command,c$dsc(err_oline),&response_length); X************** X*** 211,216 X status = get_input(&command,c$dsc(err_oline),&response_length); X if ((status == RMS$_EOF) `124`124 (status == SMG$_EOF)) `123 X while (!(delete(Mail_file))); X return(0); X `125 X `125 X--- 212,218 ----- X status = get_input(&command,c$dsc(err_oline),&response_length); X if ((status == RMS$_EOF) `124`124 (status == SMG$_EOF)) `123 X while (!(delete(Mail_file))); X+ mail_self_flag = 0; X return(0); X `125 X `125 X************** X*** 217,222 X else response_length = 0; V if (!((status & 1) && ((!response_length) `124`124 ((response_length) & X& (toupper(*response) == 'Y'))))) `123 X while (!(delete(Mail_file))); X return(0); X `125 X `125 X--- 219,225 ----- X else response_length = 0; V if (!((status & 1) && ((!response_length) `124`124 ((response_length) & X& (toupper(*response) == 'Y'))))) `123 X while (!(delete(Mail_file))); X+ mail_self_flag = 0; X return(0); X `125 X `125 X************** X*** 222,227 X `125 X if (stat(Mail_file,&sbuffer)) `123 X err_line("Error: Mail - extracted file not found"); X return(0); X `125 X if (!sbuffer.st_size) `123 X--- 225,231 ----- X `125 X if (stat(Mail_file,&sbuffer)) `123 X err_line("Error: Mail - extracted file not found"); X+ mail_self_flag = 0; X return(0); X `125 X if (!sbuffer.st_size) `123 X************** X*** 227,232 X if (!sbuffer.st_size) `123 X err_line("Error: Mail - extracted file is empty"); X while (!(delete(Mail_file))); X return(0); X `125 X call_mail(Mail_file,subj,xfrbuf,"Invoking mailer..."); X--- 231,237 ----- X if (!sbuffer.st_size) `123 X err_line("Error: Mail - extracted file is empty"); X while (!(delete(Mail_file))); X+ mail_self_flag = 0; X return(0); X `125 X call_mail(Mail_file,subj,xfrbuf,"Invoking mailer..."); X************** X*** 230,235 X return(0); X `125 X call_mail(Mail_file,subj,xfrbuf,"Invoking mailer..."); X while (!(delete(Mail_file))); X return(0); X `125 X--- 235,241 ----- X return(0); X `125 X call_mail(Mail_file,subj,xfrbuf,"Invoking mailer..."); X+ mail_self_flag = 0; X while (!(delete(Mail_file))); X return(0); X `125 X************** X*** 406,416 X return(0); X `125 X `032 X! /* X! if ((cli$present(c$dsc("SELF")) == CLI$_PRESENT) && !members) X! sprintf(&xfrbuf[strlen(xfrbuf)],"/SELF "); X! else sprintf(&xfrbuf[strlen(xfrbuf)],"/NOSELF "); X! */ X `032 X *xfrbuf = '\0'; X addressees = 0; `032 X--- 412,420 ----- X return(0); X `125 X `032 X! if ((cli$present(c$dsc("SELF")) == CLI$_PRESENT) && !members) X! mail_self_flag = 1; X! else mail_self_flag = 0; X `032 X *xfrbuf = '\0'; X addressees = 0; `032 X************** X*** 433,438 X if ((status == RMS$_EOF) `124`124 (status == SMG$_EOF)) `123 X err_line("\tSend - Canceled\n"); X while (!delete(Mail_file)); X return(0); X `125 X if (ngroup_len) `123 X--- 437,443 ----- X if ((status == RMS$_EOF) `124`124 (status == SMG$_EOF)) `123 X err_line("\tSend - Canceled\n"); X while (!delete(Mail_file)); X+ mail_self_flag = 0; X return(0); X `125 X if (ngroup_len) `123 X************** X*** 450,455 X if (!addressees && !(cli$present(c$dsc("MEMBERS")) & 1)) `123 X err_line("\tSend - Canceled: No address specified\n"); X while (!delete(Mail_file)); X return(0); X `125 X `032 X--- 455,461 ----- X if (!addressees && !(cli$present(c$dsc("MEMBERS")) & 1)) `123 X err_line("\tSend - Canceled: No address specified\n"); X while (!delete(Mail_file)); X+ mail_self_flag = 0; X return(0); X `125 X `032 X************** X*** 462,467 X if ((status == RMS$_EOF) `124`124 (status == SMG$_EOF)) `123 X err_line("\tSend - Canceled\n"); X while (!delete(Mail_file)); X return(0); X `125 X `125 X--- 468,474 ----- X if ((status == RMS$_EOF) `124`124 (status == SMG$_EOF)) `123 X err_line("\tSend - Canceled\n"); X while (!delete(Mail_file)); X+ mail_self_flag = 0; X return(0); X `125 X `125 X************** X*** 472,477 X if ((status = call_edit(Mail_file)) == 2) `123 X err_line("\tSend - Canceled\n"); X while (!delete(Mail_file)); X return(0); X `125 X if (!status) `123 X--- 479,485 ----- X if ((status = call_edit(Mail_file)) == 2) `123 X err_line("\tSend - Canceled\n"); X while (!delete(Mail_file)); X+ mail_self_flag = 0; X return(0); X `125 X if (!status) `123 X************** X*** 483,488 X if ((status == RMS$_EOF) `124`124 (status == SMG$_EOF)) `123 X err_line("\tSend - Canceled\n"); X while (!(delete(Mail_file))); X return(0); X `125 X `125 X--- 491,497 ----- X if ((status == RMS$_EOF) `124`124 (status == SMG$_EOF)) `123 X err_line("\tSend - Canceled\n"); X while (!(delete(Mail_file))); X+ `009mail_self_flag = 0; X return(0); X `125 X `125 X************** X*** 490,495 V if (!((status & 1) && ((!response_length) `124`124 ((response_length) & X& (toupper(*response) == 'Y'))))) `123 X err_line("\tSend - Canceled\n"); X while (!(delete(Mail_file))); X return(0); X `125 X `125 X--- 499,505 ----- V if (!((status & 1) && ((!response_length) `124`124 ((response_length) & X& (toupper(*response) == 'Y'))))) `123 X err_line("\tSend - Canceled\n"); X while (!(delete(Mail_file))); X+ mail_self_flag = 0; X return(0); X `125 X `125 X************** X*** 496,501 X `032 X if (stat(Mail_file,&sbuffer)) `123 X err_line("Error: Mail - extracted file not found"); X return(0); X `125 X if (!sbuffer.st_size) `123 X--- 506,512 ----- X `032 X if (stat(Mail_file,&sbuffer)) `123 X err_line("Error: Mail - extracted file not found"); X+ mail_self_flag = 0; X return(0); X `125 X if (!sbuffer.st_size) `123 X************** X*** 501,506 X if (!sbuffer.st_size) `123 X err_line("Error: Mail - extracted file is empty"); X while (!(delete(Mail_file))); X return(0); X `125 X `032 X--- 512,518 ----- X if (!sbuffer.st_size) `123 X err_line("Error: Mail - extracted file is empty"); X while (!(delete(Mail_file))); X+ mail_self_flag = 0; X return(0); X `125 X `032 X************** X*** 504,510 X return(0); X `125 X `032 X! if (addressees) call_mail(Mail_file,ngroup,xfrbuf,"Invoking mailer..."); X `032 X *err_oline = '\0'; X if (members) `123 X--- 516,525 ----- X return(0); X `125 X `032 X! if (addressees) `123 X! call_mail(Mail_file,ngroup,xfrbuf,"Invoking mailer..."); X! mail_self_flag = 0; X! `125 X `032 X *err_oline = '\0'; X if (members) `123 X************** X*** 531,536 X if (strlen(ma)) `123 X strcpy(xfrbuf,add_transform(ma)); X call_mail(Mail_file,ngroup,xfrbuf,"Invoking mailer..."); X `125 X `125 X fclose(fpd); X--- 546,552 ----- X if (strlen(ma)) `123 X strcpy(xfrbuf,add_transform(ma)); X call_mail(Mail_file,ngroup,xfrbuf,"Invoking mailer..."); X+ mail_self_flag = 0; X `125 X `125 X fclose(fpd); X************** X*** 542,546 X `125 X while (!(delete(Mail_file))); X if (*err_oline) err_line(err_oline); X return(0); X `125 X--- 558,563 ----- X `125 X while (!(delete(Mail_file))); X if (*err_oline) err_line(err_oline); X+ mail_self_flag = 0; X return(0); X `125 $ GOSUB UNPACK_FILE $ FILE_IS = "NEWSHELP.DIFF" $ CHECKSUM_IS = 1985494842 $ COPY SYS$INPUT VMS_SHARE_DUMMY.DUMMY X*** [.news_v59_src]newshelp.c X--- [.news_src]newshelp.c $ GOSUB UNPACK_FILE $ FILE_IS = "NEWSINCLUDE.DIFF" $ CHECKSUM_IS = 223754656 $ COPY SYS$INPUT VMS_SHARE_DUMMY.DUMMY X*** [.news_v59_src]newsinclude.h X--- [.news_src]newsinclude.h X************** X*** 20,25 X **-- X **/ X `032 X /* VMS INCLUDE MODULES */ X #include ctype X #include descrip X--- 20,32 ----- X **-- X **/ X `032 X+ `009`009`009`009/* use the "new" mem management routines */ X+ #define malloc VAXC$MALLOC_OPT X+ #define calloc VAXC$CALLOC_OPT X+ #define realloc VAXC$REALLOC_OPT X+ #define free VAXC$FREE_OPT X+ #define cfree VAXC$CFREE_OPT X+`032 X /* VMS INCLUDE MODULES */ X #include ctype X #include descrip $ GOSUB UNPACK_FILE $ FILE_IS = "NEWSMOD.DIFF" $ CHECKSUM_IS = 1985494578 $ COPY SYS$INPUT VMS_SHARE_DUMMY.DUMMY X*** [.news_v59_src]newsmod.c X--- [.news_src]newsmod.c $ GOSUB UNPACK_FILE $ FILE_IS = "NEWSMODE.DIFF" $ CHECKSUM_IS = 1985494842 $ COPY SYS$INPUT VMS_SHARE_DUMMY.DUMMY X*** [.news_v59_src]newsmode.c X--- [.news_src]newsmode.c $ GOSUB UNPACK_FILE $ FILE_IS = "NEWSPOST.DIFF" $ CHECKSUM_IS = 947577111 $ COPY SYS$INPUT VMS_SHARE_DUMMY.DUMMY X*** [.news_v59_src]newspost.c X--- [.news_src]newspost.c X************** X*** 54,59 X `123 X int context = 0, X sts, X i = 0; X char *cp1, *cp2; X `032 X--- 54,60 ----- X `123 X int context = 0, X sts, X+ mail_username_len, X i = 0; X short cc_type = MAIL$_CC; X char mail_username[256],*cp1, *cp2; X************** X*** 55,61 X int context = 0, X sts, X i = 0; X! char *cp1, *cp2; X `032 X struct cmlst `123 X short buffer_length; X--- 56,63 ----- X sts, X mail_username_len, X i = 0; X! short cc_type = MAIL$_CC; X! char mail_username[256],*cp1, *cp2; X `032 X struct cmlst `123 X short buffer_length; X************** X*** 72,77 X smg$begin_pasteboard_update(&pid); X `125 X `032 X sysprv(); X if (!((sts = mail$send_begin(&context,null_list,null_list)) & 1)) `123 X nosysprv(); X--- 74,91 ----- X smg$begin_pasteboard_update(&pid); X `125 X `032 X+ i = 0; X+ if (mail_self_flag) `123 X+ att_list[i].buffer_length = 255; X+ att_list[i].item_code = MAIL$_SEND_USER; X+ att_list[i].buffer_address = mail_username; X+ att_list[i].return_length_address = &mail_username_len; X+ ++i; X+ `125 X+ att_list[i].buffer_length = 0; X+ att_list[i].item_code = 0; X+ att_list[i].buffer_address = 0; X+ att_list[i].return_length_address = 0; X sysprv(); X if (!((sts = mail$send_begin(&context,null_list,att_list)) & 1)) `123 X nosysprv(); X************** X*** 73,79 X `125 X `032 X sysprv(); X! if (!((sts = mail$send_begin(&context,null_list,null_list)) & 1)) `123 X nosysprv(); X clear_err_line(); X return(sts); X--- 87,93 ----- X att_list[i].buffer_address = 0; X att_list[i].return_length_address = 0; X sysprv(); X! if (!((sts = mail$send_begin(&context,null_list,att_list)) & 1)) `123 X nosysprv(); X clear_err_line(); X return(sts); X************** X*** 78,83 X clear_err_line(); X return(sts); X `125 X att_list[i].buffer_length = strlen(address); X att_list[i].item_code = MAIL$_SEND_TO_LINE; X att_list[i].buffer_address = address; X--- 92,98 ----- X clear_err_line(); X return(sts); X `125 X+ i = 0; X att_list[i].buffer_length = strlen(address); X att_list[i].item_code = MAIL$_SEND_TO_LINE; X att_list[i].buffer_address = address; X************** X*** 119,125 X clear_err_line(); X return(sts); X `125 X- i = 0; X cp1 = address; X do `123 X if (cp2 = strchr(cp1,',')) *cp2 = '\0'; X--- 134,139 ----- X clear_err_line(); X return(sts); X `125 X cp1 = address; X do `123 X i = 0; X************** X*** 122,127 X i = 0; X cp1 = address; X do `123 X if (cp2 = strchr(cp1,',')) *cp2 = '\0'; X att_list[i].buffer_length = strlen(cp1); X att_list[i].item_code = MAIL$_SEND_USERNAME; X--- 136,142 ----- X `125 X cp1 = address; X do `123 X+ i = 0; X if (cp2 = strchr(cp1,',')) *cp2 = '\0'; X att_list[i].buffer_length = strlen(cp1); X att_list[i].item_code = MAIL$_SEND_USERNAME; X************** X*** 128,133 X att_list[i].buffer_address = cp1; X att_list[i].return_length_address = 0; X ++i; X if (cp2) *cp2++ = ','; X cp1 = cp2; X `125 while (cp1); X--- 143,158 ----- X att_list[i].buffer_address = cp1; X att_list[i].return_length_address = 0; X ++i; X+ att_list[i].buffer_length = 0; X+ att_list[i].item_code = 0; X+ att_list[i].buffer_address = 0; X+ att_list[i].return_length_address = 0; V+ if (!((sts = mail$send_add_address(&context,att_list,null_list)) & 1)) X `123 X+ mail$send_end(&context,null_list,null_list); X+ nosysprv(); X+ clear_err_line(); X+ return(sts); X+ `125 X if (cp2) *cp2++ = ','; X cp1 = cp2; X `125 while (cp1); X************** X*** 132,146 X cp1 = cp2; X `125 while (cp1); X `032 X! att_list[i].buffer_length = 0; X! att_list[i].item_code = 0; X! att_list[i].buffer_address = 0; X! att_list[i].return_length_address = 0; V! if (!((sts = mail$send_add_address(&context,att_list,null_list)) & 1)) `1 X23 X! mail$send_end(&context,null_list,null_list); X! nosysprv(); X! clear_err_line(); X! return(sts); X `125 X `032 X i = 0; X--- 157,183 ----- X cp1 = cp2; X `125 while (cp1); X `032 X! if (mail_self_flag) `123 X! att_list[i].buffer_length = mail_username_len; X! att_list[i].item_code = MAIL$_SEND_USERNAME; X! att_list[i].buffer_address = mail_username; X! att_list[i].return_length_address = 0; X! ++i; X! att_list[i].buffer_length = 2; X! att_list[i].item_code = MAIL$_SEND_USERNAME_TYPE; X! att_list[i].buffer_address = &cc_type; X! att_list[i].return_length_address = 0; X! ++i; X! att_list[i].buffer_length = 0; -+-+-+-+-+ End of part 6 +-+-+-+-+-