Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!samsung!zaphod.mps.ohio-state.edu!lavaca.uh.edu!uhnix1!nuchat!buster!rli From: rli@buster.irby.com (Buster Irby) Newsgroups: comp.lang.c Subject: Re: strncpy Message-ID: <655@buster.irby.com> Date: 24 Jan 90 18:29:27 GMT References: <11527@csli.Stanford.EDU> <000003Q@cdis-1.UUCP> <11616@csli.Stanford.EDU> <48314938.f69e@phobos.UUCP> <11864@csli.Stanford.EDU> <9683@stealth.acf.nyu.edu> Distribution: usa Organization: Buster Irby, Stafford, Tx Lines: 17 brnstnd@stealth.acf.nyu.edu writes: >Since I do, in fact, always null-terminate the string myself, I'd prefer >that strncpy do the job for me. You have obviously never worked with any vendor supplied software which used non null-terminated buffers. For example, when you access a string data field under Unify, there is no null termination at the end of the field, because the string fields are fixed length. It is not necessary to terminate fixed length items with any kind of special marker. Special markers, such as the null character, are only useful when dealing with variable length data. Furthermore, in any database, I would consider it very inefficient to store null terminators. -- Buster Irby buster!rli