root/lib/file-entry.h

/* [previous][next][first][last][top][bottom][index][help]  */

INCLUDED FROM


   1 /** \file lib/file-entry.h
   2  *  \brief Header: file entry definition
   3  */
   4 
   5 #ifndef MC__ILE_ENTRY_H
   6 #define MC__ILE_ENTRY_H
   7 
   8 #include <sys/types.h>
   9 #include <sys/stat.h>
  10 
  11 #include "lib/global.h"  // include <glib.h>
  12 
  13 /*** typedefs(not structures) and defined constants **********************************************/
  14 
  15 /*** enums ***************************************************************************************/
  16 
  17 /*** structures declarations (and typedefs of structures)*****************************************/
  18 
  19 /* keys are set only during sorting */
  20 typedef struct
  21 {
  22     // File name
  23     GString *fname;
  24     // File attributes
  25     struct stat st;
  26     // Key used for comparing names
  27     char *name_sort_key;
  28     // Key used for comparing extensions
  29     char *extension_sort_key;
  30 
  31     // Flags
  32     struct
  33     {
  34         unsigned int marked : 1;             // File marked in pane window
  35         unsigned int link_to_dir : 1;        // If this is a link, does it point to directory?
  36         unsigned int stale_link : 1;         // If this is a symlink and points to Charon's land
  37         unsigned int dir_size_computed : 1;  // Size of directory was computed with dirsizes_cmd
  38     } f;
  39 } file_entry_t;
  40 
  41 /*** global variables defined in .c file *********************************************************/
  42 
  43 /*** declarations of public functions ************************************************************/
  44 
  45 /* --------------------------------------------------------------------------------------------- */
  46 /*** inline functions ****************************************************************************/
  47 /* --------------------------------------------------------------------------------------------- */
  48 
  49 #endif

/* [previous][next][first][last][top][bottom][index][help]  */