preprocess c code to generate headers #9

Open
opened 2026-04-27 22:56:23 +00:00 by jaynuine · 0 comments
Owner

explicitly import libraries, move those include directives to an associated header on a per unit basis (e.g. file.c ==> file.h)

either nm or parse the code to find external symbols and compare that to the mentioned headers to mention those, either as prototypes under the include directive (or a matching comment if forced to include all at the top) or as comments for the existence of macros when they may not be redeclared because their declaration is not idempotent

export keyword in units to insert prototype into corresponding header ?
or just rely on functions being explicitly static when not meant to be exported, and assume the absence of the static keyword to mean that it should be
i'd like to avoid deviating from vanilla c as much as possible

explicitly import libraries, move those include directives to an associated header on a per unit basis (e.g. `file.c` ==> `file.h`) either `nm` or parse the code to find external symbols and compare that to the mentioned headers to mention those, either as prototypes under the include directive (or a matching comment if forced to include all at the top) or as comments for the existence of macros when they may not be redeclared because their declaration is not idempotent export keyword in units to insert prototype into corresponding header ? or just rely on functions being explicitly static when not meant to be exported, and assume the absence of the static keyword to mean that it should be i'd like to avoid deviating from vanilla c as much as possible
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jaynuine/weegie#9
No description provided.