Ok... one more thing....
This is really just a text formatting nit but putting the return type on a separate line above your function declaration is rather coufusing since it's not really done anymore. It's coding style circa 1980 and may result in "Old style declaration" warnings on some compilers.Code:static void set_text (struct Buffer_Info *const buffer, char *const text) { buffer->text = text; }
Since all functions are static by definition, that keyword is superfluous in this case.