Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/3/84; site delftcc.UUCP Path: utzoo!watmath!clyde!cbosgd!ihnp4!houxm!whuxl!whuxlm!akgua!gatech!seismo!cmcl2!philabs!rdin!delftcc!sam From: sam@delftcc.UUCP (Sam Kendall) Newsgroups: net.news.b Subject: Full name lookup (NAME should be FULLNAME) Message-ID: <104@delftcc.UUCP> Date: Tue, 19-Nov-85 23:21:41 EST Article-I.D.: delftcc.104 Posted: Tue Nov 19 23:21:41 1985 Date-Received: Sat, 23-Nov-85 03:55:11 EST Organization: Delft Consulting Corp., New York Lines: 31 Keywords: ifuncs.c, inews Some systems (like our Codata) put the logname into the environment variable NAME; unfortunately, news thinks that NAME contains the user's full name. The simplest solution is to use FULLNAME instead of NAME. To maintain compatibility, though, perhaps inews should try FULLNAME, then NAME, but reject NAME if it is the same as the logname. (If those fail, of course, inews should do what it does now, try $HOME/.name, then /etc/passwd.) This is the old simplicity vs. compatibility decision. News isn't commercial software, so I think simplicity is the way to go. Minor one-time user annoyance vs. minor long-term complication. But in case someone wants to do the complicated solution, diffs for it are below. ---- Sam Kendall Delft Consulting Corp. (212) 243-8700 {allegra, seismo!cmcl2, ihnp4}!delftcc!sam *** OLD ifuncs.c: fn = getenv("NAME"); *** NEW ifuncs.c: ! fn = getenv("FULLNAME"); + + if (fn == NULL) { + fn = getenv("NAME"); + if (fn != NULL && strcmp(fn, logname) == 0) + fn = NULL; + }