?login_element?

Subversion Repositories NedoOS

Rev

Blame | Last modification | View Log | Download | RSS feed

  1. /* l_inc.h - declarations for "l_inc.c".
  2.  
  3.    This is free and unencumbered software released into the public domain.
  4.    For more information, please refer to <http://unlicense.org>. */
  5.  
  6. #ifndef _L_INC_H_INCLUDED
  7. #define _L_INC_H_INCLUDED
  8.  
  9. #include "defs.h"
  10.  
  11. #include <stdbool.h>
  12. #include "l_list.h"
  13.  
  14. // Include paths list structure
  15.  
  16. // Entry
  17.  
  18. struct include_path_entry_t
  19. {
  20.     struct list_entry_t list_entry;
  21.     char *real, *base, *user;
  22. };
  23.  
  24. void
  25.     include_path_entry_clear
  26.     (
  27.         struct include_path_entry_t *self
  28.     );
  29.  
  30. void
  31.     include_path_entry_free
  32.     (
  33.         struct include_path_entry_t *self
  34.     );
  35.  
  36. // List
  37.  
  38. struct include_paths_t
  39. {
  40.     struct list_t list;
  41. };
  42.  
  43. void
  44.     include_paths_clear
  45.     (
  46.         struct include_paths_t *self
  47.     );
  48.  
  49. // Returns "false" on success ("result" if presents is set to list entry).
  50. bool
  51.     include_paths_add
  52.     (
  53.         struct include_paths_t *self,
  54.         const char *real,
  55.         const char *base,
  56.         const char *user,
  57.         struct include_path_entry_t **result
  58.     );
  59.  
  60. // Returns "false" on success ("result" if presents is set to list entry).
  61. bool
  62.     include_paths_find_real
  63.     (
  64.         struct include_paths_t *self,
  65.         const char *real,
  66.         struct include_path_entry_t **result
  67.     );
  68.  
  69. // Returns "false" on success ("result" if presents is set to list entry).
  70. bool
  71.     include_paths_find_user
  72.     (
  73.         struct include_paths_t *self,
  74.         const char *user,
  75.         struct include_path_entry_t **result
  76.     );
  77.  
  78. // Returns "false" on success ("result" if presents is set to list entry).
  79. bool
  80.     include_paths_add_with_check
  81.     (
  82.         struct include_paths_t *self,
  83.         const char *user,
  84.         const char *base_path_real,
  85.         struct include_path_entry_t **result
  86.     );
  87.  
  88. // Returns "false" on success ("result" if presents is set to list entry).
  89. bool
  90.     include_paths_resolve_file
  91.     (
  92.         struct include_paths_t *self,
  93.         const char *user,
  94.         struct include_path_entry_t **result
  95.     );
  96.  
  97. #if DEBUG == 1
  98. void
  99.     _DBG_include_paths_dump
  100.     (
  101.         struct include_paths_t *self
  102.     );
  103. #else   // DEBUG != 1
  104. # define _DBG_include_paths_dump(x)
  105. #endif  // DEBUG 1= 1
  106.  
  107. void
  108.     include_paths_free
  109.     (
  110.         struct include_paths_t *self
  111.     );
  112.  
  113. #endif  // !_L_INC_H_INCLUDED
  114.