From 47ce3271b417e6d0a8fcbbbe94bd9060290e5032 Mon Sep 17 00:00:00 2001 From: Akira Kakuto Date: Sat, 27 Feb 2016 13:55:44 +0000 Subject: dvisvgm 1.15 git-svn-id: svn://tug.org/texlive/trunk@39886 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/dvisvgm/dvisvgm-src/src/Subfont.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'Build/source/texk/dvisvgm/dvisvgm-src/src/Subfont.cpp') diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/Subfont.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/Subfont.cpp index 762ab8b65d7..8b125ac5ef9 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-src/src/Subfont.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/Subfont.cpp @@ -24,15 +24,16 @@ #include #include #include "FileFinder.h" -#include "Subfont.h" #include "Message.h" +#include "Subfont.h" + using namespace std; // helper functions static int skip_mapping_data (istream &is); -static bool scan_line (const char *line, int lineno, UInt16 *mapping, const string &fname, int &pos); +static bool scan_line (const char *line, int lineno, UInt16 *mapping, const string &fname, long &pos); /** Constructs a new SubfontDefinition object. @@ -105,7 +106,7 @@ Subfont* SubfontDefinition::subfont (const string &id) const { int SubfontDefinition::subfonts (vector &sfs) const { for (ConstIterator it=_subfonts.begin(); it != _subfonts.end(); ++it) sfs.push_back(it->second); - return sfs.size(); + return int(sfs.size()); } ////////////////////////////////////////////////////////////////////// @@ -153,7 +154,7 @@ bool Subfont::read () { // build mapping array _mapping = new UInt16[256]; memset(_mapping, 0, 256*sizeof(UInt16)); - int pos=0; + long pos=0; char buf[1024]; bool complete=false; while (!complete) { @@ -210,7 +211,7 @@ static int skip_mapping_data (istream &is) { * @param[in] fname name of the mapfile being scanned * @param[in,out] offset position/index of next mapping value * @return true if the line is the last one the current mapping sequence, i.e. the line doesn't end with a backslash */ -static bool scan_line (const char *line, int lineno, UInt16 *mapping, const string &fname, int &offset) { +static bool scan_line (const char *line, int lineno, UInt16 *mapping, const string &fname, long &offset) { const char *p=line; char *q; for (; *p && isspace(*p); p++); @@ -222,7 +223,7 @@ static bool scan_line (const char *line, int lineno, UInt16 *mapping, const stri } else { long val1 = strtol(p, &q, 0); // first value of range - long val2; // last value of range + long val2 = -1; // last value of range ostringstream oss; // output stream for exception messages switch (*q) { case ':': -- cgit v1.2.3