csp_maplist.c的代码:
/* NOTE: DO NOT EDIT THIS FILE,
* this file is created by tool (csp2bin version: 1.0.2) automaticly,
* build at: Fri Jul 24 09:31:39 2015
*/
/* NOTE: YOU MUST ADD THIS FILE TO YOUR PROJECT,
* but the files in directory `csp_p' needn't.
* newzy 2005-12-3 22:22
*/
#include <eblib.h>
#include "csp_p/_demo_main2_csp.c"
#include "csp_p/_demo_test_csp.c"
EB_CSP_MAPFILE csp_maplist[] = {
{"/demo/main2.csp", _demo_main2_csp__, 0x1000, 0x10001000},
{"/demo/test.csp", _demo_test_csp__, 0x1000, 0x10001001},
{NULL, NULL, 0, 0},
};
rom_maplist.c的代码:
/* NOTE: DO NOT EDIT THIS FILE,
* this file is created by tool (web2bin version: 1.0.2) automaticly,
* build at: Fri Jul 24 09:31:40 2015
*/
#include <ebfrm.h>
static unsigned char _img_052_png[] = {
0x5C, 0x86, 0x41, 0x83, 0xD3, 0x00, 0x00, 0x00, 0x00, 0x49,
0x45, 0x4E, 0x44, 0xAE, 0x42, 0x60, 0x82,
};
static unsigned char _img_face_gif[] = {
0x47, 0x49, 0x46, 0x38, 0x37, 0x61, 0x32, 0x00, 0x32, 0x00, 0xE3, 0x0D, 0x00, 0x00, 0x00, 0x00,
};
/*
*/
EB_ROM_MAPFILE rom_maplist[] =
{
{"/img/052.png", _img_052_png, 0x18A7, 0x53B25DF7L, 0x00001000},
{"/img/face.gif", _img_face_gif, 0x0685, 0x451651F0L, 0x00001001},
{(void*)0, (void*)0, 0, 0L, 0x0}
};
/* xx_rom_map */
cgimain.c的代码:
#include <stdio.h>
#include <string.h>
#include <stdLib.h>
#include <ebrequest.h>
#include <ebrespond.h>
/* set debug break in VC++ */
#define EXCEPTION_DEBUG
0
int cgimain()
{
extern EB_CSP_MAPLIST
csp_maplist[];
extern EB_ROM_MAPLIST
rom_maplist[];
#if EXCEPTION_DEBUG /* for debug */
int
v=0, *p1=&v, *p2=NULL;
*p2 = 0;
#endif
ebSetDebug("GET", "cgi=/demo/main.csp"); /* set debug environment */
putenv(EBENV_MAIN_PAGE "=/demo/main.csp");
/* set main-page */
/* respond require */
eyBuildExec(csp_maplist, rom_maplist, NULL);
return OK;
}