feat: removing the file_converted
This commit is contained in:
parent
8445a8c956
commit
00f9484dc4
1 changed files with 0 additions and 23 deletions
|
|
@ -33,29 +33,6 @@ char *ft_check(char *memory, int fd)
|
||||||
return (memory);
|
return (memory);
|
||||||
}
|
}
|
||||||
|
|
||||||
char *file_converted(int fd)
|
|
||||||
{
|
|
||||||
size_t i;
|
|
||||||
int read_bits;
|
|
||||||
char *str;
|
|
||||||
char c;
|
|
||||||
|
|
||||||
i = 0;
|
|
||||||
c = 1;
|
|
||||||
read_bits = 1;
|
|
||||||
str = (char *)malloc(sizeof(char) * BUFFER_SIZE);
|
|
||||||
if (!str)
|
|
||||||
return (NULL);
|
|
||||||
while (read_bits != 0 && i < BUFFER_SIZE)
|
|
||||||
{
|
|
||||||
read_bits = read(fd, &c, 1);
|
|
||||||
str[i] = c;
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
str[i] = '\0';
|
|
||||||
return (str);
|
|
||||||
}
|
|
||||||
|
|
||||||
char *ft_free(char *str)
|
char *ft_free(char *str)
|
||||||
{
|
{
|
||||||
free(str);
|
free(str);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue