//* Initialize structure variables - realistic networked embedded system data *

struct PAGE { const unsigned int maxlen; /* lenght of the allocated bytes array */ unsigned int curlen; /* lenght of current data stored in the array */ const char* mime; /* mime type to be reported */ const char* name; /* source file name */ unsigned char* bytes; /* array of unsigned bytes 0..255, no need to terminate with 0 */ }; unsigned char file00[] = {65, 66, 67, 68, 59, 70, 71, 72}; PAGE page00 = { 8, 8, "text/html", "index.html", file00 }; unsigned char file01[] = {65, 66, 67, 68, 59, 70, 13, 72}; PAGE page01 = { 8, 8, "text/html", "folder/page.html", file01 }; unsigned char file02[] = {12, 0, 27, 254, 59, 70, 71, 72, 13, 28, 11, 12}; PAGE page02 = { 12, 12, "image/gif", "picture.gif", file02 }; unsigned char file03[] = {12, 0, 27, 254, 59, 70, 71, 72, 13, 28, 11, 12}; PAGE page03 = { 12, 12, "application/pdf", "doc.pdf", file03 }; /* unsigned char dfile01[2048] = {0}; PAGE dpage01 = { 2048, 0, "text/html", "status.html", dfile01 }; */ struct PAGE* const website[] = { &page00 , &page01 , &page02 , &page03 };