rem: int i;
add: int i, first = 1;
context: autoscale(){    double max_width = LONG_MIN, max_height = LONG_MIN;    double min_x = LONG_MAX;    double x_scale, y_scale;    int i;        if (screen.drawing_area == NULL)	return;    for(i = 0; i < MAX_FILES; i++) {        if (screen.file[i]) {                        /*              * Find the biggest image and use as a size reference             */            max_width = MAX(screen.file[i]->image->info->max_x -                            screen.file[i]->image->info->min_x,                            max_width);            max_height = MAX(screen.file[i]->image->info->max_y -                             screen.file[i]->image->info->min_y,                             max_height);            min_x  = MIN(screen.file[i]->image->info->min_x, min_x);        }    }    /*     * Calculate scale for both x axis and y axis     */    x_scale = screen.drawing_area->allocation.width / max_width;    y_scale = screen.drawing_area->allocation.height / max_height;    /*     * Take the scale that fits both directions with some extra checks     */    screen.scale = (int)ceil(MIN(x_scale, y_scale));    if (screen.scale < 1)	screen.scale = 1;    if (screen.scale > 10)	screen.scale = (screen.scale / 10) * 10;    /*     * "Calculate" translation     */    screen.trans_x = 0;    screen.trans_y = 0;    return;} /* autoscale */