");
  for (index = 0; index < length; index++)
  {
    if (table[index].Line_type == '-')
      continue;
//    if (table[index].Line_type != 'N') printf("%c %s\n", table[index].Line_type, table[index].Text);
    if (table[index].Line_type == 'S')
      fprintf(f, "
");
    else if (table[index].Line_type == 'T' && !(index > 1 && table[index-2].Line_type == 'T'))
    {
      fprintf(f, "", hlevel);
      if (hlevel == 1 && page >= 4)
        Print_button(f, page-4);
    }
    if (table[index].Line_type == 'K')
    {
      char keytmp[90];
      snprintf(keytmp, sizeof(keytmp), "%s", Keyboard_default_shortcut(table[index].Line_parameter));
      fprintf(f, table[index].Text, keytmp);
    }
    else
    {
      const char * prefix = "";
      char * link = strstr(table[index].Text, "http://");
      if (link == NULL)
      {
        link = strstr(table[index].Text, "https://");
        if (link == NULL)
        {
          link = strstr(table[index].Text, "www.");
          prefix = "http://";
        }
      }
      if (link != NULL)
      {
        char * link_end = strchr(link, ' ');
        if (link_end == NULL)
        {
          link_end = strchr(link, ')');
          if (link_end == NULL)
            link_end = link + strlen(link);
        }
        fprintf(f, "%.*s", (int)(link - table[index].Text), table[index].Text);
        fprintf(f, "%.*s%s", prefix,
                (int)(link_end - link), link, (int)(link_end - link), link, link_end);
      }
      else
      {
        // print the string and escape < and > characters
        const char * text = table[index].Text;
        while (text[0] != '\0')
        {
          size_t i = strcspn(text, "<>");
          if (text[i] == '\0')
          { // no character to escape
            fprintf(f, "%s", text);
            break;
          }
          if (i > 0)
            fprintf(f, "%.*s", (int)i, text);
          switch(text[i])
          {
            case '<':
              fprintf(f, "<");
              break;
            case '>':
              fprintf(f, ">");
              break;
          }
          // continue with the remaining of the string
          text += i + 1;
        }
      }
    }
    if (table[index].Line_type == 'S')
      fprintf(f, "");
    else if (table[index].Line_type == 'T')
    {
      if (index < length-2 && table[index+2].Line_type == 'T')
        fprintf(f, "\n");
      else
      {
        fprintf(f, "", hlevel);
        if (hlevel == 1)
        {
          hlevel++;
          if (page >= 4 && page < NB_BUTTONS + 4 && Buttons[page-4].Tooltip != NULL)
            fprintf(f, "\n
%s", Buttons[page-4].Tooltip);
        }
      }
    }
    if (table[index].Line_type != 'T')
      fprintf(f, "\n");
    //  fprintf(f, "
\n");
  }
  fprintf(f, "
 ");
  fprintf(f, "\n");
  fprintf(f, "\n");
  return title;
}
///
/// Export the help to HTML files
static int Export_help(const char * path)
{
  FILE * f;
  FILE * findex;
  char * filename;
  size_t filename_size;
  unsigned int i;
  filename_size = strlen(path) + 64;
  filename = malloc(filename_size);
  if (filename == NULL)
  {
    fprintf(stderr, "Failed to allocate %lu bytes\n", (unsigned long)filename_size);
    return -1;
  }
  snprintf(filename, filename_size, "%s/index.html", path);
  //GFX2_Log(GFX2_INFO, "Creating %s\n", filename);
  findex = fopen(filename, "w");
  if (findex == NULL)
  {
    fprintf(stderr, "Cannot save index HTML file %s\n", filename);
    free(filename);
    return -1;
  }
  fprintf(findex, "\n");
  fprintf(findex, "\n");
  fprintf(findex, "\n");
  fprintf(findex, "