RIP gzip, we found a nicer playmate.
[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  * $DragonFly: src/gnu/usr.bin/as/Attic/listing.h,v 1.2 2003/06/17 04:25:44 dillon Exp $
23  */
24
25 #ifndef __listing_h__
26 #define __listing_h__
27
28 #define LISTING_LISTING    1
29 #define LISTING_SYMBOLS    2
30 #define LISTING_NOFORM     4
31 #define LISTING_HLL        8
32 #define LISTING_NODEBUG   16
33
34 #define LISTING_DEFAULT    (LISTING_LISTING | LISTING_HLL |  LISTING_SYMBOLS)
35
36 #ifndef NO_LISTING
37 #define LISTING_NEWLINE() { if (listing) listing_newline(input_line_pointer); }
38 #else
39 #define LISTING_NEWLINE() {;}
40 #endif
41
42
43 /* This structure remembers which .s were used */
44 typedef struct file_info_struct
45 {
46   char *filename;
47   int linenum;
48   FILE *file;
49   struct file_info_struct *next;
50   int end_pending;
51
52 }
53
54 file_info_type;
55
56
57 /* this structure rememebrs which line from which file goes into which
58    frag */
59 typedef struct list_info_struct
60 {
61   /* Frag which this line of source is nearest to */
62   fragS *frag;
63   /* The actual line in the source file */
64   unsigned int line;
65   /* Pointer to the file info struct for the file which this line
66      belongs to */
67   file_info_type *file;
68
69   /* Next in list */
70   struct list_info_struct *next;
71
72
73   /* Pointer to the file info struct for the high level language
74      source line that belongs here */
75   file_info_type *hll_file;
76
77   /* High level language source line */
78   int hll_line;
79
80
81   /* Pointer to any error message associated with this line */
82   char *message;
83
84   enum
85     {
86       EDICT_NONE,
87       EDICT_SBTTL,
88       EDICT_TITLE,
89       EDICT_NOLIST,
90       EDICT_LIST,
91       EDICT_EJECT
92     } edict;
93   char *edict_arg;
94
95 }
96
97 list_info_type;
98
99 void listing_eject PARAMS ((int));
100 void listing_error PARAMS ((const char *message));
101 void listing_file PARAMS ((const char *name));
102 void listing_flags PARAMS ((int));
103 void listing_list PARAMS ((int on));
104 void listing_newline PARAMS ((char *ps));
105 void listing_prev_line PARAMS ((void));
106 void listing_print PARAMS ((char *name));
107 void listing_psize PARAMS ((int));
108 void listing_source_file PARAMS ((const char *));
109 void listing_source_line PARAMS ((unsigned int));
110 void listing_title PARAMS ((int depth));
111 void listing_warning PARAMS ((const char *message));
112 void listing_width PARAMS ((unsigned int x));
113
114 #endif /* __listing_h__ */
115
116 /* end of listing.h */