Add dumping of options
git-svn-id: svn://svn.cc65.org/cc65/trunk@237 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
|
||||
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
/* common */
|
||||
#include "xmalloc.h"
|
||||
@@ -50,13 +51,23 @@
|
||||
|
||||
|
||||
|
||||
void FileSeek (FILE* F, unsigned long Pos)
|
||||
/* Seek to the given absolute position, fail on errors */
|
||||
{
|
||||
if (fseek (F, Pos, SEEK_SET) != 0) {
|
||||
Error ("Cannot seek: %s", strerror (errno));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
unsigned Read8 (FILE* F)
|
||||
/* Read an 8 bit value from the file */
|
||||
{
|
||||
int C = getc (F);
|
||||
if (C == EOF) {
|
||||
Error ("Read error (file corrupt?)");
|
||||
}
|
||||
}
|
||||
return C;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user