/*

Brief examples:

	cgi_find_root(mygetenv("SCRIPT_NAME"),rootname);
	cgi_decode();
	tpl_var_add("action",cgi_path());
	tpl_var_add("user",strlwr(cgi_get("user")));


        ncpy(cmd,cgi_get("cmd"),200);

	if (cgi_pressed("cmd_user_save")) cmd_user_save();
	else if (cgi_pressed("cmd_user_find")) cmd_user_get();
	else if (cgi_pressed("cmd_send")) cmd_sending();
	else cmd_send_now();

cgi_get works for forms and queries.
cgi_pressed checks for graphic buttons as well as non graphic.

two blind people.

*/
int cgi_show_image(char *fname, char *savename, int isattach);
int cgi_set_cookie(char *var, char *value, int life);
void cgi_wash(void);

char *cgi_get_cookie(char *var, char *orig, int tmpsz);
int cgi_true(char *var);
int cgi_set(char *var, char *val);
int cgi_get_left(char *part, char *var, char *val);
char *web_file_name(char *name);

Pair *cgi_form_pair(void);
char *cgi_path(void);
void cgi_find_root(char *script, char *rootname);
void cgi_decode_content(char *bf, int cl);
void cgi_getword(char *word, char *line, char stop) ;
void cgi_plustospace(char *str) ;
char x2c(char *what) ;
void cgi_unescape_url(char *url) ;
int cgi_decode_ref(char *ref);
void cgi_decode(void);
int cgi_pressed(char *s);
char *cgi_get(char *s);
