]> mj.ucw.cz Git - libucw.git/blobdiff - images/io-libungif.c
Table: renamed table_col_order[_by_name] -> table_set_col_order[_by_name]
[libucw.git] / images / io-libungif.c
index b3e8960a39fc6b1d3adff9c3df675425df65774d..bf97f743e11b5f009b1608090fa0bdcd98c8b467 100644 (file)
@@ -9,13 +9,13 @@
 
 #undef LOCAL_DEBUG
 
-#include "lib/lib.h"
-#include "lib/mempool.h"
-#include "lib/fastbuf.h"
-#include "images/images.h"
-#include "images/error.h"
-#include "images/color.h"
-#include "images/io-main.h"
+#include <ucw/lib.h>
+#include <ucw/mempool.h>
+#include <ucw/fastbuf.h>
+#include <images/images.h>
+#include <images/error.h>
+#include <images/color.h>
+#include <images/io-main.h>
 
 #include <gif_lib.h>
 
@@ -147,8 +147,8 @@ libungif_read_data(struct image_io *io)
 
   /* Prepare image */
   struct image_io_read_data_internals rdi;
-  uns read_flags = io->flags;
-  uns cs = read_flags & IMAGE_COLOR_SPACE;
+  uint read_flags = io->flags;
+  uint cs = read_flags & IMAGE_COLOR_SPACE;
   if (cs != COLOR_SPACE_GRAYSCALE && cs != COLOR_SPACE_RGB)
     read_flags = (read_flags & ~IMAGE_COLOR_SPACE & IMAGE_CHANNELS_FORMAT) | COLOR_SPACE_RGB;
   if (unlikely(!image_io_read_data_prepare(&rdi, io, image->ImageDesc.Width, image->ImageDesc.Height, read_flags)))
@@ -164,7 +164,7 @@ libungif_read_data(struct image_io *io)
   byte *img_end = rdi.image->pixels + rdi.image->image_size;
 
   /* Handle deinterlacing */
-  uns dein_step, dein_next;
+  uint dein_step, dein_next;
   if (image->ImageDesc.Interlace)
     {
       DBG("Deinterlaced image");
@@ -179,7 +179,7 @@ libungif_read_data(struct image_io *io)
       case 1:
        {
          byte pal[256], *pal_pos = pal, *pal_end = pal + 256;
-         for (uns i = 0; i < (uns)color_map->ColorCount; i++, pal_pos++, palette++)
+         for (uint i = 0; i < (uint)color_map->ColorCount; i++, pal_pos++, palette++)
            *pal_pos = rgb_to_gray_func(palette->Red, palette->Green, palette->Blue);
          if (pal_pos != pal_end)
            bzero(pal_pos, pal_end - pal_pos);
@@ -190,9 +190,9 @@ libungif_read_data(struct image_io *io)
                return 0;
              }
 #        define DO_ROW_END do{ \
-             walk_row_start += dein_step; \
-             while (walk_row_start >= img_end) \
-               { uns n = dein_next >> 1; walk_row_start = rdi.image->pixels + n, dein_step = dein_next; dein_next = n; } \
+             walk_row_start += dein_step; \
+             while (walk_row_start >= img_end) \
+               { uint n = dein_next >> 1; walk_row_start = rdi.image->pixels + n, dein_step = dein_next; dein_next = n; } \
            }while(0)
 #        define IMAGE_WALK_PREFIX(x) walk_##x
 #        define IMAGE_WALK_INLINE
@@ -202,13 +202,13 @@ libungif_read_data(struct image_io *io)
 #        define IMAGE_WALK_ROW_STEP 0
 #        define IMAGE_WALK_DO_STEP do{ *walk_pos = pal[*pixels++]; }while(0)
 #        define IMAGE_WALK_DO_ROW_END DO_ROW_END
-#        include "images/image-walk.h"
+#        include <images/image-walk.h>
          break;
        }
       case 2:
        {
          byte pal[256 * 2], *pal_pos = pal, *pal_end = pal + 256 * 2;
-         for (uns i = 0; i < (uns)color_map->ColorCount; i++, pal_pos += 2, palette++)
+         for (uint i = 0; i < (uint)color_map->ColorCount; i++, pal_pos += 2, palette++)
            {
              pal_pos[0] = rgb_to_gray_func(palette->Red, palette->Green, palette->Blue);
              pal_pos[1] = 255;
@@ -225,13 +225,13 @@ libungif_read_data(struct image_io *io)
 #        define IMAGE_WALK_ROW_STEP 0
 #        define IMAGE_WALK_DO_STEP do{ *(u16 *)walk_pos = ((u16 *)pal)[*pixels++]; }while(0)
 #        define IMAGE_WALK_DO_ROW_END DO_ROW_END
-#        include "images/image-walk.h"
+#        include <images/image-walk.h>
          break;
        }
       case 3:
        {
          byte pal[256 * 4], *pal_pos = pal, *pal_end = pal + 256 * 4;
-         for (uns i = 0; i < (uns)color_map->ColorCount; i++, pal_pos += 4, palette++)
+         for (uint i = 0; i < (uint)color_map->ColorCount; i++, pal_pos += 4, palette++)
            {
              pal_pos[0] = palette->Red;
              pal_pos[1] = palette->Green;
@@ -253,13 +253,13 @@ libungif_read_data(struct image_io *io)
 #        define IMAGE_WALK_ROW_STEP 0
 #        define IMAGE_WALK_DO_STEP do{ byte *p = pal + 4 * (*pixels++); walk_pos[0] = p[0]; walk_pos[1] = p[1]; walk_pos[2] = p[2]; }while(0)
 #        define IMAGE_WALK_DO_ROW_END DO_ROW_END
-#        include "images/image-walk.h"
+#        include <images/image-walk.h>
          break;
        }
       case 4:
        {
          byte pal[256 * 4], *pal_pos = pal, *pal_end = pal + 256 * 4;
-         for (uns i = 0; i < (uns)color_map->ColorCount; i++, pal_pos += 4, palette++)
+         for (uint i = 0; i < (uint)color_map->ColorCount; i++, pal_pos += 4, palette++)
            {
              pal_pos[0] = palette->Red;
              pal_pos[1] = palette->Green;
@@ -278,7 +278,7 @@ libungif_read_data(struct image_io *io)
 #        define IMAGE_WALK_ROW_STEP 0
 #        define IMAGE_WALK_DO_STEP do{ *(u32 *)walk_pos = ((u32 *)pal)[*pixels++]; }while(0)
 #        define IMAGE_WALK_DO_ROW_END DO_ROW_END
-#        include "images/image-walk.h"
+#        include <images/image-walk.h>
          break;
        }
       default: