🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nn
Article #10674

Re: nn-6.7beta is now available

#10674
From: Michael T Pins
Date: Sat, 09 Apr 2005 05:18
148 lines
4156 bytes
Michael F Gordon <mfg@ee.ed.ac.uk> writes:

>Mapping keys from .nn/init seems to be broken.  If I have

>  map both ; preview

>in .nn/init I get the error 

>  init error: unknown key command: preview

>Commenting this line out and typing

>  :map both ; preview

>while running nn works though.  The same thing happens no matter what
>I use for the key and command.

The following patch (which, of course, can be added from within nn with
the :patch command) should fix it.


*** nn.c.bak	Wed Mar 30 01:08:37 2005
--- nn.c	Fri Apr  8 22:15:52 2005
***************
*** 871,886 ****
      if ((say_welcome = init_global2()) < 0)
  	nn_exitmsg(1, "%s: nn has not been invoked to initialize user files", pname);
  
-     if (!silent && who_am_i != I_AM_CHECK)
- 	prt_version();
- 
- #ifdef NNTP
-     if (who_am_i != I_AM_VIEW) {
- 	visit_init_file(0, argv[1]);
- 	nntp_check();
-     }
- #endif
- 
      init_key_map();
  
  #ifndef AUTHORIZE
--- 871,876 ----
***************
*** 889,897 ****
--- 879,924 ----
  
      init_macro();
  
+     switch (who_am_i) {
+ 	case I_AM_VIEW:
+ 	    /* FALLTHROUGH */
+ 	case I_AM_NN:
+ 	    init_term(1);
+ 	    visit_init_file(0, argv[1]);
+ 	    if (!silent)
+ 		prt_version();
+ 	    break;
+ 
+ 	case I_AM_ADMIN:
+ 	    if (argc == 1) {
+ 		init_term(1);
+ 		visit_init_file(0, (char *) NULL);
+ 	    }
+ 	    break;
+ 
+ 	case I_AM_CHECK:
+ 	    /* FALLTHROUGH */
+ 	case I_AM_TIDY:
+ 	    /* FALLTHROUGH */
+ 	case I_AM_GOBACK:
+ 	    /* FALLTHROUGH */
+ 	case I_AM_GREP:
+ 	    init_term(0);
+ 	    visit_init_file(0, (char *) NULL);
+ 	    if (!silent && who_am_i != I_AM_CHECK)
+ 		prt_version();
+ 	    break;
+     }
+ 
      if (nn_locked())
  	nn_exit(2);
  
+ #ifdef NNTP
+     if (who_am_i != I_AM_VIEW) {
+ 	nntp_check();
+     }
+ #endif
+ 
  nnspew:
  
      if (who_am_i != I_AM_VIEW)
***************
*** 901,911 ****
  
  	case I_AM_VIEW:
  	    /* FALLTHROUGH */
- 
  	case I_AM_NN:
- 	    init_term(1);
- 	    visit_init_file(0, argv[1]);
- 
  	    if (say_welcome) {
  		first_time_user = 1;
  		display_file("adm.welcome", CLEAR_DISPLAY | CONFIRMATION);
--- 928,934 ----
***************
*** 956,972 ****
  	    break;
  
  	case I_AM_ADMIN:
- 	    if (argc == 1) {
- 		init_term(1);
- 		visit_init_file(0, (char *) NULL);
- 	    }
  	    admin_mode(argv[1]);
  	    nn_exit(0);
  	    break;
  
  	case I_AM_CHECK:
- 	    init_term(0);
- 	    visit_init_file(0, (char *) NULL);
  	    silent = 0;		/* override setting in init file */
  	    group_name_args =
  		parse_options(argc, argv, (char *) NULL, check_options,
--- 979,989 ----
***************
*** 979,998 ****
  	    break;
  
  	case I_AM_TIDY:
- 	    init_term(0);
- 	    visit_init_file(0, (char *) NULL);
  	    group_name_args = opt_nntidy(argc, argv);
  	    break;
  
  	case I_AM_GOBACK:
- 	    init_term(0);
- 	    visit_init_file(0, (char *) NULL);
  	    group_name_args = opt_nngoback(argc, &argv);
  	    break;
  
  	case I_AM_GREP:
- 	    init_term(0);
- 	    visit_init_file(0, (char *) NULL);
  	    opt_nngrep(argc, argv);
  	    silent = 1;
  	    no_update = 1;
--- 996,1009 ----
Technical Details
Message-ID: <115epdbjboabic1@corp.supernews.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nn.20140326.mbox.gz!number1.nntp.ams.giganews.com!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newshub.sdsu.edu!tethys.csu.net!nntp.csufresno.edu!sn-xit-03!sn-xit-08!sn-post-02!sn-post-01!supernews.com!corp.supernews.com!mtpins
References: <115c4lcrsrra386@corp.supernews.com> <d363q1$kjd$1@scotsman.ed.ac.uk>

Show Full Headers
Complete Article Headers
Message-ID: <115epdbjboabic1@corp.supernews.com>
Subject: Re: nn-6.7beta is now available
Date: Sat, 09 Apr 2005 05:18:35 -0000
From: Michael T Pins <mtpins@nndev.org>
References: <115c4lcrsrra386@corp.supernews.com> <d363q1$kjd$1@scotsman.ed.ac.uk>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nn.20140326.mbox.gz!number1.nntp.ams.giganews.com!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newshub.sdsu.edu!tethys.csu.net!nntp.csufresno.edu!sn-xit-03!sn-xit-08!sn-post-02!sn-post-01!supernews.com!corp.supernews.com!mtpins
Newsgroups: news.software.nn
Organization: Posted via Supernews, http://www.supernews.com
User-Agent: nn/6.7.beta
X-Complaints-To: abuse@supernews.com
Lines: 148