1 /*****************************************************************************/
5 /* A span of data within a segment */
9 /* (C) 2011, Ullrich von Bassewitz */
10 /* Roemerstrasse 52 */
11 /* D-70794 Filderstadt */
12 /* EMail: uz@cc65.org */
15 /* This software is provided 'as-is', without any expressed or implied */
16 /* warranty. In no event will the authors be held liable for any damages */
17 /* arising from the use of this software. */
19 /* Permission is granted to anyone to use this software for any purpose, */
20 /* including commercial applications, and to alter it and redistribute it */
21 /* freely, subject to the following restrictions: */
23 /* 1. The origin of this software must not be misrepresented; you must not */
24 /* claim that you wrote the original software. If you use this software */
25 /* in a product, an acknowledgment in the product documentation would be */
26 /* appreciated but is not required. */
27 /* 2. Altered source versions must be plainly marked as such, and must not */
28 /* be misrepresented as being the original software. */
29 /* 3. This notice may not be removed or altered from any source */
32 /*****************************************************************************/
48 /*****************************************************************************/
50 /*****************************************************************************/
59 /*****************************************************************************/
61 /*****************************************************************************/
65 /* Span is an opaque type */
66 typedef struct Span Span;
70 /*****************************************************************************/
72 /*****************************************************************************/
76 Span* ReadSpan (FILE* F, struct ObjData* O, unsigned Id);
77 /* Read a Span from a file and return it */
79 unsigned* ReadSpanList (FILE* F);
80 /* Read a list of span ids from a file. The list is returned as an array of
81 * unsigneds, the first being the number of spans (never zero) followed by
82 * the span ids. If the number of spans is zero, NULL is returned.
85 void FreeSpan (Span* S);
86 /* Free a span structure */
88 unsigned SpanCount (void);
89 /* Return the total number of spans */
91 void PrintDbgSpanList (FILE* F, const struct ObjData* O, const unsigned* List);
92 /* Output a string ",span=x[+y...]" for the given list. If the list is empty
93 * or NULL, output nothing. This is a helper function for other modules to
94 * print a list of spans read by ReadSpanList to the debug info file.
97 void PrintDbgSpans (FILE* F);
98 /* Output the spans to a debug info file */