{"id":19947327,"url":"https://github.com/clementvidon/get_next_line","last_synced_at":"2025-05-03T17:33:50.684Z","repository":{"id":119380135,"uuid":"525302690","full_name":"clementvidon/get_next_line","owner":"clementvidon","description":"[documented code / -pedantic -std=c89] - Get the next line of text available on a file descriptor.  Can be used within a loop to read a file line by line.","archived":false,"fork":false,"pushed_at":"2022-08-31T12:09:56.000Z","size":2727,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-09T08:08:00.630Z","etag":null,"topics":["42","42-get-next-line","42-gnl","42born2code","42cursus","42projects","42school","cleancode","getline","getnextline","getnextline-42","getnextline42","gnl","gnl-42","gnl42","gnlte","gnltester","tester"],"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/clementvidon.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":"2022-08-16T08:59:33.000Z","updated_at":"2023-12-15T15:23:22.000Z","dependencies_parsed_at":"2023-07-08T02:04:58.769Z","dependency_job_id":null,"html_url":"https://github.com/clementvidon/get_next_line","commit_stats":null,"previous_names":["clementvidon/get_next_line"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clementvidon%2Fget_next_line","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clementvidon%2Fget_next_line/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clementvidon%2Fget_next_line/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clementvidon%2Fget_next_line/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/clementvidon","download_url":"https://codeload.github.com/clementvidon/get_next_line/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224370254,"owners_count":17299968,"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","42-get-next-line","42-gnl","42born2code","42cursus","42projects","42school","cleancode","getline","getnextline","getnextline-42","getnextline42","gnl","gnl-42","gnl42","gnlte","gnltester","tester"],"created_at":"2024-11-13T00:35:32.902Z","updated_at":"2024-11-13T00:35:33.535Z","avatar_url":"https://github.com/clementvidon.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n\tGNL - GET_NEXT_LINE 42\n\u003c/h1\u003e\n\n\u003ch3 align=\"center\"\u003e\n\t\u003ca href=\"#Summary\"\u003eSummary\u003c/a\u003e\n\t\u003cspan\u003e · \u003c/span\u003e\n\t\u003ca href=\"#Usage\"\u003eUsage\u003c/a\u003e\n\t\u003cspan\u003e · \u003c/span\u003e\n\t\u003ca href=\"#Tester\"\u003eTester\u003c/a\u003e\n\t\u003cspan\u003e · \u003c/span\u003e\n\t\u003ca href=\"#Tools\"\u003eTools\u003c/a\u003e\n\u003c/h3\u003e\n\n## Summary\n\nGet the next line of text available on a file descriptor.\nCalling get_next_line in a loop will allow us to read the text available on the\nfile descriptor one line at a time until the end of it.  \n\n\u003e *\"May it be a file, stdin, or even later a network connection, you will always\n\u003e need a way to read content line by line. It is time to start working on this\n\u003e function, which will be essential for your future projects.\"* - [Subject](https://cdn.intra.42.fr/pdf/pdf/57350/en.subject.pdf)\n\nExternal functions: `read`, `malloc`, `free`\n\nCode written in accordance with **42 C** coding style,  **ANSI C89** compliant and entirely **documented with docstrings**.\n\n## Usage\n\nAdd `get_next_line.h` to your project header to access the function.\n\nTo test the function run `make` from within the `test` directory and launch as\nfollows: `./get_next_line \u003cpath_to_file\u003e`\n\nFor example: `./get_next_line main.c`\n\n## Tester\n\n**First of all** `cd test \u0026\u0026 make`.\n\n- **[Gnltester](test/gnltester.sh)** check if the number of characters returned by\n  `get_next_line` call on multiple pre defined input files with a set of\n  different BUFFER_SIZE is correct.  Uses valgrind.\n\nUsage: `make test` or `bash gnltester.sh`\n\n- **[Gnldiff](test/gnldiff.sh)** is a simple tester that check `get_next_line` output accuracy and create\na `diff.log` file if something went wrong.\n\nUsage: `bash gnldiff.sh \u003cfile_path\u003e`\n\nExample:\n\n    cat Makefile \u003e file; bash gnldiff.sh file\n\n    cat ../*.[ch] \u003e file; bash gnldiff.sh file\n\n**Make sure to** use a `BUFFER_SIZE` of 1 if your `\u003cfile\u003e` parameter contains\nmulti byte characters like those from binary file or `/dev/urandom` like:\n\n    cat /bin/cat \u003e file; bash gnldiff.sh file\n\n    head -4242 /dev/urandom \u003e file; bash gnldiff.sh file\n\n- **[gnlTester](https://github.com/Tripouille/gnlTester)**\n\n## Tools\n\n- **[ft_mallocator](https://github.com/tmatis/ft_mallocator)**\n\n*Check with different arguments (ft_mallocator/config.sh:`ARGS`) and buffer size (get_next_line.h:`BUFFER_SIZE`).*\n\n- **valgrind**: `valgrind -q --leak-check=yes --show-leak-kinds=all`\n\n- **sanitizer**: `-fsanitize=address`\n\n*Add `-g` flag when compiling with `-fsanitize=address` to print errors line numbers instead of addresses in hexadecimal.*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclementvidon%2Fget_next_line","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclementvidon%2Fget_next_line","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclementvidon%2Fget_next_line/lists"}