2020-05-27 09:59:17 -07:00
|
|
|
/**
|
|
|
|
|
* @file cls.c
|
2022-01-18 22:38:56 +03:30
|
|
|
* @author Sina Karvandi (sina@hyperdbg.org)
|
2020-05-27 09:59:17 -07:00
|
|
|
* @brief .cls, cls, clear commands implementations
|
|
|
|
|
* @details
|
|
|
|
|
* @version 0.1
|
|
|
|
|
* @date 2020-05-27
|
|
|
|
|
*
|
|
|
|
|
* @copyright This project is released under the GNU Public License v3.
|
|
|
|
|
*
|
|
|
|
|
*/
|
2022-05-04 16:38:21 -07:00
|
|
|
#include "pch.h"
|
2020-05-27 09:59:17 -07:00
|
|
|
|
2020-08-28 04:03:12 -07:00
|
|
|
/**
|
2023-07-13 16:05:42 +09:00
|
|
|
* @brief help of the .cls command
|
2021-02-10 15:19:01 -08:00
|
|
|
*
|
|
|
|
|
* @return VOID
|
2020-08-28 04:03:12 -07:00
|
|
|
*/
|
2021-03-22 18:19:39 +04:30
|
|
|
VOID
|
2024-07-30 15:07:17 +09:00
|
|
|
CommandClsHelp()
|
2021-03-22 18:19:39 +04:30
|
|
|
{
|
|
|
|
|
ShowMessages(".cls : clears the screen.\n\n");
|
2022-04-17 23:05:24 +04:30
|
|
|
|
2021-03-22 18:19:39 +04:30
|
|
|
ShowMessages("syntax : \t.cls\n");
|
2020-07-25 03:32:04 -07:00
|
|
|
}
|
2020-08-28 04:03:12 -07:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief .cls command handler
|
2023-01-18 20:23:40 +09:00
|
|
|
*
|
2024-07-30 15:07:17 +09:00
|
|
|
* @param CommandTokens
|
2024-07-31 14:08:14 +09:00
|
|
|
* @param Command
|
2024-07-30 15:07:17 +09:00
|
|
|
*
|
2021-02-10 15:19:01 -08:00
|
|
|
* @return VOID
|
2020-08-28 04:03:12 -07:00
|
|
|
*/
|
2021-03-22 18:19:39 +04:30
|
|
|
VOID
|
2024-07-31 14:08:14 +09:00
|
|
|
CommandCls(vector<CommandToken> CommandTokens, string Command)
|
2021-03-22 18:19:39 +04:30
|
|
|
{
|
2024-07-30 15:07:17 +09:00
|
|
|
if (CommandTokens.size() != 1)
|
|
|
|
|
{
|
|
|
|
|
ShowMessages("incorrect use of the '%s'\n\n",
|
|
|
|
|
GetCaseSensitiveStringFromCommandToken(CommandTokens.at(0)).c_str());
|
|
|
|
|
CommandClsHelp();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2021-03-22 18:19:39 +04:30
|
|
|
system("cls");
|
2021-02-10 15:19:01 -08:00
|
|
|
}
|