/* Copyright Yann Weber This file is part of asmsh. asmsh is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version. asmsh is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with asmsh. If not, see . */ #ifndef ASMSH_SHELL_H #define ASMSH_SHELL_H #include "config.h" #include #include #include "asm_env.h" #include "logger.h" #include "compile.h" typedef struct asmsh_s asmsh_t; #include "shell_sym.h" struct asmsh_s { asmsh_asmc_ctx_t *cctx; asmsh_env_t *env; char *child_path; char *last_instr; asmsh_bytecode_t last_bcode; }; int asmsh_init(asmsh_t *sh, const char *child_path); void asmsh_cleanup(asmsh_t *sh); /** @return <0 on error 0 on ok 1 on exit */ int asmsh_exec(asmsh_t *sh, const char *cmd); #include "shell_cmds.h" // declares the static commands list #endif