diff --git a/src/disk.h b/src/disk.h index 08da7632..d17ffce4 100644 --- a/src/disk.h +++ b/src/disk.h @@ -79,8 +79,8 @@ extern drive_t disk6; // initialize emulated 5.25 Disk ][ module extern void disk6_init(void); -// insert 5.25 disk image file from file descriptor (internally dup()'d so caller should close() after invocation). -// file_name need NOT be a path, and is important only to determine the image type via file extension +// insert 5.25 disk image file from file descriptor (internally dup()'d so caller may close() the passed fd after +// invocation). file_name need NOT be a path, and is important only to determine the image type via file extension extern const char *disk6_insert(int fd, int drive, const char * const file_name, int readonly); // eject 5.25 disk image file diff --git a/src/zlib-helpers.h b/src/zlib-helpers.h index fca40aa8..7ef7df7e 100644 --- a/src/zlib-helpers.h +++ b/src/zlib-helpers.h @@ -21,13 +21,15 @@ #define ZERR_DEFLATE_OPEN_SOURCE "Error opening source file for deflation" #define ZERR_DEFLATE_READ_SOURCE "Error reading source file for deflation" -// inflate/uncompress from file descriptor into previously allocated buffer of expected_bytes length +// Inflate/uncompress from file descriptor into previously allocated buffer of expected_bytes length. Underlying file +// can either be gzipped or not. This is meant for readonly disk images. const char *zlib_inflate_to_buffer(int fd, const int expected_bytescount, char *buf); -// inflate/uncompress from file descriptor back into itself +// Inflate/uncompress from file descriptor back into itself. Underlying file can either be gzipped or not. This is +// meant for read/write disk images. const char *zlib_inflate_inplace(int fd, const int expected_bytescount, bool *is_gzipped); -// inline deflate/compress from buffer to buffer +// Deflate/compress from buffer to buffer. This is meant for ejecting read/write disk images. const char *zlib_deflate_buffer(const char *src, const int src_bytescount, char *dst, OUTPARM off_t *dst_size); #endif