🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nn
Article #7567

Bugs (some fixed) in nn-tk 13.1

#7567
From: J. Porter Clark
Date: Tue, 16 Apr 1996 00:00
131 lines
4604 bytes
In nn-tk 13.1, I found and fixed the following bugs (see patch below):

  a. A bug in xmakefile that often causes compilers to complain.  I'm
  not sure why it didn't cause problems with nn-6.5.0.b3.

  b. A tiny ugliness in tk.c that tweaked an overly picky compiler.

  c. A problem in newsrc.c that makes nntidy dump core if .newsrc has
  very long lines and the -Q option is not used.  Note that this fix
  causes the output format of nntidy to be different.  This is not a
  new problem.

Some other bugs I've noticed:

1. nn and nn-tk have a serious memory leak if DO_NOV_DIGEST is defined
in config.h.  I managed to use up > 200 MB virtual memory one afternoon
by doing this:

  nn -mxXk -smoney all

I'm looking into this, but if somebody else wants to fix it first, by
all means go ahead.  For now, I'm leaving DO_NOV_DIGEST undefined.

2. In group.c, line 782, the prompt is longer than 80 characters, and
this causes ugliness in the non-TK version.  I changed it to the
following:

Use: j)mp J)mp(mark read) u)nread a)ll @)archive s)ubj n)ame e)ither or number

Note, however, that the prompt is actually not quite correct.  If
ART_GREP is defined, the 'b' and 'B' options are not shown.  Also, I
can't make '@' do anything; does it really work?

3. It would be super-nice if the TK version put the newsgroup 'purpose'
line on a dedicated area of the display instead of having it pop up
like a prompt for every group.  If I knew more about TK, I'd put this
in myself.

I'm tempted to go on and on with requests for enhancements, but I'll
stop here for now.


*** xmakefile.orig	Sat Mar 30 09:35:22 1996
--- xmakefile	Sat Apr  6 18:42:10 1996
***************
*** 166,175 ****
  inst: config.h xmakefile inst.sh cvt-help usercheck mkprefix man/nn.1
  	@echo building install script: ./inst
  	@./mkprefix full < /dev/null > inst
! 	@echo BIN_PROG=\"$(BIN_PROG)\" >> inst
! 	@echo BIN_LINK=\"$(BIN_LINK)\" >> inst
! 	@echo LIB_PROG=\"$(LIB_PROG)\" >> inst
! 	@echo MASTER_PROG=\"$(MASTER_PROG)\" >> inst
  	@cat inst.sh >> inst
  	@chmod 755 inst
  
--- 167,176 ----
  inst: config.h xmakefile inst.sh cvt-help usercheck mkprefix man/nn.1
  	@echo building install script: ./inst
  	@./mkprefix full < /dev/null > inst
! 	@echo BIN_PROG='"'$(BIN_PROG)'"' >> inst
! 	@echo BIN_LINK='"'$(BIN_LINK)'"' >> inst
! 	@echo LIB_PROG='"'$(LIB_PROG)'"' >> inst
! 	@echo MASTER_PROG='"'$(MASTER_PROG)'"' >> inst
  	@cat inst.sh >> inst
  	@chmod 755 inst
  
*** tk.c.orig	Thu Mar 28 11:02:55 1996
--- tk.c	Tue Apr 16 08:56:33 1996
***************
*** 45,51 ****
  static int nntp_abort();
  extern int nn_var();
  
! extern char *nn_directory,*lib_directory,*help_directory;;
  export int menu_max,menu_min;		/* max,min sizes for menu panel */
  export int mk_grp_menu = 1;             /* create group menu */
  
--- 45,51 ----
  static int nntp_abort();
  extern int nn_var();
  
! extern char *nn_directory,*lib_directory,*help_directory;
  export int menu_max,menu_min;		/* max,min sizes for menu panel */
  export int mk_grp_menu = 1;             /* create group menu */
  
*** newsrc.c.orig	Sun Apr  7 10:48:53 1996
--- newsrc.c	Mon Apr 15 09:22:28 1996
***************
*** 1657,1662 ****
--- 1657,1665 ----
      register group_header *gh;
      int changed;
      char *why;
+     int i;
+     char c;
+     char cbuf[RC_LINE_MAX];
  
      /* visit_rc_file has been called. */
  
***************
*** 1720,1726 ****
  	changed = 1;
  
       report:
! 	if (!silent) tprintf("%s%s\n", why, gh->group_name);
      }
  
      if (no_update) {
--- 1723,1737 ----
  	changed = 1;
  
       report:
! 	for (i = 0; i < (RC_LINE_MAX - 1); i++) {
! 	    if ((c = gh->group_name[i]) == '\0' || c == RC_SUBSCR ||
! 		    c == RC_UNSUBSCR)
! 		break;
! 	    cbuf[i] = c;
! 	}
! 	cbuf[i] = '\0';
! 
! 	if (!silent) tprintf("%s%s\n", why, cbuf);
      }
  
      if (no_update) {

-- 
J. Porter Clark    jpc@hammer.msfc.nasa.gov
NASA/MSFC Flight Data Systems Branch

Technical Details
Message-ID: <4l0d84$o22@anvil.msfc.nasa.gov>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nn.mbox.zip!not-for-mail

Show Full Headers
Complete Article Headers
Message-ID: <4l0d84$o22@anvil.msfc.nasa.gov>
Subject: Bugs (some fixed) in nn-tk 13.1
Date: Tue, 16 Apr 1996 00:00:00 +0000
From: jpc@hammer.msfc.nasa.gov (J. Porter Clark)
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nn.mbox.zip!not-for-mail
X-Deja-AN: 147794964
Sender: jpc@anvil.msfc.nasa.gov
Organization: NASA/MSFC
Newsgroups: news.software.nn