changing names of the string subroutines

utzoo!decvax!ucbvax!unix-wizards utzoo!decvax!ucbvax!unix-wizards
Tue Oct 27 15:24:08 AEST 1981


>From alice!ark at Berkeley Tue Oct 27 14:35:41 1981
You are correct:  some operating systems have trouble with external names
that differ only after the sixth character.  It is felt here that
it is very unlikely that a future operating system will distinguish
fewer than six characters, because that would make FORTRAN so hard
to implement.  Thus, for portability, the unices in use at BTL have
their library subroutine names distinct in the first six characters.
Thus:

	strcpyn -> strncpy
	strcatn -> strncat
	strcmpn -> strncmp

Also, to avoid confusing PL/I users:

	index -> strchr
	rindex -> strrchr

(imagine a PL/I'er writing ... index ("foo", "oo") ...)



More information about the Comp.unix.wizards mailing list