Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!brutus.cs.uiuc.edu!apple!oliveb!orc!decwrl!megatest!djones From: djones@megatest.UUCP (Dave Jones) Newsgroups: comp.lang.c Subject: Re: strncpy Message-ID: <11494@goofy.megatest.UUCP> Date: 21 Dec 89 23:08:11 GMT References: <11509@csli.Stanford.EDU> Organization: Megatest Corporation, San Jose, Ca Lines: 11 From article <11509@csli.Stanford.EDU>, by poser@csli.Stanford.EDU (Bill Poser): > > ... I claim that strncpy is mis-designed and should > null-terminate. Any comments? > I grepped through a bunch of my code, and it all adds a null everywhere it calls strncpy. So a null-terminating strncpy would seem to be useful. But don't name it strncpy! There just may be code out there that depends on it working the way it's documented. Call it strncpy0 or something.