ft_print_memory.c
This commit is contained in:
parent
7f6e5230c8
commit
3ea0e46c9f
|
@ -6,7 +6,7 @@
|
|||
/* By: tischmid <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/03/21 05:44:01 by tischmid #+# #+# */
|
||||
/* Updated: 2023/03/24 23:11:43 by tischmid ### ########.fr */
|
||||
/* Updated: 2023/03/24 23:27:31 by tischmid ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
@ -84,7 +84,7 @@ void *ft_print_memory(void *addr, unsigned int size)
|
|||
missing_chars -= (WIDTH - width) / 2;
|
||||
while (missing_chars-- > 0)
|
||||
write(1, DELIMITER, 1);
|
||||
print_addr_vals((addr += width), width, 0, "");
|
||||
print_addr_vals((addr += width) - width, width, 0, "");
|
||||
write(1, "\n", 1);
|
||||
if (width != WIDTH)
|
||||
break ;
|
||||
|
@ -110,7 +110,11 @@ int main(void)
|
|||
{
|
||||
char *ptr = STR;
|
||||
for (int i = 0; i < 95; ++i)
|
||||
{
|
||||
printf("Bytes: %d\n", i);
|
||||
ft_print_memory(ptr, i);
|
||||
write(1, "\n", 1);
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
*/ ////
|
||||
|
|
Loading…
Reference in New Issue