mirror of
https://github.com/mariusgreuel/avrdude.git
synced 2025-12-16 02:31:06 +00:00
Cache config_file components in AVRPART and PROGRAMMER structures
Some 90% of the space of AVRPART and some 50% of PROGRAMMER is occupied by a 4 kB array config_file[] that contains the configuration file name. In preparation of developer options that output a raw dump of the part descriptions, this commit changes the config_file components from a large array, which is duplicated in each part and programmer description, to a cached string for each config file allowing for smaller raw dumps. This commit also changes the config file name to its realpath(), eg, shortens unwarranted `/bin/../etc/` file name components. It also changes the global variable names `infile` and `fileno` to cfg_infile and cfg_fileno for an ever so slight improvement of code clarity.
This commit is contained in:
@@ -568,7 +568,7 @@ AVRPART * avr_new_part(void)
|
||||
p->reset_disposition = RESET_DEDICATED;
|
||||
p->retry_pulse = PIN_AVR_SCK;
|
||||
p->flags = AVRPART_SERIALOK | AVRPART_PARALLELOK | AVRPART_ENABLEPAGEPROGRAMMING;
|
||||
p->config_file[0] = 0;
|
||||
p->config_file = NULL;
|
||||
p->lineno = 0;
|
||||
memset(p->signature, 0xFF, 3);
|
||||
p->ctl_stack_type = CTL_STACK_NONE;
|
||||
|
||||
Reference in New Issue
Block a user