- make raw.c C89 compliant
- make TIFF detection stricter
- more memory allocation integer overflow auditing
- IM_DEBUG_MALLOC wasn't interacting well with the API
- make TIFF detection stricter
- more memory allocation integer overflow auditing
- IM_DEBUG_MALLOC wasn't interacting well with the API
+- make win32.c const happy
+- make raw.c C89 compliant
=================================================================
=================================================================
unsigned char *inbuffer;
unsigned char *ilbuffer;
unsigned char *exbuffer;
int inbuflen,ilbuflen,exbuflen;
unsigned char *inbuffer;
unsigned char *ilbuffer;
unsigned char *exbuffer;
int inbuflen,ilbuflen,exbuflen;
io_glue_commit_types(ig);
mm_log((1, "i_readraw(ig %p,x %d,y %d,datachannels %d,storechannels %d,intrl %d)\n",
ig, x, y, datachannels, storechannels, intrl));
io_glue_commit_types(ig);
mm_log((1, "i_readraw(ig %p,x %d,y %d,datachannels %d,storechannels %d,intrl %d)\n",
ig, x, y, datachannels, storechannels, intrl));
#define fixed(x) ((x).value + ((x).fract) / 65536.0)
#define fixed(x) ((x).value + ((x).fract) / 65536.0)
-static void set_logfont(char *face, int size, LOGFONT *lf);
+static void set_logfont(const char *face, int size, LOGFONT *lf);
-static LPVOID render_text(char *face, int size, char *text, int length, int aa,
+static LPVOID render_text(const char *face, int size, const char *text, int length, int aa,
HBITMAP *pbm, SIZE *psz, TEXTMETRIC *tm);
/*
HBITMAP *pbm, SIZE *psz, TEXTMETRIC *tm);
/*
-int i_wf_bbox(char *face, int size, char *text, int length, int *bbox) {
+int i_wf_bbox(const char *face, int size, const char *text, int length, int *bbox) {
LOGFONT lf;
HFONT font, oldFont;
HDC dc;
LOGFONT lf;
HFONT font, oldFont;
HDC dc;
-i_wf_text(char *face, i_img *im, int tx, int ty, i_color *cl, int size,
- char *text, int len, int align, int aa) {
+i_wf_text(const char *face, i_img *im, int tx, int ty, const i_color *cl, int size,
+ const char *text, int len, int align, int aa) {
unsigned char *bits;
HBITMAP bm;
SIZE sz;
unsigned char *bits;
HBITMAP bm;
SIZE sz;
-i_wf_cp(char *face, i_img *im, int tx, int ty, int channel, int size,
- char *text, int len, int align, int aa) {
+i_wf_cp(const char *face, i_img *im, int tx, int ty, int channel, int size,
+ const char *text, int len, int align, int aa) {
unsigned char *bits;
HBITMAP bm;
SIZE sz;
unsigned char *bits;
HBITMAP bm;
SIZE sz;
-static void set_logfont(char *face, int size, LOGFONT *lf) {
+static void set_logfont(const char *face, int size, LOGFONT *lf) {
memset(lf, 0, sizeof(LOGFONT));
lf->lfHeight = -size; /* character height rather than cell height */
memset(lf, 0, sizeof(LOGFONT));
lf->lfHeight = -size; /* character height rather than cell height */
-static LPVOID render_text(char *face, int size, char *text, int length, int aa,
+static LPVOID render_text(const char *face, int size, const char *text, int length, int aa,
HBITMAP *pbm, SIZE *psz, TEXTMETRIC *tm) {
BITMAPINFO bmi;
BITMAPINFOHEADER *bmih = &bmi.bmiHeader;
HBITMAP *pbm, SIZE *psz, TEXTMETRIC *tm) {
BITMAPINFO bmi;
BITMAPINFOHEADER *bmih = &bmi.bmiHeader;