Return-Path: cudep@csv.warwick.ac.uk
Received: from spatula.csv.warwick.ac.uk (cudep@spatula.csv.warwick.ac.uk [137.205.193.200]) by bosnia.pop.psu.edu (8.6.9/8.6.9) with ESMTP id MAA19155 for <barr@pop.psu.edu>; Wed, 14 Dec 1994 12:59:02 -0500
Date: Wed, 14 Dec 1994 17:58:33 GMT
From: Ian Dickinson <cudep@csv.warwick.ac.uk>
Message-Id: <6430.199412141758@spatula.csv.warwick.ac.uk>
Received: by spatula.csv.warwick.ac.uk
	id RAA06430; Wed, 14 Dec 1994 17:58:33 GMT
X-Mailer: Mail User's Shell (7.2.5 10/14/92)
To: barr@pop.psu.edu
Subject: INN patch for the repository
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII

I've posted this before but people still seem to ask the question....
Perhaps you could add it to the INN unofficial patches repository?
------
This is a patch for INN1.4 inews.c which will allow it to use the NAME
environmental variable in preference for the GECOS field in From: headers.
Set DONT_MUNGE_GETENV in config.data to get the original behaviour.
I suppose ~/.fullname support could be plugged in here too, but we don't
use this facility here.

*** inews.c.ORIG	Tue Jan 25 14:10:19 1994
--- inews.c	Tue Jan 25 16:37:31 1994
***************
*** 485,490 ****
--- 485,499 ----
      char	*out;
      char	*p;
  
+ #if	!defined(DONT_MUNGE_GETENV)
+     (void)memset(outbuff, 0, SMBUF);
+     if ((p = getenv("NAME")) != NULL) {
+ 	(void)strncpy(outbuff, p, SMBUF);
+ 	outbuff[SMBUF - 1] = '\0';	/* paranoia */
+     }
+     if (strlen(outbuff) == 0) {
+ #endif	/* !defined(DONT_MUNGE_GETENV) */
+ 
  #if	defined(DONT_MUNGE_GECOS)
      (void)strcpy(outbuff, pwp->pw_gecos);
  #else
***************
*** 508,514 ****
  	    *out++ = *p;
      }
      *out = '\0';
! #endif	/* defined(DONT_MINGE_GECOS) */
  
      out = TrimSpaces(outbuff);
      if (out[0])
--- 517,527 ----
  	    *out++ = *p;
      }
      *out = '\0';
! #endif	/* defined(DONT_MUNGE_GECOS) */
! 
! #if	!defined(DONT_MUNGE_GETENV)
!     }
! #endif	/* !defined(DONT_MUNGE_GETENV) */
  
      out = TrimSpaces(outbuff);
      if (out[0])

Cheers,
-- 
Ian 'Vato' Dickinson - NIC handle: ID17                     Kibo bait :-)
cudep@csv.warwick.ac.uk  ...!uknet!warwick!cudep         vato@spuddy.uucp
          MIME mail welcome - don't send me no steenkin' X.400
Poke <A HREF="http://crocus.csv.warwick.ac.uk/staff/cudep.html">this</A>.
