I don't understand your objection, but here's how I would do it (condensed with comments). Only the first file would be distributed as plain text.
list-decl.hlist.hCode:struct ListNode {
/* ... */
};
struct List {
/* ... */
};
/* ... function declarations ... */
main.cCode:#include "list-decl.h"
/* ... function definitions ... */
Code:#include "list.h"
/* ... */