X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=sim%2Fucsim%2Fcmd.src%2Fnewcmdcl.h;h=8204307d7c7d11cffe3b0e196eae5215a1ff613a;hb=d46f1ad41d63b49a39c6616a9918a29cbc1755e4;hp=c0a604ab557087b338be202bb16dbc3c7bef6ddc;hpb=0e1bba0730e55b3d40c1c644d94befc99c87270d;p=fw%2Fsdcc diff --git a/sim/ucsim/cmd.src/newcmdcl.h b/sim/ucsim/cmd.src/newcmdcl.h index c0a604ab..8204307d 100644 --- a/sim/ucsim/cmd.src/newcmdcl.h +++ b/sim/ucsim/cmd.src/newcmdcl.h @@ -32,6 +32,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "ddconfig.h" #include +#include #include #if FD_HEADER_OK # include HEADER_FD @@ -106,12 +107,14 @@ protected: class cl_prompt_option *prompt_option; class cl_optref *null_prompt_option; class cl_debug_option *debug_option; + class cl_ustrings *lines_printed; + class cl_cmd *last_command; + class cl_cmdline *last_cmdline; public: class cl_app *app; - char *last_command; int flags; // See CONS_XXXX char *prompt; - + public: cl_console(void): cl_base() { app= 0; in= out= 0; flags= 0; } cl_console(char *fin, char *fout, class cl_app *the_app); @@ -121,15 +124,19 @@ public: cl_console(int portnumber, class cl_app *the_app); #endif virtual ~cl_console(void); - virtual class cl_console *cl_console::clone_for_exec(char *fin); + virtual class cl_console *clone_for_exec(char *fin); virtual int init(void); + virtual bool accept_last(void); + virtual void welcome(void); virtual void redirect(char *fname, char *mode); virtual void un_redirect(void); virtual FILE *get_out(void) { return(rout?rout:out); } + int cmd_do_print(FILE *f, char *format, va_list ap); virtual void print_prompt(void); virtual int dd_printf(char *format, ...); + virtual int debug(char *format, ...); virtual void print_bin(long data, int bits); virtual void print_char_octal(char c); virtual int match(int fdnum); @@ -182,7 +189,7 @@ public: class cl_app *app; class cl_list *cons; fd_set read_set, active_set; - int fd_num; + UCSOCKET_T fd_num; //class cl_sim *sim; class cl_console *actual_console, *frozen_console; class cl_cmdset *cmdset; @@ -205,15 +212,19 @@ public: void set_fd_set(void); void prompt(void); + FILE *get_out(void); int all_printf(char *format, ...); // print to all consoles int all_print(char *string, int length); int dd_printf(char *format, ...); // print to actual_console + int dd_printf(char *format, va_list ap);// print to actual_console int debug(char *format, ...); // print consoles with debug flag set + int debug(char *format, va_list ap); // print consoles with debug flag set int flag_printf(int iflags, char *format, ...); int input_avail(void); int input_avail_on_frozen(void); int wait_input(void); int proc_input(void); + void exec_on(class cl_console *cons, char *file_name); };