Skip to content

[Suggestion] Use the cpp command (C Pre Processor) #9

Open
@SohamG

Description

@SohamG

I recently wanted to get rid of the cruft from my config.h removing all the conditional lines. I instinctively used cpp feeding it patches.h for the macros and telling it to retain comments to get the desired result.

I ran something like this:

cpp config.h.old -imacros patches.h -C -o config.h

I then realized I couldve used this script and out of curiosity I checked the implementation.

IDK if this project is actively developed, but perhaps the ginormous awk program can be shortened with cpp?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions