diff options
Diffstat (limited to 'Build/source/texk/xdvipdfmx/src')
-rw-r--r-- | Build/source/texk/xdvipdfmx/src/Makefile.in | 75 | ||||
-rw-r--r-- | Build/source/texk/xdvipdfmx/src/cidtype0.c | 8 | ||||
-rw-r--r-- | Build/source/texk/xdvipdfmx/src/cidtype2.c | 6 | ||||
-rw-r--r-- | Build/source/texk/xdvipdfmx/src/cmap_write.c | 4 | ||||
-rw-r--r-- | Build/source/texk/xdvipdfmx/src/dpxfile.c | 3 | ||||
-rw-r--r-- | Build/source/texk/xdvipdfmx/src/dvipdfmx.c | 3 | ||||
-rw-r--r-- | Build/source/texk/xdvipdfmx/src/mpost.c | 4 | ||||
-rw-r--r-- | Build/source/texk/xdvipdfmx/src/pdfencrypt.c | 2 | ||||
-rw-r--r-- | Build/source/texk/xdvipdfmx/src/pdfobj.c | 9 | ||||
-rw-r--r-- | Build/source/texk/xdvipdfmx/src/spc_dvips.c | 40 | ||||
-rw-r--r-- | Build/source/texk/xdvipdfmx/src/truetype.c | 9 | ||||
-rw-r--r-- | Build/source/texk/xdvipdfmx/src/tt_cmap.c | 2 | ||||
-rw-r--r-- | Build/source/texk/xdvipdfmx/src/tt_gsub.c | 4 | ||||
-rw-r--r-- | Build/source/texk/xdvipdfmx/src/tt_post.c | 2 | ||||
-rw-r--r-- | Build/source/texk/xdvipdfmx/src/xbb.c | 13 |
15 files changed, 120 insertions, 64 deletions
diff --git a/Build/source/texk/xdvipdfmx/src/Makefile.in b/Build/source/texk/xdvipdfmx/src/Makefile.in index 3f7002f0507..cb7dda1ce0b 100644 --- a/Build/source/texk/xdvipdfmx/src/Makefile.in +++ b/Build/source/texk/xdvipdfmx/src/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.3 from Makefile.am. +# Makefile.in generated by automake 1.12.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2012 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -36,7 +52,8 @@ build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = xdvipdfmx$(EXEEXT) subdir = src -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(top_srcdir)/../../build-aux/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/../../m4/cho-libs.m4 \ $(top_srcdir)/../../m4/kpse-common.m4 \ @@ -102,6 +119,11 @@ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(xdvipdfmx_SOURCES) DIST_SOURCES = $(xdvipdfmx_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -302,8 +324,11 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ @@ -500,6 +525,20 @@ GTAGS: && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: $(HEADERS) $(SOURCES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -643,18 +682,18 @@ uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic clean-libtool ctags distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-binPROGRAMS install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am \ - uninstall-binPROGRAMS + clean-generic clean-libtool cscopelist ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-binPROGRAMS install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-binPROGRAMS @KPATHSEA_RULE@ diff --git a/Build/source/texk/xdvipdfmx/src/cidtype0.c b/Build/source/texk/xdvipdfmx/src/cidtype0.c index f0b2be75664..f30aba4281b 100644 --- a/Build/source/texk/xdvipdfmx/src/cidtype0.c +++ b/Build/source/texk/xdvipdfmx/src/cidtype0.c @@ -546,7 +546,7 @@ CIDFont_type0_dofont (CIDFont *font) cid = 0; last_cid = 0; num_glyphs = 0; for (cid = 0; cid <= CID_MAX; cid++) { if (is_used_char2(used_chars, cid)) { - gid = cff_charsets_lookup(cffont, cid); + gid = cff_charsets_lookup(cffont, (card16)cid); if (cid != 0 && gid == 0) { WARN("Glyph for CID %u missing in font \"%s\".", (CID) cid, font->ident); used_chars[cid/8] &= ~(1 << (7 - (cid % 8))); @@ -613,7 +613,7 @@ CIDFont_type0_dofont (CIDFont *font) fdselect->data.ranges = NEW(num_glyphs, cff_range3); /* New CharStrings INDEX */ - charstrings = cff_new_index(num_glyphs+1); + charstrings = cff_new_index((card16)(num_glyphs+1)); max_len = 2 * CS_STR_LEN_MAX; charstrings->data = NEW(max_len, card8); charstring_len = 0; @@ -1029,7 +1029,7 @@ CIDFont_type0_t1cdofont (CIDFont *font) ERROR("No valid charstring data found."); /* New CharStrings INDEX */ - charstrings = cff_new_index(num_glyphs+1); + charstrings = cff_new_index((card16)(num_glyphs+1)); max_len = 2 * CS_STR_LEN_MAX; charstrings->data = NEW(max_len, card8); charstring_len = 0; @@ -1979,7 +1979,7 @@ CIDFont_type0_t1dofont (CIDFont *font) widths = NEW(num_glyphs, double); memset(w_stat, 0, sizeof(int)*1001); offset = 0L; - cstring = cff_new_index(num_glyphs); + cstring = cff_new_index((card16)num_glyphs); cstring->data = NULL; cstring->offset[0] = 1; gid = 0; diff --git a/Build/source/texk/xdvipdfmx/src/cidtype2.c b/Build/source/texk/xdvipdfmx/src/cidtype2.c index 8ff1bea2dfd..469538d8649 100644 --- a/Build/source/texk/xdvipdfmx/src/cidtype2.c +++ b/Build/source/texk/xdvipdfmx/src/cidtype2.c @@ -317,7 +317,7 @@ add_TTCIDVMetrics (pdf_obj *fontdict, struct tt_glyphs *g, if (!is_used_char2(used_chars, cid)) continue; gid = (cidtogidmap) ? ((cidtogidmap[2*cid] << 8)|cidtogidmap[2*cid+1]) : cid; - idx = tt_get_index(g, cid); + idx = tt_get_index(g, (USHORT)cid); if (cid != 0 && idx == 0) continue; advanceHeight = PDFUNIT(g->gd[idx].advh); @@ -705,7 +705,7 @@ CIDFont_type2_dofont (CIDFont *font) if (gid == 0 && unicode_cmap) { long alt_code; - alt_code = fix_CJK_symbols(code); + alt_code = fix_CJK_symbols((unsigned short)code); if (alt_code != code) { gid = tt_cmap_lookup(ttcmap, alt_code); if (gid != 0) { @@ -787,7 +787,7 @@ CIDFont_type2_dofont (CIDFont *font) if (gid == 0 && unicode_cmap) { long alt_code; - alt_code = fix_CJK_symbols(code); + alt_code = fix_CJK_symbols((unsigned short)code); if (alt_code != code) { gid = tt_cmap_lookup(ttcmap, alt_code); if (gid != 0) { diff --git a/Build/source/texk/xdvipdfmx/src/cmap_write.c b/Build/source/texk/xdvipdfmx/src/cmap_write.c index eb900512a11..b6c834993d2 100644 --- a/Build/source/texk/xdvipdfmx/src/cmap_write.c +++ b/Build/source/texk/xdvipdfmx/src/cmap_write.c @@ -201,13 +201,13 @@ write_map (mapDef *mtab, int count, *(wbuf->curptr)++ = '<'; for (j = 0; j < depth; j++) sputx(codestr[j], &(wbuf->curptr), wbuf->limptr); - sputx(c, &(wbuf->curptr), wbuf->limptr); + sputx((unsigned char)c, &(wbuf->curptr), wbuf->limptr); *(wbuf->curptr)++ = '>'; *(wbuf->curptr)++ = ' '; *(wbuf->curptr)++ = '<'; for (j = 0; j < depth; j++) sputx(codestr[j], &(wbuf->curptr), wbuf->limptr); - sputx(c + blocks[i].count, &(wbuf->curptr), wbuf->limptr); + sputx((unsigned char)(c + blocks[i].count), &(wbuf->curptr), wbuf->limptr); *(wbuf->curptr)++ = '>'; *(wbuf->curptr)++ = ' '; *(wbuf->curptr)++ = '<'; diff --git a/Build/source/texk/xdvipdfmx/src/dpxfile.c b/Build/source/texk/xdvipdfmx/src/dpxfile.c index 2b5dc1828c5..0424e4716fa 100644 --- a/Build/source/texk/xdvipdfmx/src/dpxfile.c +++ b/Build/source/texk/xdvipdfmx/src/dpxfile.c @@ -755,7 +755,7 @@ dpx_create_temp_file (void) } #elif defined(HAVE_MKSTEMP) # define __TMPDIR "/tmp" -# define TEMPLATE "/dvipdfmx.XXXXXXXX" +# define TEMPLATE "/dvipdfmx.XXXXXX" { const char *_tmpd; int _fd = -1; @@ -811,7 +811,6 @@ dpx_delete_temp_file (char *tmp) * This should be system dependent. (MiKTeX may want something different) * Please modify as appropriate (see also pdfximage.c and dvipdfmx.c). */ - int dpx_file_apply_filter (const char *cmdtmpl, const char *input, const char *output, diff --git a/Build/source/texk/xdvipdfmx/src/dvipdfmx.c b/Build/source/texk/xdvipdfmx/src/dvipdfmx.c index 0ce3e07a96d..e041cc25ec3 100644 --- a/Build/source/texk/xdvipdfmx/src/dvipdfmx.c +++ b/Build/source/texk/xdvipdfmx/src/dvipdfmx.c @@ -837,6 +837,9 @@ main (int argc, char *argv[]) miktex_initialize(); #else kpse_set_program_name(argv[0], "dvipdfmx"); /* we pretend to be dvipdfmx for kpse purposes */ +#ifdef WIN32 + texlive_gs_init (); +#endif #endif paperinit(); diff --git a/Build/source/texk/xdvipdfmx/src/mpost.c b/Build/source/texk/xdvipdfmx/src/mpost.c index 99e86f5cecd..2e1791121dd 100644 --- a/Build/source/texk/xdvipdfmx/src/mpost.c +++ b/Build/source/texk/xdvipdfmx/src/mpost.c @@ -1188,12 +1188,12 @@ do_operator (const char *token, double x_user, double y_user) case SETLINECAP: error = pop_get_numbers(values, 1); if (!error) - error = pdf_dev_setlinecap(values[0]); + error = pdf_dev_setlinecap((int)values[0]); break; case SETLINEJOIN: error = pop_get_numbers(values, 1); if (!error) - error = pdf_dev_setlinejoin(values[0]); + error = pdf_dev_setlinejoin((int)values[0]); break; case SETLINEWIDTH: error = pop_get_numbers(values, 1); diff --git a/Build/source/texk/xdvipdfmx/src/pdfencrypt.c b/Build/source/texk/xdvipdfmx/src/pdfencrypt.c index 7f358082cc3..e5a13d1b76d 100644 --- a/Build/source/texk/xdvipdfmx/src/pdfencrypt.c +++ b/Build/source/texk/xdvipdfmx/src/pdfencrypt.c @@ -359,6 +359,8 @@ static char *getpass (const char *prompt) pwd_buf[i] = getch(); if (pwd_buf[i] == '\r') break; + fputs("*", stderr); + fflush(stderr); } pwd_buf[i] = '\0'; fputs("\n", stderr); diff --git a/Build/source/texk/xdvipdfmx/src/pdfobj.c b/Build/source/texk/xdvipdfmx/src/pdfobj.c index 23069ceb9c5..b78556e138c 100644 --- a/Build/source/texk/xdvipdfmx/src/pdfobj.c +++ b/Build/source/texk/xdvipdfmx/src/pdfobj.c @@ -538,12 +538,11 @@ void pdf_out_char (FILE *file, char c) } } +static char xchar[] = "0123456789abcdef"; + #define pdf_out_xchar(f,c) do {\ - int __tmpnum;\ - __tmpnum = ((c) >> 4) & 0x0f;\ - pdf_out_char((f), (((__tmpnum) >= 10) ? (__tmpnum)+'W' : (__tmpnum)+'0'));\ - __tmpnum = (c) & 0x0f;\ - pdf_out_char((f), (((__tmpnum) >= 10) ? (__tmpnum)+'W' : (__tmpnum)+'0'));\ + pdf_out_char((f), xchar[((c) >> 4) & 0x0f]);\ + pdf_out_char((f), xchar[(c) & 0x0f]);\ } while (0) static diff --git a/Build/source/texk/xdvipdfmx/src/spc_dvips.c b/Build/source/texk/xdvipdfmx/src/spc_dvips.c index dfed29fbc9b..b408d648c56 100644 --- a/Build/source/texk/xdvipdfmx/src/spc_dvips.c +++ b/Build/source/texk/xdvipdfmx/src/spc_dvips.c @@ -298,7 +298,7 @@ spc_handler_ps_tricks_gdef (struct spc_env *spe, struct spc_arg *args) { FILE* fp; - fp = fopen(global_defs, "a"); + fp = fopen(global_defs, "ab"); fwrite(args->curptr, 1, args->endptr - args->curptr, fp); fprintf(fp, "\n"); fclose(fp); @@ -321,7 +321,7 @@ spc_handler_ps_tricks_pdef (struct spc_env *spe, struct spc_arg *args) pdf_concatmatrix(&M, &T); if (page_defs == 0) page_defs = dpx_create_temp_file(); - fp = fopen(page_defs, "a"); + fp = fopen(page_defs, "ab"); fprintf(fp, "gsave initmatrix [%f %f %f %f %f %f] concat %f %f moveto\n", M.a, M.b, M.c, M.d, M.e, M.f, spe->x_user - pt.x, spe->y_user - pt.y); fwrite(args->curptr, 1, args->endptr - args->curptr, fp); fprintf(fp, "\ngrestore\n"); @@ -336,7 +336,7 @@ spc_handler_ps_tricks_tdef (struct spc_env *spe, struct spc_arg *args) FILE* fp; if (!temporary_defs) temporary_defs = dpx_create_temp_file(); - fp = fopen(temporary_defs, "w"); + fp = fopen(temporary_defs, "wb"); fwrite(args->curptr, 1, args->endptr - args->curptr, fp); fprintf(fp, "\n"); fclose(fp); @@ -391,7 +391,7 @@ spc_handler_ps_tricks_bput (struct spc_env *spe, struct spc_arg *args, int must_ FILE* fp; if (!temporary_defs) temporary_defs = dpx_create_temp_file(); - fp = fopen(temporary_defs, "a"); + fp = fopen(temporary_defs, "ab"); fprintf(fp, "gsave\n"); if (label == 0) fprintf(fp, "[%f %f %f %f %f %f] concat %f %f moveto\n", M.a, M.b, M.c, M.d, M.e, M.f, spe->x_user, spe->y_user); @@ -535,7 +535,7 @@ spc_handler_ps_tricks_parse_path (struct spc_env *spe, struct spc_arg *args, WARN("Failed to create temporary input file for PSTricks image conversion."); return -1; } - fp = fopen(gs_in, "w"); + fp = fopen(gs_in, "wb"); for (k = 0; k < num_ps_headers; k++) fprintf(fp, "(%s) run\n", ps_headers[k]); fprintf(fp, "[%f %f %f %f %f %f] concat %f %f translate 0 0 moveto\n", M.a, M.b, M.c, M.d, M.e, M.f, spe->x_user, spe->y_user); @@ -563,7 +563,7 @@ spc_handler_ps_tricks_parse_path (struct spc_env *spe, struct spc_arg *args, } #endif } else { - fp = fopen(gs_in, "a"); + fp = fopen(gs_in, "ab"); fprintf(fp, "flattenpath stroke\n"); } fclose(fp); @@ -595,7 +595,7 @@ spc_handler_ps_tricks_parse_path (struct spc_env *spe, struct spc_arg *args, return error; } - fp = fopen(gs_out, "r"); + fp = fopen(gs_out, "rb"); if (pdf_copy_clip(fp, 1, 0, 0) != 0) { spc_warn(spe, "Failed to parse the clipping path."); RELEASE(gs_in); @@ -629,7 +629,7 @@ spc_handler_ps_tricks_render (struct spc_env *spe, struct spc_arg *args) WARN("Failed to create temporary input file for PSTricks image conversion."); return -1; } - fp = fopen(gs_in, "w"); + fp = fopen(gs_in, "wb"); for (k = 0; k < num_ps_headers; k++) fprintf(fp, "(%s) run\n", ps_headers[k]); fprintf(fp, "[%f %f %f %f %f %f] concat %f %f translate 0 0 moveto\n", M.a, M.b, M.c, M.d, M.e, M.f, spe->x_user, spe->y_user); @@ -637,7 +637,7 @@ spc_handler_ps_tricks_render (struct spc_env *spe, struct spc_arg *args) if (page_defs != 0) fprintf(fp, "(%s) run\n", page_defs); } else - fp = fopen(gs_in, "a"); + fp = fopen(gs_in, "ab"); fprintf(fp, "\nsave\n"); fwrite(args->curptr, 1, args->endptr - args->curptr, fp); @@ -885,7 +885,7 @@ spc_dvips_at_begin_document (void) /* This, together with \pscharpath support code, must be moved to xtex.pro header. */ global_defs = dpx_create_temp_file(); - fp = fopen(global_defs, "w"); + fp = fopen(global_defs, "wb"); fprintf(fp, "tx@Dict begin /STV {} def end\n"); fclose(fp); return 0; @@ -894,6 +894,12 @@ spc_dvips_at_begin_document (void) int spc_dvips_at_end_document (void) { + if (ps_headers) { + while (num_ps_headers > 0) + RELEASE(ps_headers[--num_ps_headers]); + free(ps_headers); + ps_headers = NULL; + } dpx_delete_temp_file(global_defs); dpx_delete_temp_file(page_defs); return 0; @@ -980,9 +986,11 @@ spc_dvips_setup_handler (struct spc_handler *handle, } #ifdef __EMX__ -#define GS_CALCULATOR "gsos2 -q -dNOPAUSE -dBATCH -sDEVICE=nullpage -f " +#define GS_CALCULATOR "gsos2 -q -dNOPAUSE -dBATCH -sDEVICE=nullpage -f " +#elif defined(WIN32) +#define GS_CALCULATOR "gswin32c -q -dNOPAUSE -dBATCH -sDEVICE=nullpage -f " #else -#define GS_CALCULATOR "gs -q -dNOPAUSE -dBATCH -sDEVICE=nullpage -f " +#define GS_CALCULATOR "gs -q -dNOPAUSE -dBATCH -sDEVICE=nullpage -f " #endif static @@ -994,7 +1002,7 @@ int calculate_PS (char *string, int length, double *res1, double *res2, double * if (res1 == 0 && res2 == 0) return -1; formula = dpx_create_temp_file(); - fp = fopen(formula, "w"); + fp = fopen(formula, "wb"); for (k = 0; k < num_ps_headers; k++) fprintf(fp, "(%s) run\n", ps_headers[k]); fprintf(fp, "0 0 moveto\n"); @@ -1013,10 +1021,9 @@ int calculate_PS (char *string, int length, double *res1, double *res2, double * *p = '/'; } #endif - k = strlen(GS_CALCULATOR) + strlen(formula) + 2; - cmd = malloc(k); + k = strlen(GS_CALCULATOR) + strlen(formula) + 1; + cmd = NEW(k, char); strcpy(cmd, GS_CALCULATOR); - strcat(cmd, " "); strcat(cmd, formula); coord = popen(cmd, "r"); @@ -1033,6 +1040,7 @@ int calculate_PS (char *string, int length, double *res1, double *res2, double * return -1; pclose(coord); + RELEASE(cmd); dpx_delete_temp_file(formula); return 0; } diff --git a/Build/source/texk/xdvipdfmx/src/truetype.c b/Build/source/texk/xdvipdfmx/src/truetype.c index ffbe747d62e..a928c55687b 100644 --- a/Build/source/texk/xdvipdfmx/src/truetype.c +++ b/Build/source/texk/xdvipdfmx/src/truetype.c @@ -342,7 +342,7 @@ do_builtin_encoding (pdf_font *font, const char *usedchars, sfnt *sfont) } else { idx = tt_find_glyph(glyphs, gid); if (idx == 0) - idx = tt_add_glyph(glyphs, gid, count); /* count returned. */ + idx = tt_add_glyph(glyphs, (USHORT)gid, (USHORT)count); /* count returned. */ } cmap_table[18+code] = idx & 0xff; /* bug here */ count++; @@ -498,7 +498,7 @@ selectglyph (USHORT in, const char *suffix, struct glyph_mapper *gm, USHORT *out memcpy(t, s, strlen(s)); error = select_gsub(s, gm); if (!error) - error = otl_gsub_apply_alt(gm->gsub, n, &in); + error = otl_gsub_apply_alt(gm->gsub, (USHORT)n, (USHORT *)&in); } } } @@ -532,7 +532,8 @@ composeglyph (USHORT *glyphs, int n_glyphs, } if (!error) - error = otl_gsub_apply_lig(gm->gsub, glyphs, n_glyphs, gid); + error = otl_gsub_apply_lig(gm->gsub, (USHORT *)glyphs, (USHORT)n_glyphs, + (USHORT *)gid); return error; } @@ -842,7 +843,7 @@ do_custom_encoding (pdf_font *font, } idx = tt_find_glyph(glyphs, gid); if (idx == 0) { - idx = tt_add_glyph(glyphs, gid, count); /* count returned. */ + idx = tt_add_glyph(glyphs, (USHORT)gid, (USHORT)count); /* count returned. */ count++; } } diff --git a/Build/source/texk/xdvipdfmx/src/tt_cmap.c b/Build/source/texk/xdvipdfmx/src/tt_cmap.c index 363f9fe65f1..bbc236a6028 100644 --- a/Build/source/texk/xdvipdfmx/src/tt_cmap.c +++ b/Build/source/texk/xdvipdfmx/src/tt_cmap.c @@ -1455,7 +1455,7 @@ handle_assign (pdf_obj *dst, pdf_obj *src, int flag, } rv = otl_gsub_apply_lig(gsub_list, - gid_in, n_unicodes, &lig); + gid_in, (USHORT)n_unicodes, &lig); if (rv < 0) { if (flag == 'p') WARN("No ligature found..."); diff --git a/Build/source/texk/xdvipdfmx/src/tt_gsub.c b/Build/source/texk/xdvipdfmx/src/tt_gsub.c index 20981c0b8cb..5653347a9bd 100644 --- a/Build/source/texk/xdvipdfmx/src/tt_gsub.c +++ b/Build/source/texk/xdvipdfmx/src/tt_gsub.c @@ -1265,9 +1265,9 @@ otl_gsub_apply_ligature (struct otl_gsub_subtab *subtab, ligset = &(data->LigatureSet[idx]); for (j = 0; j < ligset->LigatureCount; j++) { - if (!glyph_seq_cmp(&gid_in[1], num_gids - 1, + if (!glyph_seq_cmp(&gid_in[1], (USHORT)(num_gids - 1), ligset->Ligature[j].Component, - ligset->Ligature[j].CompCount - 1)) { + (USHORT)(ligset->Ligature[j].CompCount - 1))) { *gid_out = ligset->Ligature[j].LigGlyph; return 0; /* found */ } diff --git a/Build/source/texk/xdvipdfmx/src/tt_post.c b/Build/source/texk/xdvipdfmx/src/tt_post.c index da929bb8d21..228261bf40d 100644 --- a/Build/source/texk/xdvipdfmx/src/tt_post.c +++ b/Build/source/texk/xdvipdfmx/src/tt_post.c @@ -191,7 +191,7 @@ tt_release_post_table (struct tt_post_table *post) ASSERT(post); if (post->glyphNamePtr && post->Version != 0x00010000UL) - RELEASE(post->glyphNamePtr); + RELEASE((void *)post->glyphNamePtr); if (post->names) { for (i = 0; i < post->count; i++) { if (post->names[i]) diff --git a/Build/source/texk/xdvipdfmx/src/xbb.c b/Build/source/texk/xdvipdfmx/src/xbb.c index 199dd5b5403..19f9ed42f63 100644 --- a/Build/source/texk/xdvipdfmx/src/xbb.c +++ b/Build/source/texk/xdvipdfmx/src/xbb.c @@ -40,6 +40,8 @@ #define XBB_PROGRAM "extractbb" #define XBB_VERSION "Version 0.2" +static int xbb_output_mode = XBB_OUTPUT; + static void usage(void) { fprintf (stderr, "%s, version %s, Copyright (C) 2008 by Jin-Hwan Cho\n", @@ -51,8 +53,13 @@ static void usage(void) fprintf (stdout, "(at your option) any later version.\n"); fprintf (stderr, "\nUsage: %s [-v] [-b] [-m|-x] [files]\n", XBB_PROGRAM); fprintf (stderr, "\t-b\tWrite output file in binary mode\n"); - fprintf (stderr, "\t-m\tOutput .bb file used in DVIPDFM\n"); - fprintf (stderr, "\t-x\tOutput .xbb file used in DVIPDFMx (default)\n"); + if(xbb_output_mode == EBB_OUTPUT) { + fprintf (stderr, "\t-m\tOutput .bb file used in DVIPDFM (default)\n"); + fprintf (stderr, "\t-x\tOutput .xbb file used in DVIPDFMx\n"); + } else { + fprintf (stderr, "\t-m\tOutput .bb file used in DVIPDFM\n"); + fprintf (stderr, "\t-x\tOutput .xbb file used in DVIPDFMx (default)\n"); + } fprintf (stderr, "\t-v\tVerbose\n"); exit(1); } @@ -73,8 +80,6 @@ const char *extensions[] = { ".jpeg", ".JPEG", ".jpg", ".JPG", ".pdf", ".PDF", ".png", ".PNG" }; -static int xbb_output_mode = XBB_OUTPUT; - static char *make_xbb_filename(const char *name) { int i; |