From: Karl H. K. <kh...@kh...> - 2000-02-27 15:04:36
|
There is a bug in the current version of unprint.c: When the UNPRINT environment variable is not defined the software runs into a segfault. Apply this patch and it will work: diff -u -r1.36 unprint.c --- unprint.c 2000/02/24 13:28:23 1.36 +++ unprint.c 2000/02/27 14:54:17 @@ -1112,7 +1112,7 @@ pstate.nozzles=3D96; UNPRINT=3D getenv("UNPRINT"); - if (!strcmp(UNPRINT,"canon")) { + if (UNPRINT !=3D NULL && !strcmp(UNPRINT,"canon")) { pstate.extraskip=3D1; parse_canon(fp_r); } else {=20 This is a very common problem: strcmp() can not handle NULL pointers. I usually check all environement variables that a program uses during startup and set char * variables that I=20 then use. This makes sure that all variables are initialized to at least an empty string. Karl Heinz --=20 Karl Heinz Kremer kh...@kh... http://www.khk.net |