Added uniform copyright notice to all files of the server core.

This commit is contained in:
robijn
2001-12-27 23:30:36 +00:00
parent 5d0b33c5ef
commit b228b720d9
33 changed files with 480 additions and 127 deletions
+13 -5
View File
@@ -1,9 +1,17 @@
/*
client_data.c
Creates and destroys a client's data structures. These are mainly
its name, screen list, and menu list.
* client_data.c
* This file is part of LCDd, the lcdproc server.
*
* This file is released under the GNU General Public License. Refer to the
* COPYING file distributed with this package.
*
* Copyright (c) 1999, William Ferrell, Scott Scriven
* 2001, Joris Robijn
*
*
* Creates and destroys a client's data structures. These are mainly
* its name, screen list, and menu list.
*
*/
#include <stdlib.h>
+12
View File
@@ -1,3 +1,15 @@
/*
* client_data.h
* This file is part of LCDd, the lcdproc server.
*
* This file is released under the GNU General Public License. Refer to the
* COPYING file distributed with this package.
*
* Copyright (c) 1999, William Ferrell, Scott Scriven
* 2001, Joris Robijn
*
*/
#ifndef CLIENT_DATA_H
#define CLIENT_DATA_H
+17 -9
View File
@@ -1,13 +1,21 @@
/*
client_functions.c
This contains definitions for all the functions which clients can run.
The functions here are to be called only from parse.c's interpreter.
The client's available function set is defined here, as is the syntax
for each command.
*/
* client_functions.c
* This file is part of LCDd, the lcdproc server.
*
* This file is released under the GNU General Public License. Refer to the
* COPYING file distributed with this package.
*
* Copyright (c) 1999, William Ferrell, Scott Scriven
* 2001, Joris Robijn
*
*
* This contains definitions for all the functions which clients can run.
* The functions here are to be called only from parse.c's interpreter.
*
* The client's available function set is defined here, as is the syntax
* for each command.
*
*/
#include <unistd.h>
#include <stdlib.h>
+12
View File
@@ -1,3 +1,15 @@
/*
* client_functions.h
* This file is part of LCDd, the lcdproc server.
*
* This file is released under the GNU General Public License. Refer to the
* COPYING file distributed with this package.
*
* Copyright (c) 1999, William Ferrell, Scott Scriven
* 2001, Joris Robijn
*
*/
#ifndef CLIENT_FUNCTION_H
#define CLIENT_FUNCTION_H
+12
View File
@@ -1,3 +1,15 @@
/*
* client_menu.h
* This file is part of LCDd, the lcdproc server.
*
* This file is released under the GNU General Public License. Refer to the
* COPYING file distributed with this package.
*
* Copyright (c) 1999, William Ferrell, Scott Scriven
* 2001, Joris Robijn
*
*/
#ifndef CLIENT_MENU_H
#define CLIENT_MENU_H
+17 -10
View File
@@ -1,14 +1,21 @@
/*
clients.c
Inits/shuts down client system,
creates/destroys individual clients,
enqueues/dequeues messages from clients,
and searches for clients in the list.
:)
* clients.c
* This file is part of LCDd, the lcdproc server.
*
* This file is released under the GNU General Public License. Refer to the
* COPYING file distributed with this package.
*
* Copyright (c) 1999, William Ferrell, Scott Scriven
* 2001, Joris Robijn
*
*
* Inits/shuts down client system,
* creates/destroys individual clients,
* enqueues/dequeues messages from clients,
* and searches for clients in the list.
*
* :)
*
*/
#include <stdio.h>
+12
View File
@@ -1,3 +1,15 @@
/*
* client.h
* This file is part of LCDd, the lcdproc server.
*
* This file is released under the GNU General Public License. Refer to the
* COPYING file distributed with this package.
*
* Copyright (c) 1999, William Ferrell, Scott Scriven
* 2001, Joris Robijn
*
*/
#ifndef CLIENTS_H
#define CLIENTS_H
+7 -3
View File
@@ -1,10 +1,14 @@
/*
* Defines routines to read ini-file-like files.
* configfile.c
* This file is part of LCDd, the lcdproc server.
*
* This file is released under the GNU General Public License. Refer to the
* COPYING file distributed with this package
* COPYING file distributed with this package.
*
* (c) 2001 Joris Robijn
* Copyright (c) 2001, Joris Robijn
*
*
* Defines routines to read ini-file-like files.
*/
+11 -6
View File
@@ -1,15 +1,20 @@
#ifndef CONFIGFILE_H
#define CONFIGFILE_H
/*
* Defines routines to read ini-file-like files.
* configfile.h
* This file is part of LCDd, the lcdproc server.
*
* This file is released under the GNU General Public License. Refer to the
* COPYING file distributed with this package
* COPYING file distributed with this package.
*
* Copyright (c) 2001, Joris Robijn
*
*
* Defines routines to read ini-file-like files.
*
* (c) 2001 Joris Robijn
*/
#ifndef CONFIGFILE_H
#define CONFIGFILE_H
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
+10 -2
View File
@@ -1,5 +1,13 @@
/*
* Driver loader
/*
* driver.c
* This file is part of LCDd, the lcdproc server.
*
* This file is released under the GNU General Public License. Refer to the
* COPYING file distributed with this package.
*
* Copyright (c) 1999, William Ferrell, Scott Scriven
* 2001, Joris Robijn
*
*
* This code does all driver handling, loading, initializing, unloading.
*
+22 -11
View File
@@ -1,11 +1,22 @@
int
load_driver( char * name, char * filename, char * args );
// returns:
// <0 error
// 0 ok, driver is an input driver only
// 1 ok, driver is an output driver
// 2 ok, driver is an output driver that needs to run in the foreground
int
unload_all_drivers();
/*
* drivers.h
* This file is part of LCDd, the lcdproc server.
*
* This file is released under the GNU General Public License. Refer to the
* COPYING file distributed with this package.
*
* Copyright (c) 1999, William Ferrell, Scott Scriven
* 2001, Joris Robijn
*
*/
int
load_driver( char * name, char * filename, char * args );
// returns:
// <0 error
// 0 ok, driver is an input driver only
// 1 ok, driver is an output driver
// 2 ok, driver is an output driver that needs to run in the foreground
int
unload_all_drivers();
+26 -16
View File
@@ -1,8 +1,18 @@
/*
* input.c
* This file is part of LCDd, the lcdproc server.
*
* This file is released under the GNU General Public License. Refer to the
* COPYING file distributed with this package.
*
* Copyright (c) 1999, William Ferrell, Scott Scriven
* 2001, Joris Robijn
*
*
* Handles keypad (and other?) input from the user.
*/
input.c
Handles keypad (and other?) input from the user.
/*
Currently, the keys are as follows:
@@ -34,11 +44,11 @@
// #define KEY_ENTER 'H'
// These are the keys for my (possibly) broken LK202-25...
#define KEY_UP 'I'
#define KEY_DOWN 'F'
#define KEY_LEFT 'K'
#define KEY_RIGHT 'A'
#define KEY_F1 'N'
// #define KEY_UP 'I'
// #define KEY_DOWN 'F'
// #define KEY_LEFT 'K'
// #define KEY_RIGHT 'A'
// #define KEY_F1 'N'
// #define KEY_F2 'M'
// #define KEY_ENTER 'H'
@@ -51,17 +61,17 @@
// But then, which driver is active and which screen takes which
// input and... (sigh).
//
#define PAUSE_KEY KEY_F1
#define BACK_KEY KEY_LEFT
#define FORWARD_KEY KEY_RIGHT
#define MAIN_MENU_KEY KEY_DOWN
// #define PAUSE_KEY KEY_F1
// #define BACK_KEY KEY_LEFT
// #define FORWARD_KEY KEY_RIGHT
// #define MAIN_MENU_KEY KEY_DOWN
// This seems somewhat arbitrary, but it IS the original settings:
//
// #define PAUSE_KEY 'A'
// #define BACK_KEY 'B'
// #define FORWARD_KEY 'C'
// #define MAIN_MENU_KEY 'D'
#define PAUSE_KEY 'A'
#define BACK_KEY 'B'
#define FORWARD_KEY 'C'
#define MAIN_MENU_KEY 'D'
#include <stdlib.h>
#include <stdio.h>
+12
View File
@@ -1,3 +1,15 @@
/*
* input.h
* This file is part of LCDd, the lcdproc server.
*
* This file is released under the GNU General Public License. Refer to the
* COPYING file distributed with this package.
*
* Copyright (c) 1999, William Ferrell, Scott Scriven
* 2001, Joris Robijn
*
*/
#ifndef INPUT_H
#define INPUT_H
+20 -12
View File
@@ -1,16 +1,24 @@
/*
main.c for LCDd
Contains main(), plus signal callback functions and a help screen.
Program init, command-line handling, and the main loop are
implemented here. Also, minimal data about the program such as
the revision number.
Some of this stuff should probably be move elsewhere eventually,
such as command-line handling and the main loop. main() is supposed
to be "dumb".
* main.c
* This file is part of LCDd, the lcdproc server.
*
* This file is released under the GNU General Public License. Refer to the
* COPYING file distributed with this package.
*
* Copyright (c) 1999, William Ferrell, Scott Scriven
* 2001, Joris Robijn
*
*
* Contains main(), plus signal callback functions and a help screen.
*
* Program init, command-line handling, and the main loop are
* implemented here. Also, minimal data about the program such as
* the revision number.
*
* Some of this stuff should probably be move elsewhere eventually,
* such as command-line handling and the main loop. main() is supposed
* to be "dumb".
*
*/
#include <stdlib.h>
+12
View File
@@ -1,3 +1,15 @@
/*
* main.h
* This file is part of LCDd, the lcdproc server.
*
* This file is released under the GNU General Public License. Refer to the
* COPYING file distributed with this package.
*
* Copyright (c) 1999, William Ferrell, Scott Scriven
* 2001, Joris Robijn
*
*/
#ifndef MAIN_H
#define MAIN_H
+21 -13
View File
@@ -1,17 +1,25 @@
/*
menu.c
Handles server-supplied menus defined by a table. Read menu.h for
more information.
Menus are similar to "pull-down" menus, but have some extra features.
They can contain "normal" menu items, checkboxes, sliders, "movers",
etc..
I should probably find a more elegant way of doing this in order
to handle dynamically-changing menus such as the client list. Tcl/Tk
has neat ways to do it. Hmm...
* menu.c
* This file is part of LCDd, the lcdproc server.
*
* This file is released under the GNU General Public License. Refer to the
* COPYING file distributed with this package.
*
* Copyright (c) 1999, William Ferrell, Scott Scriven
* 2001, Joris Robijn
*
*
* Handles server-supplied menus defined by a table. Read menu.h for
* more information.
*
* Menus are similar to "pull-down" menus, but have some extra features.
* They can contain "normal" menu items, checkboxes, sliders, "movers",
* etc..
*
* I should probably find a more elegant way of doing this in order
* to handle dynamically-changing menus such as the client list. Tcl/Tk
* has neat ways to do it. Hmm...
*
*/
#include <stdlib.h>
+14 -2
View File
@@ -1,3 +1,15 @@
/*
* menu.h
* This file is part of LCDd, the lcdproc server.
*
* This file is released under the GNU General Public License. Refer to the
* COPYING file distributed with this package.
*
* Copyright (c) 1999, William Ferrell, Scott Scriven
* 2001, Joris Robijn
*
*/
#ifndef MENU_H
#define MENU_H
@@ -15,7 +27,7 @@ Each item has three values:
When an item is picked, do_menu() decides what to do based on type.
--"Menus" will recurse into the "data", assuming it is a child menu.
--"Function"-type items will have their function called.
--"Function"-type items will have their function called.
--CheckBox-type items will have their function called with a "read"
parameter to get an on/off signal, and called with a "set" signal when
picked.
@@ -73,7 +85,7 @@ int Contrast_func(int input)
if(input == MENU_READ) return status;
if(input == MENU_PLUS) increment_status(); // does something.
if(input == MENU_MINUS) decrement_status();// does something.
return (status | MENU_OK);
return (status | MENU_OK);
}
=====================================================================
+17 -9
View File
@@ -1,13 +1,21 @@
/*
menus.c
Defines the default menus the server provides. Also includes the
plug-in functions attached to menu items...
So far, all menus are static, and not dynamically generated. I'll
have to find a way to fix this, since many menu items will be dynamic.
(clients connected, screens available, etc...)
* menus.c
* This file is part of LCDd, the lcdproc server.
*
* This file is released under the GNU General Public License. Refer to the
* COPYING file distributed with this package.
*
* Copyright (c) 1999, William Ferrell, Scott Scriven
* 2001, Joris Robijn
*
*
* Defines the default menus the server provides. Also includes the
* plug-in functions attached to menu items...
*
* So far, all menus are static, and not dynamically generated. I'll
* have to find a way to fix this, since many menu items will be dynamic.
* (clients connected, screens available, etc...)
*
*/
#include <stdlib.h>
+12
View File
@@ -1,3 +1,15 @@
/*
* menus.h
* This file is part of LCDd, the lcdproc server.
*
* This file is released under the GNU General Public License. Refer to the
* COPYING file distributed with this package.
*
* Copyright (c) 1999, William Ferrell, Scott Scriven
* 2001, Joris Robijn
*
*/
#ifndef MENUS_H
#define MENUS_H
+16 -8
View File
@@ -1,12 +1,20 @@
/*
parse.c
Handles input commands from clients, by splitting strings into tokens
and passing arguments to the appropriate handler.
It works much like a command line. Only the first token is used to
determine what function to call.
* parse.c
* This file is part of LCDd, the lcdproc server.
*
* This file is released under the GNU General Public License. Refer to the
* COPYING file distributed with this package.
*
* Copyright (c) 1999, William Ferrell, Scott Scriven
* 2001, Joris Robijn
*
*
* Handles input commands from clients, by splitting strings into tokens
* and passing arguments to the appropriate handler.
*
* It works much like a command line. Only the first token is used to
* determine what function to call.
*
*/
#include <stdlib.h>
+12
View File
@@ -1,3 +1,15 @@
/*
* parse.h
* This file is part of LCDd, the lcdproc server.
*
* This file is released under the GNU General Public License. Refer to the
* COPYING file distributed with this package.
*
* Copyright (c) 1999, William Ferrell, Scott Scriven
* 2001, Joris Robijn
*
*/
#ifndef PARSE_H
#define PARSE_H
+24 -16
View File
@@ -1,20 +1,28 @@
/*
render.c
Draws screens on the LCD.
This needs to be greatly expanded and redone for greater flexibility.
For example, it should support multiple screen sizes, more flexible
widgets, and multiple simultaneous screens.
This will probably take a while to do. :(
THIS FILE IS MESSY! Anyone care to rewrite it nicely? Please?? :)
NOTE: (from David Douthitt) Multiple screen sizes? Multiple simultaneous
screens? Horrors of horrors... next thing you know it'll be making coffee...
Better believe it'll take a while to do...
* render.c
* This file is part of LCDd, the lcdproc server.
*
* This file is released under the GNU General Public License. Refer to the
* COPYING file distributed with this package.
*
* Copyright (c) 1999, William Ferrell, Scott Scriven
* 2001, Joris Robijn
*
*
* Draws screens on the LCD.
*
* This needs to be greatly expanded and redone for greater flexibility.
* For example, it should support multiple screen sizes, more flexible
* widgets, and multiple simultaneous screens.
*
* This will probably take a while to do. :(
*
* THIS FILE IS MESSY! Anyone care to rewrite it nicely? Please?? :)
*
* NOTE: (from David Douthitt) Multiple screen sizes? Multiple simultaneous
* screens? Horrors of horrors... next thing you know it'll be making coffee...
* Better believe it'll take a while to do...
*
*/
#include <string.h>
+12
View File
@@ -1,3 +1,15 @@
/*
* render.h
* This file is part of LCDd, the lcdproc server.
*
* This file is released under the GNU General Public License. Refer to the
* COPYING file distributed with this package.
*
* Copyright (c) 1999, William Ferrell, Scott Scriven
* 2001, Joris Robijn
*
*/
#ifndef RENDER_H
#define RENDER_H
+15
View File
@@ -1,3 +1,18 @@
/*
* screen.c
* This file is part of LCDd, the lcdproc server.
*
* This file is released under the GNU General Public License. Refer to the
* COPYING file distributed with this package.
*
* Copyright (c) 1999, William Ferrell, Scott Scriven
* 2001, Joris Robijn
*
*
* Does screen management
*
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
+12
View File
@@ -1,3 +1,15 @@
/*
* screen.h
* This file is part of LCDd, the lcdproc server.
*
* This file is released under the GNU General Public License. Refer to the
* COPYING file distributed with this package.
*
* Copyright (c) 1999, William Ferrell, Scott Scriven
* 2001, Joris Robijn
*
*/
#ifndef SCREEN_H
#define SCREEN_H
+15
View File
@@ -1,3 +1,18 @@
/*
* screenlist.c
* This file is part of LCDd, the lcdproc server.
*
* This file is released under the GNU General Public License. Refer to the
* COPYING file distributed with this package.
*
* Copyright (c) 1999, William Ferrell, Scott Scriven
* 2001, Joris Robijn
*
*
* All actions that can be performed on the list of screens
*
*/
#include <stdlib.h>
#include <stdio.h>
+12
View File
@@ -1,3 +1,15 @@
/*
* screenlist.h
* This file is part of LCDd, the lcdproc server.
*
* This file is released under the GNU General Public License. Refer to the
* COPYING file distributed with this package.
*
* Copyright (c) 1999, William Ferrell, Scott Scriven
* 2001, Joris Robijn
*
*/
#ifndef SCREENLIST_H
#define SCREENLIST_H
+15
View File
@@ -1,3 +1,18 @@
/*
* serverscreens.c
* This file is part of LCDd, the lcdproc server.
*
* This file is released under the GNU General Public License. Refer to the
* COPYING file distributed with this package.
*
* Copyright (c) 1999, William Ferrell, Scott Scriven
* 2001, Joris Robijn
*
*
* Implements the serverscreens
*
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
+12
View File
@@ -1,3 +1,15 @@
/*
* serverscreens.h
* This file is part of LCDd, the lcdproc server.
*
* This file is released under the GNU General Public License. Refer to the
* COPYING file distributed with this package.
*
* Copyright (c) 1999, William Ferrell, Scott Scriven
* 2001, Joris Robijn
*
*/
#ifndef SRVSTATS_H
#define SRVSTATS_H
+17 -5
View File
@@ -1,3 +1,20 @@
/*
* sock.c
* This file is part of LCDd, the lcdproc server.
*
* This file is released under the GNU General Public License. Refer to the
* COPYING file distributed with this package.
*
* Copyright (c) 1999, William Ferrell, Scott Scriven
* 2001, Joris Robijn
*
*
* LCDproc sockets code...
*
* This is messy, and needs to be finished.
*
*/
#include <unistd.h>
#include <stddef.h>
#include <stdio.h>
@@ -23,11 +40,6 @@
extern char bind_addr[64];
extern int lcd_port;
/**************************************************
LCDproc sockets code...
This is messy, and needs to be finished.
**************************************************/
fd_set active_fd_set, read_fd_set;
int orig_sock;
+12
View File
@@ -1,3 +1,15 @@
/*
* sock.h
* This file is part of LCDd, the lcdproc server.
*
* This file is released under the GNU General Public License. Refer to the
* COPYING file distributed with this package.
*
* Copyright (c) 1999, William Ferrell, Scott Scriven
* 2001, Joris Robijn
*
*/
#ifndef SOCKETS_H
#define SOCKETS_H
+15
View File
@@ -1,3 +1,18 @@
/*
* widget.c
* This file is part of LCDd, the lcdproc server.
*
* This file is released under the GNU General Public License. Refer to the
* COPYING file distributed with this package.
*
* Copyright (c) 1999, William Ferrell, Scott Scriven
* 2001, Joris Robijn
*
*
* Does widget management
*
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
+12
View File
@@ -1,3 +1,15 @@
/*
* widget.h
* This file is part of LCDd, the lcdproc server.
*
* This file is released under the GNU General Public License. Refer to the
* COPYING file distributed with this package.
*
* Copyright (c) 1999, William Ferrell, Scott Scriven
* 2001, Joris Robijn
*
*/
#ifndef WIDGET_H
#define WIDGET_H