- space_def = gh_cdr (space_def);
- Real distance = gh_scm2double (gh_cdr (space_def));
- SCM type = gh_car (space_def) ;
+ space_def = scm_cdr (space_def);
+ Real distance = scm_to_double (scm_cdr (space_def));
+ SCM type = scm_car (space_def);
+
+ Real fixed = last_ext[RIGHT];
+ Real ideal = fixed + 1.0;
+
+ if (type == ly_symbol2scm ("fixed-space"))
+ {
+ fixed += distance;
+ ideal = fixed;
+ }
+ else if (type == ly_symbol2scm ("extra-space"))
+ ideal = fixed + distance;
+ else if (type == ly_symbol2scm ("semi-fixed-space"))
+ {
+ fixed += distance / 2;
+ ideal = fixed + distance / 2;
+ }
+ else if (type == ly_symbol2scm ("minimum-space"))
+ ideal = last_ext[LEFT] + max (last_ext.length (), distance);
+ else if (type == ly_symbol2scm ("minimum-fixed-space"))
+ {
+ fixed = last_ext[LEFT] + max (last_ext.length (), distance);
+ ideal = fixed;
+ }
+
+ Real stretchability = ideal - fixed;
+
+ /* 'situational_space' passed by the caller
+ could include full-measure-extra-space */
+ ideal += situational_space;
+
+ Real optical_correction = next_notes_correction (me, last_grob);
+ fixed += optical_correction;
+ ideal += optical_correction;