2022-06-27 19:36:56 +02:00
|
|
|
/*
|
|
|
|
SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
|
|
|
|
UMKa - User-Mode KolibriOS developer tools
|
|
|
|
umka_shell - the shell
|
|
|
|
|
|
|
|
Copyright (C) 2020-2022 Ivan Baravy <dunkaist@gmail.com>
|
|
|
|
*/
|
|
|
|
|
2020-05-10 06:21:49 +02:00
|
|
|
#ifndef SHELL_H_INCLUDED
|
|
|
|
#define SHELL_H_INCLUDED
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
2022-05-31 15:43:41 +02:00
|
|
|
enum shell_var_type {
|
|
|
|
SHELL_VAR_SINT,
|
|
|
|
SHELL_VAR_UINT,
|
|
|
|
SHELL_VAR_POINTER,
|
|
|
|
};
|
|
|
|
|
|
|
|
#define SHELL_VAR_NAME_LEN 16
|
|
|
|
|
|
|
|
struct shell_var {
|
|
|
|
struct shell_var *next;
|
|
|
|
enum shell_var_type type;
|
|
|
|
char name[SHELL_VAR_NAME_LEN];
|
|
|
|
union {ssize_t sint; size_t uint; uint64_t uint64; void *ptr;} value;
|
|
|
|
};
|
|
|
|
|
2022-05-29 17:17:00 +02:00
|
|
|
struct shell_ctx {
|
|
|
|
int reproducible;
|
2022-05-30 00:08:15 +02:00
|
|
|
const char *hist_file;
|
2022-05-31 15:43:41 +02:00
|
|
|
struct shell_var *var;
|
2022-05-29 17:17:00 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
void *run_test(struct shell_ctx *ctx);
|
2020-05-10 06:21:49 +02:00
|
|
|
|
|
|
|
#endif // SHELL_H_INCLUDED
|