+/*
+ * See if we can find a help file.
+ */
+static void find_help_file(frontend *fe)
+{
+ char b[2048], *p, *q, *r;
+ FILE *fp;
+ if (!fe->help_path) {
+ GetModuleFileName(NULL, b, sizeof(b) - 1);
+ r = b;
+ p = strrchr(b, '\\');
+ if (p && p >= r) r = p+1;
+ q = strrchr(b, ':');
+ if (q && q >= r) r = q+1;
+ strcpy(r, HELP_FILE_NAME);
+ if ( (fp = fopen(b, "r")) != NULL) {
+ fe->help_path = dupstr(b);
+ fclose(fp);
+ } else
+ fe->help_path = NULL;
+ strcpy(r, HELP_CNT_NAME);
+ if ( (fp = fopen(b, "r")) != NULL) {
+ fe->help_has_contents = TRUE;
+ fclose(fp);
+ } else
+ fe->help_has_contents = FALSE;
+ }
+}
+