-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
loris
committed
Oct 29, 2023
0 parents
commit 97e8e6a
Showing
5 changed files
with
77 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/* ************************************************************************** */ | ||
/* */ | ||
/* ::: :::::::: */ | ||
/* get_next_line.h :+: :+: :+: */ | ||
/* +:+ +:+ +:+ */ | ||
/* By: lgaume <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2023/10/29 03:47:35 by lgaume #+# #+# */ | ||
/* Updated: 2023/10/29 03:47:37 by lgaume ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/* ************************************************************************** */ | ||
/* */ | ||
/* ::: :::::::: */ | ||
/* get_next_line.c :+: :+: :+: */ | ||
/* +:+ +:+ +:+ */ | ||
/* By: lgaume <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2023/10/29 03:48:00 by lgaume #+# #+# */ | ||
/* Updated: 2023/10/29 03:48:01 by lgaume ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/* ************************************************************************** */ | ||
/* */ | ||
/* ::: :::::::: */ | ||
/* get_next_line_utils.c :+: :+: :+: */ | ||
/* +:+ +:+ +:+ */ | ||
/* By: lgaume <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2023/10/29 03:48:09 by lgaume #+# #+# */ | ||
/* Updated: 2023/10/29 03:48:12 by lgaume ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* ************************************************************************** */ | ||
/* */ | ||
/* ::: :::::::: */ | ||
/* main.c :+: :+: :+: */ | ||
/* +:+ +:+ +:+ */ | ||
/* By: lgaume <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2023/10/29 03:48:45 by lgaume #+# #+# */ | ||
/* Updated: 2023/10/29 03:49:50 by lgaume ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
#include "../include/get_next_line.h" | ||
#include <fcntl.h> | ||
|
||
int main(void) | ||
{ | ||
int fd; | ||
char *line; | ||
|
||
fd = open("tests/message.txt", O_RDONLY); | ||
while (1) | ||
{ | ||
line = get_next_line(fd); | ||
printf("%s", line); | ||
if (line == NULL) | ||
break ; | ||
free(line); | ||
} | ||
return (0); | ||
}i |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Loris — Aujourd’hui à 03:11 | ||
|
||
L'histoire de la programmation en C est une saga fascinante qui remonte aux années 1970. | ||
Le C a été développé par Dennis Ritchie au sein des laboratoires Bell de AT&T, en partie pour créer un système d'exploitation plus efficace appelé UNIX. | ||
Cette nouvelle langue de programmation a été conçue pour offrir un équilibre entre la puissance et la portabilité. | ||
Le C a rapidement gagné en popularité en raison de sa simplicité, de sa flexibilité et de ses performances. | ||
Il a été utilisé pour développer des systèmes d'exploitation, des compilateurs, des applications système et bien plus encore. |