Altered to reflect the changes in em_path.h.

Now dynamically concatenes EM_DIR and error path.
This commit is contained in:
keie 1984-10-04 10:42:13 +00:00
parent 42be23b631
commit 4c0687f68b

View file

@ -21,6 +21,7 @@
#include <pc_file.h> #include <pc_file.h>
#define MESLEN 30 #define MESLEN 30
#define PATHLEN 100
extern struct file *_curfil; extern struct file *_curfil;
@ -45,6 +46,7 @@ _catch(erno) unsigned erno; {
int fd; int fd;
char *pp[8]; char *pp[8];
char mes[MESLEN]; char mes[MESLEN];
char filename[PATHLEN];
char c; char c;
qq = pp; qq = pp;
@ -66,7 +68,12 @@ _catch(erno) unsigned erno; {
*qq++ = _curfil->fname; *qq++ = _curfil->fname;
*qq++ = ": "; *qq++ = ": ";
} }
if ((fd=open(RTERR_PATH,0))<0) if ( (i=strtobuf(EM_DIR,filename,PATHLEN)) >= PATHLEN-1 ||
(filename[i]='/' ,
strtobuf(RTERR_PATH,filename+i+1,PATHLEN-i-1) >= PATHLEN-i-1
) )
goto error;
if ((fd=open(filename,0))<0)
goto error; goto error;
/* skip to correct message */ /* skip to correct message */
for(i=0;i<erno;i++) for(i=0;i<erno;i++)