Logo Search packages:      
Sourcecode: cbmconvert version File versions  Download package

static enum Filetype getFiletype ( const struct Image image,
const struct DirEnt *  dirent 
) [static]

Determine the file type of a directory entry

Parameters:
image the disk image
dirent the directory entry
Returns:
the file type of the directory entry, or 0

Definition at line 1377 of file image.c.

References CBM, Im1581, REL, and Image::type.

Referenced by checkSideSectors(), deleteDirEnt(), ReadImage(), setupSideSectors(), and WriteImage().

{
  enum Filetype type;

#ifdef DEBUG
  if (!isValidDirEnt (image, dirent))
    return 0;
#endif

  type = dirent->type & 0x8F;

  if (type < DEL || type > (image->type == Im1581 ? CBM : REL))
    return 0; /* illegal file type */

  return type;
}


Generated by  Doxygen 1.6.0   Back to index