Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!hsi!mlfarm!ron From: ron@mlfarm.com (Ronald Florence) Newsgroups: comp.lang.icon Subject: Re: post.icn (news poster) Keywords: full names Message-ID: <693@mlfarm.com> Date: 12 Jan 91 13:52:18 GMT References: <689@mlfarm.com> Sender: ron@mlfarm.com Distribution: comp Organization: Maple Lawn Farm, Stonington, CT Lines: 88 In-reply-to: ron@mlfarm.com's message of 9 Jan 91 15:33:30 GMT This patch will add (Full Name) to the From line of outgoing postings from post.icn. Most of the changes are added lines, so if you don't have `patch' it shouldn't be too onerous to do manually. If your passwd file keeps full names between a "-" and a "(", try setting "unixtype" to "usg". Use "bsd" for Xenix, V7 or other passwd files which have the full name the first item after the colon in the field. The ms-dos support relies on a hard-coded full name (ugh!). *** post.icn~ Tue Jan 8 19:57:00 1991 --- post.icn Thu Jan 10 23:15:24 1991 *************** *** 19,25 **** # ############################################################################ # ! # Configure: smarthost, mode, editor or EDITOR environment variable. # ############################################################################ # --- 19,25 ---- # ############################################################################ # ! # Configure: smarthost, mode, unixtype, editor or EDITOR env. variable. # ############################################################################ # *************** *** 34,39 **** --- 34,40 ---- smarthost := "news-feed" # Your news feed. mode := "uux" # Use "mail" for a sendnews feed. + unixtype := "bsd" # Use "usg" for "-Full Name(" passwd file. domain := ".UUCP" if (find("UNIX", &features) & find("pipes", &features)) then { *************** *** 43,48 **** --- 44,57 ---- # Uuname sometimes pads with spaces. (inf := open("uuname -l", "pr")) & (sitename := trim(!inf)) & close(inf) (tz := getenv("TZ")) & tz ?:= (tab(many(&letters)), tab(upto(&letters))) + \logname & (inf := open("/etc/passwd")) & every s := !inf do s ? { + =(logname) & { + every tab(upto(':')+1) \4 + if find("bsd", unixtype) then fullname := tab(upto(':')) + else fullname := (tab(upto('-')+1), tab(upto('('))) + break + } + } sigfile := getenv("HOME") || "/.signature" editor := "/bin/vi" } *************** *** 52,57 **** --- 61,67 ---- logname := &null sitename := &null tz := &null # Hours off GMT. + fullname := &null sigfile := &null editor := "edlin" } *************** *** 59,65 **** article := open(tmpfile := tempname(tmpdir), "w") | stop("post: cannot write temp file") write(article, "Path: ", sitename, "!", logname) ! write(article, "From: ", logname, "@", sitename, domain) if \arg[1] then { inf := open(arg[1]) | { --- 69,77 ---- article := open(tmpfile := tempname(tmpdir), "w") | stop("post: cannot write temp file") write(article, "Path: ", sitename, "!", logname) ! writes(article, "From: ", logname, "@", sitename, domain) ! \fullname & writes(article, " (", fullname, ")") ! write(article) if \arg[1] then { inf := open(arg[1]) | { -- Ronald Florence ron@mlfarm.com