rem: FILE *tfp; int i, t = 0; char *temp; for (i = 0; i < nfiles / NMERGE; ++i)
add: size_t in;   size_t out;   size_t remainder;   size_t cheap_slots;   for (out = in = 0; out < nfiles / NMERGE; out++, in += NMERGE)
context: merge (char **files, int nfiles, int max_merge, char const *output_file){  while (max_merge < nfiles)    {      FILE *tfp;      int i, t = 0;      char *temp;      for (i = 0; i < nfiles / NMERGE; ++i)	{	  temp = create_temp_file (&tfp);	  mergefps (&files[i * NMERGE], NMERGE, tfp, temp);	  files[t++] = temp;	}      temp = create_temp_file (&tfp);      mergefps (&files[i * NMERGE], nfiles % NMERGE, tfp, temp);      files[t++] = temp;      nfiles = t;      if (nfiles == 1)	break;    }  mergefps (files, nfiles, NULL, output_file);}