@@ -29,23 +29,19 @@ */ OF_SUBCLASSING_RESTRICTED @interface OFLHAArchive: OFObject { OFStream *_stream; - enum { - OF_LHA_ARCHIVE_MODE_READ, - OF_LHA_ARCHIVE_MODE_WRITE, - OF_LHA_ARCHIVE_MODE_APPEND - } _mode; - of_string_encoding_t _encoding; + uint_least8_t _mode; + OFStringEncoding _encoding; OFStream *_Nullable _lastReturnedStream; } /** * @brief The encoding to use for the archive. Defaults to ISO 8859-1. */ -@property (nonatomic) of_string_encoding_t encoding; +@property (nonatomic) OFStringEncoding encoding; /** * @brief A stream for reading the current entry. * * @note This is only available in read mode. @@ -63,12 +59,11 @@ * @param mode The mode for the LHA file. Valid modes are "r" for reading, * "w" for creating a new file and "a" for appending to an existing * archive. * @return A new, autoreleased OFLHAArchive */ -+ (instancetype)archiveWithStream: (OFStream *)stream - mode: (OFString *)mode; ++ (instancetype)archiveWithStream: (OFStream *)stream mode: (OFString *)mode; #ifdef OF_HAVE_FILES /** * @brief Creates a new OFLHAArchive object with the specified file. * @@ -76,12 +71,11 @@ * @param mode The mode for the LHA file. Valid modes are "r" for reading, * "w" for creating a new file and "a" for appending to an existing * archive. * @return A new, autoreleased OFLHAArchive */ -+ (instancetype)archiveWithPath: (OFString *)path - mode: (OFString *)mode; ++ (instancetype)archiveWithPath: (OFString *)path mode: (OFString *)mode; #endif - (instancetype)init OF_UNAVAILABLE; /** @@ -107,12 +101,11 @@ * @param mode The mode for the LHA file. Valid modes are "r" for reading, * "w" for creating a new file and "a" for appending to an existing * archive. * @return An initialized OFLHAArchive */ -- (instancetype)initWithPath: (OFString *)path - mode: (OFString *)mode; +- (instancetype)initWithPath: (OFString *)path mode: (OFString *)mode; #endif /** * @brief Returns the next entry from the LHA archive or `nil` if all entries * have been read.