summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Build/source/texk/web2c/luatexdir/luafontloader/ChangeLog8
-rw-r--r--Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/splinefont.h2
-rw-r--r--Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/splinesaveafm.c2
-rw-r--r--Build/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c12
4 files changed, 18 insertions, 6 deletions
diff --git a/Build/source/texk/web2c/luatexdir/luafontloader/ChangeLog b/Build/source/texk/web2c/luatexdir/luafontloader/ChangeLog
index 59837dcef46..7b9b0c48c7d 100644
--- a/Build/source/texk/web2c/luatexdir/luafontloader/ChangeLog
+++ b/Build/source/texk/web2c/luatexdir/luafontloader/ChangeLog
@@ -1,3 +1,11 @@
+2015-10-08 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * fontforge/fontforge/splinefont.h.
+ fontforge/fontforge/splinesaveafm.c:
+ Declare arg2 of CheckAfmOfPostscript() as const.
+ * src/luafflib.c: Temporarily copy const strings instead of
+ casting them from 'const char *' to 'char *'.
+
2015-10-07 Peter Breitenlohner <peb@mppmu.mpg.de>
* src/ffdummies.h (new): Declare functions and variables.
diff --git a/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/splinefont.h b/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/splinefont.h
index ccee275e015..5c432cb7db8 100644
--- a/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/splinefont.h
+++ b/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/splinefont.h
@@ -1764,7 +1764,7 @@ extern char *strconcat3(const char *str, const char *str2, const char *str3);
extern char *XUIDFromFD(int xuid[20]);
extern SplineFont *SplineFontFromPSFont(struct fontdict *fd);
-extern int CheckAfmOfPostscript(SplineFont *sf,char *psname,EncMap *map);
+extern int CheckAfmOfPostscript(SplineFont *sf, const char *psname,EncMap *map);
extern int LoadKerningDataFromAmfm(SplineFont *sf, char *filename, EncMap *map);
extern int LoadKerningDataFromAfm(SplineFont *sf, char *filename, EncMap *map);
extern int LoadKerningDataFromTfm(SplineFont *sf, char *filename, EncMap *map);
diff --git a/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/splinesaveafm.c b/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/splinesaveafm.c
index 4607ee38819..781e9e26f09 100644
--- a/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/splinesaveafm.c
+++ b/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/splinesaveafm.c
@@ -228,7 +228,7 @@ return( 0 );
return( true );
}
-int CheckAfmOfPostscript(SplineFont *sf,char *psname, EncMap *map) {
+int CheckAfmOfPostscript(SplineFont *sf, const char *psname, EncMap *map) {
char *new, *pt;
int ret;
int wasuc=false;
diff --git a/Build/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c b/Build/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c
index 61a2e79349f..f932c3d9946 100644
--- a/Build/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c
+++ b/Build/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c
@@ -301,8 +301,9 @@ static int ff_apply_featurefile(lua_State * L)
SplineFont **sf;
char *fname;
sf = check_isfont(L, 1);
- fname = (char *) luaL_checkstring(L, 2);
+ fname = xstrdup(luaL_checkstring(L, 2));
SFApplyFeatureFilename(*sf, fname);
+ free(fname);
if (gww_error_count > 0) {
int i;
lua_newtable(L);
@@ -320,9 +321,9 @@ static int ff_apply_featurefile(lua_State * L)
static int ff_apply_afmfile(lua_State * L)
{
SplineFont **sf;
- char *fname;
+ const char *fname;
sf = check_isfont(L, 1);
- fname = (char *) luaL_checkstring(L, 2);
+ fname = luaL_checkstring(L, 2);
CheckAfmOfPostscript(*sf, fname, (*sf)->map);
if (gww_error_count > 0) {
int i;
@@ -3227,6 +3228,7 @@ static int ff_info(lua_State * L)
FILE *l;
int i;
const char *fontname;
+ char *fontnamecopy;
int openflags = 1;
fontname = luaL_checkstring(L, 1);
if (!strlen(fontname)) {
@@ -3247,7 +3249,9 @@ static int ff_info(lua_State * L)
}
gww_error_count = 0;
- sf = ReadSplineFontInfo((char *) fontname, openflags);
+ fontnamecopy = xstrdup(fontname);
+ sf = ReadSplineFontInfo(fontnamecopy, openflags);
+ free(fontnamecopy);
if (gww_error_count > 0)
gwwv_errors_free();