Path: utzoo!attcan!uunet!lll-winken!lll-lcc!ames!mailrus!tut.cis.ohio-state.edu!triceratops.cis.ohio-state.edu!karl From: karl@triceratops.cis.ohio-state.edu (Karl Kleinpaste) Newsgroups: news.software.b Subject: Re: Why does buildfname skip past hyphens? Message-ID: Date: 5 Jan 89 18:17:28 GMT References: <111@indri.primate.wisc.edu> Sender: news@tut.cis.ohio-state.edu Organization: OSU Lines: 23 In-reply-to: bin@primate.wisc.edu's message of 5 Jan 89 15:55:32 GMT bin@primate.wisc.edu (Brain in Neutral) writes: The comments in the code say it was lifted from sendmail, but there is a difference. If the name part of the gecos field contains a hyphen, the full name is stripped of everything to the left of the hyphen. (sendmail's buildfname() doesn't do this.) Thus articles by a user such as "Firstname Lastname-Hyphenated" get posted as being from just "Hyphenated". That is to accommodate the SysVish habit of having the gecos field be some set of digits (representing, e.g., departmental affiliation), followed by a dash and the real name. In particular, the canned administrative accounts on SysV machines always come with "0000-something" in the gecos field. E.g., root is frequently found to be root:abcefghijklm:0:0:0000-Admin:/: and hence, the left-of-dash stripping is necessary there. It might be possible for a better heuristic to determine if it's really SysVish as opposed to a true hyphenated name (looking for digits would be a good start), but the generalization as it currently stands is fairly appropriate. --Karl