mirror of
https://github.com/fadden/ciderpress.git
synced 2024-12-20 23:29:17 +00:00
Update Linux build
Fix some %ld message in log messages, and update the Linux sample code to match recent changes in NufxLib and DiskImgLib. Also, bump MDC version to 3.0.0 to match Windows version.
This commit is contained in:
parent
e620d054bb
commit
b97584eeb6
@ -2179,7 +2179,7 @@ DIError DiskFSDOS33::SetFileInfo(A2File* pGenericFile, uint32_t fileType,
|
||||
if (fpImg->GetReadOnly())
|
||||
return kDIErrAccessDenied;
|
||||
|
||||
LOGI("DOS SetFileInfo '%s' type=0x%02lx aux=0x%04lx access=0x%02lx",
|
||||
LOGI("DOS SetFileInfo '%s' type=0x%02x aux=0x%04x access=0x%02x",
|
||||
pFile->GetPathName(), fileType, auxType, accessFlags);
|
||||
|
||||
/*
|
||||
|
@ -59,7 +59,7 @@ const char* DiskImgLib::kASPIDev = "ASPI:";
|
||||
}
|
||||
|
||||
if (major != kNuVersionMajor || minor < kNuVersionMinor) {
|
||||
LOGE("Unexpected NufxLib version %ld.%ld.%ld",
|
||||
LOGE("Unexpected NufxLib version %d.%d.%d",
|
||||
major, minor, bug);
|
||||
return kDIErrNufxLibInitFailed;
|
||||
}
|
||||
|
@ -1589,7 +1589,7 @@ DIError DiskFSHFS::SetFileInfo(A2File* pGenericFile, uint32_t fileType,
|
||||
|
||||
LOGD(" HFS setting '%s' to fdflags=0x%04x flags=0x%04x",
|
||||
colonPath, dirEnt.fdflags, dirEnt.flags);
|
||||
LOGD(" type=0x%08lx creator=0x%08lx", fileType, auxType);
|
||||
LOGD(" type=0x%08x creator=0x%08x", fileType, auxType);
|
||||
|
||||
if (hfs_setattr(fHfsVol, colonPath, &dirEnt) != 0) {
|
||||
LOGW(" HFS setattr '%s' failed: %s", colonPath, hfs_error);
|
||||
@ -1665,7 +1665,7 @@ uint32_t A2FileHFS::GetFileType(void) const
|
||||
digit1 = FromHex((char) (fType >> 24));
|
||||
digit2 = FromHex((char) (fType >> 16));
|
||||
if (digit1 < 0 || digit2 < 0) {
|
||||
LOGI(" Unexpected: pdos + %08lx", fType);
|
||||
LOGI(" Unexpected: pdos + %08x", fType);
|
||||
return 0x00;
|
||||
}
|
||||
return digit1 << 4 | digit2;
|
||||
|
@ -274,7 +274,7 @@ DIError Wrapper2MG::Flush(GenericFD* pWrapperGFD, GenericFD* pDataGFD,
|
||||
goto bail;
|
||||
}
|
||||
if (attr != 1) {
|
||||
LOGI(" NuFX archive has %ld entries, not disk-only", attr);
|
||||
LOGI(" NuFX archive has %d entries, not disk-only", attr);
|
||||
nerr = kNuErrGeneric;
|
||||
if (attr > 1)
|
||||
goto file_archive;
|
||||
@ -480,7 +480,7 @@ DIError WrapperNuFX::Prep(GenericFD* pGFD, di_off_t wrappedLength, bool readOnly
|
||||
*pPhysical = DiskImg::kPhysicalFormatSectors;
|
||||
*pOrder = DiskImg::kSectorOrderProDOS;
|
||||
|
||||
LOGI(" NuFX is ready, threadIdx=%ld", threadIdx);
|
||||
LOGI(" NuFX is ready, threadIdx=%d", threadIdx);
|
||||
fThreadIdx = threadIdx;
|
||||
|
||||
bail:
|
||||
@ -732,7 +732,7 @@ DIError WrapperNuFX::Flush(GenericFD* pWrapperGFD, GenericFD* pDataGFD,
|
||||
goto bail;
|
||||
}
|
||||
pDataSource = NULL; // now owned by NufxLib
|
||||
LOGI(" NuFX added thread %ld in record %ld, flushing changes",
|
||||
LOGI(" NuFX added thread %d in record %d, flushing changes",
|
||||
threadIdx, recordIdx);
|
||||
|
||||
/*
|
||||
@ -741,7 +741,7 @@ DIError WrapperNuFX::Flush(GenericFD* pWrapperGFD, GenericFD* pDataGFD,
|
||||
uint32_t status;
|
||||
nerr = NuFlush(fpArchive, &status);
|
||||
if (nerr != kNuErrNone) {
|
||||
LOGI(" NuFX flush failed (nerr=%d, status=%ld)", nerr, status);
|
||||
LOGI(" NuFX flush failed (nerr=%d, status=%u)", nerr, status);
|
||||
goto bail;
|
||||
}
|
||||
|
||||
|
@ -1289,7 +1289,7 @@ DIError DiskFSPascal::SetFileInfo(A2File* pGenericFile, uint32_t fileType,
|
||||
if (!fDiskIsGood)
|
||||
return kDIErrBadDiskImage;
|
||||
|
||||
LOGI("Pascal SetFileInfo '%s' fileType=0x%04lx",
|
||||
LOGI("Pascal SetFileInfo '%s' fileType=0x%04x",
|
||||
pFile->GetPathName(), fileType);
|
||||
|
||||
dierr = LoadCatalog();
|
||||
|
@ -3630,7 +3630,7 @@ DIError DiskFSProDOS::SetFileInfo(A2File* pGenericFile, uint32_t fileType,
|
||||
return kDIErrAccessDenied; // not quite right
|
||||
}
|
||||
|
||||
LOGI("ProDOS changing values for '%s' to 0x%02lx 0x%04lx 0x%02lx",
|
||||
LOGI("ProDOS changing values for '%s' to 0x%02x 0x%04x 0x%02x",
|
||||
pFile->GetPathName(), fileType, auxType, accessFlags);
|
||||
|
||||
/* load the directory block for this file */
|
||||
|
@ -468,10 +468,10 @@ main(int argc, char** argv)
|
||||
}
|
||||
|
||||
printf("Image Converter for Linux v1.0\n");
|
||||
printf("Copyright (C) 2004 by faddenSoft, LLC. All rights reserved.\n");
|
||||
long major, minor, bug;
|
||||
printf("Copyright (C) 2014 by faddenSoft. All rights reserved.\n");
|
||||
int32_t major, minor, bug;
|
||||
Global::GetVersion(&major, &minor, &bug);
|
||||
printf("Linked against DiskImg library v%ld.%ld.%ld\n",
|
||||
printf("Linked against DiskImg library v%d.%d.%d\n",
|
||||
major, minor, bug);
|
||||
printf("Log file is '%s'\n", kLogFile);
|
||||
printf("\n");
|
||||
|
@ -370,7 +370,7 @@ LoadDiskFSContents(DiskFS* pDiskFS, const char* volName,
|
||||
}
|
||||
switch (recordKind) {
|
||||
case kRecordKindUnknown:
|
||||
fprintf(pScanOpts->outfp, "%s- $%04lX ",
|
||||
fprintf(pScanOpts->outfp, "%s- $%04X ",
|
||||
GetFileTypeString(pFile->GetFileType()),
|
||||
pFile->GetAuxType());
|
||||
break;
|
||||
@ -388,7 +388,7 @@ LoadDiskFSContents(DiskFS* pDiskFS, const char* volName,
|
||||
pFile->GetAuxType() >= 0 && pFile->GetAuxType() <= 0xffff)
|
||||
{
|
||||
/* ProDOS type embedded in HFS */
|
||||
fprintf(pScanOpts->outfp, "%s%c $%04lX ",
|
||||
fprintf(pScanOpts->outfp, "%s%c $%04X ",
|
||||
GetFileTypeString(pFile->GetFileType()),
|
||||
recordKind == kRecordKindForkedFile ? '+' : ' ',
|
||||
pFile->GetAuxType());
|
||||
@ -424,7 +424,7 @@ LoadDiskFSContents(DiskFS* pDiskFS, const char* volName,
|
||||
}
|
||||
}
|
||||
} else {
|
||||
fprintf(pScanOpts->outfp, "%s%c $%04lX ",
|
||||
fprintf(pScanOpts->outfp, "%s%c $%04X ",
|
||||
GetFileTypeString(pFile->GetFileType()),
|
||||
recordKind == kRecordKindForkedFile ? '+' : ' ',
|
||||
pFile->GetAuxType());
|
||||
@ -836,15 +836,15 @@ main(int argc, char** argv)
|
||||
}
|
||||
#endif
|
||||
|
||||
long major, minor, bug;
|
||||
int32_t major, minor, bug;
|
||||
Global::GetVersion(&major, &minor, &bug);
|
||||
|
||||
printf("MDC for Linux v2.2.0 (DiskImg library v%ld.%ld.%ld)\n",
|
||||
printf("MDC for Linux v3.0.0 (DiskImg library v%d.%d.%d)\n",
|
||||
major, minor, bug);
|
||||
printf("Copyright (C) 2006 by faddenSoft, LLC. All rights reserved.\n");
|
||||
printf("MDC is part of CiderPress, available from http://www.faddensoft.com/.\n");
|
||||
NuGetVersion(&major, &minor, &bug, nil, nil);
|
||||
printf("Linked against NufxLib v%ld.%ld.%ld and zlib version %s.\n",
|
||||
printf("Linked against NufxLib v%d.%d.%d and zlib version %s.\n",
|
||||
major, minor, bug, zlibVersion());
|
||||
|
||||
if (argc == 1) {
|
||||
|
@ -739,9 +739,9 @@ main(int argc, char** argv)
|
||||
|
||||
printf("DDD Converter for Linux v1.0\n");
|
||||
printf("Copyright (C) 2003 by faddenSoft, LLC. All rights reserved.\n");
|
||||
long major, minor, bug;
|
||||
int32_t major, minor, bug;
|
||||
Global::GetVersion(&major, &minor, &bug);
|
||||
printf("Linked against DiskImg library v%ld.%ld.%ld\n",
|
||||
printf("Linked against DiskImg library v%d.%d.%d\n",
|
||||
major, minor, bug);
|
||||
// printf("Log file is '%s'\n", kLogFile);
|
||||
printf("\n");
|
||||
|
Loading…
Reference in New Issue
Block a user