- } break;
- case 'C': {
- poollen = *data;
- entry = 0;
- printf("(%d entries)", poollen);
- } break;
- case 's': {
- printf(" +%d", *data);
- } break;
- case 'm': {
- //m: method (byte) url:(0=none, 1=get, 2=datat)/gf2:(1=play)
- printf(" %d", *data);
- } break;
- case 'b': {
- printf(" %d", data[0]+256*(signed char)data[1]);
- } break;
- case 'p': {
- U8 type = *data;
- unsigned char*value = data+1;
- if(type == 0) {
- printf(" String:\"%s\"", value);
- } else if (type == 1) {
- U32 f = value[0]+(value[1]<<8)+
- (value[2]<<16)+(value[3]<<24);
- printf(" Float:%f", *(float*)&f);
- } else if (type == 2) {
- printf(" NULL");
- } else if (type == 4) {
- printf(" register:%d", *value);
- } else if (type == 5) {
- printf(" bool:%s", *value?"true":"false");
- } else if (type == 6) {
- U8 a[8];
- int t;
- memcpy(&a[4],value,4);
- memcpy(a,&value[4],4);
+ } break;
+ case 'C': {
+ poollen = *data;
+ entry = 0;
+ printf("(%d entries)", poollen);
+ } break;
+ case 's': {
+ printf(" +%d", *data);
+ } break;
+ case 'm': {
+ //m: method (byte) url:(0=none, 1=get, 2=datat)/gf2:(1=play)
+ printf(" %d", *data);
+ } break;
+ case '{': {
+ U16 num;
+ U16 codesize;
+ int s = 0;
+ int t;
+ printf(" %s(", data);
+ while(data[s++]); //name
+ num = (data[s++]); //num
+ num += (data[s++])*256;
+ for(t=0;t<num;t++) {
+ printf("%s",data);
+ if(t<num-1)
+ printf(", ");
+ while(data[s++]); //param
+ }
+ printf(")");
+ codesize = (data[s++]); //num
+ codesize += (data[s++])*256;
+ printf(" codesize:%d ",codesize);
+ printf("\n%s %s{", prefix, indent);
+ if(countpos>=15) {
+ printf("Error: nested too deep\n");
+ continue;
+ }
+ counter[countpos].text = "}";
+ counter[countpos].count = codesize + ATAG_FULLLENGTH(atag);
+ countpos++;
+ } break;
+ case 'o': {
+ int t;
+ U16 codesize = data[0]+256*data[1];
+ printf(" codesize:%d ", codesize);
+
+ /* the following tries to find the "string"
+ the flash documentation speaks of- I've
+ never actually seen one yet. -mk */
+ for(t=2;t<atag->len;t++)
+ printf("[%02x]", atag->data[t]);
+
+ printf("\n%s %s{", prefix, indent);
+ if(countpos>=15) {
+ printf("Error: nested too deep\n");
+ continue;
+ }
+ counter[countpos].text = "}";
+ counter[countpos].count = codesize + ATAG_FULLLENGTH(atag);
+ countpos++;
+ } break;
+ case 'b': {
+ printf(" %d", data[0]+256*(signed char)data[1]);
+ } break;
+ case 'r': {
+ printf(" %d", data[0]);
+ } break;
+ case 'p': {
+ U8 type = *data;
+ unsigned char*value = data+1;
+ if(type == 0) {
+ printf(" String:\"%s\"", value);
+ } else if (type == 1) {
+ U32 f = value[0]+(value[1]<<8)+
+ (value[2]<<16)+(value[3]<<24);
+ printf(" Float:%f", *(float*)&f);
+ } else if (type == 2) {
+ printf(" NULL");
+ } else if (type == 4) {
+ printf(" register:%d", *value);
+ } else if (type == 5) {
+ printf(" bool:%s", *value?"true":"false");
+ } else if (type == 6) {
+ U8 a[8];
+ int t;
+ memcpy(&a[4],value,4);
+ memcpy(a,&value[4],4);