strncpy
Chris Straut
cns at stiatl.UUCP
Sat Dec 23 02:00:51 AEST 1989
In article <621 at buster.irby.com> rli at buster.irby.com (Buster Irby) writes:
>cns at 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 |
More information about the Comp.lang.c
mailing list