pike.git / src / modules / Image / encodings / iff.c

version» Context lines:

pike.git/src/modules/Image/encodings/iff.c:74:    unsigned char lenb[4];       if(TYPEOF(*s) != T_ARRAY || s->u.array->size != 2 ||    TYPEOF(s->u.array->item[0]) != T_STRING ||    TYPEOF(s->u.array->item[1]) != T_STRING)    Pike_error("invalid chunk\n");       add_ref(s->u.array);    push_array_items(s->u.array);    len = sp[-1].u.string->len; -  lenb[0] = DO_NOT_WARN((unsigned char)((len & 0xff000000)>>24)); -  lenb[1] = DO_NOT_WARN((unsigned char)((len & 0x00ff0000)>>16)); -  lenb[2] = DO_NOT_WARN((unsigned char)((len & 0x0000ff00)>>8)); -  lenb[3] = DO_NOT_WARN((unsigned char)(len & 0x000000ff)); +  lenb[0] = (unsigned char)((len & 0xff000000)>>24); +  lenb[1] = (unsigned char)((len & 0x00ff0000)>>16); +  lenb[2] = (unsigned char)((len & 0x0000ff00)>>8); +  lenb[3] = (unsigned char)(len & 0x000000ff);    push_string(make_shared_binary_string((char *)lenb, 4));    stack_swap();    if(len&1) {    push_string(make_shared_binary_string("\0", 1));    f_add(4);    } else    f_add(3);    return (--sp)->u.string;   }      struct pike_string *make_iff(char *id, struct array *chunks)   {    struct pike_string *res;    INT32 i;    -  push_text("FORM"); +  push_static_text("FORM");    push_text(id);    if(chunks->size > 0) {    for(i=0; i<chunks->size; i++)    push_string(low_make_iff(&chunks->item[i]));    if(chunks->size > 1)    f_add(chunks->size);    } else    push_empty_string();    f_add(2);    f_aggregate(2);    res = low_make_iff(&sp[-1]);    pop_stack();    return res;   }