This fixes a bug where HELPFILE was being overridden by a hard coded path This also fixes an issue with fl_filename_absolute returning a relative path preventing fteapot from finding its helpfile when started from any directory except / Patch by Kevin McCarthy --- fteapot.fl +++ fteapot.fl @@ -8,6 +8,9 @@ decl {\#include "misc.h"} {private global } +decl {\#include "config.h"} {private global +} + decl {\#include } {private global } @@ -781,8 +784,8 @@ Function {find_helpfile(char *buf, int size, const char *argv0)} {open C return_type void } { - code {fl_filename_absolute(buf, size, argv0); + code {strncpy(buf, argv0, size); char *p = (char *)fl_filename_name(buf); -strncpy(p, "../share/doc/teapot/html/index.html", buf+size-p); +strncpy(p, HELPFILE, buf+size-p); buf[size-1] = 0;} {} }