mirror of
https://github.com/JannisHeydemann/BoredOS.git
synced 2026-05-30 02:16:58 +00:00
Initial commit
This commit is contained in:
22
src/kernel/cli_apps/cli_command.h
Normal file
22
src/kernel/cli_apps/cli_command.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#ifndef CLI_COMMAND_H
|
||||
#define CLI_COMMAND_H
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
// Standard interface for CLI command output
|
||||
// Commands should call these functions to write to the terminal
|
||||
extern void cli_write(const char *str);
|
||||
extern void cli_write_int(int n);
|
||||
extern void cli_putchar(char c);
|
||||
|
||||
// Callback function type for command execution
|
||||
typedef void (*cmd_callback_t)(char *args);
|
||||
|
||||
// Command entry in dispatch table
|
||||
typedef struct {
|
||||
const char *name;
|
||||
cmd_callback_t callback;
|
||||
const char *help_text;
|
||||
} CLI_Command;
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user