From b1712321e2b2ec21b174f51be9444278491b74b3 Mon Sep 17 00:00:00 2001 From: ceriel Date: Fri, 19 Aug 1988 13:26:27 +0000 Subject: [PATCH] made easier to patch --- lang/pc/libpc/catch.c | 4 +++- util/LLgen/src/machdep.c | 7 +++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lang/pc/libpc/catch.c b/lang/pc/libpc/catch.c index cf72a312c..663be2ef7 100644 --- a/lang/pc/libpc/catch.c +++ b/lang/pc/libpc/catch.c @@ -23,6 +23,8 @@ #define MESLEN 30 #define PATHLEN 100 +/* to make it easier to patch ... */ +char emdir[64] = EM_DIR; extern struct file *_curfil; extern int _pargc; @@ -68,7 +70,7 @@ _catch(erno) unsigned erno; { *qq++ = _curfil->fname; *qq++ = ": "; } - if ( (i=strtobuf(EM_DIR,filename,PATHLEN)) >= PATHLEN-1 || + if ( (i=strtobuf(emdir,filename,PATHLEN)) >= PATHLEN-1 || (filename[i]='/' , strtobuf(RTERR_PATH,filename+i+1,PATHLEN-i-1) >= PATHLEN-i-1 ) ) diff --git a/util/LLgen/src/machdep.c b/util/LLgen/src/machdep.c index 73bbd24cd..fc1980ec5 100644 --- a/util/LLgen/src/machdep.c +++ b/util/LLgen/src/machdep.c @@ -42,6 +42,9 @@ RENAME(x,y) string x,y; { if(! sys_rename(x,y)) fatal(1,"Cannot rename to %s",y); } +/* to make it easier to patch ... */ +char emdir[64] = EM_DIR; + string libpath(s) string s; { /* Must deliver a full pathname to the library file "s" */ @@ -52,9 +55,9 @@ libpath(s) string s; { string strcpy(), strcat(); static string subdir = "/lib/LLgen/"; - length = strlen(EM_DIR) + strlen(subdir) + strlen(s) + 1; + length = strlen(emdir) + strlen(subdir) + strlen(s) + 1; p = (string) alloc((unsigned) length); - strcpy(p,EM_DIR); + strcpy(p,emdir); strcat(p,subdir); strcat(p,s); return p;