rem: if ((strcmp(m->desc, "flash")==0) || (strcmp(m->desc, "eeprom")==0)) { if (pgm->paged_write != NULL) {  if (m->paged) { return pgm->paged_write(pgm, p, m, m->page_size, size); } #if 0 else { return pgm->paged_write(pgm, p, m, 32 , size); } #endif } }
context: int avr_write(PROGRAMMER * pgm, AVRPART * p, char * memtype, int size,               int verbose){  int              rc;  int              wsize;  unsigned long    i;  unsigned char    data;  int              werror;  AVRMEM         * m;  int              printed;  m = avr_locate_mem(p, memtype);  if (m == NULL) {    fprintf(stderr, "No \"%s\" memory for part %s\n",            memtype, p->desc);    return -1;  }  pgm->err_led(pgm, OFF);  if ((strcmp(m->desc, "flash")==0) || (strcmp(m->desc, "eeprom")==0)) {    if (pgm->paged_write != NULL) {      /*       * the programmer supports a paged mode write, perhaps more       * efficiently than we can read it directly, so use its routine       * instead       */      if (m->paged) {        return pgm->paged_write(pgm, p, m, m->page_size, size);      }#if 0      else {        return pgm->paged_write(pgm, p, m, 32 /*pgm->page_size*/, size);      }#endif    }  }  printed = 0;  werror  = 0;  wsize = m->size;  if (size < wsize) {    wsize = size;  }  else if (size > wsize) {    fprintf(stderr,             "%s: WARNING: %d bytes requested, but memory region is only %d bytes\n"            "%sOnly %d bytes will actually be written\n",            progname, size, wsize,            progbuf, wsize);  }  for (i=0; i<wsize; i++) {    data = m->buf[i];    if (verbose) {      if ((i % 16 == 0)||(i == (wsize-1))) {        fprintf(stderr, "\r      \r%6lu", i);        printed = 1;      }    }    rc = avr_write_byte(pgm, p, m, i, data);    if (rc) {      fprintf(stderr, " ***failed;  ");      fprintf(stderr, "\n");      pgm->err_led(pgm, ON);      werror = 1;    }    if (m->paged) {      /*       * check to see if it is time to flush the page with a page       * write       */      if (((i % m->page_size) == m->page_size-1) ||          (i == wsize-1)) {        rc = avr_write_page(pgm, p, m, i);        if (rc) {          fprintf(stderr,                  " *** page %ld (addresses 0x%04lx - 0x%04lx) failed "                  "to write\n",                  i % m->page_size,                   i - m->page_size + 1, i);          fprintf(stderr, "\n");          pgm->err_led(pgm, ON);          werror = 1;        }      }    }    if (werror) {      /*        * make sure the error led stay on if there was a previous write       * error, otherwise it gets cleared in avr_write_byte()        */      pgm->err_led(pgm, ON);    }  }  if (printed)    fprintf(stderr, "\n");  return i;}