git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix clean all script for renamed armv7 arch
[tpg/acess2.git]
/
Kernel
/
drv
/
vterm.c
diff --git
a/Kernel/drv/vterm.c
b/Kernel/drv/vterm.c
index
26ab81b
..
1d4b367
100644
(file)
--- a/
Kernel/drv/vterm.c
+++ b/
Kernel/drv/vterm.c
@@
-5,9
+5,9
@@
#include <acess.h>
#include <fs_devfs.h>
#include <modules.h>
#include <acess.h>
#include <fs_devfs.h>
#include <modules.h>
-#include <
tpl
_drv_video.h>
-#include <
tpl
_drv_keyboard.h>
-#include <
tpl
_drv_terminal.h>
+#include <
api
_drv_video.h>
+#include <
api
_drv_keyboard.h>
+#include <
api
_drv_terminal.h>
#include <errno.h>
#include <semaphore.h>
#include <errno.h>
#include <semaphore.h>
@@
-24,6
+24,7
@@
#define DEFAULT_WIDTH 640
#define DEFAULT_HEIGHT 480
#define DEFAULT_SCROLLBACK 2 // 2 Screens of text + current screen
#define DEFAULT_WIDTH 640
#define DEFAULT_HEIGHT 480
#define DEFAULT_SCROLLBACK 2 // 2 Screens of text + current screen
+//#define DEFAULT_SCROLLBACK 0
#define DEFAULT_COLOUR (VT_COL_BLACK|(0xAAA<<16))
#define VT_FLAG_HIDECSR 0x01
#define DEFAULT_COLOUR (VT_COL_BLACK|(0xAAA<<16))
#define VT_FLAG_HIDECSR 0x01
@@
-109,7
+110,7
@@
const Uint16 caVT100Colours[] = {
};
// === GLOBALS ===
};
// === GLOBALS ===
-MODULE_DEFINE(0, VERSION, VTerm, VT_Install, NULL,
FALLBACK_OUTPUT, DEFAULT_IN
PUT, NULL);
+MODULE_DEFINE(0, VERSION, VTerm, VT_Install, NULL,
DEFAULT_INPUT, FALLBACK_OUT
PUT, NULL);
tDevFS_Driver gVT_DrvInfo = {
NULL, "VTerm",
{
tDevFS_Driver gVT_DrvInfo = {
NULL, "VTerm",
{
@@
-802,10
+803,10
@@
void VT_KBCallBack(Uint32 Codepoint)
case KEY_PGDOWN:
if( gpVT_CurTerm->Flags & VT_FLAG_ALTBUF )
return ;
case KEY_PGDOWN:
if( gpVT_CurTerm->Flags & VT_FLAG_ALTBUF )
return ;
- if( gpVT_CurTerm->ViewPos < gpVT_CurTerm->Width*gpVT_CurTerm->Height*(giVT_Scrollback
-1
) )
+ if( gpVT_CurTerm->ViewPos < gpVT_CurTerm->Width*gpVT_CurTerm->Height*(giVT_Scrollback) )
gpVT_CurTerm->ViewPos += gpVT_CurTerm->Width;
else
gpVT_CurTerm->ViewPos += gpVT_CurTerm->Width;
else
- gpVT_CurTerm->ViewPos = gpVT_CurTerm->Width*gpVT_CurTerm->Height*(giVT_Scrollback
-1
);
+ gpVT_CurTerm->ViewPos = gpVT_CurTerm->Width*gpVT_CurTerm->Height*(giVT_Scrollback);
return;
}
}
return;
}
}
@@
-904,11
+905,6
@@
void VT_KBCallBack(Uint32 Codepoint)
}
VFS_MarkAvaliable(&term->Node, 1);
}
VFS_MarkAvaliable(&term->Node, 1);
-
- // Wake up the thread waiting on us
- //if( term->ReadingThread >= 0 ) {
- // Threads_WakeTID(term->ReadingThread);
- //}
}
/**
}
/**
@@
-968,7
+964,7
@@
int VT_int_ParseEscape(tVTerm *Term, char *Buffer)
}
// Get Command
}
// Get Command
- if(
('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z'))
+ if( ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z'))
{
if( bQuestionMark )
{
{
if( bQuestionMark )
{
@@
-1356,7
+1352,8
@@
void VT_int_ScrollText(tVTerm *Term, int Count)
int height, init_write_pos;
int len, i;
int scroll_top, scroll_height;
int height, init_write_pos;
int len, i;
int scroll_top, scroll_height;
-
+
+ // Get buffer pointer and attributes
if( Term->Flags & VT_FLAG_ALTBUF )
{
buf = Term->AltBuf;
if( Term->Flags & VT_FLAG_ALTBUF )
{
buf = Term->AltBuf;
@@
-1368,22
+1365,24
@@
void VT_int_ScrollText(tVTerm *Term, int Count)
else
{
buf = Term->Text;
else
{
buf = Term->Text;
- height = Term->TextHeight*
giVT_Scrollback
;
+ height = Term->TextHeight*
(giVT_Scrollback+1)
;
init_write_pos = Term->WritePos;
scroll_top = 0;
scroll_height = height;
}
init_write_pos = Term->WritePos;
scroll_top = 0;
scroll_height = height;
}
-
+
+ // Scroll text downwards
if( Count > 0 )
{
int base;
if( Count > 0 )
{
int base;
+
+ // Set up
if(Count > scroll_height) Count = scroll_height;
if(Count > scroll_height) Count = scroll_height;
-// Debug("Scroll: Count = %i", Count);
base = Term->TextWidth*(scroll_top + scroll_height - Count);
len = Term->TextWidth*(scroll_height - Count);
// Scroll terminal cache
base = Term->TextWidth*(scroll_top + scroll_height - Count);
len = Term->TextWidth*(scroll_height - Count);
// Scroll terminal cache
- mem
cpy
(
+ mem
move
(
&buf[Term->TextWidth*scroll_top],
&buf[Term->TextWidth*(scroll_top+Count)],
len*sizeof(tVT_Char)
&buf[Term->TextWidth*scroll_top],
&buf[Term->TextWidth*(scroll_top+Count)],
len*sizeof(tVT_Char)
@@
-1418,7
+1417,7
@@
void VT_int_ScrollText(tVTerm *Term, int Count)
len = Term->TextWidth*(scroll_height - Count);
// Scroll terminal cache
len = Term->TextWidth*(scroll_height - Count);
// Scroll terminal cache
- mem
cpy
(
+ mem
move
(
&buf[Term->TextWidth*(scroll_top+Count)],
&buf[Term->TextWidth*scroll_top],
len*sizeof(tVT_Char)
&buf[Term->TextWidth*(scroll_top+Count)],
&buf[Term->TextWidth*scroll_top],
len*sizeof(tVT_Char)
UCC
git Repository :: git.ucc.asn.au