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

« back to all changes in this revision

Viewing changes to info/info-utils.h

  • 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
/* info-utils.h -- Exported functions and variables from info-utils.c.
2
 
   $Id: info-utils.h,v 1.5 1998/08/10 18:07:28 karl Exp $   
 
2
   $Id: info-utils.h,v 1.4 2004/04/11 17:56:45 karl Exp $   
3
3
 
4
 
   Copyright (C) 1993, 96, 98 Free Software Foundation, Inc.
 
4
   Copyright (C) 1993, 1996, 1998, 2002, 2003, 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
34
35
  char *filename;       /* File where this node can be found. */
35
36
  char *nodename;       /* Name of the node. */
36
37
  int start, end;       /* Offsets within the containing node of LABEL. */
 
38
  int line_number;      /* Specific line number a menu item points to.  */
37
39
} REFERENCE;
38
40
 
39
41
/* When non-zero, various display and input functions handle ISO Latin
53
55
   INFO_PARSED_FILENAME to NULL.  If second argument NEWLINES_OKAY is
54
56
   non-zero, it says to allow the nodename specification to cross a
55
57
   newline boundary (i.e., only `,', `.', or `TAB' can end the spec). */
56
 
void info_parse_node ();
 
58
void info_parse_node (char *string, int newlines_okay);
57
59
 
58
60
/* Return a NULL terminated array of REFERENCE * which represents the menu
59
61
   found in NODE.  If there is no menu in NODE, just return a NULL pointer. */
60
 
extern REFERENCE **info_menu_of_node ();
 
62
extern REFERENCE **info_menu_of_node (NODE *node);
61
63
 
62
64
/* Return a NULL terminated array of REFERENCE * which represents the cross
63
65
   refrences found in NODE.  If there are no cross references in NODE, just
64
66
   return a NULL pointer. */
65
 
extern REFERENCE **info_xrefs_of_node ();
 
67
extern REFERENCE **info_xrefs_of_node (NODE *node);
66
68
 
67
69
/* Glean cross references from BINDING->buffer + BINDING->start until
68
70
   BINDING->end.  Return an array of REFERENCE * that represents each
69
71
   cross reference in this range. */
70
 
extern REFERENCE **info_xrefs ();
 
72
extern REFERENCE **info_xrefs (SEARCH_BINDING *binding);
71
73
 
72
74
/* Get the entry associated with LABEL in REFERENCES.  Return a pointer to
73
75
   the reference if found, or NULL. */
74
 
extern REFERENCE *info_get_labeled_reference ();
 
76
extern REFERENCE *info_get_labeled_reference (char *label,
 
77
    REFERENCE **references);
75
78
 
76
79
/* Glean menu entries from BINDING->buffer + BINDING->start until we
77
80
   have looked at the entire contents of BINDING.  Return an array
78
81
   of REFERENCE * that represents each menu item in this range. */
79
 
extern REFERENCE **info_menu_items ();
 
82
extern REFERENCE **info_menu_items (SEARCH_BINDING *binding);
80
83
 
81
84
/* A utility function for concatenating REFERENCE **.  Returns a new
82
85
   REFERENCE ** which is the concatenation of REF1 and REF2.  The REF1
83
86
   and REF2 arrays are freed, but their contents are not. */
84
 
REFERENCE **info_concatenate_references ();
 
87
REFERENCE **info_concatenate_references (REFERENCE **ref1, REFERENCE **ref2);
 
88
 
 
89
/* Copy an existing reference into new memory.  */
 
90
extern REFERENCE *info_copy_reference (REFERENCE *src);
85
91
 
86
92
/* Free the data associated with REFERENCES. */
87
 
extern void info_free_references ();
 
93
extern void info_free_references (REFERENCE **references);
88
94
 
89
95
/* Search for sequences of whitespace or newlines in STRING, replacing
90
96
   all such sequences with just a single space.  Remove whitespace from
91
97
   start and end of string. */
92
 
void canonicalize_whitespace ();
 
98
void canonicalize_whitespace (char *string);
93
99
 
94
100
/* Return a pointer to a string which is the printed representation
95
101
   of CHARACTER if it were printed at HPOS. */
96
 
extern char *printed_representation ();
 
102
extern char *printed_representation (unsigned char character, int hpos);
97
103
 
98
104
/* Return a pointer to the part of PATHNAME that simply defines the file. */
99
 
extern char *filename_non_directory ();
 
105
extern char *filename_non_directory (char *pathname);
100
106
 
101
107
/* Return non-zero if NODE is one especially created by Info. */
102
 
extern int internal_info_node_p ();
 
108
extern int internal_info_node_p (NODE *node);
103
109
 
104
110
/* Make NODE appear to be one especially created by Info, and give it NAME. */
105
 
extern void name_internal_node ();
 
111
extern void name_internal_node (NODE *node, char *name);
106
112
 
107
113
/* Return the window displaying NAME, the name of an internally created
108
114
   Info window. */
109
 
extern WINDOW *get_internal_info_window ();
 
115
extern WINDOW *get_internal_info_window (char *name);
110
116
 
111
117
/* Return a window displaying the node NODE. */
112
 
extern WINDOW *get_window_of_node ();
 
118
extern WINDOW *get_window_of_node (NODE *node);
113
119
 
114
120
/* Return the node addressed by LABEL in NODE (usually one of "Prev:",
115
121
   "Next:", "Up:", "File:", or "Node:".  After a call to this function,
116
122
   the globals `info_parsed_nodename' and `info_parsed_filename' contain
117
123
   the information. */
118
 
extern void info_parse_label (/* label, node */);
 
124
extern void info_parse_label (char *label, NODE *node);
119
125
 
120
126
#define info_file_label_of_node(n) info_parse_label (INFO_FILE_LABEL, n)
121
127
#define info_next_label_of_node(n) info_parse_label (INFO_NEXT_LABEL, n)