Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!aplcen!samsung!caesar.cs.montana.edu!ogicse!emory!stiatl!cns From: cns@stiatl.UUCP (Chris Straut) Newsgroups: comp.lang.c Subject: Re: strncpy Keywords: strncpy null termination Message-ID: <8334@stiatl.UUCP> Date: 22 Dec 89 15:00:51 GMT References: <11509@csli.Stanford.EDU> <8313@stiatl.UUCP> <621@buster.irby.com> Reply-To: cns@stiatl.UUCP (Chris Straut) Organization: Sales Technologies Inc., "The Little Shop of Horrors..." Lines: 36 In article <621@buster.irby.com> rli@buster.irby.com (Buster Irby) writes: >cns@stiatl.UUCP (Chris Straut) writes: > >>I agree that strncpy should null terminate the resulting string. The >>definition of a string in the C language is a null terminated char array. >>And the function called (str)ncpy indicates a string operation, which by >>default should create a null terminated string. To overcome this 'feature' >>we wrote our own strncpy function, which is benefical to the unsuspecting > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >>programmer (or novice), and the result is a null terminated string. > >CAUTION: There is a lot of existing software in the world that >would break if the operation of strncpy or any other standard >library function were suddenly changed. [ alot of other stuff deleted ] We didn't call the new function strncpy. Sorry if the text above was misleading. We have written a set of library functions to enhance the C run-time library as well as increase its functionality. We currently do development on three different platforms, therefore the need for portable library functions which can be maintained in-house. We currently employ alot of CO-OP programmers, and many are not very experienced in the C language. The use of our libraries assist these CO-OPs in overcoming these holes in the C run-time library naming convention. We are currently putting together a developers guide for in-house use, which will document the characteristics of the C libarary as well as our own C functions which bring to the attention certain "features" of the language run-time library. -- Christopher Straut | Go Jackets!!!!! gatech!stiatl!cns Sales Technologies, Inc | 3399 Peachtree Rd, NE | Atlanta, GA (404) 841-4000 |