1 /* pMARS -- a portable Memory Array Redcode Simulator
2  * Copyright (C) 1993-1995 Albert Ma, Na'ndor Sieben, Stefan Strack, Mintardjo Wangsawidjaja and Martin Maierhofer
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17  */
18 
19 /*
20  * xwindisp.h: user interface for X11 graphical displays
21  * $Id: xwindisp.h,v 1.1.1.1 2000/08/20 13:29:50 iltzu Exp $
22  */
23 
24 #ifdef XWINGRAPHX
25 
26 #ifndef XWINDISP_H
27 #define XWINDISP_H
28 
29 /* extern prototype declaration */
30 #ifdef NEW_STYLE
31 extern void     xWin_open_graphics(void);
32 extern void     xWin_display_cycle(void);
33 extern void     xWin_display_clear(void);
34 extern void     xWin_display_read(int addr);
35 extern void     xWin_display_dec(int addr);
36 extern void     xWin_display_inc(int addr);
37 extern void     xWin_display_write(int addr);
38 extern void     xWin_display_exec(int addr);
39 extern void     xWin_display_spl(int warrior, int tasks);
40 extern void     xWin_display_dat(int addr, int warNum, int tasks);
41 #else
42 extern void     xWin_open_graphics();
43 extern void     xWin_display_cycle();
44 extern void     xWin_display_clear();
45 extern void     xWin_display_read();
46 extern void     xWin_display_dec();
47 extern void     xWin_display_inc();
48 extern void     xWin_display_write();
49 extern void     xWin_display_exec();
50 extern void     xWin_display_spl();
51 extern void     xWin_display_dat();
52 #endif
53 
54 /* functional macros needed by sim.c */
55 #define display_die(warnum)
56 #define display_push(val)
57 
58 #define display_init()  xWin_open_graphics()
59 #define display_clear() xWin_display_clear()
60 #define display_close() xWin_display_close(WAIT)
61 #define display_cycle() xWin_display_cycle()
62 
63 #define display_read(addr) do { if (displayLevel > 3)\
64   xWin_display_read(addr); } while(0)
65 #define display_write(addr) do { if (displayLevel > 1)\
66   xWin_display_write(addr); } while(0)
67 #define display_dec(addr) do { if (displayLevel > 2)\
68   xWin_display_dec(addr); } while (0)
69 #define display_inc(addr)  do { if (displayLevel > 2)\
70   xWin_display_inc(addr); } while(0)
71 #define display_exec(addr) do { if (displayLevel > 0)\
72   xWin_display_exec(addr); } while(0)
73 #define display_spl(warrior,tasks) xWin_display_spl(warrior,tasks)
74 #define display_dat(addr,warnum,tasks) xWin_display_dat(addr,warnum,tasks)
75 
76 #endif				/* XWINDISP_H */
77 #endif				/* defined XWINGRAPHX */
78