commit 6e8a21ed66304aee7c5f88aa9b4fa89a9b7a11f6
parent 94694ce2f7d15d4dc8ad4b19ef2e000e8bc74e51
Author: night0721 <[email protected]>
Date: Thu, 1 Feb 2024 19:18:52 +0000
satisfy linter
Diffstat:
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/history.c b/history.c
@@ -2,7 +2,7 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#include <limits.h>
+#include <linux/limits.h>
#include "constants.h"
diff --git a/rush.c b/rush.c
@@ -3,9 +3,10 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
-#include <limits.h>
+#include <linux/limits.h>
#include <time.h>
#include <stdbool.h>
+#include <signal.h>
#include "color.h"
#include "constants.h"
@@ -13,7 +14,7 @@
#include "commands.h"
void quit_sig(int sig) {
- return 0;
+ exit(0);
}
void change_terminal_attribute(int option) {
@@ -93,7 +94,7 @@ char *readline(char **paths) {
int buf_len = strlen(buffer);
//printf("buflen %i\n", buf_len);
if (buf_len > 0) {
- printf("\033[%dD", strlen(buffer)); // move cursor to the beginning
+ printf("\033[%ldD", strlen(buffer)); // move cursor to the beginning
printf("\033[K"); // clear line to the right of cursor
}
// check each character user has input