Not yet fully spec-compliant; work in progress
. add missing prototypes for recently added functions.
work of Antoine Leca