home *** CD-ROM | disk | FTP | other *** search
- /* ==( bench/fcopy.c )== */
-
- /* ----------------------------------------------- */
- /* Pro-C Copyright (C) 1988 - 1990 Vestronix Inc. */
- /* Modification to this source is not supported */
- /* by Vestronix Inc. */
- /* All Rights Reserved */
- /* ----------------------------------------------- */
- /* Written Nig 1-Jan-87 */
- /* Modified Geo 11-Dec-89 See comments below */
- /* ----------------------------------------------- */
- /* %W% (%H% %T%) */
-
- /*
- * Modifications
- *
- * 11-Dec-89 Geo - V2 version
- * 25-Oct-89 Geo - 1.32 Merge
- */
-
- /*
- * This routine is used to copy null terminated strings into a
- * a field of a file record. The destination field is then padded out
- * to a len of DLEN with nulls
- */
- # include <stdio.h>
- # include <bench.h>
-
- char *fcopy(dest, src, dlen)
- char *dest;
- char *src;
- int dlen;
- {
- char *p = dest;
-
- if (src != NULL)
- while (*src != '\0' && dest < p + dlen)
- *dest++ = *src++;
-
- while (dest < p + dlen)
- *dest++ = '\0';
-
- return(dest);
- }
-
-