/* APA search / Shared Memory */ #include #include #include #include #include #include #include #include "web.h" #define APA_ROOT "http://bulls.kordic.re.kr/~jskim/animal" #define PREVIEW_DIR_WEB "http://bulls.kordic.re.kr/~jskim/animal/PREVIEW" #define ARCH_DIR_HEAD "animal" /* directory header, ex, animal in animal1 ... */ #define LOAD_APA_LIST "/home/jskim/public_html/animal/bin/LoadAPAlist" #define CGI_VIEWIMG "http://bulls.kordic.re.kr/~jskim/animal/ViewImg.cgi" #define CGI_PREVIEW "http://bulls.kordic.re.kr/~jskim/animal/preview.cgi" #define CGI_UU2MAIL "http://bulls.kordic.re.kr/~jskim/animal/uu2mail.cgi" #define CGI_SHOWRESULT "http://bulls.kordic.re.kr/~jskim/animal/showResult.cgi" #define WEB_MASTER "jskim@bulls.kordic.re.kr" /* Web master's email */ #define HTMLSOURCE "/home/jskim/public_html/animal/HTMLSrc/template.html" #define HTMLNORESULT "/home/jskim/public_html/animal/HTMLSrc/noresult.html" #define DIR_ROOT "/home/jskim/public_html/animal" /* root directory */ #define PREVIEW_DIR "/home/jskim/public_html/animal/PREVIEW" #define ACC_NUM_FILE "/home/jskim/public_html/animal/log/cgi_counter.dat" #define QUERY_LOG_FILE "/home/jskim/public_html/animal/log/query_log" #define FNAME_ROOT "sizeANDlist" /* root of source file name */ #define TEMP_DIR "/home/jskim/public_html/animal/TEMP" /* temp dir to store the result */ #define MAXARCHNUM 7 #define DJPEG "/usr/local/bin/djpeg" #define CJPEG "/usr/local/bin/cjpeg" #define DSP_PREVIEW_WIDTH 150 /* preview image width */ #define RENEWAL_TIME 3600*48 /* this is two days in seconds */ #define MAX_RES_NUM 1024 /* maximum number of items to be retrieved */ #define HEADER_SIZE (sizeof(time_t)+sizeof(int)) /* header size of data file */ #define SM_SEG_SIZE 2048*1024 #define SHMKEY 0xFF #define ERR ((DATABUF *)-1) typedef struct /* data buff for size and file names */ { int an; /* access control number */ char arch; /* archive number in char type */ short size; /* file size in Kbytes */ char name[82]; /* image file name */ } DATABUF;