mirror of
https://github.com/marketideas/qasm.git
synced 2024-06-11 21:29:29 +00:00
test
This commit is contained in:
parent
a6d239f87a
commit
96ae01d615
|
@ -9,6 +9,7 @@ set(LIBRARY_NAME pal)
|
|||
set(FIND_LIBRARY_USE_LIB64_PATHS TRUE)
|
||||
|
||||
include(./lib${LIBRARY_NAME}/cmake/CMakeHeader.txt)
|
||||
|
||||
set ( PROJECT_NAME "qasm" )
|
||||
|
||||
set(SOURCE
|
||||
|
@ -25,20 +26,26 @@ find_package(Poco REQUIRED Foundation Util XML JSON )
|
|||
include_directories(BEFORE
|
||||
${PROJECT_ROOT}
|
||||
${PROJECT_ROOT}/lib${LIBRARY_NAME}/include/${LIBRARY_NAME}
|
||||
${PROJECT_ROOT}/ciderpress/diskimg
|
||||
#${OPENSSL_INCLUDE_DIR}
|
||||
${Poco_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
add_subdirectory(${PROJECT_ROOT}/ciderpress/nufxlib)
|
||||
add_subdirectory(${PROJECT_ROOT}/ciderpress/diskimg)
|
||||
|
||||
add_subdirectory(${PROJECT_ROOT}/lib${LIBRARY_NAME})
|
||||
|
||||
include(${PROJECT_ROOT}/lib${LIBRARY_NAME}/cmake/CMakeApp.txt)
|
||||
|
||||
add_executable( ${PROJECT_NAME} ${SOURCE})
|
||||
|
||||
#link_directories( ${link_directories} ./build/ciderpress/diskimg
|
||||
target_link_libraries (
|
||||
${PROJECT_NAME}
|
||||
${LIBRARY_NAME}
|
||||
pthread
|
||||
${PROJECT_ROOT}/ciderpress/diskimg
|
||||
${Poco_LIBRARIES}
|
||||
)
|
||||
|
||||
|
|
|
@ -22,6 +22,8 @@ set(CMAKE_C_FLAGS_RELEASE "${RELEASE_OPT}")
|
|||
|
||||
set(FIND_LIBRARY_USE_LIB64_PATHS TRUE)
|
||||
|
||||
add_subdirectory( ${CMAKE_CURRENT_SOURCE_DIR}/libhfs)
|
||||
|
||||
set (SOURCE
|
||||
ASPI.cpp
|
||||
DiskFS.cpp
|
||||
|
|
|
@ -80,7 +80,7 @@ SST disk.
|
|||
const int kNumSymbols = 256;
|
||||
const int kNumFavorites = 20;
|
||||
const int kRLEDelim = 0x97; // value MUST have high bit set
|
||||
const int kMaxExcessByteCount = WrapperDDD::kMaxDDDZeroCount + 1;
|
||||
//const int kMaxExcessByteCount = WrapperDDD::kMaxDDDZeroCount + 1;
|
||||
//const int kTrackLen = 4096;
|
||||
//const int kNumTracks = 35;
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
* ===========================================================================
|
||||
*/
|
||||
|
||||
const int kMaxSectors = 32;
|
||||
//const int kMaxSectors = 32;
|
||||
|
||||
const int kSctSize = 256;
|
||||
/* do we need a way to override these? */
|
||||
|
|
|
@ -64,7 +64,7 @@ header followed by 6502 instructions). There's no apparent link between
|
|||
the value and the type of data in the file.
|
||||
*/
|
||||
|
||||
const int kMaxSectors = 32;
|
||||
//const int kMaxSectors = 32;
|
||||
const int kMaxVolNameLen = 9;
|
||||
const int kSctSize = 256;
|
||||
const int kVTOCTrack = 17;
|
||||
|
@ -73,20 +73,22 @@ const int kCatalogEntryOffset = 0x10; // first entry in cat sect starts here
|
|||
const int kCatalogEntrySize = 16; // length in bytes of catalog entries
|
||||
const int kCatalogEntriesPerSect = 15; // #of entries per catalog sector
|
||||
const int kEntryDeleted = 0x40; // this is used to designate deleted files
|
||||
const int kEntryUnused = 0x00; // this is track# in never-used entries
|
||||
const int kMaxTSPairs = 0x7a; // 122 entries for 256-byte sectors
|
||||
const int kTSOffset = 0x0c; // first T/S entry in a T/S list
|
||||
//const int kEntryUnused = 0x00; // this is track# in never-used entries
|
||||
//const int kMaxTSPairs = 0x7a; // 122 entries for 256-byte sectors
|
||||
//const int kTSOffset = 0x0c; // first T/S entry in a T/S list
|
||||
|
||||
const int kMaxTSIterations = 32;
|
||||
//const int kMaxTSIterations = 32;
|
||||
|
||||
/*
|
||||
* Get a pointer to the Nth entry in a catalog sector.
|
||||
*/
|
||||
#if 0
|
||||
static inline uint8_t* GetCatalogEntryPtr(uint8_t* basePtr, int entryNum)
|
||||
{
|
||||
assert(entryNum >= 0 && entryNum < kCatalogEntriesPerSect);
|
||||
return basePtr + kCatalogEntryOffset + entryNum * kCatalogEntrySize;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
@ -1771,8 +1771,8 @@ char* A2FileHFS::GetLibHFSPathName(void) const
|
|||
} else if (fileType == 0x04 && auxType == 0x0000) {
|
||||
strcpy(pCreator, "pdos");
|
||||
strcpy(pType, "TEXT");
|
||||
} else if (fileType >= 0 && fileType <= 0xff &&
|
||||
auxType >= 0 && auxType <= 0xffff)
|
||||
} else if (fileType <= 0xff &&
|
||||
auxType <= 0xffff)
|
||||
{
|
||||
pType[0] = 'p';
|
||||
pType[1] = (uint8_t) fileType;
|
||||
|
|
|
@ -53,7 +53,7 @@ const int kDataChecksumLen = 3;
|
|||
const int kChunkSize35 = 175; // ceil(524 / 3)
|
||||
const int kOffsetToChecksum = 699;
|
||||
const int kNibblizedOutputLen = (kOffsetToChecksum + 4);
|
||||
const int kMaxDataReach = 48; // should only be 6 bytes */
|
||||
//const int kMaxDataReach = 48; // should only be 6 bytes */
|
||||
|
||||
enum {
|
||||
kAddrProlog0 = 0xd5,
|
||||
|
|
|
@ -27,12 +27,12 @@ const int kVTOCTrack = 17;
|
|||
const int kVTOCSector = 0;
|
||||
const int kSctSize = 256;
|
||||
|
||||
const int kCatalogEntrySize = 0x23; // length in bytes of catalog entries
|
||||
const int kCatalogEntriesPerSect = 7; // #of entries per catalog sector
|
||||
//const int kCatalogEntrySize = 0x23; // length in bytes of catalog entries
|
||||
//const int kCatalogEntriesPerSect = 7; // #of entries per catalog sector
|
||||
const int kMaxTSPairs = 0x7a; // 122 entries for 256-byte sectors
|
||||
const int kTSOffset = 0x0c; // first T/S entry in a T/S list
|
||||
//const int kTSOffset = 0x0c; // first T/S entry in a T/S list
|
||||
|
||||
const int kMaxTSIterations = 32;
|
||||
//const int kMaxTSIterations = 32;
|
||||
const int kMaxCatalogIterations = 64;
|
||||
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
const int kBlkSize = 512;
|
||||
const int kVolHeaderBlock = 2; // first directory block
|
||||
const int kMaxCatalogIterations = 64; // should be short, linear catalog
|
||||
//const int kMaxCatalogIterations = 64; // should be short, linear catalog
|
||||
const int kHugeDir = 32;
|
||||
static const char* kInvalidNameChars = "$=?,[#:";
|
||||
|
||||
|
@ -1506,7 +1506,7 @@ uint32_t A2FilePascal::GetFileType(void) const
|
|||
year = ptm->tm_year; // years since 1900
|
||||
if (year >= 100)
|
||||
year -= 100;
|
||||
if (year < 0 || year >= 100) {
|
||||
if (year >= 100) {
|
||||
LOGW("WHOOPS: got year %u from %d", year, ptm->tm_year);
|
||||
year = 70;
|
||||
}
|
||||
|
|
|
@ -1975,7 +1975,7 @@ DIError DiskFSProDOS::CreateFile(const CreateParms* pParms, A2File** ppNewFile)
|
|||
*/
|
||||
dirEntryPtr[0x00] = (pParms->storageType << 4) | strlen(upperName);
|
||||
strncpy((char*) &dirEntryPtr[0x01], upperName, A2FileProDOS::kMaxFileName);
|
||||
if (pParms->fileType >= 0 && pParms->fileType <= 0xff)
|
||||
if (pParms->fileType <= 0xff)
|
||||
dirEntryPtr[0x10] = (uint8_t) pParms->fileType;
|
||||
else
|
||||
dirEntryPtr[0x10] = 0; // HFS long type?
|
||||
|
@ -1996,7 +1996,7 @@ DIError DiskFSProDOS::CreateFile(const CreateParms* pParms, A2File** ppNewFile)
|
|||
PutShortLE(&dirEntryPtr[0x1c], 0); // version, min_version
|
||||
}
|
||||
dirEntryPtr[0x1e] = pParms->access;
|
||||
if (pParms->auxType >= 0 && pParms->auxType <= 0xffff)
|
||||
if (pParms->auxType <= 0xffff)
|
||||
PutShortLE(&dirEntryPtr[0x1f], (uint16_t) pParms->auxType);
|
||||
else
|
||||
PutShortLE(&dirEntryPtr[0x1f], 0);
|
||||
|
|
|
@ -31,13 +31,13 @@ const int kVTOCTrack = 17;
|
|||
const int kVTOCSector = 0;
|
||||
const int kSctSize = 256;
|
||||
|
||||
const int kCatalogEntrySize = 0x23; // length in bytes of catalog entries
|
||||
const int kCatalogEntriesPerSect = 7; // #of entries per catalog sector
|
||||
//const int kCatalogEntrySize = 0x23; // length in bytes of catalog entries
|
||||
//const int kCatalogEntriesPerSect = 7; // #of entries per catalog sector
|
||||
const int kMaxTSPairs = 0x7a; // 122 entries for 256-byte sectors
|
||||
const int kTSOffset = 0x0c; // first T/S entry in a T/S list
|
||||
//const int kTSOffset = 0x0c; // first T/S entry in a T/S list
|
||||
|
||||
const int kMaxTSIterations = 32;
|
||||
const int kMaxCatalogIterations = 64;
|
||||
//const int kMaxTSIterations = 32;
|
||||
//const int kMaxCatalogIterations = 64;
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
@ -3,7 +3,7 @@ set(CMAKE_BUILD_TYPE DEBUG)
|
|||
|
||||
set(BASE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
set(PROJECT_NAME diskimg)
|
||||
set(PROJECT_NAME hfs)
|
||||
set(PROJECT_ROOT ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
project(${PROJECT_NAME})
|
||||
|
||||
|
|
|
@ -862,8 +862,15 @@ static NuError Nu_OpenTempFile(UNICHAR* fileNameUNI, FILE** pFp)
|
|||
#else
|
||||
char* result;
|
||||
|
||||
#if 1
|
||||
DBUG(("+++ Using mktemp\n"));
|
||||
result = mktemp(fileNameUNI);
|
||||
#else
|
||||
char fbuff[256];
|
||||
sprintf(fbuff,"%s%s",fileNameUNI,"XXXXXX");
|
||||
result=mkstemp();
|
||||
#endif
|
||||
|
||||
if (result == NULL) {
|
||||
Nu_ReportError(NU_BLOB, kNuErrNone, "mktemp failed on '%s'",
|
||||
fileNameUNI);
|
||||
|
|
Loading…
Reference in New Issue
Block a user