6,8 → 6,6 |
* can be used and distributed without restriction, including for commercial use * |
* No warrenty whatoever * |
********************************************************************************* |
|
7/5/2019 use strlcpy, strlcat - size-bounded string copying and concatenation |
*/ |
|
#include <stdio.h> |
38,7 → 36,7 |
} |
else |
{ |
strlcpy( word, ptr, sizeof(word) ) ; |
strncpy( word, ptr, length ) ; |
total = 0; |
for( i = 0;i < length ;i++ ){ |
total = total + word[i]; |
50,3 → 48,4 |
fprintf(stdout,"\n"); |
return 0 ; |
} |
|