⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cgimain.c

📁 eybuild中文手册 eybuild中文手册 eybuild中文手册
💻 C
字号:
/* cgimain.c - where to start CGI */

/* Copyright(C) eyBuild Group, 2005, 2006. All Rights Reserved. */

/*
modification history
--------------------
02a, 2006-03-22, newzy change file name to cspmain.c
01b, 2005-12-19, newzy add adjust the whole code for CSP.
01a, 2005-04-11, newzy author
*/

/*
DESCRIPTION
CGI process always start from cgimain(), user can set the default 
web page(or main page) by set the environment "EBENV_MAIN_PAGE",
or debug a specified page by call ebSetDebug().
*/

/* includes */
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ebrequest.h>
#include <ebrespond.h>

#ifdef HAVE_CSP_ENGINE
#include <cspsrc/csp_maplist.h>
#define rom_maplist NULL
#else
#include "cspsrc/csp_maplist.h"
#include "cspsrc/rom_maplist.h"
#endif /* HAVE_CSP_ENGINE */

/* For GoAhead webServer link internal */
#if defined(VXWORKS) && defined(GOAHEAD)
#	undef  CGI_ENTRY
#	define CGI_ENTRY	bbr_cgientry
#endif /* VXWORKS && GOAHEAD */


/* set debug break in VC++ */
#define EXCEPTION_DEBUG		0

int cgimain()
{
	EB_STAT			stat;
#if EXCEPTION_DEBUG
	int				v=0, *p1=&v, *p2=NULL;

	*p2 = 0;
#endif

    /* set debug environment */
    ebSetDebug("GET", "cgi=/cplus.csp");
    
	memset(&stat, 0, sizeof(EB_STAT));

	/* set main-page */
	ebSetMainPage("cgi=/cplus.csp");
	
#ifdef HAVE_FASTCGI
    BEGIN_FASTCGI_LOOP();
#endif /* HAVE_FASTCGI */

	/* respond require */
	eyBuildExec(csp_maplist, rom_maplist, NULL);

#ifdef HAVE_FASTCGI
	END_FASTCGI_LOOP();
#endif /* HAVE_FASTCGI */

    return OK;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -