mirror of
https://github.com/cc65/cc65.git
synced 2024-09-29 17:56:21 +00:00
b8549f0af8
list as before. git-svn-id: svn://svn.cc65.org/cc65/trunk@5162 b7a2c559-68d2-44c3-8de9-860c34a00d81
112 lines
4.5 KiB
C
112 lines
4.5 KiB
C
/*****************************************************************************/
|
|
/* */
|
|
/* lineinfo.h */
|
|
/* */
|
|
/* Source file line info management */
|
|
/* */
|
|
/* */
|
|
/* */
|
|
/* (C) 2001-2011, Ullrich von Bassewitz */
|
|
/* Roemerstrasse 52 */
|
|
/* 70794 Filderstadt */
|
|
/* EMail: uz@cc65.org */
|
|
/* */
|
|
/* */
|
|
/* This software is provided 'as-is', without any expressed or implied */
|
|
/* warranty. In no event will the authors be held liable for any damages */
|
|
/* arising from the use of this software. */
|
|
/* */
|
|
/* Permission is granted to anyone to use this software for any purpose, */
|
|
/* including commercial applications, and to alter it and redistribute it */
|
|
/* freely, subject to the following restrictions: */
|
|
/* */
|
|
/* 1. The origin of this software must not be misrepresented; you must not */
|
|
/* claim that you wrote the original software. If you use this software */
|
|
/* in a product, an acknowledgment in the product documentation would be */
|
|
/* appreciated but is not required. */
|
|
/* 2. Altered source versions must be plainly marked as such, and must not */
|
|
/* be misrepresented as being the original software. */
|
|
/* 3. This notice may not be removed or altered from any source */
|
|
/* distribution. */
|
|
/* */
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
#ifndef LINEINFO_H
|
|
#define LINEINFO_H
|
|
|
|
|
|
|
|
/* common */
|
|
#include "coll.h"
|
|
#include "filepos.h"
|
|
#include "hashtab.h"
|
|
#include "lidefs.h"
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
/* Data */
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
/* Opaque structure used to handle line information */
|
|
typedef struct LineInfo LineInfo;
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
/* Code */
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
void InitLineInfo (void);
|
|
/* Initialize the line infos */
|
|
|
|
void DoneLineInfo (void);
|
|
/* Close down line infos */
|
|
|
|
void EndLine (LineInfo* LI);
|
|
/* End a line that is tracked by the given LineInfo structure */
|
|
|
|
LineInfo* StartLine (const FilePos* Pos, unsigned Type, unsigned Count);
|
|
/* Start line info for a new line */
|
|
|
|
void NewAsmLine (void);
|
|
/* Start a new assembler input line. Use this function when generating new
|
|
* line of LI_TYPE_ASM. It will check if line and/or file have actually
|
|
* changed, end the old and start the new line as necessary.
|
|
*/
|
|
|
|
void GetFullLineInfo (Collection* LineInfos, int ForceRef);
|
|
/* Return full line infos, that is line infos for currently active Slots. The
|
|
* function will clear LineInfos before usage. If ForceRef is not zero, a
|
|
* forced reference will be added to all line infos, with the consequence that
|
|
* they won't get deleted, even if there is no code or data generated for these
|
|
* lines.
|
|
*/
|
|
|
|
const FilePos* GetSourcePos (const LineInfo* LI);
|
|
/* Return the source file position from the given line info */
|
|
|
|
unsigned GetLineInfoType (const LineInfo* LI);
|
|
/* Return the type of a line info */
|
|
|
|
void WriteLineInfo (const Collection* LineInfos);
|
|
/* Write a list of line infos to the object file. */
|
|
|
|
void WriteLineInfos (void);
|
|
/* Write a list of all line infos to the object file. */
|
|
|
|
|
|
|
|
/* End of lineinfo.h */
|
|
#endif
|
|
|
|
|
|
|
|
|