summaryrefslogtreecommitdiffstats
path: root/src/m_loop_counter.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/m_loop_counter.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/m_loop_counter.c b/src/m_loop_counter.c
index 330d3f1..85609dd 100644
--- a/src/m_loop_counter.c
+++ b/src/m_loop_counter.c
@@ -23,9 +23,7 @@ char *m_counter_line_backslash(int fd,
{
char *counter_line;
- if (fd == STDIN_FILENO)
- m_prompt_psx(psx, msh);
- get_next_line(fd, &counter_line);
+ c_gnl(fd, &line, psx, msh);
if (counter_line[0] != C_NUL)
{
l = ft_nrealloc(l,
@@ -43,9 +41,7 @@ char *m_counter_line_pipes(int fd, unsigned char psx, char *line, t_msh *msh)
{
char *counter_line;
- if (fd == STDIN_FILENO)
- m_prompt_psx(psx, msh);
- get_next_line(fd, &counter_line);
+ c_gnl(fd, &line, psx, msh);
if (counter_line[0] != C_NUL)
{
line = ft_nrealloc(line,
@@ -66,9 +62,7 @@ char *m_counter_line_quotes(int fd,
{
char *counter_line;
- if (fd == STDIN_FILENO)
- m_prompt_psx(psx, msh);
- get_next_line(fd, &counter_line);
+ c_gnl(fd, &line, psx, msh);
if (counter_line[0] != C_NUL)
{
line = ft_nrealloc(line,