|
cbmimage
|
Classes | |
| struct | cbmimage_dir_header_name_s |
| The name of a directory header or directory entry. More... | |
| struct | cbmimage_dir_header_s |
| A directory header. More... | |
| struct | cbmimage_dir_entry_s |
| A directory entry. More... | |
| struct | cbmimage_i_dir_entry_internal_s |
| internal data for directory entry More... | |
Typedefs | |
| typedef enum cbmimage_dir_type_e | cbmimage_dir_type |
| The type of a directory entry cbmimage_dir_entry_s. | |
| typedef enum cbmimage_geos_filetype_e | cbmimage_geos_filetype |
| The GEOS type of a directory entry cbmimage_dir_entry_s. | |
| typedef struct cbmimage_dir_header_name_s | cbmimage_dir_header_name |
| The name of a directory header or directory entry. | |
| typedef struct cbmimage_dir_header_s | cbmimage_dir_header |
| A directory header. | |
| typedef struct cbmimage_dir_entry_s | cbmimage_dir_entry |
| A directory entry. | |
| typedef struct cbmimage_i_dir_entry_internal_s | cbmimage_i_dir_entry_internal |
| internal data for directory entry | |
Enumerations | |
| enum | cbmimage_dir_type_e { DIR_TYPE_DEL = 0 , DIR_TYPE_SEQ = 1 , DIR_TYPE_PRG = 2 , DIR_TYPE_USR = 3 , DIR_TYPE_REL = 4 , DIR_TYPE_PART1581 = 5 , DIR_TYPE_CMD_NATIVE = 6 , DIR_TYPE_PART_OFFSET = 0x100 , DIR_TYPE_PART_NO = DIR_TYPE_PART_OFFSET , DIR_TYPE_PART_CMD_NATIVE = DIR_TYPE_PART_OFFSET + 0x01 , DIR_TYPE_PART_D64 = DIR_TYPE_PART_OFFSET + 0x02 , DIR_TYPE_PART_D71 = DIR_TYPE_PART_OFFSET + 0x03 , DIR_TYPE_PART_D81 = DIR_TYPE_PART_OFFSET + 0x04 , DIR_TYPE_PART_SYSTEM = DIR_TYPE_PART_OFFSET + 0xFF } |
| The type of a directory entry cbmimage_dir_entry_s. More... | |
| enum | cbmimage_geos_filetype_e { GEOS_FILETYPE_NON_GEOS = 0x00 , GEOS_FILETYPE_BASIC = 0x01 , GEOS_FILETYPE_ASSEMBLER = 0x02 , GEOS_FILETYPE_DATA_FILE = 0x03 , GEOS_FILETYPE_SYSTEM_FILE = 0x04 , GEOS_FILETYPE_DESK_ACCESSORY = 0x05 , GEOS_FILETYPE_APPLICATION = 0x06 , GEOS_FILETYPE_APPLICATION_DATA = 0x07 , GEOS_FILETYPE_FONT_FILE = 0x08 , GEOS_FILETYPE_PRINTER_DRIVER = 0x09 , GEOS_FILETYPE_INPUT_DRIVER = 0x0A , GEOS_FILETYPE_DISK_DRIVER = 0x0B , GEOS_FILETYPE_SYSTEM_BOOT_FILE = 0x0C , GEOS_FILETYPE_TEMPORARY = 0x0D , GEOS_FILETYPE_AUTO_EXECUTE_FILE = 0x0E } |
| The GEOS type of a directory entry cbmimage_dir_entry_s. More... | |
Functions | |
| cbmimage_dir_header * | cbmimage_dir_get_header (cbmimage_fileimage *image) |
| get the header entry | |
| void | cbmimage_dir_get_header_close (cbmimage_dir_header *header_entry) |
| free the resources from a cbmimage_dir_get_header() | |
| static int | cbmimage_i_dir_entry_store_datetime (cbmimage_i_dir_entry_internal *dei) |
| internal store date and time of directory entry @ | |
| static int | cbmimage_i_dir_get (cbmimage_i_dir_entry_internal *dei) |
| create a directory entry @ | |
| static int | cbmimage_i_dir_get_nonempty (cbmimage_i_dir_entry_internal *dei) |
| get the next non-empty directory entry @ | |
| cbmimage_dir_entry * | cbmimage_dir_get_first (cbmimage_fileimage *image) |
| get the first (non-empty) directory entry | |
| int | cbmimage_dir_get_next (cbmimage_dir_entry *dir_entry) |
| get the next (non-empty) directory entry | |
| int | cbmimage_dir_get_is_valid (cbmimage_dir_entry *dir_entry) |
| get the next (non-empty) directory entry | |
| void | cbmimage_dir_get_close (cbmimage_dir_entry *dir_entry) |
| free the resources from a cbmimage_dir_get_first() | |
| int | cbmimage_dir_is_deleted (cbmimage_dir_entry *dir_entry) |
| check if the directory entry points to a deleted file | |
| char * | cbmimage_dir_extract_name (cbmimage_dir_header_name *dir_name, char *name_buffer, size_t name_buffer_len) |
| extract the name of a directory entry as a C string | |
| cbmimage_dir_entry * | cbmimage_i_dir_get_clone (cbmimage_dir_entry *dir_entry) |
| clone a directory entry | |
| int | cbmimage_dir_chdir (cbmimage_dir_entry *dir_entry) |
| perform a chdir to a partition marked by a directory entry | |
| int | cbmimage_dir_chdir_close (cbmimage_fileimage *image) |
| "close a chdir"; that is, go back to the parent directory | |
| int | cbmimage_i_dir_get_partition_data (cbmimage_dir_entry *dir_entry, cbmimage_blockaddress *block_first, cbmimage_blockaddress *block_last, size_t *block_count) |
| int | cbmimage_i_dir_set_subpartition_global (cbmimage_image_settings *settings, cbmimage_blockaddress block_subdir_first, size_t block_count) |
| int | cbmimage_i_dir_set_subpartition_relative (cbmimage_image_settings *settings, cbmimage_blockaddress block_subdir_first, cbmimage_blockaddress block_subdir_last) |
| typedef struct cbmimage_dir_entry_s cbmimage_dir_entry |
A directory entry.
The functions that enumerate directory entrys all operate on this entry type.
see also: cbmimage_dir_get_first, cbmimage_dir_get_next, cbmimage_dir_get_close, cbmimage_dir_is_deleted
| typedef struct cbmimage_dir_header_s cbmimage_dir_header |
A directory header.
This entry has all the data that is needed to handle the image header and the count of free blocks
see also: cbmimage_dir_get_first, cbmimage_dir_get_next, cbmimage_dir_get_close, cbmimage_dir_is_deleted
| typedef struct cbmimage_dir_header_name_s cbmimage_dir_header_name |
The name of a directory header or directory entry.
This entry is used in cbmimage_dir_header as well as cbmimage_dir_entry. It describes the name of the header or directory that is to be processed.
| typedef enum cbmimage_geos_filetype_e cbmimage_geos_filetype |
The GEOS type of a directory entry cbmimage_dir_entry_s.
| typedef struct cbmimage_i_dir_entry_internal_s cbmimage_i_dir_entry_internal |
internal data for directory entry
This type contains the internal data that is needed to specify a directory entry.
| enum cbmimage_dir_type_e |
The type of a directory entry cbmimage_dir_entry_s.
The GEOS type of a directory entry cbmimage_dir_entry_s.
| int cbmimage_dir_chdir | ( | cbmimage_dir_entry * | dir_entry | ) |
perform a chdir to a partition marked by a directory entry
| [in] | dir_entry | pointer to a directory entry that was the result of a previous cbmimage_dir_get_first() or cbmimage_dir_get_next() call. |
| int cbmimage_dir_chdir_close | ( | cbmimage_fileimage * | image | ) |
"close a chdir"; that is, go back to the parent directory
| [in] | image | pointer to an image for which to return to the parent directory |
| char * cbmimage_dir_extract_name | ( | cbmimage_dir_header_name * | dir_name, |
| char * | name_buffer, | ||
| size_t | name_buffer_len ) |
extract the name of a directory entry as a C string
| [in] | dir_name | pointer to the name entry of a cbmimage_dir_entry or cbmimage_header_entry |
| [in,out] | name_buffer | pointer to a block of memory that acts as a buffer for the name as a C string |
| [in] | name_buffer_len | the length of the buffer provided by the parameter name. This must be at least 18 for a regular directory entry, and at least 26 for the header |
| void cbmimage_dir_get_close | ( | cbmimage_dir_entry * | dir_entry | ) |
free the resources from a cbmimage_dir_get_first()
| [in] | dir_entry | ptr to a directory entry that was the result of a previous cbmimage_dir_get_first() or cbmimage_dir_get_next() call. |
| cbmimage_dir_entry * cbmimage_dir_get_first | ( | cbmimage_fileimage * | image | ) |
get the first (non-empty) directory entry
| [in] | image | pointer to the image data |
| cbmimage_dir_header * cbmimage_dir_get_header | ( | cbmimage_fileimage * | image | ) |
get the header entry
| [in] | image | pointer to the image data |
| void cbmimage_dir_get_header_close | ( | cbmimage_dir_header * | header_entry | ) |
free the resources from a cbmimage_dir_get_header()
| [in] | header_entry | ptr to a header entry that was the result of a previous call to cbmimage_dir_get_header(). |
| int cbmimage_dir_get_is_valid | ( | cbmimage_dir_entry * | dir_entry | ) |
get the next (non-empty) directory entry
| [in] | dir_entry | ptr to a directory entry that was the result of a previous cbmimage_dir_get_first() or cbmimage_dir_get_next() call. On return, this dir_entry contains the next directory entry if the return value is 0. If the return value is not 0, The result of this is unspecified. |
| int cbmimage_dir_get_next | ( | cbmimage_dir_entry * | dir_entry | ) |
get the next (non-empty) directory entry
| [in,out] | dir_entry | ptr to a directory entry that was the result of a previous cbmimage_dir_get_first() or cbmimage_dir_get_next() call. On return, this dir_entry contains the next directory entry if the return value is 0. If the return value is not 0, The result of this is unspecified. |
| int cbmimage_dir_is_deleted | ( | cbmimage_dir_entry * | dir_entry | ) |
check if the directory entry points to a deleted file
| [in] | dir_entry | pointer to a directory entry that was the result of a previous cbmimage_dir_get_first() or cbmimage_dir_get_next() call. |
|
static |
internal store date and time of directory entry @
| [in,out] | dei | ptr to a internal directory entry that will be initialized |
|
static |
create a directory entry @
| [in,out] | dei | ptr to a internal directory entry that will be initialized |
| cbmimage_dir_entry * cbmimage_i_dir_get_clone | ( | cbmimage_dir_entry * | dir_entry | ) |
clone a directory entry
| [in] | dir_entry | ptr to a directory entry that was the result of a previous cbmimage_dir_get_first() or cbmimage_dir_get_next() call. |
|
static |
get the next non-empty directory entry @
| [in,out] | dei | ptr to a internal directory entry that will be initialized |
| int cbmimage_i_dir_get_partition_data | ( | cbmimage_dir_entry * | dir_entry, |
| cbmimage_blockaddress * | block_first, | ||
| cbmimage_blockaddress * | block_last, | ||
| size_t * | block_count ) |
read the partition data (start and end block) from a directory entry
| [in] | dir_entry | pointer to a entry |
| [in,out] | block_first | pointer to a block address that will contain the first block of the partition on exit |
| [in,out] | block_last | pointer to a block address that will contain the last block of the partition on exit. Can be NULL if this info is not needed. |
| [in,out] | block_count | pointer to a size_t that will contain the number of blocks of this partition on exit. Can be NULL if this info is not needed. |
| int cbmimage_i_dir_set_subpartition_global | ( | cbmimage_image_settings * | settings, |
| cbmimage_blockaddress | block_subdir_first, | ||
| size_t | block_count ) |
change to a (global) subpartition
| [in] | settings | pointer to image settings |
| [in] | block_subdir_first | the block that is the first block of the subdir/subpartition |
| [in,out] | block_count | the number of blocks that form this subdir/subpartition |
This is the type of partitions that was introduced with the CMD devices
| int cbmimage_i_dir_set_subpartition_relative | ( | cbmimage_image_settings * | settings, |
| cbmimage_blockaddress | block_subdir_first, | ||
| cbmimage_blockaddress | block_subdir_last ) |
change to a (relative) subpartition
| [in] | settings | pointer to image settings |
| [in] | block_subdir_first | the block that is the first block of the subdir/subpartition |
| [in,out] | block_subdir_last | the last block of the subdir/subpartition |
This is the type of partitions that was introduced with the 1581 drive.