rem: int new_file_flag = 1; size_t n = 0;
add: bool new_file_flag = true; uintmax_t n = 0;
context: lines_split (size_t nlines, char *buf, size_t bufsize){  size_t n_read;  char *bp, *bp_out, *eob;  int new_file_flag = 1;  size_t n = 0;  do    {      n_read = full_read (input_desc, buf, bufsize);      if (n_read == SAFE_READ_ERROR)	error (EXIT_FAILURE, errno, "%s", infile);      bp = bp_out = buf;      eob = bp + n_read;      *eob = '\n';      for (;;)	{	  bp = memchr (bp, '\n', eob - bp + 1);	  if (bp == eob)	    {	      if (eob != bp_out) /* do not write 0 bytes! */		{		  size_t len = eob - bp_out;		  cwrite (new_file_flag, bp_out, len);		  new_file_flag = 0;		}	      break;	    }	  ++bp;	  if (++n >= nlines)	    {	      cwrite (new_file_flag, bp_out, bp - bp_out);	      bp_out = bp;	      new_file_flag = 1;	      n = 0;	    }	}    }  while (n_read == bufsize);}