/****************************************************************/
/*                Web Interface Header                          */
/*              (c) COPYRIGHT KORDIC 1996                       */
/*                                                              */
/*              Authors: armian@www.kordic.re.kr                */
/*              History: July 24 96 First Version               */
/* 		Modified by jskim@bulls.kordic.re.kr		*/
/****************************************************************/

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

#define TEMPLATE_ENG "HTMLSrc/ViewImg.html"
#define TEMPLATE_HAN "HTMLSrc/ViewImg_han.html"

#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;

char *urls[] = { "http://", "gopher://", "file://", "ftp://",
        "wais://", "telnet://", "news:", "mailto:", NULL };

/* 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);

/* etc */
int PrintDescFile(char *srcPath, char *srcFile);
int PrintLink(char *line);

