Imported Upstream version 2.9.0
[debian/cc1111] / sim / ucsim / cmd.src / cmdutil.h
1 /*
2  * Simulator of microcontrollers (cmd.src/cmdutil.h)
3  *
4  * Copyright (C) 1999,99 Drotos Daniel, Talker Bt.
5  * Copyright (C) 2006, Borut Razem - borut.razem@siol.net
6  *
7  * To contact author send email to drdani@mazsola.iit.uni-miskolc.hu
8  *
9  */
10
11 /* This file is part of microcontroller simulator: ucsim.
12
13 UCSIM is free software; you can redistribute it and/or modify
14 it under the terms of the GNU General Public License as published by
15 the Free Software Foundation; either version 2 of the License, or
16 (at your option) any later version.
17
18 UCSIM is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21 GNU General Public License for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with UCSIM; see the file COPYING.  If not, write to the Free
25 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
26 02111-1307, USA. */
27 /*@1@*/
28
29 #ifndef CMD_CMDUTIL_HEADER
30 #define CMD_CMDUTIL_HEADER
31
32 #ifdef SOCKET_AVAIL
33 # include HEADER_SOCKET
34 #endif
35
36 #include "ddconfig.h"
37
38 #include "uccl.h"
39
40 #ifdef SOCKET_AVAIL
41 extern UCSOCKET_T make_server_socket(unsigned short int port);
42 #endif
43 #ifdef _WIN32
44 enum e_handle_type { CH_UNDEF, CH_FILE, CH_SOCKET, CH_CONSOLE, CH_SERIAL,};
45 enum e_handle_type get_handle_type(HANDLE handle);
46 bool input_avail(HANDLE handle, e_handle_type type = CH_UNDEF);
47 #else
48 bool input_avail(UCSOCKET_T handle);
49 #endif
50 //extern void print_bin(long data, int bits, class cl_console_base *con);
51 extern struct name_entry *get_name_entry(struct name_entry tabl[],
52                                          char *name,
53                                          class cl_uc *uc);
54 /*extern bool interpret_bitname(char *name, class cl_uc *uc,
55                               uchar **cell, uchar *celladdr,
56                               uchar *bitaddr, uchar *bitmask,
57                               char **symname);*/
58 extern char *proc_escape(char *string, int *len);
59
60
61 #endif
62
63 /* End of cmd.src/cmdutil.h */