Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 287725
Collapse All | Expand All

(-)converter/other/pngx.c (-1 / +9 lines)
Lines 69-74 Link Here
69
            else
69
            else
70
                *pngxPP = pngxP;
70
                *pngxPP = pngxP;
71
        }
71
        }
72
        pngxP->rw = rw;
72
    }
73
    }
73
}
74
}
74
75
Lines 77-83 Link Here
77
void
78
void
78
pngx_destroy(struct pngx * const pngxP) {
79
pngx_destroy(struct pngx * const pngxP) {
79
80
80
    png_destroy_write_struct(&pngxP->png_ptr, &pngxP->info_ptr);
81
    switch(pngxP->rw) {
82
    case PNGX_READ:
83
        png_destroy_read_struct(&pngxP->png_ptr, &pngxP->info_ptr, NULL);
84
        break;
85
    case PNGX_WRITE:
86
        png_destroy_write_struct(&pngxP->png_ptr, &pngxP->info_ptr);
87
        break;
88
    }
81
89
82
    free(pngxP);
90
    free(pngxP);
83
}
91
}
(-)converter/other/pngx.h (-4 / +4 lines)
Lines 5-18 Link Here
5
   the PNG library easier and cleaner.
5
   the PNG library easier and cleaner.
6
*/
6
*/
7
7
8
typedef enum {PNGX_READ, PNGX_WRITE} pngx_rw;
9
8
struct pngx {
10
struct pngx {
9
    png_structp png_ptr;
11
    png_structp png_ptr;
10
    png_infop info_ptr;
12
    png_infop   info_ptr;
13
    pngx_rw     rw;
11
};
14
};
12
15
13
typedef enum {PNGX_READ, PNGX_WRITE} pngx_rw;
14
15
16
void
16
void
17
pngx_create(struct pngx ** const pngxPP,
17
pngx_create(struct pngx ** const pngxPP,
18
            pngx_rw        const rw,
18
            pngx_rw        const rw,

Return to bug 287725