1 /* The IGEN simulator generator for GDB, the GNU Debugger.
3 Copyright 2002-2024 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 3 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, see <http://www.gnu.org/licenses/>. */
28 /* LF: Line Numbered Output Stream */
30 typedef struct _lf lf
;
43 lf_include_references
,
49 /* Open the file NAME for writing ("-" for stdout). Use REAL_NAME
50 when referring to the opened file. Line number information (in the
51 output) can be suppressed with FILE_REFERENCES ==
52 LF_OMIT_REFERENCES. TYPE is to determine the formatting of some of
53 the print messages below. */
57 const char *real_name
,
58 lf_file_references file_references
,
59 lf_file_type type
, const char *program
);
61 extern lf_file_type
lf_get_file_type (const lf
*file
);
63 extern void lf_close (lf
*file
);
66 /* Basic output functions */
68 extern int lf_write (lf
*file
, const char *string
, int len
);
70 extern int lf_putchr (lf
*file
, const char ch
);
72 extern int lf_putstr (lf
*file
, const char *string
);
74 extern int lf_putint (lf
*file
, int decimal
);
76 extern int lf_putbin (lf
*file
, int decimal
, int width
);
79 (lf
*file
, const char *fmt
, ...) ATTRIBUTE_PRINTF (2, 3);
82 /* Indentation control.
84 lf_indent_suppress suppresses indentation on the next line (current
85 line if that has not yet been started) */
87 extern void lf_indent_suppress (lf
*file
);
89 extern void lf_indent (lf
*file
, int delta
);
92 /* Print generic text: */
95 extern int lf_print__gnu_copyleft (lf
*file
);
97 extern int lf_print__file_start (lf
*file
);
99 extern int lf_print__this_file_is_empty (lf
*file
, const char *reason
);
101 extern int lf_print__file_finish (lf
*file
);
103 extern int lf_print__internal_ref (lf
*file
);
105 extern int lf_print__external_ref
106 (lf
*file
, int line_nr
, const char *file_name
);
108 extern int lf_print__line_ref (lf
*file
, const line_ref
*line
);
110 extern int lf_print__ucase_filename (lf
*file
);
112 extern int lf_print__function_type
114 const char *type
, const char *prefix
, const char *trailing_space
);
116 typedef int print_function (lf
*file
);
118 extern int lf_print__function_type_function
120 print_function
* print_type
,
121 const char *prefix
, const char *trailing_space
);
123 #endif /* IGEN_LF_H */