Back to index

tetex-bin  3.0
Defines | Functions | Variables
footnotes.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


#define FOOTNOTE_LABEL   N_("---------- Footnotes ----------")
#define FN_FOUND   0
#define FN_UNFOUND   1
#define FN_UNABLE   2


int info_get_or_remove_footnotes (WINDOW *window)


int auto_footnotes_p

Define Documentation

#define FN_FOUND   0

Definition at line 28 of file footnotes.h.

#define FN_UNABLE   2

Definition at line 30 of file footnotes.h.

#define FN_UNFOUND   1

Definition at line 29 of file footnotes.h.

#define FOOTNOTE_LABEL   N_("---------- Footnotes ----------")

Definition at line 26 of file footnotes.h.

Function Documentation

Definition at line 165 of file footnotes.c.

  WINDOW *fn_win;
  NODE *new_footnotes;

  fn_win = find_footnotes_window ();

  /* If we are in the footnotes window, change nothing. */
  if (fn_win == window)
    return (FN_FOUND);

  /* Try to find footnotes for this window's node. */
  new_footnotes = make_footnotes_node (window->node);

  /* If there was a window showing footnotes, and there are no footnotes
     for the current window, delete the old footnote window. */
  if (fn_win && !new_footnotes)
      if (windows->next)
        info_delete_window_internal (fn_win);

  /* If there are footnotes for this window's node, but no window around
     showing footnotes, try to make a new window. */
  if (new_footnotes && !fn_win)
      WINDOW *old_active;
      WINDOW *last, *win;

      /* Always make this window be the last one appearing in the list.  Find
         the last window in the chain. */
      for (win = windows, last = windows; win; last = win, win = win->next);

      /* Try to split this window, and make the split window the one to
         contain the footnotes. */
      old_active = active_window;
      active_window = last;
      fn_win = window_make_window (new_footnotes);
      active_window = old_active;

      if (!fn_win)
          free (new_footnotes->contents);
          free (new_footnotes);

          /* If we are hacking automatic footnotes, and there are footnotes
             but we couldn't display them, print a message to that effect. */
          if (auto_footnotes_p)
            inform_in_echo_area ((char *) _("Footnotes could not be displayed"));
          return (FN_UNABLE);

  /* If there are footnotes, and there is a window to display them,
     make that window be the number of lines appearing in the footnotes. */
  if (new_footnotes && fn_win)
      window_set_node_of_window (fn_win, new_footnotes);

        (fn_win, fn_win->line_count - fn_win->height);

      remember_window_and_node (fn_win, new_footnotes);
      add_gcable_pointer (new_footnotes->contents);

  if (!new_footnotes)
    return (FN_UNFOUND);
    return (FN_FOUND);

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

Definition at line 26 of file footnotes.c.