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
;
68 #if BETTER_WRITE_HANDLING
69 LONG partlywrite_actual
;
70 LONG partlywrite_size
;
74 WORD inputstart
; /* usually 0, but needed for multi-lines (CONTROL RETURN) */
75 WORD inputpos
; /* cursor pos. inside line */
76 WORD inputsize
; /* length of input string */
84 UBYTE consolebuffer
[CONSOLEBUFFER_SIZE
+ 2];
85 UBYTE inputbuffer
[INPUTBUFFER_SIZE
+ 2];
86 UBYTE historybuffer
[CMD_HISTORY_SIZE
][INPUTBUFFER_SIZE
+ 1];
88 /* If pastebuffer != 0, this contains data to paste from ConClip */
92 struct Device
*inputbase
;
93 struct IntuitionBase
*intuibase
;
94 struct GfxBase
*gfxbase
;
95 struct DosLibrary
*dosbase
;
96 struct Library
*gtbase
;
97 struct Library
*utilbase
;
100 /* filehandle flags */
102 #define FHFLG_READPENDING 1
103 #define FHFLG_WRITEPENDING 2
104 #define FHFLG_CANREAD 4
105 #define FHFLG_WAIT 8 /* filename contained WAIT */
106 #define FHFLG_RAW 16 /* in RAW mode */
107 #define FHFLG_ASYNCCONSOLEREAD 32 /* There is a pending async console.device CMD_READ request */
108 #define FHFLG_AUTO 64 /* filename contained AUTO */
109 #define FHFLG_CONSOLEDEVICEOPEN 128
110 #define FHFLG_EOF 256
111 #define FHFLG_WAITFORCLOSE 512 /* Console with WAIT is waiting to be closed */
120 * FIXME: Remove these #define xxxBase hacks
121 * Do not use this in new code !
123 #define InputBase fh->inputbase
124 #define IntuitionBase fh->intuibase
125 #define DOSBase fh->dosbase
126 #define GadToolsBase fh->gtbase
127 #define GfxBase fh->gfxbase
128 #define UtilityBase fh->utilbase
130 #endif /* __CON_HANDLER_INTERN_H */