/get_next_line

The aim of the project is to access and return the contents of a text file pointed to by the file descriptor, one line at a time. The bonus part can handle multiple files simultaneously.

Primary LanguageC

Logo

Get Next Line Project

42 Porto get_next_line



Explore the Subjetc ยป

๐ŸŒŸ About The Project

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.

๐ŸŽฏ Table of Contents

  • Mandatory Part One

    • 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.


  • Bonus Part

    • 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.

    ๐Ÿ‘‹ Contributing


    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!

    1. Fork the Project
    2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
    3. Commit your Changes (git commit -m 'Add some AmazingFeature')
    4. Push to the Branch (git push origin feature/AmazingFeature)
    5. Open a Pull Request

    ๐Ÿ”ง Running Tests

    ๐Ÿ“ท Screenshots

    Libft-Unit-Test Libft-Unit-Test

    Libft-Unit-Test Libft-Unit-Test