17 main(
int argc,
char * argv[])
23 Asset asset =
new(Asset,
CSTRA(
"./src/mmapfiletest.c"));
25 print_buf[100] =
'\0';
28 position = random() % (asset->size - 100);
30 for (i=0; i<100; i+=10) {
31 print_buf[i+0] = asset->data[position+i+0];
32 print_buf[i+1] = asset->data[position+i+1];
33 print_buf[i+2] = asset->data[position+i+2];
34 print_buf[i+3] = asset->data[position+i+3];
35 print_buf[i+4] = asset->data[position+i+4];
36 print_buf[i+5] = asset->data[position+i+5];
37 print_buf[i+6] = asset->data[position+i+6];
38 print_buf[i+7] = asset->data[position+i+7];
39 print_buf[i+8] = asset->data[position+i+8];
40 print_buf[i+9] = asset->data[position+i+9];
43 if (NULL != asset->mime_type) {
44 puts(asset->mime_type);
#define CSTRA(val)
Const STRing Argument.
int main(int argc, char *argv[])