{"id":20574674,"url":"https://github.com/llefranc/42_ft_printf","last_synced_at":"2025-03-06T10:42:43.960Z","repository":{"id":151135464,"uuid":"315939976","full_name":"llefranc/42_ft_printf","owner":"llefranc","description":"School project: reimplement printf in C  (with all the bonuses, including the floats and Dragon4 algorithm).","archived":false,"fork":false,"pushed_at":"2021-01-04T12:51:29.000Z","size":1319,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-16T21:40:29.021Z","etag":null,"topics":["42","42born2code","42paris","42school","dragon4-algorithm","float","floating-point","ft-printf","printf","printf-42"],"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/llefranc.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,"publiccode":null,"codemeta":null}},"created_at":"2020-11-25T12:57:36.000Z","updated_at":"2023-10-12T14:28:05.000Z","dependencies_parsed_at":"2024-03-09T06:00:54.756Z","dependency_job_id":null,"html_url":"https://github.com/llefranc/42_ft_printf","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/llefranc%2F42_ft_printf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/llefranc%2F42_ft_printf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/llefranc%2F42_ft_printf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/llefranc%2F42_ft_printf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/llefranc","download_url":"https://codeload.github.com/llefranc/42_ft_printf/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242196006,"owners_count":20087761,"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":["42","42born2code","42paris","42school","dragon4-algorithm","float","floating-point","ft-printf","printf","printf-42"],"created_at":"2024-11-16T05:36:37.923Z","updated_at":"2025-03-06T10:42:43.945Z","avatar_url":"https://github.com/llefranc.png","language":"C","readme":"# ft_printf (@42Paris)\n\n\"Because putnbr and putstr aren’t enough\"\n\n![Alt text](https://github.com/lucaslefrancq/42_ft_printf/blob/main/ft_printf_example.png)\n\n## About\n\nFt_printf is a project of the mandatory part of the 42cursus.\nThe main goal is to recreate the printf function in C.\nIn this case we had to understand how the different parameters in printf works (width, height...).  \nThis ft_printf handles all the bonuses from the subject.\n\n- Ft_printf will be able to work with :\n    - Flags : -, 0, ., *\n\t- Conversions : %c, %s, %p, %d, %i, %u, %x, %X, %%\n\t- Bonus flags : l, ll, h, hh, #, +, and space\n\t- Bonus conversions : %n, %f, %e, %g\n\nYou can do combination between width / heigh / flags and conversions like the real printf.  \n\nFor the bonus flag l, I had to implement the wide_char conversion for ls and lc combination.\nMy ft_printf can so print unicode characters.\n\nFor the bonuses %f %e and %g (float conversion), I implemented the Dragon4 algorithm.  \nMy implementation of the Dragon4 algorithm works like the real printf, so this ft_printf is able to print all the possible floats :\nfrom DBL_MAX (max double) to DBL_MIN (which will print 1024 numbers after the dot !).\n\nIn this case, I created a library (called BIG_INT library) that can do calculation on strings filled with number.\nThis was necessary because floats algorithm needs to represent bigger number than possible with a long long int.  \nThe BIG_INT library is able to perfom addition, subtraction, multiplication, division and pow.  \n\n- Here is the [subject][1]\n\n`This project was code for MACOS`\n\n### Building and running the project\n\n1. Download/Clone this repo\n\n        git clone https://github.com/lucaslefrancq/42_ft_printf\n\n2. `cd` into the root directory, and run `make`\n\n        cd 42_ft_printf\n        make\n\n3.  Compile your `main.c` with the lib `libftprintf.a` created\n\n        gcc -Wall -Werror -Wextra main.c libftprintf.a\n\n## Sources\n\n- [Format specification syntax for printf][2]\n- [Printing floating point numbers][3]\n- [Comprendre les encodages et unicode (FR)][4]\n- [Understanding unicode][5]\n\n[1]: https://github.com/lucaslefrancq/42_ft_printf/blob/main/ft_printf.en.subject.pdf\n[2]: https://docs.microsoft.com/fr-fr/cpp/c-runtime-library/format-specification-syntax-printf-and-wprintf-functions?view=msvc-160\n[3]: http://www.ryanjuckett.com/programming/printing-floating-point-numbers/\n[4]: https://zestedesavoir.com/tutoriels/1114/comprendre-les-encodages/\n[5]: https://betterexplained.com/articles/unicode/","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fllefranc%2F42_ft_printf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fllefranc%2F42_ft_printf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fllefranc%2F42_ft_printf/lists"}