diff --git a/lang/m2/comp/build.lua b/lang/m2/comp/build.lua index 95c4a30d7..4e12d24f7 100644 --- a/lang/m2/comp/build.lua +++ b/lang/m2/comp/build.lua @@ -113,6 +113,7 @@ cprogram { "h+emheaders", "modules+headers", "modules/src/alloc+lib", + "modules/src/data+lib", "modules/src/em_code+lib_k", "modules/src/em_data+lib", "modules/src/em_mes+lib", diff --git a/lang/m2/comp/defmodule.c b/lang/m2/comp/defmodule.c index a164c1939..0ecb1dd2a 100644 --- a/lang/m2/comp/defmodule.c +++ b/lang/m2/comp/defmodule.c @@ -17,6 +17,7 @@ #include #include #include +#include #include "LLlex.h" #include "Lpars.h" @@ -64,12 +65,7 @@ GetFile(name) char* name; /* Try to find a file with basename "name" and extension ".def", in the directories mentioned in "DEFPATH". */ - char buf[15]; - char *strncpy(), *strcat(); - - strncpy(buf, name, 10); - buf[10] = '\0'; /* maximum length */ - strcat(buf, ".def"); + char* buf = aprintf("%s.def", name); DEFPATH[0] = WorkingDir; if (!InsertFile(buf, DEFPATH, &(FileName))) { diff --git a/lang/m2/libm2/Conversion.def b/lang/m2/libm2/Conversions.def similarity index 100% rename from lang/m2/libm2/Conversion.def rename to lang/m2/libm2/Conversions.def diff --git a/lang/m2/libm2/Conversion.mod b/lang/m2/libm2/Conversions.mod similarity index 100% rename from lang/m2/libm2/Conversion.mod rename to lang/m2/libm2/Conversions.mod diff --git a/lang/m2/libm2/RealConver.def b/lang/m2/libm2/RealConversions.def similarity index 100% rename from lang/m2/libm2/RealConver.def rename to lang/m2/libm2/RealConversions.def diff --git a/lang/m2/libm2/RealConver.mod b/lang/m2/libm2/RealConversions.mod similarity index 100% rename from lang/m2/libm2/RealConver.mod rename to lang/m2/libm2/RealConversions.mod