]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - sim/igen/lf.h
Update years in copyright notice for the GDB files.
[thirdparty/binutils-gdb.git] / sim / igen / lf.h
CommitLineData
feaee4bd
AC
1/* The IGEN simulator generator for GDB, the GNU Debugger.
2
8acc9f48 3 Copyright 2002-2013 Free Software Foundation, Inc.
feaee4bd
AC
4
5 Contributed by Andrew Cagney.
6
7 This file is part of GDB.
8
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
4744ac1b 11 the Free Software Foundation; either version 3 of the License, or
feaee4bd
AC
12 (at your option) any later version.
13
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.
18
19 You should have received a copy of the GNU General Public License
4744ac1b 20 along with this program. If not, see <http://www.gnu.org/licenses/>. */
feaee4bd 21
c906108c
SS
22
23
24/* LF: Line Numbered Output Stream */
25
26typedef struct _lf lf;
27
4e0bf4c4
AC
28typedef enum
29{
c906108c
SS
30 lf_is_h,
31 lf_is_c,
32 lf_is_text,
4e0bf4c4
AC
33}
34lf_file_type;
c906108c
SS
35
36
4e0bf4c4
AC
37typedef enum
38{
c906108c
SS
39 lf_include_references,
40 lf_omit_references,
4e0bf4c4
AC
41}
42lf_file_references;
c906108c
SS
43
44
45/* Open the file NAME for writing ("-" for stdout). Use REAL_NAME
46 when refering to the opened file. Line number information (in the
47 output) can be suppressed with FILE_REFERENCES ==
48 LF_OMIT_REFERENCES. TYPE is to determine the formatting of some of
49 the print messages below. */
50
51extern lf *lf_open
4e0bf4c4
AC
52 (char *name,
53 char *real_name,
54 lf_file_references file_references,
55 lf_file_type type, const char *program);
c906108c 56
4e0bf4c4 57extern void lf_close (lf *file);
c906108c
SS
58
59
60/* Basic output functions */
61
4e0bf4c4 62extern int lf_write (lf *file, const char *string, int len);
c906108c 63
4e0bf4c4 64extern int lf_putchr (lf *file, const char ch);
c906108c 65
4e0bf4c4 66extern int lf_putstr (lf *file, const char *string);
c906108c 67
4e0bf4c4 68extern int lf_putint (lf *file, int decimal);
c906108c 69
4e0bf4c4 70extern int lf_putbin (lf *file, int decimal, int width);
c906108c
SS
71
72extern int lf_printf
4e0bf4c4 73 (lf *file, const char *fmt, ...) __attribute__ ((format (printf, 2, 3)));
c906108c
SS
74
75
76/* Indentation control.
77
78 lf_indent_suppress suppresses indentation on the next line (current
79 line if that has not yet been started) */
80
4e0bf4c4 81extern void lf_indent_suppress (lf *file);
c906108c 82
4e0bf4c4 83extern void lf_indent (lf *file, int delta);
c906108c
SS
84
85
86/* Print generic text: */
87
88
4e0bf4c4 89extern int lf_print__gnu_copyleft (lf *file);
c906108c 90
4e0bf4c4 91extern int lf_print__file_start (lf *file);
c906108c 92
4e0bf4c4 93extern int lf_print__this_file_is_empty (lf *file, const char *reason);
c906108c 94
4e0bf4c4 95extern int lf_print__file_finish (lf *file);
c906108c 96
4e0bf4c4 97extern int lf_print__internal_ref (lf *file);
c906108c
SS
98
99extern int lf_print__external_ref
4e0bf4c4 100 (lf *file, int line_nr, const char *file_name);
c906108c 101
4e0bf4c4 102extern int lf_print__line_ref (lf *file, line_ref *line);
c906108c 103
4e0bf4c4 104extern int lf_print__ucase_filename (lf *file);
c906108c
SS
105
106extern int lf_print__function_type
4e0bf4c4
AC
107 (lf *file,
108 const char *type, const char *prefix, const char *trailing_space);
c906108c 109
4e0bf4c4 110typedef int print_function (lf *file);
c906108c
SS
111
112extern int lf_print__function_type_function
4e0bf4c4
AC
113 (lf *file,
114 print_function * print_type,
115 const char *prefix, const char *trailing_space);