1 #ifndef __CON_HANDLER_INTERN_H
2 #define __CON_HANDLER_INTERN_H
4 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
7 Desc: Internal header-file for emulation-handler.
12 #include <exec/libraries.h>
13 #include <exec/types.h>
14 #include <dos/dosextens.h>
15 #include <intuition/intuition.h>
16 #include <hidd/hidd.h>
17 #include <aros/asmcall.h>
22 ** if BETTER_WRITE_HANDLING is #defined then writes are sent to
23 ** console.device in smaller parts (max. 256 bytes or upto next
26 ** NOTE: Could be problematic with control sequences in case of
27 ** the 256-Byte-Block write (write size is >256 but no LINE-
28 ** FEED was found in this first (or better actual) 256 bytes
33 #define BETTER_WRITE_HANDLING 1
34 #define RMB_FREEZES_OUTPUT 1
36 #define CONTASK_STACKSIZE (AROS_STACKSIZE)
37 #define CONTASK_PRIORITY 5
39 #define CONSOLEBUFFER_SIZE 256
40 #define INPUTBUFFER_SIZE 256
41 #define CMD_HISTORY_SIZE 32
42 #define PASTEBUFSIZE 16384
46 struct conbase
*conbase
;
47 struct Task
*parentTask
;
53 struct IOStdReq
*conreadio
;
54 struct IOStdReq conwriteio
;
55 struct MsgPort
*conreadmp
;
56 struct MsgPort
*conwritemp
;
57 struct Window
*window
;
58 struct Window
*otherwindow
; /* WINDOW0xXXXXXXXX parameter */
60 struct Task
*breaktask
;
61 struct Task
*lastwritetask
;
62 struct MinList pendingReads
;
64 struct MsgPort
*timermp
;
65 struct timerequest
*timerreq
;
66 struct MsgPort
*appmsgport
;
67 struct AppMessage
*appmsg
;
68 struct AppWindow
*appwindow
;
71 #if BETTER_WRITE_HANDLING
72 LONG partlywrite_actual
;
73 LONG partlywrite_size
;
77 WORD inputstart
; /* usually 0, but needed for multi-lines (CONTROL RETURN) */
78 WORD inputpos
; /* cursor pos. inside line */
79 WORD inputsize
; /* length of input string */
87 UBYTE consolebuffer
[CONSOLEBUFFER_SIZE
+ 2];
88 UBYTE inputbuffer
[INPUTBUFFER_SIZE
+ 2];
89 UBYTE historybuffer
[CMD_HISTORY_SIZE
][INPUTBUFFER_SIZE
+ 1];
91 /* If pastebuffer != 0, this contains data to paste from ConClip */
95 struct Device
*inputbase
;
96 struct IntuitionBase
*intuibase
;
97 struct GfxBase
*gfxbase
;
98 struct DosLibrary
*dosbase
;
99 struct Library
*gtbase
;
100 struct Library
*utilbase
;
101 struct Library
*workbenchbase
;
104 /* filehandle flags */
106 #define FHFLG_READPENDING 1
107 #define FHFLG_WRITEPENDING 2
108 #define FHFLG_CANREAD 4
109 #define FHFLG_WAIT 8 /* filename contained WAIT */
110 #define FHFLG_RAW 16 /* in RAW mode */
111 #define FHFLG_ASYNCCONSOLEREAD 32 /* There is a pending async console.device CMD_READ request */
112 #define FHFLG_AUTO 64 /* filename contained AUTO */
113 #define FHFLG_CONSOLEDEVICEOPEN 128
114 #define FHFLG_EOF 256
115 #define FHFLG_WAITFORCLOSE 512 /* Console with WAIT is waiting to be closed */
116 #define FHFLG_BOOTCON 1024/* Special marker for boot console */
126 * FIXME: Remove these #define xxxBase hacks
127 * Do not use this in new code !
129 #define InputBase fh->inputbase
130 #define IntuitionBase fh->intuibase
131 #define DOSBase fh->dosbase
132 #define GadToolsBase fh->gtbase
133 #define GfxBase fh->gfxbase
134 #define UtilityBase fh->utilbase
135 #define WorkbenchBase fh->workbenchbase
137 #endif /* __CON_HANDLER_INTERN_H */