資源簡介
ARM&Linux;平臺開發中,在GoAhead移植過程中需要通過Json來實現web對Arm數據的請求操作,此資源經本人詳細整理,有詳細的GoAhead Json開發文檔及相關代碼。
代碼片段和文件信息
/*
?*?asp.c?--?Active?Server?Page?Support
?*
?*?Copyright?(c)?GoAhead?Software?Inc.?1995-2000.?All?Rights?Reserved.
?*
?*?See?the?file?“license.txt“?for?usage?and?redistribution?license?requirements
?*
?*?$Id:?asp.cv?1.3?2002/10/24?14:44:50?bporter?Exp?$
?*/
/********************************?Description?*********************************/
/*
?* The?ASP?module?processes?ASP?pages?and?executes?embedded?scripts.?It?
?* support?an?open?scripting?architecture?with?in-built?support?for?
?* Ejscript(TM).
?*/
/*********************************?Includes?***********************************/
#include “wsIntrn.h“
/**********************************?Locals?************************************/
static?sym_fd_t websAspFunctions?=?-1; /*?Symbol?table?of?functions?*/
static?int aspOpenCount?=?0; /*?count?of?apps?using?this?module?*/
/*****************************?Forward?Declarations?***************************/
static?char_t *strtokcmp(char_t?*s1?char_t?*s2);
static?char_t *skipWhite(char_t?*s);
/*************************************?Code?***********************************/
/*
?* Create?script?spaces?and?commands
?*/
int?websAspOpen()
{
if?(++aspOpenCount?==?1)?{
/*
?* Create?the?table?for?ASP?functions
?*/
websAspFunctions?=?symOpen(WEBS_SYM_INIT?*?2);
/*
?* Create?standard?ASP?commands
?*/
websAspDefine(T(“write“)?websAspWrite);
}
return?0;
}
/*************************************?Code?***********************************/
/*
?* Close?Asp?symbol?table.
?*/
void?websAspClose()
{
if?(--aspOpenCount?<=?0)?{
if?(websAspFunctions?!=?-1)?{
symClose(websAspFunctions);
websAspFunctions?=?-1;
}
}
}
/******************************************************************************/
/*
?* Process?ASP?requests?and?expand?all?scripting?commands.?We?read?the
?* entire?ASP?page?into?memory?and?then?process.?If?you?have?really?big?
?* documents?it?is?better?to?make?them?plain?HTML?files?rather?than?ASPs.
?*/
int?websAspRequest(webs_t?wp?char_t?*lpath)
{
websStatType sbuf;
char *rbuf;
char_t *token?*lang?*result?*path?*ep?*cp?*buf?*nextp;
char_t *last;
int rc?engine?len?ejid;
a_assert(websValid(wp));
a_assert(lpath?&&?*lpath);
rc?=?-1;
buf?=?NULL;
rbuf?=?NULL;
engine?=?EMF_script_EJscript;
wp->flags?|=?WEBS_HEADER_DONE;
path?=?websGetRequestPath(wp);
/*
?* Create?Ejscript?instance?in?case?it?is?needed
?*/
ejid?=?ejOpenEngine(wp->cgiVars?websAspFunctions);
if?(ejid?0)?{
websError(wp?200?T(“Can‘t?create?Ejscript?engine“));
goto?done;
}
ejSetUserHandle(ejid?(int)?wp);
if?(websPageStat(wp?lpath?path?&sbuf)?0)?{
websError(wp?200?T(“Can‘t?stat?%s“)?lpath);
goto?done;
}
/*
?* Create?a?buffer?to?hold?the?ASP?file?in-memory
?*/
len?=?sbuf.size?*?sizeof(char);
if?((rbuf?=?balloc(B_L?len?+?1))?==?NULL)?{
websError(wp?200?T(“Can‘t?get?memory“));
goto?done;
}
rbuf[len]?=?‘\0‘;
if?(websPageReadData(wp?rbuf?len)?!=?len)?{
websError(wp?200?T(“Cant?read?%s“)?lpath);
goto
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄??????????0??2012-11-13?18:38??GoAhead?Json開發
?????目錄??????????0??2012-11-13?18:40??GoAhead?Json開發\GoAhead?Json開發
?????文件??????51712??2012-11-13?18:40??GoAhead?Json開發\GoAhead?Json開發\JSON開發文檔.doc
?????目錄??????????0??2012-11-13?18:38??GoAhead?Json開發\GoAhead?Json開發\JSON模塊文件
?????目錄??????????0??2012-11-13?18:38??GoAhead?Json開發\GoAhead?Json開發\JSON模塊文件\ARM
?????目錄??????????0??2012-11-13?18:38??GoAhead?Json開發\GoAhead?Json開發\JSON模塊文件\ARM\GoAhead
?????文件??????12733??2012-04-17?15:11??GoAhead?Json開發\GoAhead?Json開發\JSON模塊文件\ARM\GoAhead\.cdtproject
?????文件???????2507??2012-07-17?16:57??GoAhead?Json開發\GoAhead?Json開發\JSON模塊文件\ARM\GoAhead\.project
?????文件???????7100??2011-05-27?12:53??GoAhead?Json開發\GoAhead?Json開發\JSON模塊文件\ARM\GoAhead\asp.c
?????文件??????24713??2011-05-27?12:53??GoAhead?Json開發\GoAhead?Json開發\JSON模塊文件\ARM\GoAhead\balloc.c
?????文件???????4413??2011-05-27?12:53??GoAhead?Json開發\GoAhead?Json開發\JSON模塊文件\ARM\GoAhead\ba
?????文件??????10103??2011-05-27?12:53??GoAhead?Json開發\GoAhead?Json開發\JSON模塊文件\ARM\GoAhead\cgi.c
?????文件??????15920??2011-05-27?12:53??GoAhead?Json開發\GoAhead?Json開發\JSON模塊文件\ARM\GoAhead\default.c
?????文件???????3270??2011-05-27?12:53??GoAhead?Json開發\GoAhead?Json開發\JSON模塊文件\ARM\GoAhead\default.css
?????文件???????1420??2011-05-27?12:53??GoAhead?Json開發\GoAhead?Json開發\JSON模塊文件\ARM\GoAhead\ej.h
?????文件???????7275??2011-05-27?12:53??GoAhead?Json開發\GoAhead?Json開發\JSON模塊文件\ARM\GoAhead\ejIntrn.h
?????文件??????14606??2011-05-27?12:53??GoAhead?Json開發\GoAhead?Json開發\JSON模塊文件\ARM\GoAhead\ejlex.c
?????文件??????36540??2011-05-27?12:53??GoAhead?Json開發\GoAhead?Json開發\JSON模塊文件\ARM\GoAhead\ejparse.c
?????文件??????22929??2011-05-27?12:53??GoAhead?Json開發\GoAhead?Json開發\JSON模塊文件\ARM\GoAhead\emfdb.c
?????文件???????3110??2011-05-27?12:53??GoAhead?Json開發\GoAhead?Json開發\JSON模塊文件\ARM\GoAhead\emfdb.h
?????文件???????4053??2011-05-27?12:53??GoAhead?Json開發\GoAhead?Json開發\JSON模塊文件\ARM\GoAhead\form.c
?????文件???????4276??2011-05-27?12:53??GoAhead?Json開發\GoAhead?Json開發\JSON模塊文件\ARM\GoAhead\h.c
?????文件??????10352??2011-05-27?12:53??GoAhead?Json開發\GoAhead?Json開發\JSON模塊文件\ARM\GoAhead\handler.c
?????文件??????13605??2011-05-27?12:53??GoAhead?Json開發\GoAhead?Json開發\JSON模塊文件\ARM\GoAhead\license.txt
?????目錄??????????0??2012-11-13?18:38??GoAhead?Json開發\GoAhead?Json開發\JSON模塊文件\ARM\GoAhead\LINUX
?????目錄??????????0??2012-11-13?18:38??GoAhead?Json開發\GoAhead?Json開發\JSON模塊文件\ARM\GoAhead\LINUX\include
?????目錄??????????0??2012-11-13?18:38??GoAhead?Json開發\GoAhead?Json開發\JSON模塊文件\ARM\GoAhead\LINUX\include\json
?????文件???????1382??2012-03-12?14:02??GoAhead?Json開發\GoAhead?Json開發\JSON模塊文件\ARM\GoAhead\LINUX\include\json\arraylist.h
?????文件???????1596??2012-03-12?14:02??GoAhead?Json開發\GoAhead?Json開發\JSON模塊文件\ARM\GoAhead\LINUX\include\json\bits.h
?????文件???????1091??2012-03-12?14:02??GoAhead?Json開發\GoAhead?Json開發\JSON模塊文件\ARM\GoAhead\LINUX\include\json\debug.h
............此處省略397個文件信息
評論
共有 條評論