Return error codes instead of exiting, thus making sure that we exit

only via main() so that the exitspecs are properly applied.

When reading input data from a file, remember how many bytes were read
and write and verify only that many bytes.

Don't complain when an input file size is smaller than the memory size
we are programming.  This is normal.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@44 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
Brian S. Dean
2001-01-20 16:34:28 +00:00
parent 3d43a61bcc
commit c06319e33c
5 changed files with 104 additions and 54 deletions

5
avr.h
View File

@@ -90,7 +90,7 @@ int avr_read ( int fd, struct avrpart * p, AVRMEM memtype );
int avr_write_byte ( int fd, struct avrpart * p, AVRMEM memtype,
unsigned short addr, unsigned char data );
int avr_write ( int fd, struct avrpart * p, AVRMEM memtype );
int avr_write ( int fd, struct avrpart * p, AVRMEM memtype, int size );
int avr_program_enable ( int fd );
@@ -108,7 +108,8 @@ char * avr_memtstr ( AVRMEM memtype );
int avr_initmem ( struct avrpart * p );
int avr_verify(struct avrpart * p, struct avrpart * v, AVRMEM memtype);
int avr_verify(struct avrpart * p, struct avrpart * v, AVRMEM memtype,
int size);
void avr_display ( FILE * f, struct avrpart * p, char * prefix );