From dc0f01850b985302a7f9653af5280f00444c0774 Mon Sep 17 00:00:00 2001 From: robijn Date: Wed, 24 Oct 2001 14:26:15 +0000 Subject: [PATCH] First step towards the v0.5 API. New configfile routines in use. Configfile adapted. For drivers: configfile routines are available. --- LCDd.conf | 150 ++++---- server/Makefile.am | 2 +- server/configfile.c | 560 ++++++++++++++++++++++++++++++ server/configfile.h | 65 ++++ server/drivers.c | 184 ++++++++++ server/drivers.h | 11 + server/drivers/lcd.c | 3 +- server/drivers/lcd.h | 20 ++ server/main.c | 793 ++++++++++++++++++++----------------------- 9 files changed, 1288 insertions(+), 500 deletions(-) create mode 100644 server/configfile.c create mode 100644 server/configfile.h create mode 100644 server/drivers.c create mode 100644 server/drivers.h diff --git a/LCDd.conf b/LCDd.conf index 1869442..3a0b7dc 100644 --- a/LCDd.conf +++ b/LCDd.conf @@ -1,114 +1,134 @@ # LCDd.conf # -# Each driver has a section which defines how it acts. -# Drivers which are supported but unused are ignored. -# Each driver section is begun by a "[drivername]" line -# with no white space in the line at all. +# This file contains the configuration for the LCDd server. +# +# The format is ini-file-like. It is divided into sections that start at +# markers that look like [section]. Comments are all line-based comments, +# and are lines that start with '#' or ';'. # -# There is currently only one keyword for the driver sections: +# The server has a 'central' section named [server]. Further each driver +# has a section which defines how the driver acts. # -# Arguments +# The drivers are activated by specifiying them in a driver= line in the +# server section, like: # -# These are the arguments to be passed to the -# driver, without quotes. These are the same -# arguments that the driver would have been passed -# under the old command line format of +# Driver=curses # -# -d "" +# This tells LCDd to use the curses driver. The first driver that is +# loaded and is capable of output becomes 'the' output driver. +# All extra drivers can only serve as input. +# The default driver to use is curses. # -# Before the driver sections, global settings can be set. +# In the driver sections currently only one keyword is recognized: # -# Global settings are: +# Arguments="place arguments here" # -# Driver +# These are the arguments to be passed to the driver, without quotes. +# These are the same arguments that the driver would have been passed +# under the old command line format of # -# Use the specified driver. Second and further instances -# of this command add input drivers to the server; -# output is only to the first driver. The default driver -# to use is curses. +# -d "" # -# Bind -# -# Bind to this address; defaults to 127.0.0.1 -# -# Port -# -# Listen on this specified port; defaults to 13666. -# -# Debug -# -# Debugging level; defaults to 0 (no debugging output). -# -# Wait