dernier leaks disparu avec nouvelle fonction dans read_file
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
/* By: hulamy <marvin@42.fr> +#+ +:+ +#+ */
|
/* By: hulamy <marvin@42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2019/05/27 13:46:29 by hulamy #+# #+# */
|
/* Created: 2019/05/27 13:46:29 by hulamy #+# #+# */
|
||||||
/* Updated: 2019/06/01 14:17:43 by hulamy ### ########.fr */
|
/* Updated: 2019/06/01 15:00:01 by hulamy ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
/* By: vmanzoni <vmanzoni@student.42.fr> +#+ +:+ +#+ */
|
/* By: vmanzoni <vmanzoni@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2019/04/13 12:09:46 by vmanzoni #+# #+# */
|
/* Created: 2019/04/13 12:09:46 by vmanzoni #+# #+# */
|
||||||
/* Updated: 2019/05/29 16:10:58 by hulamy ### ########.fr */
|
/* Updated: 2019/06/01 15:12:03 by hulamy ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@@ -36,3 +36,15 @@ char *read_file(char *file)
|
|||||||
close(fd);
|
close(fd);
|
||||||
return (result);
|
return (result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Function that init num and size for search_map
|
||||||
|
*/
|
||||||
|
|
||||||
|
void init_num_and_size(int num, int *size, t_fillist *tmp)
|
||||||
|
{
|
||||||
|
while ((tmp = tmp->next))
|
||||||
|
num++;
|
||||||
|
while (*size * *size < num * 4)
|
||||||
|
(*size)++;
|
||||||
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
/* By: hulamy <hulamy@student.42.fr> +#+ +:+ +#+ */
|
/* By: hulamy <hulamy@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2019/04/27 20:47:22 by hulamy #+# #+# */
|
/* Created: 2019/04/27 20:47:22 by hulamy #+# #+# */
|
||||||
/* Updated: 2019/06/01 14:19:22 by hulamy ### ########.fr */
|
/* Updated: 2019/06/01 15:12:08 by hulamy ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@@ -148,12 +148,8 @@ int search_map(t_fillist *list)
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
size = 2;
|
size = 2;
|
||||||
num = 1;
|
|
||||||
tmp = print_tetri(list);
|
tmp = print_tetri(list);
|
||||||
while ((tmp = tmp->next))
|
init_num_and_size(1, &size, tmp);
|
||||||
num++;
|
|
||||||
while (size * size < num * 4)
|
|
||||||
size++;
|
|
||||||
i = 0;
|
i = 0;
|
||||||
while (!i)
|
while (!i)
|
||||||
{
|
{
|
||||||
@@ -164,6 +160,8 @@ int search_map(t_fillist *list)
|
|||||||
while (num--)
|
while (num--)
|
||||||
map[num] = 0;
|
map[num] = 0;
|
||||||
i = fill_map(map, list, size++);
|
i = fill_map(map, list, size++);
|
||||||
|
if (!i)
|
||||||
|
free(map);
|
||||||
}
|
}
|
||||||
return (print_binary_map(map, size, list->dope));
|
return (print_binary_map(map, size, list->dope));
|
||||||
}
|
}
|
||||||
|
|||||||
20
fillit.dSYM/Contents/Info.plist
Normal file
20
fillit.dSYM/Contents/Info.plist
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
|
<string>English</string>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string>com.apple.xcode.dsym.fillit</string>
|
||||||
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
|
<string>6.0</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>dSYM</string>
|
||||||
|
<key>CFBundleSignature</key>
|
||||||
|
<string>????</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>1.0</string>
|
||||||
|
<key>CFBundleVersion</key>
|
||||||
|
<string>1</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
3
fillit.h
3
fillit.h
@@ -6,7 +6,7 @@
|
|||||||
/* By: vmanzoni <vmanzoni@student.42.fr> +#+ +:+ +#+ */
|
/* By: vmanzoni <vmanzoni@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2019/03/01 13:34:46 by vmanzoni #+# #+# */
|
/* Created: 2019/03/01 13:34:46 by vmanzoni #+# #+# */
|
||||||
/* Updated: 2019/06/01 14:34:31 by hulamy ### ########.fr */
|
/* Updated: 2019/06/01 15:12:00 by hulamy ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@@ -97,6 +97,7 @@ int main(int argc, char **argv);
|
|||||||
** read_file.c
|
** read_file.c
|
||||||
*/
|
*/
|
||||||
char *read_file(char *file);
|
char *read_file(char *file);
|
||||||
|
void init_num_and_size(int num, int *size, t_fillist *tmp);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** handle_errors.c
|
** handle_errors.c
|
||||||
|
|||||||
Reference in New Issue
Block a user