From cc3fd78041bd5ce5f3752865d13efd965759c2f5 Mon Sep 17 00:00:00 2001 From: Karl Ramm Date: Tue, 14 Apr 2009 12:47:51 +0000 Subject: display.c is dead, and appears to have been for a very long time --- zwgc/Makefile.in | 1 - zwgc/display.c | 141 ------------------------------------------------------- 2 files changed, 142 deletions(-) delete mode 100644 zwgc/display.c (limited to 'zwgc') diff --git a/zwgc/Makefile.in b/zwgc/Makefile.in index f2beb82..6addf6a 100644 --- a/zwgc/Makefile.in +++ b/zwgc/Makefile.in @@ -116,7 +116,6 @@ X_gram.o: xrevstack.h xerror.h xselect.h browser.o: zwgc.h buffer.o: new_memory.h buffer.h character_class.o: character_class.h -display.o: new_memory.h new_string.h variables.h display.h eval.o: new_memory.h node.h eval.h substitute.h port.h buffer.h regexp.h eval.o: text_operations.h zwgc.h variables.h exec.o: new_memory.h exec.h eval.h node.h buffer.h port.h variables.h notice.h diff --git a/zwgc/display.c b/zwgc/display.c deleted file mode 100644 index ebbbec8..0000000 --- a/zwgc/display.c +++ /dev/null @@ -1,141 +0,0 @@ -/* This file is part of the Project Athena Zephyr Notification System. - * It is one of the source files comprising zwgc, the Zephyr WindowGram - * client. - * - * Created by: Marc Horowitz - * - * $Id$ - * - * Copyright (c) 1989 by the Massachusetts Institute of Technology. - * For copying and distribution information, see the file - * "mit-copyright.h". - */ - -#if (!defined(lint) && !defined(SABER)) -static char rcsid_display_c[] = "$Id$"; -#endif - -#include - -/****************************************************************************/ -/* */ -/* "Bus" module for plug in output driver modules: */ -/* */ -/****************************************************************************/ - -#include -#include "new_memory.h" -#include "new_string.h" -#include "variables.h" -#include "display.h" - -/* - * driver_table - <<<>>> - */ - -extern void tty_driver(); -extern void plain_driver(); -extern void raw_driver(); - -extern int tty_driver_init(); - -#ifndef X_DISPLAY_MISSING -extern int X_driver_init(); -extern void X_driver(); -#endif - -static struct driver_info { - string driver_name; - void (*driver)(); - int (*driver_init)(); - void (*driver_reset)(); -} driver_table[] = { -#ifndef X_DISPLAY_MISSING - {"X", X_driver, X_driver_init, X_driver_reset}, -#endif - {"tty", tty_driver, tty_driver_init, NULL}, - {"plain", plain_driver, NULL, NULL}, - {"raw", raw_driver, NULL, NULL}, - {NULL, NULL, NULL, NULL} -}; - -/* - * <<<>>> - */ - -struct driver_info *get_driver_info(driver_name) - string driver_name; -{ - struct driver_info *d; - - for (d=driver_table; d->driver_name; d++) - if (string_Eq(d->driver_name, driver_name) && d->driver) - return(d); - - return(NULL); -} - -/* - * void init_display(int *pargc; char **argv) - * Effects: <<<>>> - */ - -void display_init(pargc, argv) - int *pargc; - char **argv; -{ - char **new, **current; - struct driver_info *d; - string first_working_driver = ""; - string default_driver = ""; - - /* - * Process argument list handling "-disable " and - * "-default " arguments: - */ - for (new=current=argv+1; *current; current++) { - if (string_Eq(*current, "-disable")) { - current++; *pargc -= 2; - if (!*current) - usage(); - if (d = get_driver_info(*current)) - d->driver = NULL; - } else if (string_Eq(*current, "-default")) { - current++; *pargc -= 2; - if (!*current) - usage(); - default_driver = *current; - } else - *(new++) = *current; - } - *new = *current; - - /* - * Initialize all non-disabled drivers. If a driver reports an error, - * disable that driver. Set default_driver if not already set - * by the -default argument to the first non-disabled driver. - */ - for (d = driver_table; d->driver_name; d++) { - if (!d->driver) - continue; - - if (d->driver_init && d->driver_init(pargc, argv)) { - d->driver = NULL; - continue; - } - - if (!*first_working_driver) - first_working_driver = d->driver_name; - } - - if (!get_driver_info(default_driver)) - default_driver = first_working_driver; - - var_set_variable("output_driver", default_driver); -} - -void display_reset() -{ - for (d = driver_table; d->driver_name; d++) - if (d->driver) d->driver_reset(); -} -- cgit v1.2.3