svnno****@sourc*****
svnno****@sourc*****
2008年 10月 15日 (水) 10:49:48 JST
Revision: 77 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=swfed&view=rev&rev=77 Author: yoya Date: 2008-10-15 10:49:47 +0900 (Wed, 15 Oct 2008) Log Message: ----------- for 文の整形 (スペースを見やすいように調節) Modified Paths: -------------- trunk/src/bitstream.c trunk/src/jpeg_segment.c trunk/src/swf_action.c trunk/src/swf_debug.c trunk/src/swf_object.c trunk/src/swf_png.c trunk/src/swf_tag.c trunk/src/swf_tag_jpeg.c trunk/src/swf_tag_lossless.c trunk/src/swfed.c -------------- next part -------------- Modified: trunk/src/bitstream.c =================================================================== --- trunk/src/bitstream.c 2008-10-14 19:12:28 UTC (rev 76) +++ trunk/src/bitstream.c 2008-10-15 01:49:47 UTC (rev 77) @@ -196,7 +196,7 @@ bitstream_putbytesLE(bitstream_t *bs, unsigned long bytes, int byte_width) { int i; unsigned long byte; - for (i=0; i < byte_width; i++) { + for (i=0 ; i < byte_width ; i++) { byte = bytes & 0xff; bitstream_putbyte(bs, byte); bytes >>= 8; @@ -208,7 +208,7 @@ bitstream_putbytesBE(bitstream_t *bs, unsigned long bytes, int byte_width) { int i; unsigned long byte; - for (i=0; i < byte_width; i++) { + for (i=0 ; i < byte_width ; i++) { byte = bytes >> ( 8 * (byte_width - 1 - i)); bitstream_putbyte(bs, byte & 0xff); } @@ -219,7 +219,7 @@ bitstream_getbytesLE(bitstream_t *bs, int byte_width) { int i; unsigned long byte, bytes = 0; - for (i=0; i < byte_width; i++) { + for (i=0 ; i < byte_width ; i++) { byte = bitstream_getbyte(bs); byte <<= 8 * i; bytes |= byte; @@ -231,7 +231,7 @@ bitstream_getbytesBE(bitstream_t *bs, int byte_width) { int i; unsigned long byte, bytes = 0; - for (i=0; i < byte_width; i++) { + for (i=0 ; i < byte_width ; i++) { bytes <<= 8; byte = bitstream_getbyte(bs); bytes |= byte; @@ -281,7 +281,7 @@ int bitstream_putbits(bitstream_t *bs, unsigned long bits, int bit_width) { int i, bit; - for (i=0; i < bit_width; i++) { + for (i=0 ; i < bit_width ; i++) { bit = bits >> (bit_width - 1 - i); bit &= 1; bitstream_putbit(bs, bit); @@ -294,7 +294,7 @@ int i; int bit; unsigned long bits = 0; - for (i=0; i < bit_width; i++) { + for (i=0 ; i < bit_width ; i++) { bit = bitstream_getbit(bs); if (bit == -1) { return -1; Modified: trunk/src/jpeg_segment.c =================================================================== --- trunk/src/jpeg_segment.c 2008-10-14 19:12:28 UTC (rev 76) +++ trunk/src/jpeg_segment.c 2008-10-15 01:49:47 UTC (rev 77) @@ -36,7 +36,7 @@ char *jpeg_segment_get_marker_name(int marker) { int i, marker_name_num = NumOfTable(jpeg_marker_name_table); - for(i=0; i < marker_name_num; i++) { + for (i=0 ; i < marker_name_num ; i++) { if (marker == jpeg_marker_name_table[i].marker) { return jpeg_marker_name_table[i].name; } @@ -138,7 +138,7 @@ int jpeg_segment_contain(jpeg_segment_t *jpeg_seg, int marker) { jpeg_segment_node_t *node; - for (node = jpeg_seg->head; node; node = node->next) { + for (node=jpeg_seg->head ; node ; node=node->next) { if (node->marker == marker) { return 1; } @@ -152,7 +152,7 @@ jpeg_segment_node_t *node; unsigned char *data; *length = 0; - for (node = jpeg_seg->head; node; node = node->next) { + for (node=jpeg_seg->head ; node ; node=node->next) { if (node->marker == marker) { data = node->data_ref; *length = node->data_len; @@ -169,7 +169,7 @@ jpeg_segment_delete_node(jpeg_segment_t *jpeg_seg, int marker) { jpeg_segment_node_t *node; int count = 0; - for (node = jpeg_seg->head; node; node = node->next) { + for (node=jpeg_seg->head ; node ; node=node->next) { if (node->marker == marker) { node->marker = -1; // remove mark; if (node->data_ref) { @@ -185,7 +185,7 @@ int jpeg_segment_peek_marker(jpeg_segment_t *jpeg_seg) { jpeg_segment_node_t *node; - for (node = jpeg_seg->head; node; node = node->next) { + for (node=jpeg_seg->head ; node ; node=node->next) { if (node->marker != -1) { return node->marker; } @@ -201,7 +201,7 @@ return ; } node = jpeg_seg->head; - for (i=0; node; i++) { + for (i=0 ; node ; i++) { char *marker_name; if (node->marker >= 0) { marker_name = jpeg_segment_get_marker_name(node->marker); @@ -221,7 +221,7 @@ *length = 0; node = jpeg_seg->head; bs = bitstream_open(); - for (; node; node = node->next) { + for (; node ; node=node->next) { int marker2 = node->marker; if (marker2 == -1) { continue; Modified: trunk/src/swf_action.c =================================================================== --- trunk/src/swf_action.c 2008-10-14 19:12:28 UTC (rev 76) +++ trunk/src/swf_action.c 2008-10-15 01:49:47 UTC (rev 77) @@ -125,7 +125,7 @@ swf_action_info_t * get_swf_action_info(int action_id) { int i, action_info_num = NumOfTable(swf_action_info_table); - for (i=0; i < action_info_num; i++) { + for (i=0 ; i < action_info_num; i++) { if (action_id == swf_action_info_table[i].id) { return &(swf_action_info_table[i]); } @@ -192,7 +192,7 @@ d = act->action_data; n = GetUShortLE(act->action_data); d += 2; printf(":\n"); - for(i=0; i<n; i++) { + for (i=0 ; i < n ; i++) { printf("\t\t[%d]'", i); d += printf("%s", d) + 1; printf("'\n"); @@ -244,7 +244,7 @@ unsigned char *data; *length = 0; bs = bitstream_open(); - for (action = list->head; action ; action = action->next) { + for (action=list->head ; action ; action=action->next) { swf_action_build(bs, action); } data = bitstream_steal(bs, length); Modified: trunk/src/swf_debug.c =================================================================== --- trunk/src/swf_debug.c 2008-10-14 19:12:28 UTC (rev 76) +++ trunk/src/swf_debug.c 2008-10-15 01:49:47 UTC (rev 77) @@ -16,14 +16,14 @@ void malloc_debug_start(void) { int i; - for(i=0; i<MALLOC_DEBUG_TABLE_NUM; i++) { + for (i=0 ; i < MALLOC_DEBUG_TABLE_NUM ; i++) { malloc_debug_table[i].ptr = NULL; } } void malloc_debug_end(void) { int i; - for(i=0; i<MALLOC_DEBUG_TABLE_NUM; i++) { + for (i=0 ; i < MALLOC_DEBUG_TABLE_NUM ; i++) { if (malloc_debug_table[i].ptr) { fprintf(stderr, "XXX (%d) ptr=%p (%s, %d)\n", i, malloc_debug_table[i].ptr, @@ -39,7 +39,7 @@ void *ptr; ptr = calloc(nmemb, size); // fprintf(stderr, "calloc_debug: ptr=%p (%s,%d)\n", ptr, filename, linenum); - for(i=0; i<MALLOC_DEBUG_TABLE_NUM; i++) { + for (i=0 ; i < MALLOC_DEBUG_TABLE_NUM ; i++) { if (malloc_debug_table[i].ptr == NULL) { malloc_debug_table[i].ptr = ptr; malloc_debug_table[i].filename = filename; @@ -55,7 +55,7 @@ void *ptr; ptr = malloc(size); // fprintf(stderr, "malloc_debug: ptr=%p (%s,%d)\n", ptr, filename, linenum); - for(i=0; i<MALLOC_DEBUG_TABLE_NUM; i++) { + for (i=0 ; i < MALLOC_DEBUG_TABLE_NUM ; i++) { if (malloc_debug_table[i].ptr == NULL) { malloc_debug_table[i].ptr = ptr; malloc_debug_table[i].filename = filename; @@ -72,7 +72,7 @@ free_debug(void *ptr, char *filename, int linenum) { int i; // fprintf(stderr, "free_debug: ptr=%p (%s,%d)\n", ptr, filename, linenum); - for(i = 0; i < MALLOC_DEBUG_TABLE_NUM; i++) { + for (i=0 ; i < MALLOC_DEBUG_TABLE_NUM ; i++) { if (malloc_debug_table[i].ptr == ptr) { malloc_debug_table[i].ptr = NULL; break; @@ -95,7 +95,7 @@ new_ptr = realloc(ptr, size); // fprintf(stderr, "realloc_debug: ptr=%p => new_ptr=%p (%s,%d)\n", // ptr, new_ptr, filename, linenum); - for(i=0; i<MALLOC_DEBUG_TABLE_NUM; i++) { + for (i=0 ; i < MALLOC_DEBUG_TABLE_NUM ; i++) { if (malloc_debug_table[i].ptr == ptr) { malloc_debug_table[i].ptr = new_ptr; malloc_debug_table[i].filename = filename; @@ -112,7 +112,7 @@ print_hexbin(unsigned char *data, int data_len) { int i; printf("\n"); - for(i=0; i<data_len; i++) { + for (i=0 ; i < data_len ; i++) { if ((i%HEXBIN_DISP_UNIT) == 0) { printf("0x%08x: ", i); } @@ -128,7 +128,7 @@ if ((i%HEXBIN_DISP_UNIT) == 0) { printf("\n"); } - for(j=7; j>=0; j--) { + for (j=7 ; j >= 0 ; j--) { printf("%d", (c >> j) & 1); } Modified: trunk/src/swf_object.c =================================================================== --- trunk/src/swf_object.c 2008-10-14 19:12:28 UTC (rev 76) +++ trunk/src/swf_object.c 2008-10-15 01:49:47 UTC (rev 77) @@ -30,7 +30,7 @@ if (! swf) { return ; } - for(tag = swf->tag; tag; tag = next_tag) { + for (tag=swf->tag ; tag ; tag=next_tag) { next_tag = tag->next; swf_tag_destroy(tag); } @@ -119,7 +119,7 @@ bitstream_close(bs); return NULL; } - for (tag = swf->tag; tag; tag = tag->next) { + for (tag=swf->tag ; tag ; tag=tag->next) { swf_tag_build(bs, tag, swf); } swf->header.file_length = bitstream_getbytepos(bs); @@ -166,7 +166,7 @@ swf_header_print(&swf->header); swf_header_movie_print(&swf->header_movie); tag = swf->tag; - for (i=0; tag; i++) { + for (i=0 ; tag ; i++) { printf("[%d] ", i); swf_tag_print(tag, swf); if (tag->tag == 0) { // END Tag @@ -188,13 +188,13 @@ fprintf(stderr, "swf_object_get_jpegdata: swf == NULL\n"); return NULL; } - for (tag = swf->tag; tag; tag = tag->next) { + for (tag=swf->tag ; tag ; tag=tag->next) { if (tag->tag == 8) { // JPEGTables tag_jpegtables = tag; break; } } - for (tag = swf->tag; tag; tag = tag->next) { + for (tag=swf->tag ; tag ; tag=tag->next) { if (tag->tag == 8) { tag_jpegtables = tag; continue; @@ -220,7 +220,7 @@ fprintf(stderr, "swf_object_get_alphadata: swf == NULL\n"); return NULL; } - for (tag = swf->tag; tag; tag = tag->next) { + for (tag=swf->tag ; tag ; tag=tag->next) { if (tag->tag != 35) { // ! DefineBitsJPEG3 continue; } @@ -245,7 +245,7 @@ fprintf(stderr, "swf_object_replace_jpegdata: swf == NULL\n"); return 1; } - for (tag = swf->tag; tag; tag = tag->next) { + for (tag=swf->tag ; tag ; tag=tag->next) { result = swf_tag_replace_jpeg_data(tag, image_id, jpeg_data, jpeg_data_len, alpha_data, alpha_data_len); @@ -266,7 +266,7 @@ fprintf(stderr, "swf_object_get_pngdata: swf == NULL\n"); return NULL; } - for (tag = swf->tag; tag; tag = tag->next) { + for (tag=swf->tag ; tag ; tag=tag->next) { // DefineBitsLossless(1),2 if ((tag->tag != 20) && (tag->tag != 36)) { continue; @@ -289,7 +289,7 @@ fprintf(stderr, "swf_object_replace_pngdata: swf == NULL\n"); return 1; } - for (tag = swf->tag; tag; tag = tag->next) { + for (tag=swf->tag ; tag ; tag=tag->next) { result = swf_tag_replace_png_data(tag, image_id, png_data, png_data_len); if (! result) { @@ -308,7 +308,7 @@ fprintf(stderr, "swf_object_get_sounddata: swf == NULL\n"); return NULL; } - for (tag = swf->tag; tag; tag = tag->next) { + for (tag=swf->tag ; tag ; tag=tag->next) { // DefineSound if (tag->tag != 14) { continue; @@ -331,7 +331,7 @@ fprintf(stderr, "swf_object_replace_melodata: swf == NULL\n"); return 1; } - for (tag = swf->tag; tag; tag = tag->next) { + for (tag=swf->tag ; tag ; tag=tag->next) { result = swf_tag_replace_melo_data(tag, sound_id, melo_data, melo_data_len); if (! result) { @@ -351,7 +351,7 @@ fprintf(stderr, "swf_object_get_editstring: swf == NULL\n"); return NULL; } - for (tag = swf->tag; tag; tag = tag->next) { + for (tag=swf->tag ; tag ; tag=tag->next) { data = swf_tag_get_edit_string(tag, variable_name, variable_name_len, swf); if (data) { @@ -372,7 +372,7 @@ fprintf(stderr, "swf_object_replace_editstring: swf == NULL\n"); return 1; } - for (tag = swf->tag; tag; tag = tag->next) { + for (tag=swf->tag ; tag ; tag=tag->next) { result = swf_tag_replace_edit_string(tag, variable_name, variable_name_len, initial_text, @@ -390,7 +390,7 @@ swf_tag_t *tag; swf_tag_action_detail_t *swf_tag_action; int i = 0; - for(tag = swf->tag; tag; tag = tag->next) { + for (tag=swf->tag ; tag ; tag=tag->next) { if (i == tag_seqno) { break; } Modified: trunk/src/swf_png.c =================================================================== --- trunk/src/swf_png.c 2008-10-14 19:12:28 UTC (rev 76) +++ trunk/src/swf_png.c 2008-10-15 01:49:47 UTC (rev 77) @@ -24,7 +24,7 @@ * png read */ -static void png_data_read_func(png_structp png_ptr, png_bytep buf, png_size_t size){ +static void png_data_read_func(png_structp png_ptr, png_bytep buf, png_size_t size) { my_png_buffer *png_buff = (my_png_buffer *)png_get_io_ptr(png_ptr); if (png_buff->data_offset + size <= png_buff->data_len) { memcpy(buf, png_buff->data + png_buff->data_offset, size); @@ -45,7 +45,7 @@ * png write */ -void png_data_write_func(png_structp png_ptr, png_bytep buf, png_size_t size){ +void png_data_write_func(png_structp png_ptr, png_bytep buf, png_size_t size) { my_png_buffer *png_buff = (my_png_buffer *)png_get_io_ptr(png_ptr); unsigned long new_data_len; if (png_buff->data_offset + size > png_buff->data_len) { @@ -111,7 +111,7 @@ png_destroy_read_struct((png_structpp) &png_ptr, (png_infopp) &png_info_ptr, NULL); if (png_image_data) { - for ( y = 0 ; y < png_height ; y++) { + for (y=0 ; y < png_height ; y++) { free(png_image_data[y]); } free(png_image_data); @@ -170,7 +170,7 @@ } png_image_data = (png_bytepp) malloc(png_height * sizeof(png_bytep)); - for (y=0; y < png_height; y++) { + for (y=0 ; y < png_height ; y++) { png_image_data[y] = (png_bytep) malloc(png_get_rowbytes(png_ptr, png_info_ptr)); } png_read_image(png_ptr, png_image_data); @@ -182,7 +182,7 @@ *colormap_count = palette_num; if (num_trans == 0) { swf_rgb_t *result_colormap = malloc(sizeof(swf_rgb_t) * palette_num); // Lossless - for (i = 0 ; i < palette_num ; i++) { + for (i=0 ; i < palette_num ; i++) { result_colormap[i].red = palette[i].red; result_colormap[i].green = palette[i].green; result_colormap[i].blue = palette[i].blue; @@ -190,7 +190,7 @@ *colormap = result_colormap; } else { swf_rgba_t *result_colormap = malloc(sizeof(swf_rgba_t) * palette_num); // Lossless2 - for (i = 0 ; i < palette_num ; i++) { + for (i=0 ; i < palette_num ; i++) { result_colormap[i].red = palette[i].red; result_colormap[i].green = palette[i].green; result_colormap[i].blue = palette[i].blue; @@ -203,8 +203,8 @@ *colormap = result_colormap; } unsigned char *indices_data = malloc(((png_width+ 3) & -4) * png_height); - for (y=0; y < png_height; y++) { - for (x=0; x < png_width; x++) { + for (y=0 ; y < png_height ; y++) { + for (x=0 ; x < png_width ; x++) { indices_data[x+y*((png_width + 3) & -4)] = png_image_data[y][x]; // XXX } } @@ -212,8 +212,8 @@ } else if (color_type == PNG_COLOR_TYPE_RGB) { swf_xrgb_t *xrgb_list; xrgb_list = malloc(sizeof(swf_xrgb_t) * png_width * png_height); - for (y=0; y < png_height; y++) { - for (x=0; x < png_width; x++) { + for (y=0 ; y < png_height ; y++) { + for (x=0 ; x < png_width ; x++) { xrgb_list[x+y*png_width].red = png_image_data[y][3*x + 0]; xrgb_list[x+y*png_width].green = png_image_data[y][3*x + 1]; xrgb_list[x+y*png_width].blue = png_image_data[y][3*x + 2]; @@ -223,8 +223,8 @@ } else { // PNG_COLOR_TYPE_RGB_ALPHA swf_argb_t *argb_list; argb_list = malloc(sizeof(swf_argb_t) * png_width * png_height); - for (y=0; y < png_height; y++) { - for (x=0; x < png_width; x++) { + for (y=0 ; y < png_height ; y++) { + for (x=0 ; x < png_width ; x++) { argb_list[x+y*png_width].red = png_image_data[y][4*x + 0]; argb_list[x+y*png_width].green = png_image_data[y][4*x + 1]; argb_list[x+y*png_width].blue = png_image_data[y][4*x + 2]; @@ -233,7 +233,7 @@ } image_data = argb_list; } - for (y=0; y < png_height; y++) { + for (y=0 ; y < png_height ; y++) { free(png_image_data[y]); } free(png_image_data); @@ -273,7 +273,7 @@ fprintf(stderr, "pngconv_lossless2png: libpng error jump occured\n"); free(png_palette); if (png_image_data) { - for ( y = 0; y < png_height ; y++) { + for (y=0 ; y < png_height ; y++) { free(png_image_data[y]); } free(png_image_data); @@ -323,14 +323,14 @@ png_set_packing(png_ptr); if (tag_no == 20) { swf_rgb_t *rgb_list = index_data; - for (i=0; i<index_data_count; i++) { + for (i=0 ; i < index_data_count ; i++) { png_palette[i].red = rgb_list[i].red; png_palette[i].green = rgb_list[i].green; png_palette[i].blue = rgb_list[i].blue; } } else { swf_rgba_t *rgba_list = index_data; - for (i=0; i<index_data_count; i++) { + for (i=0 ; i < index_data_count ; i++) { png_palette[i].red = rgba_list[i].red; png_palette[i].green = rgba_list[i].green; png_palette[i].blue = rgba_list[i].blue; @@ -343,9 +343,9 @@ png_set_gAMA(png_ptr, png_info_ptr, 1.0); png_image_data = (png_bytepp) malloc(png_height * sizeof(png_bytep)); if (color_type == PNG_COLOR_TYPE_PALETTE) { - for (y=0; y < png_height; y++) { + for (y=0 ; y < png_height ; y++) { png_image_data[y] = (png_bytep) malloc(png_get_rowbytes(png_ptr, png_info_ptr)); - for (x=0; x < png_width; x++) { + for (x=0 ; x < png_width ; x++) { unsigned char *data = image_data; png_image_data[y][x] = data[x + y*((png_width +3) & -4)]; } @@ -353,10 +353,10 @@ } else if (color_type == PNG_COLOR_TYPE_RGB) { swf_xrgb_t *xrgb_list = image_data; - for (y=0; y < png_height; y++) { + for (y=0 ; y < png_height ; y++) { png_image_data[y] = (png_bytep) malloc(png_get_rowbytes(png_ptr, png_info_ptr)) \ ; - for (x=0; x < png_width; x++) { + for (x=0 ; x < png_width ; x++) { png_image_data[y][3*x] = xrgb_list[x+y*png_width].red; png_image_data[y][3*x+1] = xrgb_list[x+y*png_width].green; png_image_data[y][3*x+2] = xrgb_list[x+y*png_width].blue; @@ -364,9 +364,9 @@ } } else { swf_argb_t *argb_list = image_data; - for (y=0; y < png_height; y++) { + for (y=0 ; y < png_height ; y++) { png_image_data[y] = (png_bytep) malloc(png_get_rowbytes(png_ptr, png_info_ptr)); - for (x=0; x < png_width; x++) { + for (x=0 ; x < png_width ; x++) { png_image_data[y][4*x] = argb_list[x+y*png_width].red; png_image_data[y][4*x+1] = argb_list[x+y*png_width].green; png_image_data[y][4*x+2] = argb_list[x+y*png_width].blue; @@ -384,7 +384,7 @@ png_write_image(png_ptr, png_image_data); png_write_end(png_ptr, png_info_ptr); // - for (y=0; y < png_height; y++) { + for (y=0 ; y < png_height ; y++) { free(png_image_data[y]); } free(png_image_data); Modified: trunk/src/swf_tag.c =================================================================== --- trunk/src/swf_tag.c 2008-10-14 19:12:28 UTC (rev 76) +++ trunk/src/swf_tag.c 2008-10-15 01:49:47 UTC (rev 77) @@ -61,7 +61,7 @@ swf_tag_info_t *get_swf_tag_info(int tag_id) { int i, tag_info_num = NumOfTable(swf_tag_info_table); - for(i=0; i < tag_info_num; i++) { + for (i=0 ; i < tag_info_num ; i++) { if (tag_id == swf_tag_info_table[i].id) { return &(swf_tag_info_table[i]); } @@ -169,7 +169,7 @@ if (tag->data) { swf_tag_and_length_build(bs, tag); bitstream_putstring(bs, tag->data, tag->length); - } else if (tag->detail){ + } else if (tag->detail) { tag_info = get_swf_tag_info(tag->tag); if ((tag_info == NULL) || (tag_info->detail_handler == NULL)) { fprintf(stderr, "swf_tag_build: not implemented yet. detail build tag->tag=%d\n", Modified: trunk/src/swf_tag_jpeg.c =================================================================== --- trunk/src/swf_tag_jpeg.c 2008-10-14 19:12:28 UTC (rev 76) +++ trunk/src/swf_tag_jpeg.c 2008-10-15 01:49:47 UTC (rev 77) @@ -211,7 +211,7 @@ jpeg_seg = jpeg_segment_parse(swf_tag_jpeg->jpeg_data, swf_tag_jpeg->jpeg_data_len); if (jpeg_seg) { - for(node = jpeg_seg->head ; node ; node = node->next) { + for (node=jpeg_seg->head ; node ; node=node->next) { char *name = jpeg_segment_get_marker_name(node->marker); printf("\t\t%s(0x%02X): len=%lu\n", name?name:"Unknwon", node->marker, node->data_len); Modified: trunk/src/swf_tag_lossless.c =================================================================== --- trunk/src/swf_tag_lossless.c 2008-10-14 19:12:28 UTC (rev 76) +++ trunk/src/swf_tag_lossless.c 2008-10-15 01:49:47 UTC (rev 77) @@ -117,7 +117,7 @@ } } else { // tag == 36 (Lossless2) swf_tag_lossless->colormap2 = malloc(sizeof(swf_rgba_t) * swf_tag_lossless->colormap_count); - for (i=0; i<swf_tag_lossless->colormap_count; i++) { + for (i=0 ; i < swf_tag_lossless->colormap_count ; i++) { swf_rgba_t *rgba = swf_tag_lossless->colormap2 + i; swf_rgba_parse(bs2, rgba); } @@ -155,13 +155,13 @@ bitstream_input(bs2, tmp_buff, origsize); if (tag->tag == 20) { // Lossless swf_tag_lossless->bitmap = malloc(bitmap_count * sizeof(swf_xrgb_t)); - for (i=0; i<bitmap_count; i++) { + for (i=0 ; i < bitmap_count ; i++) { swf_xrgb_t *xrgb = swf_tag_lossless->bitmap + i; swf_xrgb_parse(bs2, xrgb); } } else { // tag == 36 (Lossless2) swf_tag_lossless->bitmap2 = malloc(bitmap_count * sizeof(swf_argb_t)); - for (i=0; i<bitmap_count; i++) { + for (i=0 ; i < bitmap_count ; i++) { swf_argb_t *argb = swf_tag_lossless->bitmap2 + i; swf_argb_parse(bs2, argb); } @@ -217,12 +217,12 @@ bitstream_putbyte(bs, swf_tag_lossless->colormap_count - 1); /* XXX */ bs2 = bitstream_open(); if (tag->tag == 20) { // Lossless - for (i=0; i<swf_tag_lossless->colormap_count; i++) { + for (i=0 ; i < swf_tag_lossless->colormap_count ; i++) { swf_rgb_t *rgb = swf_tag_lossless->colormap + i; swf_rgb_build(bs2, rgb); } } else { // tag == 36 (Lossless2) - for (i=0; i<swf_tag_lossless->colormap_count; i++) { + for (i=0 ; i < swf_tag_lossless->colormap_count ; i++) { swf_rgba_t *rgba = swf_tag_lossless->colormap2 + i; swf_rgba_build(bs2, rgba); } @@ -242,13 +242,13 @@ bs2 = bitstream_open(); if (tag->tag == 20) { // Lossless bitmap_size = swf_tag_lossless->width * swf_tag_lossless->height; - for (i=0; i<bitmap_size; i++) { + for (i=0 ; i < bitmap_size ; i++) { swf_xrgb_t *xrgb = swf_tag_lossless->bitmap + i; swf_xrgb_build(bs2, xrgb); } } else { // tag == 36 (Lossless2) bitmap_size = swf_tag_lossless->width * swf_tag_lossless->height; - for (i=0; i<bitmap_size; i++) { + for (i=0 ; i < bitmap_size ; i++) { swf_argb_t *argb = swf_tag_lossless->bitmap2 + i; swf_argb_build(bs2, argb); } Modified: trunk/src/swfed.c =================================================================== --- trunk/src/swfed.c 2008-10-14 19:12:28 UTC (rev 76) +++ trunk/src/swfed.c 2008-10-15 01:49:47 UTC (rev 77) @@ -327,7 +327,7 @@ swf = get_swf_object(getThis()); tag = swf->tag; array_init(return_value); - for(tag = swf->tag; tag; tag=tag->next) { + for (tag=swf->tag ; tag ; tag=tag->next) { ALLOC_INIT_ZVAL(data); array_init(data); add_assoc_long(data, "tag", tag->tag); @@ -358,7 +358,7 @@ } swf = get_swf_object(getThis()); i = 0; - for(tag = swf->tag; tag; tag = tag->next) { + for (tag=swf->tag ; tag ; tag=tag->next) { if (i == tag_seqno) { break; } @@ -428,7 +428,7 @@ tag_edit = tag->detail; array_init(return_value); add_assoc_long(return_value, "edit_id", tag_edit->edit_id); - if (tag_edit->edit_variable_name && tag_edit->edit_variable_name[0]){ + if (tag_edit->edit_variable_name && tag_edit->edit_variable_name[0]) { add_assoc_string_ex(return_value, "variable_name", sizeof("variable_name"), (char *)tag_edit->edit_variable_name, 1);