?login_element?

Subversion Repositories NedoOS

Rev

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

  1. /* l_tgt.h - declarations for "l_tgt.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_TGT_H_INCLUDED
  7. #define _L_TGT_H_INCLUDED
  8.  
  9. #include "defs.h"
  10.  
  11. #include <stdbool.h>
  12. #include <stdio.h>
  13. #include "l_list.h"
  14.  
  15. // Target names list structure
  16.  
  17. // Entry
  18.  
  19. struct target_name_entry_t
  20. {
  21.     struct list_entry_t list_entry;
  22.     char *name;
  23. };
  24.  
  25. void
  26.     target_name_entry_clear
  27.     (
  28.         struct target_name_entry_t *self
  29.     );
  30.  
  31. void
  32.     target_name_entry_free
  33.     (
  34.         struct target_name_entry_t *self
  35.     );
  36.  
  37. // List
  38.  
  39. struct target_names_t
  40. {
  41.     struct list_t list;
  42. };
  43.  
  44. void
  45.     target_names_clear
  46.     (
  47.         struct target_names_t *self
  48.     );
  49.  
  50. // Returns "false" on success.
  51. bool
  52.     target_names_add
  53.     (
  54.         struct target_names_t *self,
  55.         const char *name,
  56.         struct target_name_entry_t **result
  57.     );
  58.  
  59. // Returns "false" on success.
  60. bool
  61.     target_names_print
  62.     (
  63.         struct target_names_t *self,
  64.         FILE *stream
  65.     );
  66.  
  67. #if DEBUG == 1
  68. void
  69.     _DBG_target_names_dump
  70.     (
  71.         struct target_names_t *self
  72.     );
  73. #else   // DEBUG != 1
  74. # define _DBG_target_names_dump(x)
  75. #endif  // DEBUG 1= 1
  76.  
  77. void
  78.     target_names_free
  79.     (
  80.         struct target_names_t *self
  81.     );
  82.  
  83. #endif  // !_L_TGT_H_INCLUDED
  84.