add: start = 0;
context: int avr_read ( int fd, struct avrpart * p, AVRMEM memtype ){  unsigned char rbyte, memt;  unsigned short n, start, end, i, bi;  unsigned char * buf;  int bufsize;  switch (memtype) {    case AVR_FLASH  :      memt    = AVR_FLASH_LO;      buf     = p->flash;      n       = p->flash_size/2;      bufsize = p->flash_size;      break;    case AVR_EEPROM :       memt    = memtype;      buf     = p->eeprom;      n       = p->eeprom_size;      bufsize = p->eeprom_size;      break;    default:      fprintf(stderr, "%s: avr_read(); internal error: invalid memtype=%d\n",              progname, memtype);      exit(1);      break;  }  end = start+n;  bi = 0;  for (i=start; i<end; i++) {    /* eeprom or low byte of flash */    rbyte = avr_read_byte(fd, p, memt, i);    fprintf ( stderr, "                    \r%4u  0x%02x", i, rbyte );    if (bi < bufsize) {      buf[bi++] = rbyte;    }    if (memtype == AVR_FLASH) {      /* flash high byte */      rbyte = avr_read_byte(fd, p, AVR_FLASH_HI, i);      fprintf ( stderr, " 0x%02x", rbyte );      if (bi < bufsize) {        buf[bi++] = rbyte;      }    }  }  fprintf ( stderr, "\n" );  return 0;}