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:
@@ -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 */
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user