rem: fprintf(stderr, "**" ); ready = 1;
add: return -1;
context: int avr_write_byte ( int fd, int memtype, unsigned short addr, unsigned char data ){  unsigned char r;  int ready;  int tries;  switch (memtype) {    case AVR_FLASH_LO:       avr_txrx(fd, 0x40);       break;    case AVR_FLASH_HI:       avr_txrx(fd, 0x48);       break;    case AVR_EEPROM:       avr_txrx(fd, 0xc0);       addr &= 0x7f;      break;    default:      fprintf(stderr, "%s: avr_write_byte(); internal error: invalid memtype=%d\n",              progname, memtype);      exit(1);      break;  }  avr_txrx(fd, addr >> 8);     /* high order bits of address       */  avr_txrx(fd, addr & 0x0ff);  /* low order bits of address        */  avr_txrx(fd, data);          /* data                             */  tries = 0;  ready = 0;  while (!ready) {    usleep(5000);               /* flash write delay */    r = avr_read_byte ( fd, addr, memtype );    if (data == 0x7f) {      usleep(20000);      ready = 1;    }    else if (r == data) {      ready = 1;    }    tries++;    if (!ready && tries > 10) {      fprintf(stderr, "**" );      ready = 1;    }  }  return 0;}