#!/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.
/^package .*_gmp_h is$/ c\
package GMP.H is\
   pragma Pure;

# Remove noisy comments.
s/ *--.*//
/^$/d

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

# The last definitions contain errors.
/^limited with cpp_[0-9.]*_iosfwd;$/d
/^   function operator_sl /,$ c\
end GMP.H;
