{"id":13421159,"url":"https://github.com/pix/cppp","last_synced_at":"2026-05-19T06:35:29.563Z","repository":{"id":4635035,"uuid":"5779629","full_name":"pix/cppp","owner":"pix","description":"Fork of cppp: A Partial Preprocessor for C from Brian Raiter ","archived":false,"fork":false,"pushed_at":"2012-09-12T12:49:24.000Z","size":120,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-07-31T22:58:07.434Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pix.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-09-12T12:47:48.000Z","updated_at":"2019-07-14T14:10:52.000Z","dependencies_parsed_at":"2022-09-09T11:10:50.084Z","dependency_job_id":null,"html_url":"https://github.com/pix/cppp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pix/cppp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pix%2Fcppp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pix%2Fcppp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pix%2Fcppp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pix%2Fcppp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pix","download_url":"https://codeload.github.com/pix/cppp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pix%2Fcppp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33204729,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-18T09:27:30.708Z","status":"online","status_checked_at":"2026-05-19T02:00:06.763Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-30T22:01:50.740Z","updated_at":"2026-05-19T06:35:29.533Z","avatar_url":"https://github.com/pix.png","language":"C","funding_links":[],"categories":["TODO scan for Android support in followings"],"sub_categories":[],"readme":"cppp is a partial preprocessor for C/C++ code. It implements enough of\nthe C preprocessor to identify the preprocessor statements #if,\n#ifdef, et al., and applies their effects for the identifiers that are\nspecified on the command-line. Preprocessor statements using\nidentifiers not specified by the user are passed through without\nmodification. And no other part of the input is altered.\n\nThus, if cppp is invoked with the options -DFOO -UBAR, then FOO will\nbe defined, BAR will be undefined, and all other identifiers will be\nunaffected. A section guarded by \"#ifdef FOO\" will be included in the\noutput without the guard statements, and a section guarded by \"#ifdef\nBAR\" will be entirely dropped from the output.\n\nIn addition to removing #ifdef statements, cppp understands complex\nexpressions in #if statements that involve the defined operator, and\nwill apply the effects even partially. Thus for example the\npreprocessor statement \"#if (defined(BAR) || defined(BAZ))\" would be\nedited to read \"#if defined(BAZ)\" in the output.\n\ncppp can also handle simple numeric tests. For example, giving cppp\nthe option -D_LIB_VERSION=5 would cause the preprocessor statement\n\"#if _LIB_VERSION \u003e= 4\" to succeed. Note, however, that cppp is\nlimited to dealing with integer constants. The preprocessor statement\n\"#if _LIB_VERSION \u003e= _HEADER_FILE_VERSION\" would simply get rewritten\nto \"#if 5 \u003e= _HEADER_FILE_VERSION\", even if a definition for\n_HEADER_FILE_VERSION was provided in the same file.\n\nThe general purpose of this program is to deal with legacy code bases\nwhere #ifdefs have crept in and infiltrated the source. This sort of\nthing usually happens while code is transitioning from one platform to\nanother, in the misguided belief that this will ease the process\nrather than make it more confusing. Then, if the time finally comes\nthat the ifdefs can be safely removed, it often doesn't get done\nbecause it's too tedious and error-prone to do it manually.\n\nI originally wrote cppp as an interesting exercise, but I later wound\nup using it to save myself from just such a tedious task. Sadly,\nbecause the code was not originally intended to be seen by anyone, it\nis not well-written and in some places it is downright opaque. I have\nattempted to ameliorate this by cleaning up some of the most egregious\ninconsistencies and adding a handful of comments, but the central\nfunctions are quite large and not easily explicated (particularly with\nall the intervening years since the time of its original creation). I\noffer it solely as a tool that might save you from a mind-numbing\nchore, but not as something to learn from.\n\nBrian Raiter\nbreadbox@muppetlabs.com\nJune, 2011\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpix%2Fcppp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpix%2Fcppp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpix%2Fcppp/lists"}