summaryrefslogtreecommitdiffstats
path: root/src/m_loop_next.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/m_loop_next.c')
-rw-r--r--src/m_loop_next.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/m_loop_next.c b/src/m_loop_next.c
index d138206..e088cda 100644
--- a/src/m_loop_next.c
+++ b/src/m_loop_next.c
@@ -18,6 +18,7 @@
#include "m_loop_next.h"
#include "m_prompt.h"
#include "s_struct.h"
+#include "c_init.h"
#include "u_utils.h"
static char
@@ -25,9 +26,7 @@ static char
{
char *counter_line;
- if (fd == STDIN_FILENO)
- m_prompt_psx(psx, msh);
- get_next_line(fd, &counter_line);
+ c_gnl(fd, &counter_line, psx, msh);
if (counter_line[0] != C_NUL)
{
line = ft_nrealloc(line,
@@ -46,9 +45,7 @@ static char
{
char *counter_line;
- if (fd == STDIN_FILENO)
- m_prompt_psx(psx, msh);
- get_next_line(fd, &counter_line);
+ c_gnl(fd, &counter_line, psx, msh);
if (counter_line[0] != C_NUL)
{
line = ft_nrealloc(line,