summaryrefslogtreecommitdiff
path: root/console-client
diff options
context:
space:
mode:
Diffstat (limited to 'console-client')
-rw-r--r--console-client/bdf.c4
-rw-r--r--console-client/bdf.h8
-rw-r--r--console-client/driver.c2
-rw-r--r--console-client/ncursesw.c2
-rw-r--r--console-client/pc-kbd.c6
-rw-r--r--console-client/vga-dynacolor.c2
-rw-r--r--console-client/vga-dynafont.c27
-rw-r--r--console-client/vga-hw.h2
-rw-r--r--console-client/vga-support.c54
-rw-r--r--console-client/vga.c2
10 files changed, 42 insertions, 67 deletions
diff --git a/console-client/bdf.c b/console-client/bdf.c
index 30501f4a..f62a2473 100644
--- a/console-client/bdf.c
+++ b/console-client/bdf.c
@@ -154,7 +154,7 @@ next_line (char **line, int *size, FILE *file, int *count)
}
-/* Isolate the next white-space seperated argument from the current
+/* Isolate the next white-space separated argument from the current
line, and set ARGP to the beginning of the next argument. It is an
error if there is no further argument. */
static bdf_error_t
@@ -178,7 +178,7 @@ find_arg (char **argp)
/* Read the font from stream FILE, and return it in FONT. If
LINECOUNT is not zero, it will contain the number of lines in the
- file at success, and the line an error occured at failure. */
+ file at success, and the line an error occurred at failure. */
bdf_error_t
bdf_read (FILE *filep, bdf_font_t *font, int *linecount)
{
diff --git a/console-client/bdf.h b/console-client/bdf.h
index 1f0bce41..17cd0235 100644
--- a/console-client/bdf.h
+++ b/console-client/bdf.h
@@ -32,17 +32,17 @@
types of the arguments, so we treat a string as an 8-bit string
which must not contain a binary null, and a number like an integer
as an int. Leading and trailing white space are removed, multiple
- spaces that seperate arguments are replaced by a single white
+ spaces that separate arguments are replaced by a single white
space, and empty lines are ignored. */
/* Possible error values returned by the BDF functions. */
typedef enum
{
- /* No error occured. This is guaranteed to be zero. */
+ /* No error occurred. This is guaranteed to be zero. */
BDF_NO_ERROR = 0,
- /* A system error occured. The caller should consult errno. */
+ /* A system error occurred. The caller should consult errno. */
BDF_SYSTEM_ERROR,
/* All following errors indicate that the file is not a valid BDF
@@ -200,7 +200,7 @@ typedef struct bdf_font *bdf_font_t;
/* Read the font from stream FILE, and return it in FONT. If
LINECOUNT is not zero, it will contain the number of lines in the
- file at success, and the current line an error occured at
+ file at success, and the current line an error occurred at
failure. */
bdf_error_t bdf_read (FILE *file, bdf_font_t *font, int *linecount);
diff --git a/console-client/driver.c b/console-client/driver.c
index 2a56729d..7f799f0a 100644
--- a/console-client/driver.c
+++ b/console-client/driver.c
@@ -83,7 +83,7 @@ driver_fini (void)
/* Load, intialize and (if START is non-zero) start the driver DRIVER
under the given NAME (which must be unique among all loaded
- drivers) with arguments ARGZ with length ARGZ_LEN. This funtion
+ drivers) with arguments ARGZ with length ARGZ_LEN. This function
will grab the driver list lock. The driver itself might try to
grab the display, input source and bell list locks as well. */
error_t driver_add (const char *const name, const char *const driver,
diff --git a/console-client/ncursesw.c b/console-client/ncursesw.c
index 8b559016..a34026a2 100644
--- a/console-client/ncursesw.c
+++ b/console-client/ncursesw.c
@@ -47,7 +47,7 @@ static WINDOW *conspad;
static unsigned int padx;
static unsigned int pady;
-/* Autoscroll is on or off. Autoscroll makes scrolling dependant on
+/* Autoscroll is on or off. Autoscroll makes scrolling dependent on
the cursor position. */
static int autoscroll;
diff --git a/console-client/pc-kbd.c b/console-client/pc-kbd.c
index 9999654f..95109e52 100644
--- a/console-client/pc-kbd.c
+++ b/console-client/pc-kbd.c
@@ -602,7 +602,7 @@ gnumach_v1_input_next ()
error_t err = device_read_inband (kbd_dev, 0, -1, sizeof (kd_event),
(void *) &data_buf, &data_cnt);
- /* XXX The error occured likely because KBD_DEV was closed, so
+ /* XXX The error occurred likely because KBD_DEV was closed, so
terminate. */
if (err)
return 0;
@@ -685,7 +685,7 @@ input_next ()
error_t err = device_read_inband (kbd_dev, 0, -1, 1,
(void *) &next, &data_cnt);
- /* XXX The error occured likely because KBD_DEV was closed, so
+ /* XXX The error occurred likely because KBD_DEV was closed, so
terminate. */
if (err)
return 0;
@@ -913,7 +913,7 @@ input_loop (any_t unused)
/* The virtual console to switch to. */
int vc = 0;
- /* Check if a funtion key was pressed.
+ /* Check if a function key was pressed.
Choose the virtual console corresponding to that key. */
switch (sc)
{
diff --git a/console-client/vga-dynacolor.c b/console-client/vga-dynacolor.c
index 7b81e2f9..9289e1eb 100644
--- a/console-client/vga-dynacolor.c
+++ b/console-client/vga-dynacolor.c
@@ -177,7 +177,7 @@ dynacolor_replace_colors (dynacolor_t *dc,
based on pairs, but that increases the number of cases a
lot. */
/* Note that no color must occur twice in one replacement list,
- and that the color to be replaced must not occure either. */
+ and that the color to be replaced must not occur either. */
static signed char pref[16][9] =
{
/* Replacements for CONS_COLOR_BLACK. */
diff --git a/console-client/vga-dynafont.c b/console-client/vga-dynafont.c
index 3e0ec3ff..834d0aca 100644
--- a/console-client/vga-dynafont.c
+++ b/console-client/vga-dynafont.c
@@ -529,6 +529,31 @@ dynafont_new (bdf_font_t font, bdf_font_t font_italic, bdf_font_t font_bold,
df->vga_font_last_free_index_lgc = 0;
}
+ /* Ensure that ASCII is always available 1-to-1, for kernel messages. */
+ for (int c = ' '; c <= '~'; c++)
+ {
+ glyph = bdf_find_glyph (df->font, c, 0);
+ if (!glyph)
+ glyph = bdf_find_glyph (df->font, -1, c);
+ if (glyph)
+ {
+ struct mapped_character *chr = &df->charmap_data[c];
+ df->vga_font_free_indices--;
+ chr->refs = 1;
+
+ for (int i = 0; i < ((glyph->bbox.height > 32)
+ ? 32 : glyph->bbox.height); i++)
+ df->vga_font[c][i]
+ = glyph->bitmap[i * ((glyph->bbox.width + 7) / 8)];
+ if (glyph->bbox.height < 32)
+ memset (((char *) df->vga_font[c])
+ + glyph->bbox.height, 0, 32 - glyph->bbox.height);
+
+ /* Update the hash table. */
+ hurd_ihash_add (&df->charmap, c, chr);
+ }
+ }
+
/* Ensure that we always have the replacement character
available. */
{
@@ -846,7 +871,7 @@ dynafont_lookup_internal (dynafont_t df, bdf_font_t font,
chr->refs = 1;
chr->character = (wide_chr | attr);
- /* Copy the glyph bitmap, taking into account double-width charcters. */
+ /* Copy the glyph bitmap, taking into account double-width characters. */
{
int height = (glyph->bbox.height > 32) ? 32 : glyph->bbox.height;
int bwidth = (glyph->bbox.width + 7) / 8;
diff --git a/console-client/vga-hw.h b/console-client/vga-hw.h
index 6be87d31..7275b03e 100644
--- a/console-client/vga-hw.h
+++ b/console-client/vga-hw.h
@@ -21,7 +21,7 @@
#ifndef _VGA_HW_H_
#define _VGA_HW_H_ 1
-#define VGA_VIDEO_MEM_BASE_ADDR 0x0a0000
+#define VGA_VIDEO_MEM_BASE_ADDR 0x0b8000
#define VGA_VIDEO_MEM_LENGTH 0x004000
#define VGA_FONT_BUFFER 8
diff --git a/console-client/vga-support.c b/console-client/vga-support.c
index bce6f8e9..2837a6e0 100644
--- a/console-client/vga-support.c
+++ b/console-client/vga-support.c
@@ -59,19 +59,6 @@ struct vga_state
static struct vga_state *vga_state;
-#if OSKIT_MACH
-#else
-
-#include <device/device.h>
-#include <hurd.h>
-
-/* Constants from Mach. */
-#define VIDMMAP_BEGIN 0xA0000
-#define VIDMMAP_SIZE (0xC0000 - 0xA0000)
-#define VIDMMAP_KDOFS 0xA0000 /* == kd_bitmap_start in mach/i386/i386at/kd.c */
-
-#endif
-
error_t
vga_init (void)
{
@@ -101,43 +88,6 @@ vga_init (void)
if (vga_videomem == (void *) -1)
return err;
}
- else if (errno == ENXIO)
- {
- /* GNU Mach v1 does not provide /dev/mem, but allows direct
- memory access to the video memory through the special "kd"
- kernel device. */
- device_t device_master = MACH_PORT_NULL;
- memory_object_t kd_mem = MACH_PORT_NULL;
- static device_t kd_device = MACH_PORT_NULL;
- vm_address_t mapped;
-
- err = get_privileged_ports (0, &device_master);
- if (err)
- return err;
-
- err = device_open (device_master, D_WRITE, "kd", &kd_device);
- if (err)
- return err;
-
- err = device_map (kd_device, VM_PROT_READ | VM_PROT_WRITE,
- VIDMMAP_BEGIN - VIDMMAP_KDOFS, VIDMMAP_SIZE,
- &kd_mem, 0);
- if (err)
- return err;
-
- err = vm_map (mach_task_self (), &mapped, VIDMMAP_SIZE,
- 0, 1, kd_mem, VIDMMAP_BEGIN - VIDMMAP_KDOFS, 0,
- VM_PROT_READ | VM_PROT_WRITE, VM_PROT_READ | VM_PROT_WRITE,
- VM_INHERIT_NONE);
- if (err)
- return err;
-
- vga_videomem = (char *) mapped;
- assert (vga_videomem != NULL);
-
- mach_port_deallocate (mach_task_self (), device_master);
- mach_port_deallocate (mach_task_self (), kd_mem);
- }
else
return errno;
@@ -175,7 +125,7 @@ vga_init (void)
/* Read/write in interleaved mode. */
outb (VGA_GFX_MISC_ADDR, VGA_GFX_ADDR_REG);
- outb (VGA_GFX_MISC_CHAINOE | VGA_GFX_MISC_A0TOAF, VGA_GFX_DATA_REG);
+ outb (VGA_GFX_MISC_CHAINOE | VGA_GFX_MISC_B8TOBF, VGA_GFX_DATA_REG);
outb (VGA_GFX_MODE_ADDR, VGA_GFX_ADDR_REG);
outb (VGA_GFX_MODE_HOSTOE, VGA_GFX_DATA_REG);
@@ -269,7 +219,7 @@ vga_read_write_font_buffer (int write, int buffer, int index,
outb (VGA_GFX_MODE_READ0, VGA_GFX_DATA_REG);
outb (VGA_GFX_MISC_ADDR, VGA_GFX_ADDR_REG);
saved_gfx_misc = inb (VGA_GFX_DATA_REG);
- outb (VGA_GFX_MISC_A0TOBF, VGA_GFX_DATA_REG);
+ outb (VGA_GFX_MISC_B8TOBF, VGA_GFX_DATA_REG);
if (write)
memcpy (vga_videomem + offset, data, datalen);
diff --git a/console-client/vga.c b/console-client/vga.c
index 4693c664..9e8abb3a 100644
--- a/console-client/vga.c
+++ b/console-client/vga.c
@@ -394,7 +394,7 @@ vga_display_restore_status (void *handle)
/* Read/write in interleaved mode. This is not preserved by the
XFree VESA driver. */
outb (VGA_GFX_MISC_ADDR, VGA_GFX_ADDR_REG);
- outb (VGA_GFX_MISC_CHAINOE | VGA_GFX_MISC_A0TOAF, VGA_GFX_DATA_REG);
+ outb (VGA_GFX_MISC_CHAINOE | VGA_GFX_MISC_B8TOBF, VGA_GFX_DATA_REG);
}