diff options
-rw-r--r-- | backends/fs/amigaos4/amigaos4-fs.cpp | 37 | ||||
-rw-r--r-- | backends/fs/amigaos4/amigaos4-fs.h | 6 |
2 files changed, 22 insertions, 21 deletions
diff --git a/backends/fs/amigaos4/amigaos4-fs.cpp b/backends/fs/amigaos4/amigaos4-fs.cpp index 5a66cdaa2f..2cf397492a 100644 --- a/backends/fs/amigaos4/amigaos4-fs.cpp +++ b/backends/fs/amigaos4/amigaos4-fs.cpp @@ -62,7 +62,7 @@ AmigaOSFilesystemNode::AmigaOSFilesystemNode() { _bIsDirectory = true; _sPath = ""; _pFileLock = 0; - _nProt = 0; // protection is ignored for the root volume + _nProt = 0; // Protection is ignored for the root volume LEAVE(); } @@ -84,7 +84,7 @@ AmigaOSFilesystemNode::AmigaOSFilesystemNode(const Common::String &p) { _bIsDirectory = false; _bIsValid = false; - // Check whether the node exists and if it is a directory + // Check whether the node exists and if it's a directory struct ExamineData * pExd = IDOS->ExamineObjectTags(EX_StringNameInput,_sPath.c_str(),TAG_END); if (pExd) { _nProt = pExd->Protection; @@ -93,7 +93,7 @@ AmigaOSFilesystemNode::AmigaOSFilesystemNode(const Common::String &p) { _pFileLock = IDOS->Lock((CONST_STRPTR)_sPath.c_str(), SHARED_LOCK); _bIsValid = (_pFileLock != 0); - // Add a trailing slash if it is needed + // Add a trailing slash if needed const char c = _sPath.lastChar(); if (c != '/' && c != ':') _sPath += '/'; @@ -134,7 +134,7 @@ AmigaOSFilesystemNode::AmigaOSFilesystemNode(BPTR pLock, const char *pDisplayNam delete[] n; } - _bIsValid = false; + _bIsValid = false; _bIsDirectory = false; struct ExamineData * pExd = IDOS->ExamineObjectTags(EX_FileLockInput,pLock,TAG_END); @@ -188,10 +188,10 @@ bool AmigaOSFilesystemNode::exists() const { bool nodeExists = false; - // previously we were trying to examine the node in order + // Previously we were trying to examine the node in order // to determine if the node exists or not. // I don't see the point : once you have been granted a - // lock on it then it means it exists... + // lock on it, it means it exists... // // ============================= Old code // BPTR pLock = IDOS->Lock((STRPTR)_sPath.c_str(), SHARED_LOCK); @@ -237,8 +237,8 @@ bool AmigaOSFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, b ENTER(); bool ret = false; - //TODO: honor the hidden flag - // There is nothing like a hidden flag under AmigaOS... + // TODO: Honor the hidden flag + // There is no such thing as a hidden flag in AmigaOS... if (!_bIsValid) { debug(6, "Invalid node"); @@ -264,7 +264,7 @@ bool AmigaOSFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, b EX_DataFields, (EXF_NAME|EXF_LINK|EXF_TYPE), TAG_END); if (context) { - struct ExamineData * pExd = NULL; // NB: no need to free value after usage, all is dealt by the DirContext release + struct ExamineData * pExd = NULL; // NB: No need to free the value after usage, everything will be dealt with by the DirContext release AmigaOSFilesystemNode *entry ; while ( (pExd = IDOS->ExamineDir(context)) ) { @@ -332,8 +332,8 @@ bool AmigaOSFilesystemNode::isReadable() const { return false; // Regular RWED protection flags are low-active or inverted, thus the negation. - // moreover pseudo root filesystem (null _pFileLock) is readable whatever the - // protection says + // Moreover, a pseudo root filesystem (null _pFileLock) is readable whatever the + // protection says. bool readable = !(_nProt & EXDF_OTR_READ) || _pFileLock == 0; return readable; @@ -344,8 +344,8 @@ bool AmigaOSFilesystemNode::isWritable() const { return false; // Regular RWED protection flags are low-active or inverted, thus the negation. - // moreover pseudo root filesystem (null _pFileLock) is never writable whatever - // the protection says (because of the pseudo nature) + // Moreover, a pseudo root filesystem (null _pFileLock) is never writable whatever + // the protection says (Because of it's pseudo nature). bool writable = !(_nProt & EXDF_OTR_WRITE) && _pFileLock !=0; return writable; @@ -371,12 +371,13 @@ AbstractFSList AmigaOSFilesystemNode::listVolumes() const { if (dosList->dol_Type == DLT_VOLUME && dosList->dol_Name) { - // Original was - // dosList->dol_Name && - // dosList->dol_Task) { + // The original line was + //if (dosList->dol_Type == DLT_VOLUME && + //dosList->dol_Name && + //dosList->dol_Task) { // which errored using SDK 53.24 with a 'struct dosList' has no member called 'dol_Task' // I removed dol_Task because it's not used anywhere else - // and it neither brought up further errors nor crashes or regressions. + // and it neither brought up further errors nor crashes or regressions // Copy name to buffer IDOS->CopyStringBSTRToC(dosList->dol_Name, buffer, MAXPATHLEN); @@ -410,7 +411,7 @@ AbstractFSList AmigaOSFilesystemNode::listVolumes() const { delete[] volName; } - dosList = IDOS->NextDosEntry(dosList, LDF_VOLUMES); + dosList = IDOS->NextDosEntry(dosList, LDF_VOLUMES); } IDOS->UnLockDosList(kLockFlags); diff --git a/backends/fs/amigaos4/amigaos4-fs.h b/backends/fs/amigaos4/amigaos4-fs.h index bbe88b2716..223d809032 100644 --- a/backends/fs/amigaos4/amigaos4-fs.h +++ b/backends/fs/amigaos4/amigaos4-fs.h @@ -76,19 +76,19 @@ public: AmigaOSFilesystemNode(const Common::String &p); /** - * Creates an AmigaOSFilesystemNode given its lock and display name + * Creates an AmigaOSFilesystemNode given its lock and display name. * * @param pLock BPTR to the lock. * @param pDisplayName name to be used for display, in case not supplied the FilePart() of the filename will be used. * - * @note This shouldn't even be public as it's only internally, at best it should have been protected if not private + * @note This shouldn't even be public as it's only internally, at best it should have been protected if not private. */ AmigaOSFilesystemNode(BPTR pLock, const char *pDisplayName = 0); /** * Copy constructor. * - * @note Needed because it duplicates the file lock + * @note Needed because it duplicates the file lock. */ AmigaOSFilesystemNode(const AmigaOSFilesystemNode &node); |