added prototypes for inline functions (some gcc versions couldn't compile without)