Restructuring the object file format

git-svn-id: svn://svn.cc65.org/cc65/trunk@2196 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2003-06-03 22:19:46 +00:00
parent 0f8add2112
commit 4937cd236f
18 changed files with 380 additions and 299 deletions

View File

@@ -51,7 +51,7 @@
void FileSeek (FILE* F, unsigned long Pos)
void FileSetPos (FILE* F, unsigned long Pos)
/* Seek to the given absolute position, fail on errors */
{
if (fseek (F, Pos, SEEK_SET) != 0) {
@@ -61,6 +61,18 @@ void FileSeek (FILE* F, unsigned long Pos)
unsigned long FileGetPos (FILE* F)
/* Return the current file position, fail on errors */
{
long Pos = ftell (F);
if (Pos < 0) {
Error ("Error in ftell: %s", strerror (errno));
}
return Pos;
}
unsigned Read8 (FILE* F)
/* Read an 8 bit value from the file */
{