From a7e242f9e450219a3e8583cef45a1b3a0fab089f Mon Sep 17 00:00:00 2001 From: Bradley Bell Date: Fri, 19 Apr 2002 21:26:30 +0000 Subject: [PATCH] better error message when hog not found --- main/text.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/main/text.c b/main/text.c index aac91b5f..1a326629 100644 --- a/main/text.c +++ b/main/text.c @@ -16,7 +16,7 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #endif #ifdef RCS -static char rcsid[] = "$Id: text.c,v 1.3 2001-01-31 15:17:59 bradleyb Exp $"; +static char rcsid[] = "$Id: text.c,v 1.4 2002-04-19 21:26:30 bradleyb Exp $"; #endif #include @@ -66,6 +66,7 @@ void decode_text_line(char *p) } } +#include //load all the text strings for Descent void load_text() { @@ -80,8 +81,11 @@ void load_text() if ((tfile = cfopen(filename,"rb")) == NULL) { filename="descent.txb"; - if ((ifile = cfopen(filename, "rb")) == NULL) - Error("Cannot open file DESCENT.TEX or DESCENT.TXB\nIs descent2.hog in your current directory?"); + if ((ifile = cfopen(filename, "rb")) == NULL) { + char cwd[_MAX_PATH]; + getcwd(cwd, _MAX_PATH); + Error("Cannot open file DESCENT.TEX or DESCENT.TXB\nIs descent2.hog in %s?", AltHogdir_initialized?AltHogDir:cwd); + } have_binary = 1; len = cfilelength(ifile); -- 2.39.2