c style struct converter