Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site mips.UUCP Path: utzoo!linus!philabs!prls!amdimage!amdcad!decwrl!Glacier!mips!mash From: mash@mips.UUCP (John Mashey) Newsgroups: net.micro.att,net.unix-wizards Subject: Re: Re: instability in Berkeley versus AT&T releases (really index) Message-ID: <153@mips.UUCP> Date: Mon, 29-Jul-85 00:43:57 EDT Article-I.D.: mips.153 Posted: Mon Jul 29 00:43:57 1985 Date-Received: Tue, 30-Jul-85 05:32:48 EDT References: <2067@ucf-cs.UUCP> <363@cuae2.UUCP> <2423@sun.uucp> <5827@utzoo.UUCP> <2505@sun.uucp> Organization: MIPS Computer Systems, Mountain View, CA Lines: 33 Xref: linus net.micro.att:358 net.unix-wizards:11256 Guy Harris writes (onto long sequence of articles): > > > * Don't flame me if the index/strchr difference isn't an example of NIH -- > > > I haven't used V5 much... > > Furthermore, the index/strchr difference is probably not an example of NIH > in the way the original poster thought. *Both* routines are products of > AT&T - the routine was called "index" in V7 and "strchr" in System III. At > what point it was renamed, I dunno. The S3 documentation comes with a > description of changes between S3 and some unspecified earlier version of > UNIX. One of the changes was that "strcpyn" was renamed "strncpy". This > predates V7, since it was called "strncpy" there as well. 0) As usual, Guy has pretty good model of the history, minor details: 1) index->strchr happened in UNIX/TS 1.0 (in some sense, System I of the System V sequence). My 1.0 manual reads November 78; as I recall, this particular change happened fairly early in the packaging effort that was trying to get Edition 7 (late, but not released), PWB/UNIX 1.2, and some USG G3 UNIX all back together. 2) strcpyn ->strncpy happened at the same time, early 78. The rename was because some non-UNIX systems (GCOS, I think) took only the first 6 characters, so that strcpy and strcpyn conflicted, a clearly bad thing. 3) In general, it is unwise to EVER label something as NIH unless you know for a fact that it is NIH. There are more weird reasons for things being different in different UNIX versions than you would ever believe; only a few of them are NIH; it is always best to ask why things are different. -- -john mashey UUCP: {decvax,ucbvax,ihnp4}!decwrl!mips!mash DDD: 415-960-1200 USPS: MIPS Computer Systems, 1330 Charleston Rd, Mtn View, CA 94043