summaryrefslogtreecommitdiff
path: root/viengoos/output.c
AgeCommit message (Collapse)Author
2008-06-112008-06-11 Neal H. Walfield <neal@gnu.org>neal
* output.c (puts) [_ENABLE_TESTS]: Don't define. (vprintf) [_ENABLE_TESTS]: Likewise. (printf) [_ENABLE_TESTS]: Likewise.
2008-06-11libc-parts/neal
2008-06-11 Neal H. Walfield <neal@gnu.org> * s-printf.h: New file. * Makefile.am (common_sources): Add s-printf.h. * s_printf.c: Include "s-printf.h". viengoos/ 2008-06-11 Neal H. Walfield <neal@gnu.org> * output.h: Include <s-printf.h>. (device_puts): Remove declaration. (device_vprintf): Likewise. (device_printf): Likewise. * output.c (device_puts): Remove function. (print_nr): Likewise. (print_signed_nr): Likewise. (device_vprintf): Likewise. (device_printf): Likewise. (puts): Implement in terms of s_puts. (vprintf): Implement in terms of s_vprintf. (printf): Likewise. hurd/ 2008-06-11 Neal H. Walfield <neal@gnu.org> * trace.h: Include <s-printf.h>.
2007-12-212007-12-21 Neal H. Walfield <neal@gnu.org>neal
* output.h: Include <stdint.h> and <stdbool.h>. (struct output_driver): Add a struct output_driver * argument to all function pointers. Update users. Add fields getchar and cookie. (output_init): Take additional arguments device, a struct output_driver * pointing to storage to hold the driver instance, and make_default, a boolean, indicating whether the device should be made the default device. (output_deinit): Take additional argument device, a struct output_driver *, designating the device to deinitialize. Update users. (device_putchar): New declaration. (device_puts): Likewise. (device_vprintf): Likewise. (device_printf): Likewise. (device_getchar): Likewise. (getchar): Likewise. * output.c: Include <hurd/stddef.h>. (output): Rename... (default_device): ... to this. Update users. (output_init): Take additional parameter, device. Treat the selected driver as a template and store a copy of it here. Take additional parameter make_default. If true, set DEFAULT_DEVICE to the driver. If DEFAULT_DEVICE was not NULL and MAKE_DEFAULT is true, first deinitialize the driver instance. (output_deinit): Take additional parameter device. Use it as the device to deinitialize. (device_putchar): New function. (putchar): Implement in terms of device_putchar. (device_puts): New function. (puts): Implement in terms of device_puts. (print_nr): Take additional parameter, the device to send output to. Use it. Update callers. (print_signed_nr): Likewise. (device_vprintf): New function. (vprintf): Implement in terms of device_vprintf. (device_printf): New function. (device_getchar): Likewise. (getchar): Likewise. * output-serial.c (uart_base): Remove variable. (UART_BASE_DEFAULT): New macro. (UART_DR): Use DEVICE->COOKIE, not UART_BASE, to determine the uart. (UART_IER): Likewise. (UART_IIR): Likewise. (UART_LCR): Likewise. (UART_MCR): Likewise. (UART_LSR): Likewise. (UART_MSR): Likewise. (UART_LSB): Likewise. (UART_MSB): Likewise. (UART_LSR_DR): New macro. (serial_init): Save the selected uart in DEVICE->COOKIE. (serial_getchar): New function. (serial_output): Add it here. * Makefile.am (t_link_SOURCES): Add panic.c shutdown.h shutdown.c. (t_guard_SOURCES): Likewise. * t-environment.h: Include "output.h". * viengoos.c (output_device): New variable. * Makefile.am (t_as_SOURCES): Remove reference to panic.h. (t_activity_SOURCES): Likewise.
2007-11-162007-11-16 Neal H. Walfield <neal@gnu.org>neal
* viengoos/Makefile.am: New file based on ../wortel/Makefile.am. * viengoos/headers.m4: New file. * viengoos/config.m4: New file based on ../wortel/config.m4. * viengoos/viengoos.h: New file. * viengoos/viengoos.c: New file. * viengoos/activity.h: Likewise. * viengoos/activity.c: Likewise. * viengoos/as.h: Likewise. * viengoos/as.c: Likewise. * viengoos/cap-lookup.c: Likewise. * viengoos/cap.h: Likewise. * viengoos/cap.c: Likewise. * viengoos/thread.h: New file. * viengoos/thread.c: New file. * viengoos/object.h: New file. * viengoos/object.c: New file. * viengoos/rm.h: New file. * viengoos/server.c: New file. * viengoos/server.h: New file. * viengoos/zalloc.h: Copied from ../physmem. * viengoos/zalloc.c: Copied from ../physmem. Don't include "output.h". Include <hurd/stddef.h>. Change uses of min_page_size to PAGESIZE. * viengoos/memory.h: New file. * viengoos/memory.c: New file. * viengoos/sigma0.c: Copy from ../wortel. * viengoos/sigma0.h: Copy from ../wortel. Don't include "shutdown.h". Include <hurd/stddef.h>. * viengoos/bits.h: Likewise. * viengoos/panic.c: New file. * viengoos/debug.c: Likewise. * viengoos/debug.h: Likewise. * viengoos/boot-modules.h: Likewise. * viengoos/boot-modules.c: Likewise. * viengoos/elf.h: Copied from ../wortel. * viengoos/loader.c: New file based on ../wortel/loader.c. * viengoos/loader.h: New file. * viengoos/multiboot.h: Copied from Grub. * viengoos/mmap.c: New file based on ../physmem/mmap.c. * viengoos/malloc-wrap.c: New file based on ../physmem/malloc-wrap.c. * viengoos/malloc.c: Version 2.8.3 of Doug Lea's malloc.c. * viengoos/malloc.h: Version 2.8.3 of Doug Lea's malloc.h. * viengoos/ia32-cmain.c: New file based on ../wortel/ia32-cmain.c. * viengoos/ia32-crt0.S: Copied from ../wortel. (STACK_SIZE): Use a 16 page stack. * viengoos/ia32-output.c: Copied from ../wortel. * viengoos/ia32-shutdown.c: Likewise. * viengoos/output.h: New file based on ../wortel/output.h. Include <stdarg.h>. (cprintf): New definition. (output_debug): Don't define. (debug): Don't define. * viengoos/output.c: New file based on ../wortel/output.c. Don't include <stdlib.h>. (vprintf): New function. (printf): Implement in terms of vprintf. * viengoos/output-none.c: Copied from ../wortel. * viengoos/output-serial.c: Likewise. * viengoos/output-stdio.c: New file. * viengoos/output-vga.c: Copied from ../wortel. * viengoos/shutdown.h: New file based on ../wortel/shutdown.h. Don't include "output.h". (panic): Don't define. (shutdown): Rename from this... (shutdown_machine): ... to this. * viengoos/shutdown.c: New file based on ../wortel/shutdown.c. (reset) [_L4_TEST_ENVIRONMENT]: Call abort. (halt) [_L4_TEST_ENVIRONMENT]: Call abort. (shutdown): Rename from this... (shutdown_machine): ... to this. * viengoos/t-environment.h: New file based on ../libl4/tests/environment.h. Protect from multiple inclusion. Include <hurd/stddef.h>. Include <string.h>. Include <l4/stubs.h>. (program_name): New declaration. (check_nr): Don't assume that val1 and val2 are _L4_word_t, use typeof instead. (main): Call output_init. * viengoos/t-as.c: New file.