#!/bin/sed -f
# Script transforming gmp_h.ads generated by g++ --dump-ada-specs.

1i\
--  This source is generated, and may be different on your system.\

# Avoid depending on the C header path.
# Allow depending units to be declared Pure.
s/^package .*_gmp_h is$/package GMP.H with Pure is/
s/^end .*_gmp_h;$/end GMP.H;/

# Remove noisy comments.
# (most of them depend on the architecture)
/ *--.*/ {
  s///
  # If the modified line is empty, remove it.
  /^$/ d }

# Remove named access types (so that the package is Pure).
/^   type .* is access / d
