https://github.com/mdbentaleb/get_next_line_42
🔍 Efficient single-line reader function for handling file descriptors 📂, built for the 42 Network's Get Next Line project 🖥️.
https://github.com/mdbentaleb/get_next_line_42
1337school 42network c-programming file-descriptor file-handling get-next-line-42 memory-management system-calls
Last synced: 11 days ago
JSON representation
🔍 Efficient single-line reader function for handling file descriptors 📂, built for the 42 Network's Get Next Line project 🖥️.
- Host: GitHub
- URL: https://github.com/mdbentaleb/get_next_line_42
- Owner: mdbentaleb
- Created: 2024-11-14T11:44:53.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-07-30T16:58:52.000Z (12 months ago)
- Last Synced: 2025-10-21T04:43:33.160Z (9 months ago)
- Topics: 1337school, 42network, c-programming, file-descriptor, file-handling, get-next-line-42, memory-management, system-calls
- Language: C
- Homepage: https://github.com/mdbentaleb/Get-next-line_42_1337
- Size: 385 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Get Next Line - 42 Network Project
Get Next Line is a function that reads a line from a file descriptor, designed to efficiently handle large lines and multiple file descriptors, while ensuring proper memory management without relying on external libraries.
It helps in handling file input in C and is a key part of the 42 Network curriculum.
---
## 🚀 Features
- **Reads a line** from a file descriptor, handling multiple reads if the line is too large for a buffer.
- **Memory management**: Ensures dynamic memory allocation for each line.
- **Efficient handling** of multiple file descriptors, allowing you to read from different sources.
---
## 🛠️ Getting Started
### Prerequisites
To get started, ensure you have the following installed:
- A C compiler like `gcc` or `clang`
- `make` for building the project
- A UNIX-like operating system (Linux/macOS/WSL)
### 1. Clone the Repository
```bash
git clone https://github.com/mdbentaleb/Get_next_line_42.git
cd Get_next_line_42