home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / unix / volume1 / rn / patch18 < prev    next >
Encoding:
Text File  |  1986-11-30  |  12.6 KB  |  512 lines

  1. System: rn version 4.3
  2. Patch #: 18
  3. Priority: ENHANCEMENT
  4. Subject: The 'r' and 'f' commands ought to work from "End of newsgroup"
  5.  
  6. Description:
  7.     The reply and followup commands should let you do so from a null
  8.     article (typically the pseudo-article called "End of newsgroup")
  9.     producing a basenote, or a mail message to nobody (yet).  Not only
  10.     would this be handy, but it allows certain news administrators who
  11.     can't put Pnews and Rnmail in a public place to nevertheless let
  12.     people originate notes or messages.  It also lets you invoke
  13.     Pnews or Rnmail with the same environment as rn, in the situation
  14.     where you aren't really carrying environment variables around in
  15.     your environment but rather setting them with -E.
  16.  
  17. Fix:    From rn, say "| patch -d DIR", where DIR is your rn source directory.
  18.     Outside of rn, say "cd DIR; patch <thisarticle".  If you don't have
  19.     the patch program, apply the following by hand, or get patch.
  20.  
  21.     If patch indicates that patchlevel is the wrong version, you may need
  22.     to apply one or more previous patches, or the patch may already
  23.     have been applied.  See the patchlevel file to find out what has or
  24.     has not been applied.  In any event, don't continue with the patch.
  25.  
  26. Index: patchlevel
  27. Prereq: 17
  28. 1c1
  29. < Patch #: 17
  30. ---
  31. > Patch #: 18
  32.  
  33. Index: common.h
  34. Prereq: 4.3.1.2
  35. *** common.h.old    Thu May 23 17:23:43 1985
  36. --- common.h    Thu May 23 17:24:16 1985
  37. ***************
  38. *** 1,4
  39. ! /* $Header: common.h,v 4.3.1.2 85/05/13 09:30:39 lwall Exp $
  40.    * 
  41.    * $Log:    common.h,v $
  42.    * Revision 4.3.1.2  85/05/13  09:30:39  lwall
  43.  
  44. --- 1,4 -----
  45. ! /* $Header: common.h,v 4.3.1.3 85/05/23 17:19:32 lwall Exp $
  46.    * 
  47.    * $Log:    common.h,v $
  48.    * Revision 4.3.1.3  85/05/23  17:19:32  lwall
  49. ***************
  50. *** 1,6
  51.   /* $Header: common.h,v 4.3.1.2 85/05/13 09:30:39 lwall Exp $
  52.    * 
  53.    * $Log:    common.h,v $
  54.    * Revision 4.3.1.2  85/05/13  09:30:39  lwall
  55.    * Added CUSTOMLINES option.
  56.    * 
  57.  
  58. --- 1,9 -----
  59.   /* $Header: common.h,v 4.3.1.3 85/05/23 17:19:32 lwall Exp $
  60.    * 
  61.    * $Log:    common.h,v $
  62. +  * Revision 4.3.1.3  85/05/23  17:19:32  lwall
  63. +  * Now allows 'r' and 'f' on null articles.
  64. +  * 
  65.    * Revision 4.3.1.2  85/05/13  09:30:39  lwall
  66.    * Added CUSTOMLINES option.
  67.    * 
  68. ***************
  69. *** 531,537
  70.   #else
  71.   #   ifndef MAILHEADER        /* % */
  72.   #    ifdef CONDSUB
  73. ! #        define MAILHEADER "To: %T\nSubject: Re: %S\nNewsgroups: %n\nIn-Reply-To: %i\n%(%[references]!=^$?References\\: %[references]\n)Organization: %o\nCc: \nBcc: \n\n"
  74.   #    else
  75.   #        define MAILHEADER "To: %T\nSubject: Re: %S\nNewsgroups: %n\nIn-Reply-To: %i\nReferences: %[references]\nCc: \nBcc: \n\n"
  76.   #    endif
  77.  
  78. --- 534,540 -----
  79.   #else
  80.   #   ifndef MAILHEADER        /* % */
  81.   #    ifdef CONDSUB
  82. ! #        define MAILHEADER "To: %T\nSubject: %(%i=^$?:Re: %S\nNewsgroups: %n\nIn-Reply-To: %i)\n%(%[references]!=^$?References\\: %[references]\n)Organization: %o\nCc: \nBcc: \n\n"
  83.   #    else
  84.   #        define MAILHEADER "To: %T\nSubject: Re: %S\nNewsgroups: %n\nIn-Reply-To: %i\nReferences: %[references]\nCc: \nBcc: \n\n"
  85.   #    endif
  86. ***************
  87. *** 548,554
  88.   #endif
  89.   
  90.   #ifndef NEWSHEADER        /* % */
  91. ! #   define NEWSHEADER "Newsgroups: %F\nSubject: Re: %S\nSummary: \nExpires: \nReferences: %R\nSender: \nReply-To: %L@%H.UUCP (%N)\nFollowup-To: \nDistribution: %D\nOrganization: %o\nKeywords: %[keywords]\n\n"
  92.   #endif
  93.   
  94.   #ifndef ATTRIBUTION        /* % */
  95.  
  96. --- 551,561 -----
  97.   #endif
  98.   
  99.   #ifndef NEWSHEADER        /* % */
  100. ! #   ifdef CONDSUB
  101. ! #    define NEWSHEADER "Newsgroups: %(%F=^$?%C:%F)\nSubject: %(%S=^$?%\"\n\nSubject: \":Re: %S)\nSummary: \nExpires: \n%(%R=^$?:References: %R\n)Sender: \nReply-To: %L@%H.UUCP (%N)\nFollowup-To: \nDistribution: %(%i=^$?%\"Distribution: \":%D)\nOrganization: %o\nKeywords: %[keywords]\n\n"
  102. ! #   else
  103. ! #    define NEWSHEADER "Newsgroups: %F\nSubject: Re: %S\nSummary: \nExpires: \nReferences: %R\nSender: \nReply-To: %L@%H.UUCP (%N)\nFollowup-To: \nDistribution: %D\nOrganization: %o\nKeywords: %[keywords]\n\n"
  104. ! #   endif
  105.   #endif
  106.   
  107.   #ifndef ATTRIBUTION        /* % */
  108.  
  109. Index: intrp.c
  110. Prereq: 4.3.1.4
  111. *** intrp.c.old    Thu May 23 17:28:02 1985
  112. --- intrp.c    Thu May 23 17:29:42 1985
  113. ***************
  114. *** 1,4
  115. ! /* $Header: intrp.c,v 4.3.1.4 85/05/21 13:35:21 lwall Exp $
  116.    *
  117.    * $Log:    intrp.c,v $
  118.    * Revision 4.3.1.4  85/05/21  13:35:21  lwall
  119.  
  120. --- 1,4 -----
  121. ! /* $Header: intrp.c,v 4.3.1.5 85/05/23 17:21:24 lwall Exp $
  122.    *
  123.    * $Log:    intrp.c,v $
  124.    * Revision 4.3.1.5  85/05/23  17:21:24  lwall
  125. ***************
  126. *** 1,6
  127.   /* $Header: intrp.c,v 4.3.1.4 85/05/21 13:35:21 lwall Exp $
  128.    *
  129.    * $Log:    intrp.c,v $
  130.    * Revision 4.3.1.4  85/05/21  13:35:21  lwall
  131.    * Sped up "rn -c" by not doing unnecessary initialization.
  132.    * 
  133.  
  134. --- 1,9 -----
  135.   /* $Header: intrp.c,v 4.3.1.5 85/05/23 17:21:24 lwall Exp $
  136.    *
  137.    * $Log:    intrp.c,v $
  138. +  * Revision 4.3.1.5  85/05/23  17:21:24  lwall
  139. +  * Now allows 'r' and 'f' on null articles.
  140. +  * 
  141.    * Revision 4.3.1.4  85/05/21  13:35:21  lwall
  142.    * Sped up "rn -c" by not doing unnecessary initialization.
  143.    * 
  144. ***************
  145. *** 625,631
  146.           case 'i':
  147.               if (!(s=artid_buf))
  148.               s = artid_buf = fetchlines(art,MESSID_LINE);
  149. !             if (*s != '<') {
  150.               sprintf(scrbuf,"<%s>",artid_buf);
  151.               s = scrbuf;
  152.               }
  153.  
  154. --- 628,634 -----
  155.           case 'i':
  156.               if (!(s=artid_buf))
  157.               s = artid_buf = fetchlines(art,MESSID_LINE);
  158. !             if (*s && *s != '<') {
  159.               sprintf(scrbuf,"<%s>",artid_buf);
  160.               s = scrbuf;
  161.               }
  162. ***************
  163. *** 713,719
  164.               artid_buf = fetchlines(art,MESSID_LINE);
  165.               if (artid_buf[0] == '<')
  166.               safecat(scrbuf,artid_buf,sizeof(scrbuf));
  167. !             else {
  168.               char tmpbuf[64];
  169.       
  170.               sprintf(tmpbuf,"<%s>",artid_buf);
  171.  
  172. --- 716,722 -----
  173.               artid_buf = fetchlines(art,MESSID_LINE);
  174.               if (artid_buf[0] == '<')
  175.               safecat(scrbuf,artid_buf,sizeof(scrbuf));
  176. !             else if (artid_buf[0]) {
  177.               char tmpbuf[64];
  178.       
  179.               sprintf(tmpbuf,"<%s>",artid_buf);
  180.  
  181. Index: respond.c
  182. Prereq: 4.3.1.3
  183. *** respond.c.old    Thu May 23 17:27:17 1985
  184. --- respond.c    Thu May 23 17:27:44 1985
  185. ***************
  186. *** 1,4
  187. ! /* $Header: respond.c,v 4.3.1.3 85/05/15 14:42:32 lwall Exp $
  188.    *
  189.    * $Log:    respond.c,v $
  190.    * Revision 4.3.1.3  85/05/15  14:42:32  lwall
  191.  
  192. --- 1,4 -----
  193. ! /* $Header: respond.c,v 4.3.1.4 85/05/23 17:24:49 lwall Exp $
  194.    *
  195.    * $Log:    respond.c,v $
  196.    * Revision 4.3.1.4  85/05/23  17:24:49  lwall
  197. ***************
  198. *** 1,6
  199.   /* $Header: respond.c,v 4.3.1.3 85/05/15 14:42:32 lwall Exp $
  200.    *
  201.    * $Log:    respond.c,v $
  202.    * Revision 4.3.1.3  85/05/15  14:42:32  lwall
  203.    * Removed duplicate include of intrp.h.
  204.    * 
  205.  
  206. --- 1,9 -----
  207.   /* $Header: respond.c,v 4.3.1.4 85/05/23 17:24:49 lwall Exp $
  208.    *
  209.    * $Log:    respond.c,v $
  210. +  * Revision 4.3.1.4  85/05/23  17:24:49  lwall
  211. +  * Now allows 'r' and 'f' on null articles.
  212. +  * 
  213.    * Revision 4.3.1.3  85/05/15  14:42:32  lwall
  214.    * Removed duplicate include of intrp.h.
  215.    * 
  216. ***************
  217. *** 306,322
  218.       bool incl_body = (*buf == 'R');
  219.       char *maildoer = savestr(filexp(getval("MAILPOSTER",MAILPOSTER)));
  220.   
  221. !     if (artopen(art) == Nullfp) {
  222. ! #ifdef VERBOSE
  223. !     IF(verbose)
  224. !         fputs("\nBut null articles are so dull!  :-)\n",stdout) FLUSH;
  225. !     ELSE
  226. ! #endif
  227. ! #ifdef TERSE
  228. !         fputs(nullart,stdout) FLUSH;
  229. ! #endif
  230. !     goto no_reply;
  231. !     }
  232.       tmpfp = fopen(headname,"w");    /* open header file */
  233.       if (tmpfp == Nullfp) {
  234.       printf(cantcreate,headname) FLUSH;
  235.  
  236. --- 309,315 -----
  237.       bool incl_body = (*buf == 'R');
  238.       char *maildoer = savestr(filexp(getval("MAILPOSTER",MAILPOSTER)));
  239.   
  240. !     artopen(art);
  241.       tmpfp = fopen(headname,"w");    /* open header file */
  242.       if (tmpfp == Nullfp) {
  243.       printf(cantcreate,headname) FLUSH;
  244. ***************
  245. *** 334,340
  246.   #ifdef TERSE
  247.           printf("\n%s\n(Header in %s)\n",buf,headname) FLUSH;
  248.   #endif
  249. !     if (incl_body) {
  250.       interp(buf, (sizeof buf), getval("YOUSAID",YOUSAID));
  251.       fprintf(tmpfp,"%s\n",buf);
  252.   #ifdef ASYNC_PARSE
  253.  
  254. --- 327,333 -----
  255.   #ifdef TERSE
  256.           printf("\n%s\n(Header in %s)\n",buf,headname) FLUSH;
  257.   #endif
  258. !     if (incl_body && artfp != Nullfp) {
  259.       interp(buf, (sizeof buf), getval("YOUSAID",YOUSAID));
  260.       fprintf(tmpfp,"%s\n",buf);
  261.   #ifdef ASYNC_PARSE
  262. ***************
  263. *** 359,375
  264.   {
  265.       bool incl_body = (*buf == 'F');
  266.   
  267. !     if (artopen(art) == Nullfp) {
  268. ! #ifdef VERBOSE
  269. !     IF(verbose)
  270. !         fputs("\nNull articles give me indigestion!  :-)\n",stdout) FLUSH;
  271. !     ELSE
  272. ! #endif
  273. ! #ifdef TERSE
  274. !         fputs(nullart,stdout) FLUSH;
  275. ! #endif
  276. !     return;
  277. !     }
  278.       tmpfp = fopen(headname,"w");
  279.       if (tmpfp == Nullfp) {
  280.       printf(cantcreate,headname) FLUSH;
  281.  
  282. --- 352,358 -----
  283.   {
  284.       bool incl_body = (*buf == 'F');
  285.   
  286. !     artopen(art);
  287.       tmpfp = fopen(headname,"w");
  288.       if (tmpfp == Nullfp) {
  289.       printf(cantcreate,headname) FLUSH;
  290. ***************
  291. *** 377,383
  292.       }
  293.       interp(buf, (sizeof buf), getval("NEWSHEADER",NEWSHEADER));
  294.       fprintf(tmpfp,"%s",buf);
  295. !     if (incl_body) {
  296.   #ifdef VERBOSE
  297.       if (verbose)
  298.           fputs("\n\
  299.  
  300. --- 360,366 -----
  301.       }
  302.       interp(buf, (sizeof buf), getval("NEWSHEADER",NEWSHEADER));
  303.       fprintf(tmpfp,"%s",buf);
  304. !     if (incl_body && artfp != Nullfp) {
  305.   #ifdef VERBOSE
  306.       if (verbose)
  307.           fputs("\n\
  308.  
  309. Index: rn.1
  310. Prereq: 4.3.1.2
  311. *** rn.1.old    Thu May 23 17:21:17 1985
  312. --- rn.1    Thu May 23 17:23:24 1985
  313. ***************
  314. *** 1,4
  315. ! ''' $Header: rn.1,v 4.3.1.2 85/05/13 09:27:53 lwall Exp $
  316.   ''' 
  317.   ''' $Log:    rn.1,v $
  318.   ''' Revision 4.3.1.2  85/05/13  09:27:53  lwall
  319.  
  320. --- 1,4 -----
  321. ! ''' $Header: rn.1,v 4.3.1.3 85/05/23 17:14:14 lwall Exp $
  322.   ''' 
  323.   ''' $Log:    rn.1,v $
  324.   ''' Revision 4.3.1.3  85/05/23  17:14:14  lwall
  325. ***************
  326. *** 1,6
  327.   ''' $Header: rn.1,v 4.3.1.2 85/05/13 09:27:53 lwall Exp $
  328.   ''' 
  329.   ''' $Log:    rn.1,v $
  330.   ''' Revision 4.3.1.2  85/05/13  09:27:53  lwall
  331.   ''' Added CUSTOMLINES option.
  332.   ''' 
  333.  
  334. --- 1,9 -----
  335.   ''' $Header: rn.1,v 4.3.1.3 85/05/23 17:14:14 lwall Exp $
  336.   ''' 
  337.   ''' $Log:    rn.1,v $
  338. + ''' Revision 4.3.1.3  85/05/23  17:14:14  lwall
  339. + ''' Now allows 'r' and 'f' on null articles.
  340. + ''' 
  341.   ''' Revision 4.3.1.2  85/05/13  09:27:53  lwall
  342.   ''' Added CUSTOMLINES option.
  343.   ''' 
  344. ***************
  345. *** 512,517
  346.   the mailing behavior of
  347.   .I rn
  348.   (see environment section).
  349.   .Ip R 8
  350.   Reply, including the current article in the header file generated.
  351.   (See \*(L'F\*(R' command below).
  352.  
  353. --- 515,523 -----
  354.   the mailing behavior of
  355.   .I rn
  356.   (see environment section).
  357. + If on a nonexistent article such as the "End of newsgroup" pseudo-article
  358. + (which you can get to with a \*(L'$\*(R' command), invokes the mailer to
  359. + nobody in particular.
  360.   .Ip R 8
  361.   Reply, including the current article in the header file generated.
  362.   (See \*(L'F\*(R' command below).
  363. ***************
  364. *** 518,523
  365.   The YOUSAID environment variable controls the format of the attribution line.
  366.   .Ip f 8
  367.   Submit a followup article.
  368.   .Ip F 8
  369.   Submit a followup article, and include the old article, with lines prefixed
  370.   either by \*(L">\*(R" or by the argument to a
  371.  
  372. --- 524,532 -----
  373.   The YOUSAID environment variable controls the format of the attribution line.
  374.   .Ip f 8
  375.   Submit a followup article.
  376. + If on a nonexistent article such as the "End of newsgroup" pseudo-article
  377. + (which you can get to with a \*(L'$\*(R' command), posts an original
  378. + article (basenote).
  379.   .Ip F 8
  380.   Submit a followup article, and include the old article, with lines prefixed
  381.   either by \*(L">\*(R" or by the argument to a
  382. ***************
  383. *** 1336,1342
  384.   .Sp
  385.   To: %T
  386.   .br
  387. ! Subject: Re: %S
  388.   .br
  389.   Newsgroups: %n
  390.   .br
  391.  
  392. --- 1345,1351 -----
  393.   .Sp
  394.   To: %T
  395.   .br
  396. ! Subject: %(%i=^$?:Re: %S
  397.   .br
  398.   Newsgroups: %n
  399.   .br
  400. ***************
  401. *** 1340,1346
  402.   .br
  403.   Newsgroups: %n
  404.   .br
  405. ! In-Reply-To: %i
  406.   .br
  407.   %(%[references]!=^$?References\\: %[references]
  408.   .br
  409.  
  410. --- 1349,1355 -----
  411.   .br
  412.   Newsgroups: %n
  413.   .br
  414. ! In-Reply-To: %i)
  415.   .br
  416.   %(%[references]!=^$?References\\: %[references]
  417.   .br
  418. ***************
  419. *** 1383,1389
  420.   .Sp
  421.   Default:
  422.   .Sp
  423. ! Newsgroups: %F
  424.   .br
  425.   Subject: Re: %S
  426.   .br
  427.  
  428. --- 1392,1398 -----
  429.   .Sp
  430.   Default:
  431.   .Sp
  432. ! Newsgroups: %(%F=^$?%C:%F)
  433.   .br
  434.   Subject: %(%S=^$?%"\n\nSubject: ":Re: %S)
  435.   .br
  436. ***************
  437. *** 1385,1391
  438.   .Sp
  439.   Newsgroups: %F
  440.   .br
  441. ! Subject: Re: %S
  442.   .br
  443.   Summary:
  444.   .br
  445.  
  446. --- 1394,1400 -----
  447.   .Sp
  448.   Newsgroups: %(%F=^$?%C:%F)
  449.   .br
  450. ! Subject: %(%S=^$?%"\n\nSubject: ":Re: %S)
  451.   .br
  452.   Summary:
  453.   .br
  454. ***************
  455. *** 1391,1397
  456.   .br
  457.   Expires: 
  458.   .br
  459. ! References: %R
  460.   .br
  461.   Sender: 
  462.   .br
  463.  
  464. --- 1400,1406 -----
  465.   .br
  466.   Expires: 
  467.   .br
  468. ! %(%R=^$?:References: %R
  469.   .br
  470.   )Sender: 
  471.   .br
  472. ***************
  473. *** 1393,1399
  474.   .br
  475.   References: %R
  476.   .br
  477. ! Sender: 
  478.   .br
  479.   Reply-To: %L@%H.UUCP (%N)
  480.   .br
  481.  
  482. --- 1402,1408 -----
  483.   .br
  484.   %(%R=^$?:References: %R
  485.   .br
  486. ! )Sender: 
  487.   .br
  488.   Reply-To: %L@%H.UUCP (%N)
  489.   .br
  490. ***************
  491. *** 1399,1405
  492.   .br
  493.   Followup-To: 
  494.   .br
  495. ! Distribution: %D
  496.   .br
  497.   Organization: %o
  498.   .br
  499.  
  500. --- 1408,1414 -----
  501.   .br
  502.   Followup-To: 
  503.   .br
  504. ! Distribution: %(%i=^$?%"\nDistribution: ":%D)
  505.   .br
  506.   Organization: %o
  507.   .br
  508.  
  509.  
  510.  
  511.  
  512.