ipng_structp ipng_p;
ipng_structp ipng_p; png_structp png_ptr; png_infop info_ptr;   PR_ASSERT(ic != NULL); ipng_p = (ipng_structp)ic->ds;
il_png_write(il_container *ic, const unsigned char *buf, int32 len){   ipng_structp ipng_p;   png_structp png_ptr;   png_infop info_ptr;  	/*------*/   	ipng_p = (ipng_structp)ic->ds;       if(ipng_p->state == PNG_INIT ){        png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL );    	ipng_p->pngs_p = png_ptr;        /* Allocate/initialize the memory for image information.  REQUIRED. */	    info_ptr = png_create_info_struct(png_ptr);        ipng_p->info_p = info_ptr;	    if (info_ptr == NULL){		      png_destroy_read_struct(&png_ptr, (png_infopp)NULL, (png_infopp)NULL);		      return -1;	    }        png_set_progressive_read_fn(png_ptr, (void *)buf,        info_callback, row_callback, end_callback);     }	else{        png_ptr = ipng_p->pngs_p;        info_ptr = ipng_p->info_p;    }    /* note addition of ic to png structure.... */    png_ptr->io_ptr = ic;    if (setjmp(png_ptr->jmpbuf)) {         png_destroy_read_struct(&png_ptr, &info_ptr, NULL);         return -1;    }    png_process_data( png_ptr, info_ptr, (unsigned char *)buf, len );    ipng_p->state = PNG_CONTINUE;              return 0;}