mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
cleanup
svn path=/trunk/; revision=850
This commit is contained in:
parent
45043db6ff
commit
66f738dbd1
1 changed files with 15 additions and 17 deletions
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: blue.c,v 1.15 1999/12/10 17:04:37 dwelch Exp $
|
/* $Id: blue.c,v 1.16 1999/12/11 01:44:29 ekohl Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -95,14 +95,14 @@ ScrCreate (PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
||||||
offset += (READ_PORT_UCHAR (CRTC_DATA) << 8);
|
offset += (READ_PORT_UCHAR (CRTC_DATA) << 8);
|
||||||
|
|
||||||
/* switch blinking characters off */
|
/* switch blinking characters off */
|
||||||
READ_PORT_UCHAR (ATTRC_INPST1 /*0x3da*/);
|
READ_PORT_UCHAR (ATTRC_INPST1);
|
||||||
value = READ_PORT_UCHAR (ATTRC_WRITEREG/*0x3c0*/);
|
value = READ_PORT_UCHAR (ATTRC_WRITEREG);
|
||||||
WRITE_PORT_UCHAR (ATTRC_WRITEREG /*0x3c0*/, 0x10);
|
WRITE_PORT_UCHAR (ATTRC_WRITEREG, 0x10);
|
||||||
data = READ_PORT_UCHAR (ATTRC_READREG /*0x3c1*/);
|
data = READ_PORT_UCHAR (ATTRC_READREG);
|
||||||
data = data & ~0x08;
|
data = data & ~0x08;
|
||||||
WRITE_PORT_UCHAR (ATTRC_WRITEREG /*0x3c0*/, data);
|
WRITE_PORT_UCHAR (ATTRC_WRITEREG, data);
|
||||||
WRITE_PORT_UCHAR (ATTRC_WRITEREG /*0x3c0*/, value);
|
WRITE_PORT_UCHAR (ATTRC_WRITEREG, value);
|
||||||
READ_PORT_UCHAR (ATTRC_INPST1 /*0x3da*/);
|
READ_PORT_UCHAR (ATTRC_INPST1);
|
||||||
__asm__("sti\n\t");
|
__asm__("sti\n\t");
|
||||||
|
|
||||||
DeviceExtension->ScanLines = NR_SCANLINES; /* FIXME: read it from CRTC */
|
DeviceExtension->ScanLines = NR_SCANLINES; /* FIXME: read it from CRTC */
|
||||||
|
@ -198,7 +198,7 @@ ScrWrite (PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
vidmem[(cursorx * 2) + (cursory * columns * 2)] = *pch;
|
vidmem[(cursorx * 2) + (cursory * columns * 2)] = *pch;
|
||||||
vidmem[(cursorx * 2) + (cursory * columns * 2) + 1] = (char) DeviceExtension->CharAttribute;
|
vidmem[(cursorx * 2) + (cursory * columns * 2) + 1] = (char) DeviceExtension->CharAttribute;
|
||||||
|
@ -210,14 +210,13 @@ ScrWrite (PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (cursory >= rows)
|
if (cursory >= rows)
|
||||||
{
|
{
|
||||||
unsigned short *LinePtr;
|
unsigned short *LinePtr;
|
||||||
|
|
||||||
memcpy (vidmem,
|
memcpy (vidmem,
|
||||||
&vidmem[columns * 2],
|
&vidmem[columns * 2],
|
||||||
columns * (rows - 1) * 2);
|
columns * (rows - 1) * 2);
|
||||||
|
|
||||||
LinePtr = (unsigned short *) &vidmem[columns * (rows - 1) * 2];
|
LinePtr = (unsigned short *) &vidmem[columns * (rows - 1) * 2];
|
||||||
|
@ -235,7 +234,6 @@ ScrWrite (PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Set the cursor position */
|
/* Set the cursor position */
|
||||||
offset = (cursory * columns) + cursorx;
|
offset = (cursory * columns) + cursorx;
|
||||||
|
|
||||||
|
@ -246,7 +244,7 @@ ScrWrite (PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
||||||
WRITE_PORT_UCHAR (CRTC_DATA, offset);
|
WRITE_PORT_UCHAR (CRTC_DATA, offset);
|
||||||
|
|
||||||
Status = STATUS_SUCCESS;
|
Status = STATUS_SUCCESS;
|
||||||
|
|
||||||
Irp->IoStatus.Status = Status;
|
Irp->IoStatus.Status = Status;
|
||||||
IoCompleteRequest (Irp, IO_NO_INCREMENT);
|
IoCompleteRequest (Irp, IO_NO_INCREMENT);
|
||||||
|
|
||||||
|
@ -299,7 +297,7 @@ ScrIoControl (PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
||||||
Status = STATUS_SUCCESS;
|
Status = STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IOCTL_CONSOLE_SET_SCREEN_BUFFER_INFO:
|
case IOCTL_CONSOLE_SET_SCREEN_BUFFER_INFO:
|
||||||
{
|
{
|
||||||
PCONSOLE_SCREEN_BUFFER_INFO pcsbi = (PCONSOLE_SCREEN_BUFFER_INFO)Irp->AssociatedIrp.SystemBuffer;
|
PCONSOLE_SCREEN_BUFFER_INFO pcsbi = (PCONSOLE_SCREEN_BUFFER_INFO)Irp->AssociatedIrp.SystemBuffer;
|
||||||
|
@ -584,7 +582,7 @@ DriverEntry (PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath)
|
||||||
UNICODE_STRING device_name;
|
UNICODE_STRING device_name;
|
||||||
ANSI_STRING asymlink_name;
|
ANSI_STRING asymlink_name;
|
||||||
UNICODE_STRING symlink_name;
|
UNICODE_STRING symlink_name;
|
||||||
|
|
||||||
DbgPrint ("Screen Driver 0.0.6\n");
|
DbgPrint ("Screen Driver 0.0.6\n");
|
||||||
|
|
||||||
DriverObject->MajorFunction[IRP_MJ_CREATE] = ScrCreate;
|
DriverObject->MajorFunction[IRP_MJ_CREATE] = ScrCreate;
|
||||||
|
|
Loading…
Reference in a new issue