Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/trobert42/get_next_line
Implementation of a function written in C that reads a lines from a file descriptor
https://github.com/trobert42/get_next_line
buffer fd getline read
Last synced: 9 days ago
JSON representation
Implementation of a function written in C that reads a lines from a file descriptor
- Host: GitHub
- URL: https://github.com/trobert42/get_next_line
- Owner: trobert42
- Created: 2023-08-31T20:28:58.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-02-26T16:10:29.000Z (9 months ago)
- Last Synced: 2024-02-26T17:33:19.617Z (9 months ago)
- Topics: buffer, fd, getline, read
- Language: C
- Homepage:
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GNL - getline() but in C
The goal of this project is to develop a function in C that reads lines ending with a newline character ('\n') from a file descriptor without prior knowledge of their size. Through this project, we aim to explore the concept of static variables in C programming and gain insight into memory allocations, buffer manipulation, and the lifecycle of buffers.
| Project Name | get_next_line |
| :----------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------: |
| Description | My implementation of a function written in C that reads a lines from a file descriptor function |
| Technologies | |
| External libraries | malloc(), free(), read() |## Usage
```bash
gcl https://github.com/trobert42/get_next_line.git
cd get_next_line
```You can use it by compiling the main.c. Here's how :
```bash
gcc -Wall -Wextra -Werror main.c get_next_line.c get_next_line_utils.c
./a.out text1.text
```