Article 8627 of comp.lang.perl:
Xref: feenix.metronet.com comp.lang.perl:8627
Path: feenix.metronet.com!news.utdallas.edu!wupost!math.ohio-state.edu!howland.reston.ans.net!agate!ames!koriel!sh.wide!wnoc-tyo-news!scslwide!wsgw!headgw!cvgw3!tshiono
From: tshiono@cv.sony.co.jp (Toru SHIONO)
Newsgroups: comp.lang.perl
Subject: patch for prn (Perl news reader)
Message-ID: <TSHIONO.93Dec04042705@aquarius.cv.sony.co.jp>
Date: 4 Dec 93 04:27:05 GMT
Sender: news@cv.sony.co.jp (Usenet News System)
Organization: Sony Corporation, Tokyo, Japan
Lines: 82
Nntp-Posting-Host: aquarius
X-Newsreader: prn Ver 1.10

A couple of weeks before I posted here a small newsreader written in
curseperl.  After that I found some bugs to be fixed.  Here's the patch:

---------------- cut here ---------------------
*** prn	Thu Nov 18 20:16:21 1993
--- prn	Sat Dec  4 13:20:25 1993
***************
*** 28,36 ****
  #	Ver 1.08  Nov. 10, 93 -- followup to `Followup-To'
  #			      -- localize $reply-to to initialize
  #	Ver 1.09  Nov. 18, 93 -- add non-Japanese switch
  
  # global definitions
! $VERSION = 'Ver 1.09';				# version number
  $THEM = 'cvgw';					# nntp server
  $PAGER = $ENV{PRNPAGER} || 'less -c0';		# pager to read news
  $MYHOME = $ENV{HOME} || (getpwuid($<))[7];	# home dir
--- 28,38 ----
  #	Ver 1.08  Nov. 10, 93 -- followup to `Followup-To'
  #			      -- localize $reply-to to initialize
  #	Ver 1.09  Nov. 18, 93 -- add non-Japanese switch
+ #	Ver 1.10  Dec.  4, 93 -- didn't print errmsg in posting error
+ #			      -- correct decoding of leftmost dots
  
  # global definitions
! $VERSION = 'Ver 1.10';				# version number
  $THEM = 'cvgw';					# nntp server
  $PAGER = $ENV{PRNPAGER} || 'less -c0';		# pager to read news
  $MYHOME = $ENV{HOME} || (getpwuid($<))[7];	# home dir
***************
*** 752,757 ****
--- 754,760 ----
  	while (<S>) {		# slurp all the lines to tempfile
  		s/\cM$//;	# to avoid socket deadlock
  		last if /^\.$/;
+ 		s/^\.\./\./;
  		print TMP $_;
  	}
  	close(TMP);
***************
*** 969,974 ****
--- 972,978 ----
  		&addstr("Now posting\n");
  		&refresh;
  		local($status) = &postit($tmp, $mydist);
+ 		$status =~ s/\cM$//;
  		if ($status =~ /^240/) {
  			&addstr("Done\n");
  			&authorcopy($tmp, $myid);
***************
*** 1069,1074 ****
--- 1073,1079 ----
  		&chkauthorcopy;
  		print STDOUT "Now posting\n";
  		local($status) = &postit($tmp, $mydist);
+ 		$status =~ s/\cM$//;
  		if ($status =~ /^240/) {
  			print STDOUT "Done\n";
  			&authorcopy($tmp, $myid);
***************
*** 1453,1458 ****
--- 1458,1464 ----
  		while (<S>) {
  			s/\cM$//;
  			last if /^\.$/;
+ 			s/^\.\./\./;
  			print;
  		}
  		select(STDOUT);
***************
*** 1474,1479 ****
--- 1480,1486 ----
  	while (<S>) {
  		s/\cM$//;
  		last if /^\.$/;
+ 		s/^\.\./\./;
  		print TO $quote, $_;
  	}
  }
---------------- cut here ---------------------
--
Toru "devil-may-care" Shiono          Sony Corporation, JAPAN


