FILL_SIZE
char fill[FILL_SIZE+1];
memset(fill, c, FILL_SIZE);
fill[FILL_SIZE] = '\0';
int nnew = n <= FILL_SIZE ? n : FILL_SIZE;