fix(char): fixing the isascii / isprint
- Correcting the behavour of is ascii to the original given by the original function
This commit is contained in:
parent
4c6a17811f
commit
7051eaf1bf
2 changed files with 4 additions and 4 deletions
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
|
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2023/11/06 14:04:26 by rparodi #+# #+# */
|
/* Created: 2023/11/06 14:04:26 by rparodi #+# #+# */
|
||||||
/* Updated: 2025/09/04 11:41:42 by rparodi ### ########.fr */
|
/* Updated: 2025/09/05 10:40:03 by rparodi ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -21,6 +21,6 @@ int ft_isascii(int c)
|
||||||
if (c == 0)
|
if (c == 0)
|
||||||
return (1);
|
return (1);
|
||||||
if (c > 0 && c <= 127)
|
if (c > 0 && c <= 127)
|
||||||
return (c);
|
return (1);
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
|
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2023/11/06 14:06:53 by rparodi #+# #+# */
|
/* Created: 2023/11/06 14:06:53 by rparodi #+# #+# */
|
||||||
/* Updated: 2025/09/04 11:41:49 by rparodi ### ########.fr */
|
/* Updated: 2025/09/05 10:44:13 by rparodi ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -19,6 +19,6 @@
|
||||||
int ft_isprint(int c)
|
int ft_isprint(int c)
|
||||||
{
|
{
|
||||||
if (c >= 32 && c <= 126)
|
if (c >= 32 && c <= 126)
|
||||||
return (c);
|
return (1);
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue