Initial import from FreeBSD RELENG_4:
[dragonfly.git] / gnu / usr.bin / as / listing.h
1 /* This file is listing.h
2    Copyright (C) 1987, 1988, 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
3
4    This file is part of GAS, the GNU Assembler.
5
6    GAS is free software; you can redistribute it and/or modify
7    it under the terms of the GNU General Public License as published by
8    the Free Software Foundation; either version 2, or (at your option)
9    any later version.
10
11    GAS is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14    GNU General Public License for more details.
15
16    You should have received a copy of the GNU General Public License
17    along with GAS; see the file COPYING.  If not, write to
18    the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
19
20 /*
21  * $FreeBSD: src/gnu/usr.bin/as/listing.h,v 1.5 1999/08/27 23:34:18 peter Exp $
22  */
23
24 #ifndef __listing_h__
25 #define __listing_h__
26
27 #define LISTING_LISTING    1
28 #define LISTING_SYMBOLS    2
29 #define LISTING_NOFORM     4
30 #define LISTING_HLL        8
31 #define LISTING_NODEBUG   16
32
33 #define LISTING_DEFAULT    (LISTING_LISTING | LISTING_HLL |  LISTING_SYMBOLS)
34
35 #ifndef NO_LISTING
36 #define LISTING_NEWLINE() { if (listing) listing_newline(input_line_pointer); }
37 #else
38 #define LISTING_NEWLINE() {;}
39 #endif
40
41
42 /* This structure remembers which .s were used */
43 typedef struct file_info_struct
44 {
45   char *filename;
46   int linenum;
47   FILE *file;
48   struct file_info_struct *next;
49   int end_pending;
50
51 }
52
53 file_info_type;
54
55
56 /* this structure rememebrs which line from which file goes into which
57    frag */
58 typedef struct list_info_struct
59 {
60   /* Frag which this line of source is nearest to */
61   fragS *frag;
62   /* The actual line in the source file */
63   unsigned int line;
64   /* Pointer to the file info struct for the file which this line
65      belongs to */
66   file_info_type *file;
67
68   /* Next in list */
69   struct list_info_struct *next;
70
71
72   /* Pointer to the file info struct for the high level language
73      source line that belongs here */
74   file_info_type *hll_file;
75
76   /* High level language source line */
77   int hll_line;
78
79
80   /* Pointer to any error message associated with this line */
81   char *message;
82
83   enum
84     {
85       EDICT_NONE,
86       EDICT_SBTTL,
87       EDICT_TITLE,
88       EDICT_NOLIST,
89       EDICT_LIST,
90       EDICT_EJECT
91     } edict;
92   char *edict_arg;
93
94 }
95
96 list_info_type;
97
98 void listing_eject PARAMS ((int));
99 void listing_error PARAMS ((const char *message));
100 void listing_file PARAMS ((const char *name));
101 void listing_flags PARAMS ((int));
102 void listing_list PARAMS ((int on));
103 void listing_newline PARAMS ((char *ps));
104 void listing_prev_line PARAMS ((void));
105 void listing_print PARAMS ((char *name));
106 void listing_psize PARAMS ((int));
107 void listing_source_file PARAMS ((const char *));
108 void listing_source_line PARAMS ((unsigned int));
109 void listing_title PARAMS ((int depth));
110 void listing_warning PARAMS ((const char *message));
111 void listing_width PARAMS ((unsigned int x));
112
113 #endif /* __listing_h__ */
114
115 /* end of listing.h */