/* @(#)strncpy_null.c 2.1 93/05/18 */ /******************************************************************************/ /* function : strncpy_null.c */ /* */ /* subsystem : chgen */ /* */ /* input : b (source string) , n (char copy count, same as for strncpy) */ /* */ /* output : a (result string) */ /* */ /* returns : void */ /* */ /* author : Steve Smith / Craig Smith */ /* */ /* created : July, 1991 */ /* */ /* revisions : */ /* */ /* description : This routine is identical to the standard library routine */ /* strncpy, except that the result string is then null */ /* terminated properly. */ /* */ /******************************************************************************/ #include #include #include "chgen_define.h" #include "chgen_externs.h" void strncpy_null(a,b,n) char a[]; char b[]; int n; { static char rcsid[] = "$Id: strncpy_null.c,v 1.2.4.1 1999/05/04 17:00:23 jkarner Exp $"; strncpy(a,b,n); a[n] = '\0'; return; }