~ubuntu-branches/ubuntu/maverick/texinfo/maverick

« back to all changes in this revision

Viewing changes to info/footnotes.c

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Preining
  • Date: 2005-10-28 15:10:30 UTC
  • mto: (2.1.1 dapper) (3.1.4 hardy)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20051028151030-9nsf2s2k2z3fktjt
Tags: upstream-4.8
ImportĀ upstreamĀ versionĀ 4.8

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* footnotes.c -- Some functions for manipulating footnotes.
2
 
   $Id: footnotes.c,v 1.9 1999/09/25 16:10:04 karl Exp $
 
2
   $Id: footnotes.c,v 1.4 2004/04/11 17:56:45 karl Exp $
3
3
 
4
 
   Copyright (C) 1993, 97, 98, 99 Free Software Foundation, Inc.
 
4
   Copyright (C) 1993, 1997, 1998, 1999, 2002, 2004 Free Software
 
5
   Foundation, Inc.
5
6
 
6
7
   This program is free software; you can redistribute it and/or modify
7
8
   it under the terms of the GNU General Public License as published by
17
18
   along with this program; if not, write to the Free Software
18
19
   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19
20
 
20
 
   Written by Brian Fox (bfox@ai.mit.edu). */
 
21
   Originally written by Brian Fox (bfox@ai.mit.edu). */
21
22
 
22
23
#include "info.h"
23
24
 
24
 
/* Non-zero means attempt to show footnotes when displaying a new window. */
25
 
int auto_footnotes_p = 1;
 
25
/* Nonzero means attempt to show footnotes when displaying a new window. */
 
26
int auto_footnotes_p = 0;
26
27
 
27
28
static char *footnote_nodename = "*Footnotes*";
28
29
 
 
30
NODE * make_footnotes_node (NODE *node);
 
31
 
29
32
#define FOOTNOTE_HEADER_FORMAT \
30
 
   "*** Footnotes appearing in the node \"%s\" ***\n"
 
33
   "*** Footnotes appearing in the node `%s' ***\n"
31
34
 
32
35
/* Find the window currently showing footnotes. */
33
36
static WINDOW *
34
 
find_footnotes_window ()
 
37
find_footnotes_window (void)
35
38
{
36
39
  WINDOW *win;
37
40
 
48
51
   return the manufactured node.  If NODE has no footnotes, return a 
49
52
   NULL pointer. */
50
53
NODE *
51
 
make_footnotes_node (node)
52
 
     NODE *node;
 
54
make_footnotes_node (NODE *node)
53
55
{
54
56
  NODE *fn_node, *result = (NODE *)NULL;
55
57
  long fn_start;
160
162
   in WINDOW's node.  Returns FN_UNABLE if there were footnotes, but the
161
163
   window to show them couldn't be made. */
162
164
int
163
 
info_get_or_remove_footnotes (window)
164
 
     WINDOW *window;
 
165
info_get_or_remove_footnotes (WINDOW *window)
165
166
{
166
167
  WINDOW *fn_win;
167
168
  NODE *new_footnotes;
209
210
          /* If we are hacking automatic footnotes, and there are footnotes
210
211
             but we couldn't display them, print a message to that effect. */
211
212
          if (auto_footnotes_p)
212
 
            inform_in_echo_area (_("Footnotes could not be displayed"));
 
213
            inform_in_echo_area ((char *) _("Footnotes could not be displayed"));
213
214
          return (FN_UNABLE);
214
215
        }
215
216
    }
256
257
      switch (result)
257
258
        {
258
259
        case FN_UNFOUND:
259
 
          info_error (msg_no_foot_node);
 
260
          info_error ((char *) msg_no_foot_node, NULL, NULL);
260
261
          break;
261
262
 
262
263
        case FN_UNABLE:
263
 
          info_error (msg_win_too_small);
 
264
          info_error ((char *) msg_win_too_small, NULL, NULL);
264
265
          break;
265
266
        }
266
267
    }