From 814c8494623bc117d6503fe0f144a5450d7881d2 Mon Sep 17 00:00:00 2001 From: kamkow1 Date: Mon, 9 Mar 2026 18:06:45 +0100 Subject: [PATCH] CE add cls command --- ce/interp.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ce/interp.c b/ce/interp.c index 798f54f..87b7612 100644 --- a/ce/interp.c +++ b/ce/interp.c @@ -17,7 +17,9 @@ #include #include #include +#include #include +#include static bool run = true; @@ -268,6 +270,8 @@ static void quit1 (struct context* context) { interp_shutdown (); } +static void cls (struct context* context) { cprintf (context, ANSIQ_CUR_HOME ANSIQ_SCR_CLR_ALL); } + static void help (struct context* context) { cprintf (context, "Available commands:\n"); cprintf (context, "help\n"); @@ -279,6 +283,7 @@ static void help (struct context* context) { cprintf (context, "rm \n"); cprintf (context, "edit \n"); cprintf (context, "terminfo\n"); + cprintf (context, "cls\n"); cprintf (context, "quit\n"); } @@ -317,6 +322,8 @@ static void execute_cmd (struct ast_cmd* cmd, struct context* context) { edit (context, cmd->args[0]); } else if (strcmp (cmd->name, "terminfo") == 0) { terminfo (context); + } else if (strcmp (cmd->name, "cls") == 0) { + cls (context); } else { char volume[VOLUME_MAX]; const char* path;