summaryrefslogtreecommitdiff
path: root/clear.c
diff options
context:
space:
mode:
authorczjstmax <jstmaxlol@disroot.org>2026-04-13 15:23:14 +0200
committerczjstmax <jstmaxlol@disroot.org>2026-04-13 15:23:14 +0200
commit046801397d0e028ab600377ef6ba7109b55ffae7 (patch)
tree954cffeddaeb5ced7339ecf55b8505d98f7a5e38 /clear.c
rel
Signed-off-by: czjstmax <jstmaxlol@disroot.org>
Diffstat (limited to 'clear.c')
-rw-r--r--clear.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/clear.c b/clear.c
new file mode 100644
index 0000000..8982abe
--- /dev/null
+++ b/clear.c
@@ -0,0 +1,19 @@
+#include <stdio.h>
+
+int main(int argc, char **argv)
+{
+ if (argc > 1) {
+ char *grammar = (argc > 2)? "arguments" : "argument";
+
+ printf("%d %s found. %s won't be checked.\n", argc-1, grammar, grammar);
+
+ for (int i = 1; i < argc; i++)
+ printf("argument %d = %s\n", i, argv[i]);
+
+ printf("aborting insane clear operation.\n");
+ return 1;
+ }
+
+ puts("\033[2J\033[3J\033[H");
+ return 0;
+}