summaryrefslogtreecommitdiffstats
path: root/src/m_prompt.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-10-27 19:59:20 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-10-27 19:59:20 +0100
commitc5aae008dee36276154882d8fd56c3bdeb473474 (patch)
treea40740914847ebf39a5f8cb3acf6a48c8b9d61ef /src/m_prompt.c
parentTODO update (diff)
download42-minishell-c5aae008dee36276154882d8fd56c3bdeb473474.tar.gz
42-minishell-c5aae008dee36276154882d8fd56c3bdeb473474.tar.bz2
42-minishell-c5aae008dee36276154882d8fd56c3bdeb473474.tar.xz
42-minishell-c5aae008dee36276154882d8fd56c3bdeb473474.tar.zst
42-minishell-c5aae008dee36276154882d8fd56c3bdeb473474.zip
Now norme
Diffstat (limited to 'src/m_prompt.c')
-rw-r--r--src/m_prompt.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/m_prompt.c b/src/m_prompt.c
index 4f80627..e36a07e 100644
--- a/src/m_prompt.c
+++ b/src/m_prompt.c
@@ -12,7 +12,6 @@
#include <libft.h>
#include <stddef.h>
-#include <stdint.h>
#include <unistd.h>
#ifdef __linux__
# include <linux/limits.h>
@@ -44,12 +43,12 @@ static void m_subst_prompt_rice(char var[], t_msh *msh)
}
}
-static void m_update_psx(uint8_t x, t_msh *msh)
+static void m_update_psx(unsigned char x, t_msh *msh)
{
char var[ARG_MAX];
char psx[5];
- ft_sprintf(psx, "$PS%hu", (uint16_t)x);
+ ft_sprintf(psx, "$PS%hu", (unsigned short)x);
u_get_var_value(var, psx, ARG_MAX, msh);
if (var[0] == C_NUL)
{
@@ -60,7 +59,7 @@ static void m_update_psx(uint8_t x, t_msh *msh)
ft_strlcpy(msh->ps[x - 1], var, 255);
}
-void m_prompt_psx(uint8_t x, t_msh *msh)
+void m_prompt_psx(unsigned char x, t_msh *msh)
{
m_update_psx(x, msh);
ft_dprintf(STDERR_FILENO, "%s", msh->ps[x - 1]);