#include "example.h" #include "util.h" char *mypage_body; int mypage_header_len = 0; extern unsigned long gcycle; //extern int Https_TestIndexPage_len; //extern char *Https_TestIndexPage; #define Https_TestIndexPage_Len 80*40 //&RA if more than 80*50 then compilation error: "region .DATA full" int Https_TestIndexPage_len = Https_TestIndexPage_Len; static char mypage[Https_TestIndexPage_Len]; char *Https_TestIndexPage = (char*)mypage; const char mypage_header[]= "HTTP/1.0 200 OK\r\n\ Server: ESERV-10/1.0\nContent-type: text/html\r\n\ Content-length: 400\r\n\ \r\n\ \ InSyst\ \

InSyst

\ System Status:
"; const char mypage_footer[]= "
\
\ \r\n\ InSyst ColdFire System, BNL\ \r\n\
\ \ Andrey Sukhanov\ "; void insyst_init() { printl("Starting insyst.c\r\n"); char *ptri,*ptro; //printl(">my_init\n"); //printl(mypage_header); strcpy(Https_TestIndexPage,mypage_header); //sprintf(Https_TestIndexPage,"%s",mypage_header); //mypage_header_len = 0; // simulation of strcpy //for(ptri=(char*)mypage_header,ptro=(char*)Https_TestIndexPage; // *ptri;mypage_header_len++) *ptro++ = *ptri++; //printl(Https_TestIndexPage); mypage_header_len = strlen(Https_TestIndexPage); strcat(Https_TestIndexPage,mypage_footer); //for(ptri=(char*)mypage_footer;*ptri;) *ptro++ = *ptri++; //printl(Https_TestIndexPage); //printl("",gcycle); itoa_q(gcycle,string,5,10); strcpy(Https_TestIndexPage+mypage_header_len,string); strcat(Https_TestIndexPage,mypage_footer); printl(string); printl("\n"); } void https_callback() { insyst_update_status(); }