Changeset 164

Show
Ignore:
Timestamp:
03/01/06 13:10:26 (3 years ago)
Author:
conrad
Message:

add ini file reading: read /etc/fastphoto/fastphoto.ini

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • fastphoto/trunk/src/Makefile.am

    r161 r164  
    1010TESTS = httpdate_test cgi_test 
    1111 
    12 noinst_HEADERS = fastphoto.h alloc_snprintf.h cache.h cgi.h cmd.h header.h httpdate.h memory.h photo.h resize.h tests.h 
     12noinst_HEADERS = fastphoto.h alloc_snprintf.h cache.h cgi.h cmd.h read_config.h header.h httpdate.h memory.h photo.h resize.h tests.h xini.h 
    1313 
    14 fastphoto_SOURCES = main.c alloc_snprintf.c cache.c cgi.c cmd.c header.c httpdate.c memory.c photo.c resize.c 
     14fastphoto_SOURCES = main.c alloc_snprintf.c cache.c cgi.c cmd.c read_config.c header.c httpdate.c memory.c photo.c resize.c xini.c 
    1515fastphoto_LDADD = $(EPEG_LIBS) 
    1616 
    1717httpdate_test_SOURCES = httpdate.c httpdate_test.c 
    1818 
    19 cgi_test_SOURCES = cgi_test.c cgi.c alloc_snprintf.c cache.c httpdate.c header.c photo.c resize.c memory.c 
     19cgi_test_SOURCES = cgi_test.c cgi.c alloc_snprintf.c cache.c read_config.c httpdate.c header.c photo.c resize.c memory.c xini.c 
    2020cgi_test_LDADD = $(EPEG_LIBS) 
  • fastphoto/trunk/src/cache.c

    r159 r164  
    6363cache_init (fastphoto_t * params, char * path_info) 
    6464{ 
    65     char * cachedir = FASTPHOTO_DEFAULT_CACHEDIR
     65    char * cachedir = params->config.cachedir
    6666    char * cachefile, * c; 
    6767    int cached; 
  • fastphoto/trunk/src/cgi.c

    r159 r164  
    1111#include "memory.h" 
    1212#include "photo.h" 
     13#include "read_config.h" 
    1314#include "resize.h" 
    1415 
     
    152153  header_content_type_jpeg (); 
    153154 
     155  config_init (params); 
     156 
    154157  parse_query (params, query_string); 
    155158 
  • fastphoto/trunk/src/fastphoto.h

    r149 r164  
    1010 
    1111typedef struct fastphoto_s fastphoto_t; 
     12typedef struct config_s config_t; 
    1213typedef struct photo_s photo_t; 
     14 
     15struct config_s { 
     16  char * cachedir; 
     17}; 
    1318 
    1419struct photo_s { 
     
    1924 
    2025struct fastphoto_s { 
     26  config_t config; 
     27 
    2128  photo_t in; 
    2229  photo_t out;