#include <stdio.h>
#include <time.h>
#include <sys/types.h>
#ifndef NO_STDLIB_H
#include <stdlib.h>
#else
char *getenv();
#endif

#define KEYWORD_FILE "./Keywords/AnimalKeywords"
#define HTML_FILE_ENG "HTMLSrc/keyword.html"
#define HTML_FILE_HAN "HTMLSrc/keyword_han.html"
#define CGI_APASRCH "/animal/APAsrch3.cgi"
#define CGI_KEYWORD "keyword.cgi"
#define URL_HOME "/animal"
#define URL_HOME_INFO "Animal Pictures Archive"

#define TRUE	1
#define FALSE	0
#define YES	1
#define NO	0

#define LF 10
#define CR 13

#define MAX_ENTRIES 10000

/* for Get method */
typedef struct {
	char name[256];
	char val[256];
} getentry;

/* for Post method */
typedef struct {
	char *name;
	char *val;
} postentry;

/* For Using Get Method */
void getword(char *word, char *line, char stop);
char x2c(char *what);
void unescape_url(char *url);
void plustospace(char *str);

/* For Using Post Method */
char *makeword(char *line, char stop);
char *fmakeword(FILE *f, char stop, int *len);
char x2c(char *what);
void unescape_url(char *url);
void plustospace(char *str);

