file-entry.h 1.7 KB

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