{"id":19536745,"url":"https://github.com/sigmapitech/myprintf","last_synced_at":"2025-04-26T14:36:54.521Z","repository":{"id":229447268,"uuid":"708821254","full_name":"Sigmapitech/myprintf","owner":"Sigmapitech","description":"Allocation free, C99 printf function recreation focused of a small memory footprint","archived":false,"fork":false,"pushed_at":"2024-03-24T19:17:17.000Z","size":508,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2024-10-17T23:15:33.617Z","etag":null,"topics":["c","epitech","epitech-project","printf"],"latest_commit_sha":null,"homepage":"","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/Sigmapitech.png","metadata":{"files":{"readme":"README.md","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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-10-23T13:11:05.000Z","updated_at":"2024-04-15T21:38:57.000Z","dependencies_parsed_at":"2024-03-30T17:00:19.451Z","dependency_job_id":null,"html_url":"https://github.com/Sigmapitech/myprintf","commit_stats":null,"previous_names":["sigmapitech/myprintf"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sigmapitech%2Fmyprintf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sigmapitech%2Fmyprintf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sigmapitech%2Fmyprintf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sigmapitech%2Fmyprintf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sigmapitech","download_url":"https://codeload.github.com/Sigmapitech/myprintf/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224037301,"owners_count":17245218,"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":["c","epitech","epitech-project","printf"],"created_at":"2024-11-11T02:24:09.956Z","updated_at":"2025-04-26T14:36:54.505Z","avatar_url":"https://github.com/Sigmapitech.png","language":"C","readme":"# C99 Printf Recreation\n\n*Recreating infamous printf function as described by standard C99.*\n\n\u003e [!CAUTION]\n\u003e if you are a epitech student, and want to make a quick buck of this repo,\n\u003e copying the content of this repository for your own delivery will grade you a\n\u003e `-42` for cheating.\n\n## :closed_book: \u003csamp\u003eC99 limitations\u003c/samp\u003e\n\nPlease refer to the [fprintf format specification](https://www.open-std.org/JTC1/SC22/WG14/www/docs/n1256.pdf#%5B%7B%22num%22%3A571%2C%22gen%22%3A0%7D%2C%7B%22name%22%3A%22XYZ%22%7D%2C-27%2C816%2Cnull%5D)\nfor information about supported features.\n\nThe current implementation follows strictly the C99 compliance, with the\nfollowing known exceptions:\n\n- `long double` (IEEE float 80) support has not been implemented.\n- multibyte character (`wchar_t`) are not supported.\n- `%e` as not been kept due to its incorrectness.\n\n\u003e [!NOTE]\n\u003e Ask requested by the assignment, conversion specifier `B` and `b` from\n\u003e c2x standard have been implemented, corresponding to binary format.\n\n### :question: \u003csamp\u003eInvalid format\u003c/samp\u003e\n\nIn case of invalid format, as specified by C99,our function will treat the given\nsequence as regular text and continue.\n\n## :wrench: \u003csamp\u003eSetup\u003c/samp\u003e\n\n\u003e [!NOTE]\n\u003e To ensure a consistent development environment and to simplify dependency\n\u003e management, we strongly recommend using Nix. The project is configured to\n\u003e work seamlessly with Nix, providing reproducible builds and a standardized\n\u003e development environment.\n\n*If you haven't already, consider installing Nix by following the instructions\non* [nix installation page](https://nixos.org/download).\n\n### :cherry_blossom: \u003csamp\u003eNix\u003c/samp\u003e\n\nYou can use the standard nix flakes commands to `clone`, `build`, ... this\nproject.\n\n```\nnix build github:Sigmapitech/myprintf\n```\n\n\u003e outputs `libmy.a` containing `my_printf`.\n\n### :paperclip: \u003csamp\u003eNon-nix\u003c/samp\u003e\n\n\u003ckbd\u003e0.\u003c/kbd\u003e Install the required dependencies\n\nMake sure to have the following dependencies available within your environment:\n\n- The [`Coreutils`](https://www.gnu.org/software/coreutils/coreutils.html) command set, which\n *are expected to exist on every operating system*.\n- a recent version of [`Gnu make`](https://www.gnu.org/software/make/manual/make.html) ~4.x.x\n- [`GCC`](https://gcc.gnu.org), preferably, version `13.x.x` along the [`GNU C Library`](https://www.gnu.org/software/libc).\n- The [`GNU ar`](https://linux.die.net/man/1/ar) archive program, provided by\n  [`binutils`](https://www.gnu.org/software/binutils).\n- Optionally, [`tput`](https://www.gnu.org/software/termutils/manual/termutils-2.0/html_chapter/tput_1.html)\n  command to support colors within the Makefile.\n- [`criterion`](https://github.com/Snaipe/Criterion) library to compile tests.\n- [`gcovr`](https://github.com/gcovr/gcovr) to retrieve coverage report.\n\n#### \u003csamp\u003eEpitest Docker\u003c/samp\u003e\n\nIf you want to use the [epitest](https://github.com/Epitech/epitest-docker)\ncontainer provided by Epitech, you can use the following command:\n\n```bash\ndocker run -it --rm -v $(pwd):/home/project -w /home/project epitechcontent/epitest-docker:latest /bin/bash\n```\n\n\u003ckbd\u003eI.\u003c/kbd\u003e Clone the repository\n\n```bash\ngit clone https://github.com/Sigmapitech/myprintf.git myprintf\ncd myprintf\n```\n\n\u003ckbd\u003eII.\u003c/kbd\u003e Compile the library\n\n\u003e [!TIP]\n\u003e you can `touch .fast` to use parralel building.\n\n```\nmake\n```\n\nTo see other available targets, you can use a program such as\n[fzf-make](https://github.com/kyu08/fzf-make).\n\n## :bookmark_tabs: \u003csamp\u003eDEVELOPMENT\u003c/samp\u003e\n\nif you are using `Nix`, you can access a devShell that you can `develop`\nwith the project dependencies to build and develop.\n\n```bash\nnix develop\nnix develop github:Sigmapitech/myrpg\n```\n\n### \u003csamp\u003eUsing direnv\u003c/samp\u003e\n\nYou may load the devShell automatically using [direnv](https://direnv.net)\nshell integration.\n\n```\necho \"use flake\" | tee .envrc\ndirenv allow\n```\n\n## :microscope: \u003csamp\u003eTESTING\u003c/samp\u003e\n\nA tester is provided to compared the implementation along-side `printf` from\nglibc. Test table only features defined behaviour described by the standard.\n\nTo run the tests and get a coverage report:\n\n```\nmake cov\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsigmapitech%2Fmyprintf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsigmapitech%2Fmyprintf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsigmapitech%2Fmyprintf/lists"}