From 1f0e4679ab240972881c168ebde20a920b497ca1 Mon Sep 17 00:00:00 2001 From: William Ferrell Date: Sat, 11 Dec 1999 19:21:29 +0000 Subject: [PATCH] Applied Bjorn Andersson's autoconf/automake patch. LCDproc is now built with the standard "./autogen.sh && ./configure && make && make install" instead of just tweaking the Makefile and typing "make". --- Makefile | 133 -------------------------------- Makefile.config | 136 --------------------------------- clients/Makefile | 39 ---------- clients/lcdproc/Makefile | 41 ---------- clients/lcdproc/disk.c | 55 +------------- clients/lcdproc/main.c | 4 + server/Makefile | 52 ------------- server/drivers/Makefile | 45 ----------- server/drivers/MtxOrb.c | 56 -------------- server/drivers/debug.c | 2 +- server/drivers/lcd.c | 6 +- server/main.h | 4 + server/serverscreens.c | 4 + shared/Makefile | 41 ---------- shared/config.c | 158 --------------------------------------- shared/config.h | 12 --- shared/sockets.h | 4 + 17 files changed, 26 insertions(+), 766 deletions(-) delete mode 100644 Makefile delete mode 100644 Makefile.config delete mode 100644 clients/Makefile delete mode 100644 clients/lcdproc/Makefile delete mode 100644 server/Makefile delete mode 100644 server/drivers/Makefile delete mode 100644 shared/Makefile delete mode 100644 shared/config.c delete mode 100644 shared/config.h diff --git a/Makefile b/Makefile deleted file mode 100644 index 573e031..0000000 --- a/Makefile +++ /dev/null @@ -1,133 +0,0 @@ -include Makefile.config - -######################################################################## -# Please edit Makefile.config to configure LCDproc for your system. -######################################################################## - - -######################################################################## -# You shouldn't need to touch anything below here. -######################################################################## - -#GCC = gcc -Wall -Wp,-lang-c-c++-comments -O6 -DIRS = shared clients/lcdproc clients server/drivers server -TARGETS = server clients shared -SOURCES = Makefile \ - shared/Makefile \ - shared/LL.c shared/LL.h \ - shared/config.c shared/config.h \ - shared/sockets.c shared/sockets.h \ - clients/Makefile \ - clients/mode.c clients/mode.h \ - tests/Makefile \ - server/Makefile \ - server/main.c server/main.h \ - server/lcd.c server/lcd.h \ - server/drv_base.c server/drv_base.h \ - server/drivers/MtxOrb.c server/drivers/MtxOrb.h \ - server/drivers/wirz-sli.c server/drivers/wirz-sli.h \ - server/drivers/text.c server/drivers/text.h \ - server/drivers/debug.c server/drivers/debug.h \ - server/drivers/curses_drv.c server/drivers/curses_drv.h \ - server/drivers/hd44780.c server/drivers/hd44780.h server/drivers/port.h -EXTRAS = WHATSNEW INSTALL README COPYING TODO README.IRman \ - docs/menustuff.txt docs/netstuff.txt docs/README.dg \ - docs/README.dg2 docs/hd44780_howto.txt -DOCS = docs/lcdproc.1 -#MISC += $(OS) $(DRIVERS) - - - -################################################################### -# Compilation... -# - -# TODO: Make sure lcdproc is configured first... -#@NOTCONFIGURED=`find . -newer . -name Makefile.config` -#@if [ $(NOTCONFIGURED) ]; do \ -# echo Please configure lcdproc before compiling! ;\ -# echo Edit "Makefile.config" to configure. ;\ -# exit 0 ;\ -#@done; -all: - @echo Compiling LCDproc... - @for i in $(DIRS); do \ - (cd $$i; [ -f Makefile ] && $(MAKE) $@) \ - done; true - - -server: - cd server; $(MAKE) - -clients: - cd clients; $(MAKE) - -shared: - cd shared; $(MAKE) - -tests: - cd tests; $(MAKE) - - -################################################################## -# Installation -# -install: $(TARGETS) $(DOCS) - @echo Installing LCDproc... -# @echo Sorry! Cannot do that yet... -# @echo Please read INSTALL for instructions - @for i in $(DIRS); do \ - (cd $$i; [ -f Makefile ] && $(MAKE) $@) \ - done; true - if [ ! -e /dev/lcd ]; then ln -s $(DEVICE) /dev/lcd ; chmod a+rw $(DEVICE) ; fi - @echo "All done -- enjoy!" - @echo "Be sure to verify that /dev/lcd points to the correct device." - @ls -l /dev/lcd - -# TODO: Have the installer insert lcdproc in system startup scripts? - - -################################################################## -# Other stuff... -# -clean: - @for i in $(DIRS); do \ - (cd $$i; [ -f Makefile ] && $(MAKE) $@) \ - done - rm -f *~ core - -# Distribution file -dist: - @echo Making distributable tarball... - make clean - rm -rf lcdproc-$(VERSION) - rm -rf lcdproc-$(VERSION).tar.gz - mkdir lcdproc-$(VERSION) - tar cBf - . --exclude CVS --exclude lcdproc-$(VERSION) | (cd lcdproc-$(VERSION) && tar xBfv -) - tar cfv lcdproc-$(VERSION).tar lcdproc-$(VERSION) - gzip lcdproc-$(VERSION).tar - rm -rf lcdproc-$(VERSION) - -# This includes source... -#tarball: -# tar cfv lcd.tar . -# gzip lcd.tar - -edit: - emacs . & - -.PHONY : todo -todo : - @echo ---------------=========================================== - @grep -n TODO\\\|FIXME `find . -type f` | grep -v grep - @echo ---------------=========================================== - -#todo: -# @echo ---------------=========================================== -# @grep TODO $(SOURCES) | grep -v SOURCES -# @grep FIXME $(SOURCES) | grep -v SOURCES -# @echo ---------------=========================================== - -#TODO: Keep updating the "Thank You's" section of the README. -#TODO: Don't forget about homework! - diff --git a/Makefile.config b/Makefile.config deleted file mode 100644 index 673a58e..0000000 --- a/Makefile.config +++ /dev/null @@ -1,136 +0,0 @@ -######################################################################## -# Modify these variables to fit your system. -######################################################################## - -##################### Installation base directory -# This should point to /usr/local, for most people, or -# to /usr if you want to integrate LCDproc into your main filesystem. -INSTALL_DIR = /usr/local - -##################### Serial device -# This should be whatever your display is connected to. -# "make install" will create a link from /dev/lcd to DEVICE -# if you don't already have a /dev/lcd -DEVICE = /dev/ttyS0 - -##################### Operating System -# Uncomment the section for your OS. - -### For Linux... -OS=-DLINUX - -### For BSD. We call it xBSD to -# avoid a clash with the BSD in sys/param.h -#OS=-DxBSD - -### For IRIX... -#OS=-DIRIX - -### For Alpha processors... -#CFLAGS += -mieee - -##################### Inet port to use... -# Use whatever you want... -# The default is 13666 -LCDPORT=-DLCDPORT=13666 - -##################### Modescreen Options - -##### Load Screen -# Max: Load Avg at which the backlight will start blinking -MISC += -DLOAD_MAX=1.3 -# Min: Load Avg at which the backlight will turn off (asleep) -MISC += -DLOAD_MIN=0.05 - -##### Filesystems to display stats for... (comment out ones you don't want) -# NFS (Network File System) -MISC += -DSTAT_NFS -# SMBFS (Samba filesystem -- Windows drives) -MISC += -DSTAT_SMBFS - - -##################### Drivers -# Comment out each section you don't want. - -# Matrix-Orbital displays -DRIVERS += -DMTXORB_DRV -DOBJ += MtxOrb.o - -# Wirz SLI -DRIVERS += -DSLI_DRV -DOBJ += wirz-sli.o - -# CrystalFontz displays -DRIVERS += -DCFONTZ_DRV -DOBJ += CFontz.o - -# Curses text-based output -DRIVERS += -DCURSES_DRV -DOBJ += curses_drv.o -LIB += -lncurses - -# Regular text output (ugly) -DRIVERS += -DTEXT_DRV -DOBJ += text.o - -# HD44780 parallel port lcd displays -#DRIVERS += -DHD44780_DRV -#DOBJ += hd44780.o -# Pick one of the following ports to use -#LPTPORT = 0x378 -#LPTPORT = 0x278 -#LPTPORT = 0x3bc - -# Joystick input... handy! -DRIVERS += -DJOY_DRV -DOBJ += joy.o - -# Irman input... handy! -#DRIVERS += -DIRMANIN_DRV -#DOBJ += irmanin.o ../../../libirman-0.4.1b/libirman.a -#IRMAN=1 - - -##################### Debugging Options -# Please uncomment only one of these two, and comment the other: -# Uncomment this to build a debugging executable -#DEBUG = -g -DDEBUG -# If the above is commented, this shouldn't be... -MISC += -Wno-unused - - -######################################################################## -# You shouldn't need to touch anything below here. -######################################################################## - -GCC = gcc -Wall -Wp,-lang-c-c++-comments -O6 $(CFLAGS) -VERSION = 0.4-pre9 -MISC += $(OS) $(DRIVERS) $(DEBUG) $(LCDPORT) -DVERSION=\"$(VERSION)\" - - -################################################################### -# Compilation... -# -#all: -# @echo Compiling LCDproc... -# @for i in $(DIRS); do \ -# (cd $$i; [ -f Makefile ] && $(MAKE) $@) \ -# done; true - -################################################################## -# Other stuff... -# -#clean: -# @for i in $(DIRS); do \ -# (cd $$i; [ -f Makefile ] && $(MAKE) $@) \ -# done -# rm -f *~ core -# -#edit: -# emacs . & - -#.PHONY : todo -#todo : -# @echo ---------------=========================================== -# @grep -n TODO\\\|FIXME `find . -type f` | grep -v grep -# @echo ---------------=========================================== diff --git a/clients/Makefile b/clients/Makefile deleted file mode 100644 index a3d714d..0000000 --- a/clients/Makefile +++ /dev/null @@ -1,39 +0,0 @@ -######################################################################## -# You shouldn't need to touch anything below here. -######################################################################## -include ../Makefile.config - -DIRS = lcdproc -TARGETS = lcdproc/lcdproc - -################################################################### -# Compilation... -# -all: $(TARGETS) - for i in $(DIRS); do \ - (cd $$i; [ -f Makefile ] && $(MAKE) $@) \ - done - - -################################################################## -# Installation -# -install: $(TARGETS) - @echo Installing LCD clients... - for i in $(DIRS); do \ - (cd $$i; [ -f Makefile ] && $(MAKE) $@) \ - done; true - - -################################################################## -# Other stuff... -# -clean: - for i in $(DIRS); do \ - (cd $$i; [ -f Makefile ] && $(MAKE) $@) \ - done; true - rm -f *.o *~ core - -edit: - emacs . & - diff --git a/clients/lcdproc/Makefile b/clients/lcdproc/Makefile deleted file mode 100644 index 1d812b5..0000000 --- a/clients/lcdproc/Makefile +++ /dev/null @@ -1,41 +0,0 @@ -include ../../Makefile.config - -######################################################################## -# You shouldn't need to touch anything below here. -######################################################################## - -TARGET = lcdproc -OBJ = main.o mode.o batt.o chrono.o cpu.o disk.o load.o mem.o -LIB += -L../../shared -lLCDstuff - - -################################################################### -# Compilation... -# - -all: $(TARGET) - -$(TARGET): $(OBJ) Makefile - $(GCC) -s $(MISC) -o $(TARGET) $(OBJ) $(LIB) - -%.o: %.c %.h Makefile - $(GCC) -c $(MISC) $< - - -################################################################## -# Installation -# -install: $(TARGET) - @echo ... lcdproc main client ... - install -m 0755 -o root -g root $(TARGET) /usr/local/bin/ - - -################################################################## -# Other stuff... -# -clean: - rm -f $(OBJ) $(TARGET) *~ core - -edit: - emacs . & - diff --git a/clients/lcdproc/disk.c b/clients/lcdproc/disk.c index dc91d41..a44ac42 100644 --- a/clients/lcdproc/disk.c +++ b/clients/lcdproc/disk.c @@ -4,6 +4,10 @@ #include #include +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #ifdef LINUX #include #else @@ -85,57 +89,6 @@ static int get_fs(mounts fs[]) return x; } -#if 0 -static int get_fs(mounts fs[]) -{ - struct statfs fsinfo; - char line[256]; - int x = 0, y; - - mtab_fd = fopen("/etc/mtab", "r"); - - // Get rid of old, unmounted filesystems... - memset(fs, 0, sizeof(mounts)*256); - - while (x < 256) - { - if(fgets(line, 256, mtab_fd) == NULL) - { - fclose(mtab_fd); - return x; - } - - sscanf(line, "%s %s %s", fs[x].dev, fs[x].mpoint, fs[x].type); - - if( strcmp(fs[x].type, "proc") -#ifndef STAT_NFS - && strcmp(fs[x].type, "nfs") -#endif -#ifndef STAT_SMBFS - && strcmp(fs[x].type, "smbfs") -#endif - ) - { -#ifdef LINUX - y = statfs(fs[x].mpoint, &fsinfo); -#else - y = statfs(fs[x].mpoint, &fsinfo, sizeof(fsinfo), 0); -#endif - fs[x].bsize = fsinfo.f_bsize; - fs[x].blocks = fsinfo.f_blocks; - fs[x].bfree = fsinfo.f_bfree; - fs[x].files = fsinfo.f_files; - fs[x].ffree = fsinfo.f_ffree; - x++; - } - } - - fclose(mtab_fd); - return x; -} -#endif - - int disk_init() { diff --git a/clients/lcdproc/main.c b/clients/lcdproc/main.c index 52591dd..22dccc8 100644 --- a/clients/lcdproc/main.c +++ b/clients/lcdproc/main.c @@ -9,6 +9,10 @@ #include #include +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include "main.h" #include "mode.h" #include "../../shared/sockets.h" diff --git a/server/Makefile b/server/Makefile deleted file mode 100644 index ba832c7..0000000 --- a/server/Makefile +++ /dev/null @@ -1,52 +0,0 @@ -include ../Makefile.config - -######################################################################## -# You shouldn't need to touch anything below here. -######################################################################## - -TARGET = LCDd -DIRS = drivers -OBJ += sock.o clients.o parse.o client_functions.o client_data.o screen.o \ - widget.o screenlist.o render.o serverscreens.o main.o input.o \ - menu.o menus.o -LIB += drivers/libLCDdrivers.a ../shared/libLCDstuff.a - -ifeq ($(IRMAN),1) - LIB += ../../libirman-0.4.1b/libirman.a -endif - - -include ../Makefile.config - -################################################################### -# Compilation... -# -#all: $(OBJ) -all: $(TARGET) - -$(TARGET): $(OBJ) $(LIB) Makefile - $(GCC) -s $(MISC) -o $(TARGET) $(OBJ) $(LIB) - -%.o: %.c %.h Makefile - $(GCC) -c $(MISC) $< - - -################################################################## -# Installation -# -install: $(TARGET) - @echo Installing LCD Server... - install -m 0755 -o root -g root $(TARGET) /usr/local/bin/ - - -################################################################## -# Other stuff... -# -clean: - @for i in $(DIRS); do \ - (cd $$i; [ -f Makefile ] && $(MAKE) $@) \ - done - rm -f $(OBJ) $(TARGET) *~ core - -edit: - emacs . & diff --git a/server/drivers/Makefile b/server/drivers/Makefile deleted file mode 100644 index 80b9ea1..0000000 --- a/server/drivers/Makefile +++ /dev/null @@ -1,45 +0,0 @@ -######################################################################## -# You shouldn't need to touch anything below here. -######################################################################## -include ../../Makefile.config - -TARGET = libLCDdrivers.a -OBJ += lcd.o drv_base.o $(DOBJ) -SOURCES = Makefile lcd.c lcd.h \ - MtxOrb.c MtxOrb.h wirz-sli.c wirz-sli.h text.c text.h \ - curses_drv.c curses_drv.h drv_base.c drv_base.h \ - hd44780.c hd44780.h port.h joy.c joy.h irman.c irman.h \ - CFontz.c CFontz.h -INCLUDE = -I../../shared - - -################################################################### -# Compilation... -# -all: $(TARGET) - - -$(TARGET): $(OBJ) Makefile - $(AR) rcs $(TARGET) $(OBJ) -#$(TARGET): $(OBJ) Makefile -# $(GCC) -s $(MISC) $(INCLUDE) -o $(TARGET) $(OBJ) $(LIB) - -%.o: %.c %.h Makefile - $(GCC) -c $(MISC) $(INCLUDE) $< - - -################################################################## -# Other stuff... -# -clean: - rm -f $(OBJ) *.o $(DOBJ) $(TARGET) *~ core - -edit: - nedit $(SOURCES) $(EXTRAS) & - -todo: - @echo ---------------=========================================== - @grep TODO $(SOURCES) | grep -v SOURCES - @grep FIXME $(SOURCES) | grep -v SOURCES - @echo ---------------=========================================== - diff --git a/server/drivers/MtxOrb.c b/server/drivers/MtxOrb.c index 798a389..cb941d8 100644 --- a/server/drivers/MtxOrb.c +++ b/server/drivers/MtxOrb.c @@ -989,59 +989,3 @@ void MtxOrb_init_all(int type) { } -// TODO: Remove this code wich was use for developpement. -// PS: That was the code to define unidirectionnal [h|v]bar. -/* - if(type==hbar){ - if(custom!=hbar) { - MtxOrb_set_known_char(1, barr1); - MtxOrb_set_known_char(2, barr2); - MtxOrb_set_known_char(3, barr3); - MtxOrb_set_known_char(4, barr4); - custom=hbar; - } - } - - if(type==vbar){ - if(custom!=vbar) { - MtxOrb_set_known_char(1, baru1); - MtxOrb_set_known_char(2, baru2); - MtxOrb_set_known_char(3, baru3); - MtxOrb_set_known_char(4, baru4); - MtxOrb_set_known_char(5, baru5); - MtxOrb_set_known_char(6, baru6); - MtxOrb_set_known_char(7, baru7); - custom=vbar; - } - } -*/ - - -// TODO: Remove this code wich was use for developpement. -// PS: It was a good idea, but not working (fixing take to much time). -/* -void MtxOrb_icon(int which, char dest) -{ - if(custom==bign) custom=beat; - MtxOrb_set_known_char(dest, which+21); -} -*/ - - -// TODO: Remove this code wich was use for developpement. -// PS: Temporary code used durring developpement of dynamic bar. -/* - if(type==barr1)return(1); - if(type==barr2)return(2); - if(type==barr3)return(3); - if(type==barr4)return(4); - if(type==baru1)return(1); - if(type==baru2)return(2); - if(type==baru3)return(3); - if(type==baru4)return(4); - if(type==baru5)return(5); - if(type==baru6)return(6); - if(type==baru7)return(7); -*/ - - diff --git a/server/drivers/debug.c b/server/drivers/debug.c index 9172872..5266b32 100644 --- a/server/drivers/debug.c +++ b/server/drivers/debug.c @@ -6,7 +6,7 @@ #include #include -#include "../lcd.h" +#include "lcd.h" #include "debug.h" diff --git a/server/drivers/lcd.c b/server/drivers/lcd.c index cb18f63..1e18900 100644 --- a/server/drivers/lcd.c +++ b/server/drivers/lcd.c @@ -6,7 +6,11 @@ #include #include -#include "LL.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "../../shared/LL.h" #include "lcd.h" diff --git a/server/main.h b/server/main.h index 44df1ac..4a2cd19 100644 --- a/server/main.h +++ b/server/main.h @@ -1,6 +1,10 @@ #ifndef MAIN_H #define MAIN_H +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + /* contains a few things that other parts of the program might want to know about... diff --git a/server/serverscreens.c b/server/serverscreens.c index e7d80c8..9e63e2b 100644 --- a/server/serverscreens.c +++ b/server/serverscreens.c @@ -3,6 +3,10 @@ #include #include +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include "../shared/debug.h" #include "drivers/lcd.h" diff --git a/shared/Makefile b/shared/Makefile deleted file mode 100644 index 2bb0e27..0000000 --- a/shared/Makefile +++ /dev/null @@ -1,41 +0,0 @@ -######################################################################## -# You shouldn't need to touch anything below here. -######################################################################## -include ../Makefile.config - - -TARGET = libLCDstuff.a -OBJ = LL.o sockets.o str.o -#OBJ = LL.o config.o sockets.o -#TODO: config and sockets stuff... - -################################################################### -# Compilation... -# -all: $(TARGET) - -$(TARGET): $(OBJ) Makefile - ar rcs $(TARGET) $(OBJ) -#$(TARGET): $(OBJ) Makefile -# $(GCC) -s $(MISC) -o $(TARGET) $(OBJ) $(LIB) - -%.o: %.c %.h Makefile - $(GCC) -c $(MISC) $< - - -################################################################## -# Installation -# -install: $(TARGET) - @echo No shared stuff will be installed... - - -################################################################## -# Other stuff... -# -clean: - rm -f $(OBJ) $(TARGET) *~ core - -edit: - emacs . & - diff --git a/shared/config.c b/shared/config.c deleted file mode 100644 index 9eac53a..0000000 --- a/shared/config.c +++ /dev/null @@ -1,158 +0,0 @@ -#include "config.h" - - -typedef struct command -{ - char *text; - struct command *child; - int (*func)(char *line); -}; - -command main_list[] = { - "Key", NULL, Key_func, - "Driver", Driver_commands,NULL, - NULL, NULL, NULL, -}; - -command Driver_commands[] = { - "MtxOrb", NULL, MtxOrb_drv_init, - "curses", NULL, curses_drv_init, - "hd44780", NULL, hd44780_drv_init, -// "X11", NULL, X11_drv_init, -// "debug", NULL, debug_drv_init, - "text", NULL, text_drv_init, -}; - - - -// Interpret a line... -int parse_line(char *line); -// Interpret the rest of the line... -int parse_rest(char *line, command *commands); - - -////////// Helper functions for line parsing ///////////////// -// Pops off the first word of the string. -char *shift(char *string); - - -////////////// Config Functions ///////////////////////////////// -int Key_func(char *line) -{ - // uh, interpret the command... - return 0; -} - - -int parse_line(char *line, command *commands) -{ - int i, j; - int newtoken, inquote; - char *str; -// char *tok; - int argc; - char *argv[256]; - char delimiters[] = " \0"; - char leftquote[] = "\0\"'`([{\0"; - char rightquote[] = "\0\"'`)]}\0"; - char errmsg[256]; - int invalid=0; - int err=0; - - // And parse all its messages... - //debug("parse: Getting messages...\n"); - str = strdup(line); - debug("parse: ...%s\n", str); - // Now, split up the string... - //len = strlen(str); - argc=0; - newtoken=1; - inquote=0; - for(i=0; str[i]; i++) - { - if(inquote) // Scan for the end of the quote - { - if(str[i] == rightquote[inquote]) - { // Found the end of the quote - inquote=0; - str[i] = 0; - newtoken=1; - } - } - else // Normal operation; split at delimiters - { - for(j=1; leftquote[j]; j++) - { - // Found the beginning of a new quote... - if(str[i] == leftquote[j]) - { - inquote = j; - str[i] = 0; - continue; - } - } - for(j=0; delimiters[j]; j++) - { - // Break into a new string... - if(str[i] == delimiters[j]) - { - str[i] = 0; - newtoken = 1; - continue; - } - } - } - if(newtoken && str[i]) - { - newtoken=0; - argv[argc] = str + i; - argc++; - } - else - { - } - } - if(inquote) - { - sprintf(errmsg, "huh? Unterminated string: missing %c\n", - rightquote[inquote]); - sock_send_string(c->sock, errmsg); - continue; - } -/* - for(tok = strtok(str, delimiters); - tok; - tok=strtok(NULL, delimiters)) - { - argv[argc] = tok; - argc++; - } -*/ - argv[argc] = NULL; - if(argc < 1) continue; - - // Now find and call the appropriate function... -// debug("parse: Finding function...\n"); - invalid = 1; - for(i=0; commands[i].keyword; i++) - { -// debug("(checking %s)\n", commands[i].keyword); - if(0 == strcmp(argv[0], commands[i].keyword)) - { -// debug("(FOUND %s)\n", commands[i].keyword); - invalid = commands[i].function(c, argc, argv); -// debug("parse: Returned %i...\n", err); - } - } - if(invalid) - { - // FIXME: Check for buffer overflows here... - err = 1; - //sprintf(errmsg, "huh? Invalid command \"%s\"\n", argv[0]); - //sock_send_string(c->sock, errmsg); - } - - free(str); // Don't want to forget this... :) - - return err; -} diff --git a/shared/config.h b/shared/config.h deleted file mode 100644 index bfad8c2..0000000 --- a/shared/config.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef CONFIG_H -#define CONFIG_H - - -// Read entire config file -int config_load_file(char *file); - -// Save new options -int config_save_file(char *file); - - -#endif diff --git a/shared/sockets.h b/shared/sockets.h index 3d96ae0..1e932b9 100644 --- a/shared/sockets.h +++ b/shared/sockets.h @@ -3,6 +3,10 @@ #include +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #ifndef LCDPORT #define LCDPORT 13666 #endif