Forgotten changes that should have been part of the r45368 64-bit fix.
[AROS.git] / rom / filesys / console_handler / con_handler_intern.h
blobf1914a7b196dddcacdd89e7d2336f681a62b23a1
1 #ifndef __CON_HANDLER_INTERN_H
2 #define __CON_HANDLER_INTERN_H
3 /*
4 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
5 $Id$
7 Desc: Internal header-file for emulation-handler.
8 Lang: english
9 */
11 /* AROS includes */
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>
20 ** stegerg:
22 ** if BETTER_WRITE_HANDLING is #defined then writes are sent to
23 ** console.device in smaller parts (max. 256 bytes or upto next
24 ** LINEFEED).
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
29 ** to be written.
31 **/
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
44 struct conTaskParams
46 struct conbase *conbase;
47 struct Task *parentTask;
48 ULONG initSignal;
51 struct filehandle
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 */
59 struct Task *contask;
60 struct Task *breaktask;
61 struct Task *lastwritetask;
62 struct MinList pendingReads;
63 struct NewWindow nw;
64 struct MsgPort *timermp;
65 struct timerequest *timerreq;
66 UBYTE *wintitle;
67 UBYTE *screenname;
68 #if BETTER_WRITE_HANDLING
69 LONG partlywrite_actual;
70 LONG partlywrite_size;
71 #endif
72 WORD conbufferpos;
73 WORD conbuffersize;
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 */
77 WORD canreadsize;
78 WORD historysize;
79 WORD historypos;
80 WORD historyviewpos;
81 WORD usecount;
82 UWORD flags;
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 */
89 WORD pastebufferpos;
90 WORD pastebuffersize;
91 STRPTR pastebuffer;
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 */
113 #undef InputBase
114 #undef IntuitionBase
115 #undef DOSBase
116 #undef GadToolsBase
117 #undef UtilityBase
119 /* FIXME: Remove these #define xxxBase hacks
120 Do not use this in new code !
122 #define InputBase fh->inputbase
123 #define IntuitionBase fh->intuibase
124 #define DOSBase fh->dosbase
125 #define GadToolsBase fh->gtbase
126 #define GfxBase fh->gfxbase
127 #define UtilityBase fh->utilbase
129 #endif /* __CON_HANDLER_INTERN_H */