1 /* The IGEN simulator generator for GDB, the GNU Debugger.
3 Copyright 2002, 2007 Free Software Foundation, Inc.
5 Contributed by Andrew Cagney.
7 This file is part of GDB.
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 59 Temple Place - Suite 330,
22 Boston, MA 02111-1307, USA. */
26 /* LF: Line Numbered Output Stream */
28 typedef struct _lf lf;
41 lf_include_references,
47 /* Open the file NAME for writing ("-" for stdout). Use REAL_NAME
48 when refering to the opened file. Line number information (in the
49 output) can be suppressed with FILE_REFERENCES ==
50 LF_OMIT_REFERENCES. TYPE is to determine the formatting of some of
51 the print messages below. */
56 lf_file_references file_references,
57 lf_file_type type, const char *program);
59 extern void lf_close (lf *file);
62 /* Basic output functions */
64 extern int lf_write (lf *file, const char *string, int len);
66 extern int lf_putchr (lf *file, const char ch);
68 extern int lf_putstr (lf *file, const char *string);
70 extern int lf_putint (lf *file, int decimal);
72 extern int lf_putbin (lf *file, int decimal, int width);
75 (lf *file, const char *fmt, ...) __attribute__ ((format (printf, 2, 3)));
78 /* Indentation control.
80 lf_indent_suppress suppresses indentation on the next line (current
81 line if that has not yet been started) */
83 extern void lf_indent_suppress (lf *file);
85 extern void lf_indent (lf *file, int delta);
88 /* Print generic text: */
91 extern int lf_print__gnu_copyleft (lf *file);
93 extern int lf_print__file_start (lf *file);
95 extern int lf_print__this_file_is_empty (lf *file, const char *reason);
97 extern int lf_print__file_finish (lf *file);
99 extern int lf_print__internal_ref (lf *file);
101 extern int lf_print__external_ref
102 (lf *file, int line_nr, const char *file_name);
104 extern int lf_print__line_ref (lf *file, line_ref *line);
106 extern int lf_print__ucase_filename (lf *file);
108 extern int lf_print__function_type
110 const char *type, const char *prefix, const char *trailing_space);
112 typedef int print_function (lf *file);
114 extern int lf_print__function_type_function
116 print_function * print_type,
117 const char *prefix, const char *trailing_space);