🚧 Add debug message

This commit is contained in:
C-3PO 2018-09-14 05:30:22 +02:00
parent 12190f0ae8
commit f64412ebfe
Signed by: c3po
GPG key ID: 62993C4BB4D86F24
3 changed files with 20 additions and 7 deletions

View file

@ -32,15 +32,18 @@ void skipBytes(long numBytes) {
}
//Closes the currently opened file and opens the next file at its beginning.
void openNextFile() {
//Closes the currently opened file
void closeCurrentFile() {
const int closeResult = fclose(file.filePointer);
if (closeResult != 0) {
fprintf(stderr, "Could not close file: %s\n", strerror(errno));
exit(1);
}
}
//Open next file
//Opens the next file at its beginning.
void openNextFile() {
const size_t fileNameLength = strlen(file.name);
//We need to transfer carry if necessary (e.g. .z09 to .z10), otherwise just increase last digit
if (file.name[fileNameLength - 1] == '9') {

View file

@ -21,5 +21,9 @@ void readBytesIntoBuffer(uint8_t* buffer, long numBytes);
void skipBytes(long numBytes);
//Closes the currently opened file and opens the next file at its beginning.
//Closes the currently opened file
void closeCurrentFile();
//Opens the next file at its beginning.
void openNextFile();