No longer truncate module names at 10 characters when constructing paths;

rename some library modules to their full names.
This commit is contained in:
David Given 2017-01-07 23:00:52 +01:00
parent d50a6f99de
commit 893471a42e
6 changed files with 3 additions and 6 deletions

View file

@ -113,6 +113,7 @@ cprogram {
"h+emheaders", "h+emheaders",
"modules+headers", "modules+headers",
"modules/src/alloc+lib", "modules/src/alloc+lib",
"modules/src/data+lib",
"modules/src/em_code+lib_k", "modules/src/em_code+lib_k",
"modules/src/em_data+lib", "modules/src/em_data+lib",
"modules/src/em_mes+lib", "modules/src/em_mes+lib",

View file

@ -17,6 +17,7 @@
#include <em_arith.h> #include <em_arith.h>
#include <em_label.h> #include <em_label.h>
#include <stdlib.h> #include <stdlib.h>
#include <astring.h>
#include "LLlex.h" #include "LLlex.h"
#include "Lpars.h" #include "Lpars.h"
@ -64,12 +65,7 @@ GetFile(name) char* name;
/* Try to find a file with basename "name" and extension ".def", /* Try to find a file with basename "name" and extension ".def",
in the directories mentioned in "DEFPATH". in the directories mentioned in "DEFPATH".
*/ */
char buf[15]; char* buf = aprintf("%s.def", name);
char *strncpy(), *strcat();
strncpy(buf, name, 10);
buf[10] = '\0'; /* maximum length */
strcat(buf, ".def");
DEFPATH[0] = WorkingDir; DEFPATH[0] = WorkingDir;
if (!InsertFile(buf, DEFPATH, &(FileName))) if (!InsertFile(buf, DEFPATH, &(FileName)))
{ {