diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2011-04-19 13:44:09 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2011-04-19 13:44:09 +0000 |
commit | 129c1c0ef9266468d65fbcf846132b4329cad994 (patch) | |
tree | 0aeb7c371bb33f4fb69501b7715c82b769957896 /Build/source/texk/dvipos | |
parent | 880a5b0998e88b6c3a3c50b3058f0139bf9b1211 (diff) |
Avoid Mac OS X compiler warnings, mainly 'differ in signedness'
git-svn-id: svn://tug.org/texlive/trunk@22123 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvipos')
-rw-r--r-- | Build/source/texk/dvipos/ChangeLog | 7 | ||||
-rw-r--r-- | Build/source/texk/dvipos/dvicore.c | 30 |
2 files changed, 22 insertions, 15 deletions
diff --git a/Build/source/texk/dvipos/ChangeLog b/Build/source/texk/dvipos/ChangeLog index 266458772fe..84f8234c15e 100644 --- a/Build/source/texk/dvipos/ChangeLog +++ b/Build/source/texk/dvipos/ChangeLog @@ -1,3 +1,10 @@ +2011-04-19 Peter Breitenlohner <peb@mppmu.mpg.de> + + Avoid 'differ in signedness' warnings. + dvicore.c (struct a_bbox): Don't declare member tag as unsigned. + (new_bbox): Don't declare param tag as unsigned. + (do_pos_special): Casts from 'unsigned char *' to 'char *'. + 2010-02-25 Peter Breitenlohner <peb@mppmu.mpg.de> * utils.h: Revert the last changes from Feb 20 and 23. diff --git a/Build/source/texk/dvipos/dvicore.c b/Build/source/texk/dvipos/dvicore.c index 227e345a075..5a1db99c9e6 100644 --- a/Build/source/texk/dvipos/dvicore.c +++ b/Build/source/texk/dvipos/dvicore.c @@ -60,7 +60,7 @@ static SIGNED_PAIR max_s_so_far, page_count; typedef struct a_bbox { SIGNED_QUAD h1, v1, h2, v2, fb, cb; /* first and current baseline */ int type, lev_s; - unsigned char *tag; + char *tag; struct a_bbox *next; } BBOX; static BBOX page_bbox; @@ -189,7 +189,7 @@ static void clear_bbox (int init) } } -static void new_bbox (unsigned char *tag, int type) +static void new_bbox (char *tag, int type) { BBOX *bb = &page_bbox; @@ -918,7 +918,7 @@ static void do_pos_special (unsigned char *buffer, SIGNED_QUAD buffer_len) for (p = buffer; p - buffer < buffer_len && isspace(*p); p++) ; /* skip white chars */ - if (strncmp(p, "pos:", 4)) return; + if (strncmp((char *)p, "pos:", 4)) return; for (cmd = p; p - buffer < buffer_len && !isspace(*p); p++) ; /* retrieve POS command */ @@ -938,7 +938,7 @@ static void do_pos_special (unsigned char *buffer, SIGNED_QUAD buffer_len) if (p - buffer < buffer_len) { /* hangafter is a number, not a dimension, hence its %ld */ - parsed = sscanf(p, "%lfpt %lfpt %lfpt %lfpt,%lfpt,%lfpt,%lfpt,%ld,%lfpt", + parsed = sscanf((char *)p, "%lfpt %lfpt %lfpt %lfpt,%lfpt,%lfpt,%lfpt,%ld,%lfpt", &w_pt, &h_pt, &d_pt, &list.hsize, &list.leftskip, &list.rightskip, &list.hangindent, &list.hangafter, &list.parindent); @@ -951,11 +951,11 @@ static void do_pos_special (unsigned char *buffer, SIGNED_QUAD buffer_len) x = dvi_state.h + denominator / 100; y = max_v - dvi_state.v; - if (strcmp(cmd, "pos:pxy") == 0) + if (strcmp((char *)cmd, "pos:pxy") == 0) fprintf(outfp, "\\pospxy{%s}{%d}{%ldsp}{%ldsp}\n", tag, current_page, x, y); - else if (strcmp(cmd, "pos:pxywhd") == 0) + else if (strcmp((char *)cmd, "pos:pxywhd") == 0) fprintf(outfp, "\\pospxywhd{%s}{%d}{%ldsp}{%ldsp}{%ldsp}{%ldsp}{%ldsp}\n", tag, current_page, x, y, w, h, d); - else if (strcmp(cmd, "pos:pxyplus") == 0) { + else if (strcmp((char *)cmd, "pos:pxyplus") == 0) { if (parsed < 9) fprintf(stderr, "dvipos: only %d conversions for \\pospxyplus but 9 are needed\nBeward: Coordinates in the output may therefore be junk. Continuing anyway...", parsed); fprintf(outfp, "\\pospxyplus{%s}{%d}{%ldsp}{%ldsp}{%ldsp}{%ldsp}{%ldsp}", tag, current_page, x, y, w, h, d); @@ -963,14 +963,14 @@ static void do_pos_special (unsigned char *buffer, SIGNED_QUAD buffer_len) list.hsize, list.leftskip, list.rightskip, list.hangindent, list.hangafter, list.parindent); } - else if (strcmp(cmd, "pos:begbox") == 0) - new_bbox(tag, BOX_TYPE); - else if (strcmp(cmd, "pos:endbox") == 0) - close_bbox(tag); - else if (strcmp(cmd, "pos:beglines") == 0) - new_bbox(tag, LINES_TYPE); - else if (strcmp(cmd, "pos:endlines") == 0) - close_bbox(tag); + else if (strcmp((char *)cmd, "pos:begbox") == 0) + new_bbox((char *)tag, BOX_TYPE); + else if (strcmp((char *)cmd, "pos:endbox") == 0) + close_bbox((char *)tag); + else if (strcmp((char *)cmd, "pos:beglines") == 0) + new_bbox((char *)tag, LINES_TYPE); + else if (strcmp((char *)cmd, "pos:endlines") == 0) + close_bbox((char *)tag); } static void do_xxx (UNSIGNED_BYTE opcode) |