qepcad-B/qepcad-B-env.patch

12 lines
586 B
Diff
Raw Normal View History

2014-02-14 19:17:12 +00:00
--- ./source/main/BEGINQEPCAD.c.orig 2012-03-16 06:49:30.000000000 -0600
+++ ./source/main/BEGINQEPCAD.c 2013-07-18 16:57:34.694879193 -0600
@@ -98,7 +98,7 @@ void BEGINQEPCAD(int &argc, char**& argv
void QEPCAD_ProcessRC(int argc, char **argv)
{
char *qepath = getenv("qe");
- if (qepath == NULL) { FAIL("QEPCAD_ProcessRC","Environment variable qe not defined!"); }
+ if (qepath == NULL) { setenv("qe", "/usr/share/qepcad", 1); qepath = getenv("qe"); }
string rcFileName = qepath + string("/default.qepcadrc");
ifstream rcin(rcFileName.c_str());
if (!rcin) { return; }