Explore the Subjetc »
The goal of the project is to create a script that receives a file descriptor and reads a predefined amount of bytes BUFFER_SIZE, until the end of a line is reached. When the number of bytes in the line is not a multiple of BUFFER_SIZE, the read function will read bytes that do not belong to the line in question, but to the next line. As a result, this project reads and returns one line at a time from a file descriptor, whenever the get_next_line function is executed. The bonus part handles multiple text files simultaneously.
get_next_line.c
Checks and reads the contents of the file descriptor to the end of the line one line at a time.
get_next_line.h
Header of the project
get_next_line_utils.c
General purpose functions. Check out the individual documentation here.
get_next_line_bonus.c
Checks and reads the contents of multiple file descriptors at the same time.
get_next_line_bonus.h
Bonus Header
get_next_line_utils_bonus.c
General purpose functions. Check out the individual documentation here.
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request