working on charts

git-svn-id: file:///home/jan/tmp/wetterstation/trunk@69 dd492736-c11a-0410-ad51-8c26713eaf7f
This commit is contained in:
losinshi 2006-09-06 22:33:12 +00:00
parent 1880abfc3e
commit c73e7f591a
2 changed files with 11 additions and 7 deletions

View File

@ -3,7 +3,7 @@ LD = gcc
RM = rm RM = rm
CFLAGS = -c CFLAGS = -c
LDFLAS = -o LDFLAS = -o
INCL = -I$$(pg_config --includedir) #INCL = -I$$(pg_config --includedir)
BIN_NAME = chart BIN_NAME = chart
OBJS = chart.o config.o common.o image_file/image_file.o image_file/image_config.o OBJS = chart.o config.o common.o image_file/image_file.o image_file/image_config.o
@ -25,7 +25,8 @@ all: $(BIN_NAME)
# Binary Linken # Binary Linken
$(BIN_NAME): $(OBJS) $(BIN_NAME): $(OBJS)
@ echo Linke: $(LD) $(DEBUG) $(NOLOG) -L$$(pg_config --libdir)/pgsql -lpq $(LDFLAS) $(BIN_NAME) $(OBJS) @ echo Linke: $(LD) $(DEBUG) $(NOLOG) -L$$(pg_config --libdir)/pgsql -lpq $(LDFLAS) $(BIN_NAME) $(OBJS)
@ $(LD) $(DEBUG) $(NOLOG) -L$$(pg_config --libdir)/pgsql -lpq $(LDFLAS) $(BIN_NAME) $(OBJS) # @ $(LD) $(DEBUG) $(NOLOG) -L$$(pg_config --libdir)/pgsql -lpq $(LDFLAS) $(BIN_NAME) $(OBJS)
@ $(LD) $(DEBUG) $(NOLOG) $(LDFLAS) $(BIN_NAME) $(OBJS)
@ echo Binary $(BIN_NAME) ist fertig! @ echo Binary $(BIN_NAME) ist fertig!
# Abhängigkeiten # Abhängigkeiten

View File

@ -24,8 +24,8 @@
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include "../common.h" #include "../common.h"
#include "image_common.h"
#include "../config.h" #include "../config.h"
#include "image_common.h"
/* Zuordnung zwischen Schlüsselwörtern in der Config, Der Funktion, die diese auswertet /* Zuordnung zwischen Schlüsselwörtern in der Config, Der Funktion, die diese auswertet
* und dem eld in der Options-Struktur */ * und dem eld in der Options-Struktur */
@ -39,13 +39,16 @@ static const config_keyword keywords[] = {
}; };
get_image_cfg(char *file){ int get_image_cfg(char *file){
char *buff = malloc(sizeof(char)*(strlen(file)+strlen(global_opts.image_cfg_location)+1)); int ret_var;
char *buff;
buff = malloc(sizeof(char)*(strlen(file)+strlen(global_opts.image_cfg_location)+1));
buff = strcpy(buff, global_opts.image_cfg_location); buff = strcpy(buff, global_opts.image_cfg_location);
buff = strcat(buff, file); buff = strcat(buff, file);
printf("dada\n"); DEBUGOUT2("Lese Config-File: '%s' \n", buff);
return read_config(file, 1, keywords); ret_var = read_config(buff, 1, keywords);
return ret_var;
} }