Skip to content

Commit 32f70d4

Browse files
Michail ChatzipanagiotouMichail Chatzipanagiotou
Michail Chatzipanagiotou
authored and
Michail Chatzipanagiotou
committed
signals finished and working
1 parent 999149d commit 32f70d4

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

exportutils.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
/* By: mchatzip <[email protected]> +#+ +:+ +#+ */
77
/* +#+#+#+#+#+ +#+ */
88
/* Created: 2021/11/16 11:19:39 by mchatzip #+# #+# */
9-
/* Updated: 2022/02/01 16:13:39 by mchatzip ### ########.fr */
9+
/* Updated: 2022/02/05 18:33:21 by mchatzip ### ########.fr */
1010
/* */
1111
/* ************************************************************************** */
1212

@@ -85,11 +85,9 @@ static char *handlescharsxp(char *b, char *ret)
8585

8686
char *exportout(char *b)
8787
{
88-
int i;
8988
char *ret;
9089

9190
ret = malloc(1000);
92-
i = 0;
9391
if (echoerrcheck(b))
9492
return ("");
9593
while (*b == ' ')

utils.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
/* By: mchatzip <[email protected]> +#+ +:+ +#+ */
77
/* +#+#+#+#+#+ +#+ */
88
/* Created: 2021/11/16 11:19:39 by mchatzip #+# #+# */
9-
/* Updated: 2022/01/31 15:48:10 by mchatzip ### ########.fr */
9+
/* Updated: 2022/02/05 18:36:41 by mchatzip ### ########.fr */
1010
/* */
1111
/* ************************************************************************** */
1212

@@ -30,9 +30,10 @@ void dhandler(int signum)
3030
{
3131
if (signum == SIGINT)
3232
{
33-
write(2, "\b\b ", 4);
34-
write(2, "\nMike's minishell % ", 20);
33+
write(1, "\n", 1);
3534
rl_on_new_line();
35+
rl_replace_line("", 0);
36+
rl_redisplay();
3637
}
3738
else if (signum == SIGQUIT)
3839
return ;

0 commit comments

Comments
 (0)