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
Usermode/AxWin3 - Minor changes
[tpg/acess2.git]
/
KernelLand
/
Kernel
/
drv
/
vterm.c
diff --git
a/KernelLand/Kernel/drv/vterm.c
b/KernelLand/Kernel/drv/vterm.c
index
7d30511
..
63db01e
100644
(file)
--- a/
KernelLand/Kernel/drv/vterm.c
+++ b/
KernelLand/Kernel/drv/vterm.c
@@
-196,7
+196,6
@@
int VT_Install(char **Arguments)
// Semaphore_Init(&gVT_Terminals[i].InputSemaphore, 0, MAX_INPUT_CHARS8, "VTerm", gVT_Terminals[i].Name);
}
// Semaphore_Init(&gVT_Terminals[i].InputSemaphore, 0, MAX_INPUT_CHARS8, "VTerm", gVT_Terminals[i].Name);
}
- Log_Debug("VTerm", "Registering with DevFS");
// Add to DevFS
DevFS_AddDevice( &gVT_DrvInfo );
// Add to DevFS
DevFS_AddDevice( &gVT_DrvInfo );
@@
-353,8
+352,7
@@
int VT_Root_IOCtl(tVFS_Node *Node, int Id, void *Data)
*/
size_t VT_Read(tVFS_Node *Node, off_t Offset, size_t Length, void *Buffer)
{
*/
size_t VT_Read(tVFS_Node *Node, off_t Offset, size_t Length, void *Buffer)
{
- int pos = 0;
- int avail;
+ int pos, avail;
tVTerm *term = &gVT_Terminals[ Node->Inode ];
Uint32 *codepoint_buf = Buffer;
Uint32 *codepoint_in;
tVTerm *term = &gVT_Terminals[ Node->Inode ];
Uint32 *codepoint_buf = Buffer;
Uint32 *codepoint_in;
@@
-373,9
+371,10
@@
size_t VT_Read(tVFS_Node *Node, off_t Offset, size_t Length, void *Buffer)
avail = term->InputWrite - term->InputRead;
if(avail < 0)
avail += MAX_INPUT_CHARS8;
avail = term->InputWrite - term->InputRead;
if(avail < 0)
avail += MAX_INPUT_CHARS8;
- if(avail > Length
- pos
)
- avail = Length
- pos
;
+ if(avail > Length)
+ avail = Length;
+ pos = 0;
while( avail -- )
{
((char*)Buffer)[pos] = term->InputBuffer[term->InputRead];
while( avail -- )
{
((char*)Buffer)[pos] = term->InputBuffer[term->InputRead];
@@
-395,12
+394,13
@@
size_t VT_Read(tVFS_Node *Node, off_t Offset, size_t Length, void *Buffer)
if(avail < 0)
avail += MAX_INPUT_CHARS32;
Length /= 4;
if(avail < 0)
avail += MAX_INPUT_CHARS32;
Length /= 4;
- if(avail > Length
- pos
)
- avail = Length
- pos
;
+ if(avail > Length)
+ avail = Length;
codepoint_in = (void*)term->InputBuffer;
codepoint_buf = Buffer;
codepoint_in = (void*)term->InputBuffer;
codepoint_buf = Buffer;
+ pos = 0;
while( avail -- )
{
codepoint_buf[pos] = codepoint_in[term->InputRead];
while( avail -- )
{
codepoint_buf[pos] = codepoint_in[term->InputRead];
UCC
git Repository :: git.ucc.asn.au