diff options
Diffstat (limited to 'app-office/teapot/files/teapot-2.2.0-helpfile.patch')
-rw-r--r-- | app-office/teapot/files/teapot-2.2.0-helpfile.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/app-office/teapot/files/teapot-2.2.0-helpfile.patch b/app-office/teapot/files/teapot-2.2.0-helpfile.patch new file mode 100644 index 000000000000..751e68119350 --- /dev/null +++ b/app-office/teapot/files/teapot-2.2.0-helpfile.patch @@ -0,0 +1,31 @@ +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 <signals42@gmail.com> + +--- fteapot.fl ++++ fteapot.fl +@@ -8,6 +8,9 @@ + decl {\#include "misc.h"} {private global + } + ++decl {\#include "config.h"} {private global ++} ++ + decl {\#include <stdint.h>} {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;} {} + } |