1 #include <string.h> 2 3 /* global header (opt.) and strpad's prototypes "" */ 4 #include "csf.h" 5 #include "csfimpl.h" 6 7 /* headers of this app. modules called */ 8 9 /***************/ 10 /* EXTERNALS */ 11 /***************/ 12 13 /**********************/ 14 /* LOCAL DECLARATIONS */ 15 /**********************/ 16 17 /*********************/ 18 /* LOCAL DEFINITIONS */ 19 /*********************/ 20 21 /******************/ 22 /* IMPLEMENTATION */ 23 /******************/ 24 /* pad a string attribute with zeros (LIBRARY_INTERNAL) 25 */ CsfStringPad(char * s,size_t reqSize)26char *CsfStringPad(char *s, size_t reqSize) 27 { 28 size_t l = strlen(s); 29 PRECOND(l <= reqSize); 30 (void)memset(s+l, '\0', reqSize-l); 31 return s; 32 } 33