Initial port of inline() code from rework