#ifndef _CGI_
#define _CGI_
	#include<sys/types.h>
	#include<dirent.h>
	#include<sys/stat.h>
	#include<fcntl.h>
	#include<stdio.h>
	#include<sys/select.h>
	#include<stdlib.h>
	#include<sys/time.h>
	#include<sys/types.h>
	#include<regex.h>
	#include<sqlite3.h>
	#define SBOX_LEN 256
	#define KEY_SIZE 32
	#define MBOX_ROOT "/tmp/MBOX/"
	char * crypt(char*,char*);
	int check_write(int sock){
	fd_set w;
	FD_ZERO(&w);
	FD_SET(sock,&w);
	/* 3 secs timeout */
	int ret=select(sock+1,NULL,&w,NULL,&((struct timeval){3,0}));
	if(ret==-1){
		perror("select foo in check_write();");
		close(sock);
		exit(-1);
	}else{
		return ret;
	}
	}
	void zp(int sock,char*msg){
	if(check_write(sock))//hate being blocked
	write(sock,msg,strlen(msg));
	}
	static int cq(void *bla,int argc,char**argv,char**argt){
		(*(int *)bla)=1;
	}

	#define X (
	#define Y )
	#define	_ (
	#define	__ )
	#define	PUSH {
	#define	POP  }
	#define	sAy (
	#define	SPEECH )
	#define I_want zp
#endif 

