{"id":13830627,"url":"https://github.com/nokia/awkcc","last_synced_at":"2025-07-27T15:33:16.328Z","repository":{"id":43097133,"uuid":"445551058","full_name":"nokia/awkcc","owner":"nokia","description":null,"archived":false,"fork":false,"pushed_at":"2022-03-18T13:31:19.000Z","size":304,"stargazers_count":82,"open_issues_count":0,"forks_count":7,"subscribers_count":7,"default_branch":"main","last_synced_at":"2024-11-20T12:09:49.497Z","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":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nokia.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-01-07T14:37:12.000Z","updated_at":"2024-10-05T02:27:10.000Z","dependencies_parsed_at":"2022-09-14T01:32:39.351Z","dependency_job_id":null,"html_url":"https://github.com/nokia/awkcc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nokia%2Fawkcc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nokia%2Fawkcc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nokia%2Fawkcc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nokia%2Fawkcc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nokia","download_url":"https://codeload.github.com/nokia/awkcc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227817160,"owners_count":17824199,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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-08-04T10:01:03.370Z","updated_at":"2024-12-02T23:10:23.738Z","avatar_url":"https://github.com/nokia.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"# awkcc\n\nawkcc is an awk-to-C transcompiler. It was originally implemented by Chris Ramming,\nthen at Bell Labs, circa 1988.\n\nThe intent of this repo is to make the source code of awkcc public for historical\npurposes. This code is not being further developed or maintained.\n\n## Repo structure\n\nThe repo contains two snapshots of the source code in the [1988](1988) and\n[2011](2011) folders. Both snapshots contain the complete codebase of awkcc\nat the given time. The codebase includes the original documentation.  Much\nthanks to Arnold Robbins for his help in recovering these snapshots.  Thanks\nto Jeff Paranich for the build instructions.\n\n## Build Instructions\n\nThese instructions apply to the 2011 version of the code.\n\n### Requirements\n\nYacc is required to build. On a Debian-derived system with `apt`,\ninstall it with `apt install bison`.\n\n### Compilation\n\n#### Build in Linux\nBuild: `make awkcc TYPE=darwin CC=gcc`\n\nClean: `make force`\n\n#### Build in MinGW (MSys)\nBuild: `make awkcc TYPE=cygwin CC=gcc CFLAGS=\"-D__CYGWIN__ -DWIN_NUL_DEV\"`\n\nClean: `make force`\n\nIt is neccessary to define __CYGWIN__ or else the compiler will compile\na different implementation of the function awkerr in awkerr.c, which\nrelies on `_doprnt`, which is non-portable (no POSIX, no ANSI/ISO C).\n\nSee the Makefile for other build type parameters (solaris, hppa).\n\nAfter building, `make` will create three files worth noting:\n\n* The executable 'awkcc' in awkcc20/awkcc\n* The script 'awkcc.sh' in awkcc20/awkcc\n* The library 'libAWK.a' in awkcc20/lib\n\nYou will need to edit awkcc.sh HEADERDIR and AWKLIB variables (at the top\nof the script) to where you ultimately install libAWK.a and the header\nfiles on your system. You only need to install the headers in ./include\n({awk,dollars,ear,hash,header,specassign,y.tab}.h)\n\n### Usage\n\n    awkcc -o nwc -c nwc.c nwc.awk\n\nawkcc will automatically call awkcc.sh, a shell script for compiling\nthe resulting .c file.  It may require hand-tuning based on your include\nand library paths, but is pretty straightforward.\n\nAlternatively if want to compile the generated .c manually you can do so with:\n\n    gcc -I../include -o nwc nwc.c libAWK.a -lm\n\nNote the order of statements matter; libAWK.a must come after `*.c`.\n\n### Minor Changes to Original Bell Labs Source\n\nThese minor changes enable the code to compile on certain systems.\n\n#### [Added to awkrun.c]\n\nTo allow execution in Windows through MinGW, it is neccessary to specify an\nalternative to /dev/null:\n\n\t#ifdef WIN_NUL_DEV\n\tin = fopen(\"nul\", \"r\");\n\tif (in == NULL)\n\t\tfprintf(stderr, \"cannot open nul for reading.\\n\");\n\t#else\n\tin = fopen(\"/dev/null\", \"r\");\n\tif (in == NULL)\n\t\tfprintf(stderr, \"cannot open /dev/null for reading.\\n\");\t\n\t#endif\n\n#### [Changed in main.c]\n\n    Nodep yyparse();\n     -to-\n    int yyparse();\n\n## License\n\nawkcc is licensed under the [BSD 2-Clause \"Simplified\" License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnokia%2Fawkcc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnokia%2Fawkcc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnokia%2Fawkcc/lists"}