
# global - sed script which extracts global variables & functions

/^#ifndef[ \t]*global/,/^#endif[ \t]*\/\* global \*\// {
	/^#ifndef[ \t]*global/d
	/^#endif[ \t]*\/\* global \*\//d
	p
}

/^;global/ {
	s/^;global/extern/
	s/[^;]$/&;/
	s/()[ \t]*;/(void);/
	p
}

/^global/ {
	s/^global/extern/
	s/[^;]$/&;/
	s/()[ \t]*;/(void);/
	p
}
