X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Kernel%2Fdrv%2Fvterm.c;h=af927176c688f18de6824d04922766af5c4356d1;hb=2f341c0ca8d0e97bf87d8de68cc461c7aceb1035;hp=2cdd84ff4afccc4e47320fc55b50a4b8743ca639;hpb=e65e6d063e88824bef125f9a08e9120b5ab4d97f;p=tpg%2Facess2.git diff --git a/Kernel/drv/vterm.c b/Kernel/drv/vterm.c index 2cdd84ff..af927176 100644 --- a/Kernel/drv/vterm.c +++ b/Kernel/drv/vterm.c @@ -15,7 +15,7 @@ #define DEFAULT_INPUT "/Devices/PS2Keyboard" #define DEFAULT_WIDTH 80 #define DEFAULT_HEIGHT 25 -#define DEFAULT_COLOUR (VT_COL_BLACK|(VT_COL_WHITE<<16)) +#define DEFAULT_COLOUR (VT_COL_BLACK|(0xAAA<<16)) #define VT_FLAG_HIDECSR 0x01 @@ -62,7 +62,7 @@ void VT_int_UpdateScreen( tVTerm *Term, int UpdateAll ); // === CONSTANTS === const Uint16 caVT100Colours[] = { - VT_COL_BLACK, 0x700, 0x070, 0x770, 0x007, 0x707, 0x077, VT_COL_LTGREY, + VT_COL_BLACK, 0x700, 0x070, 0x770, 0x007, 0x707, 0x077, 0xAAA, VT_COL_GREY, 0xF00, 0x0F0, 0xFF0, 0x00F, 0xF0F, 0x0FF, VT_COL_WHITE }; @@ -72,6 +72,7 @@ tDevFS_Driver gVT_DrvInfo = { NULL, "VTerm", { .Flags = VFS_FFLAG_DIRECTORY, + .Size = NUM_VTS, .Inode = -1, .NumACLs = 0, .ReadDir = VT_ReadDir, @@ -194,7 +195,7 @@ char *VT_ReadDir(tVFS_Node *Node, int Pos) { if(Pos < 0) return NULL; if(Pos >= NUM_VTS) return NULL; - return gVT_Terminals[Pos].Name; + return strdup( gVT_Terminals[Pos].Name ); } /** @@ -242,10 +243,9 @@ Uint64 VT_Read(tVFS_Node *Node, Uint64 Offset, Uint64 Length, void *Buffer) case VT_MODE_TEXT8: while(pos < Length) { - while(term->InputRead == term->InputWrite) Proc_Yield(); + while(term->InputRead == term->InputWrite) Threads_Yield(); while(term->InputRead != term->InputWrite) { - LOG("WriteUTF8(%p, 0x%x)", Buffer+pos, term->InputBuffer[term->InputRead]); pos += WriteUTF8(Buffer+pos, term->InputBuffer[term->InputRead]); term->InputRead ++; term->InputRead %= MAX_INPUT_CHARS; @@ -256,7 +256,7 @@ Uint64 VT_Read(tVFS_Node *Node, Uint64 Offset, Uint64 Length, void *Buffer) case VT_MODE_TEXT32: while(pos < Length) { - while(term->InputRead == term->InputWrite) Proc_Yield(); + while(term->InputRead == term->InputWrite) Threads_Yield(); while(term->InputRead != term->InputWrite) { ((Uint32*)Buffer)[pos] = term->InputBuffer[term->InputRead];