Add dumping of options

git-svn-id: svn://svn.cc65.org/cc65/trunk@237 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2000-07-30 14:25:30 +00:00
parent 2e3b545bdb
commit 697f6e1cfa
6 changed files with 158 additions and 30 deletions

View File

@@ -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;
}