classes.struct: factoring struct-size out.
tools.ps: implemented on macosx.