words.c 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /* INFO THIS
  2. * file: words.c */
  3. # ifndef L_LIB_WORDS_U
  4. # define L_LIB_WORDS_U
  5. /* */
  6. # include "words.h"
  7. /* INCLUDE
  8. * Words
  9. * Words.tail
  10. * Words.head
  11. * Words.select
  12. * Words.line
  13. * Words.file */
  14. /* */
  15. # include <iostream>
  16. /* INCLUDE
  17. * std::cout
  18. * std::endl */
  19. /* */
  20. # include "config.h"
  21. /* INCLUDE
  22. * C_SEPARATOR */
  23. /* INFO
  24. * do: Init Words */
  25. Words::Words ()
  26. {
  27. /* log */
  28. fprintf (stderr, "\nword create\n");
  29. /* clear point select */
  30. this->select = NULL;
  31. /* clear point tail */
  32. this->tail = NULL;
  33. /* clear point head */
  34. this->head = NULL;
  35. link = "empty__link";
  36. line = "empty__line";
  37. }
  38. /* INFO
  39. * do: COPY Words */
  40. Words::Words (Words &words)
  41. {
  42. /* set point head */
  43. this->head = words.head;
  44. /* set point tail */
  45. this->tail = words.tail;
  46. /* set point select */
  47. this->select = words.select;
  48. /* set value link */
  49. this->link = words.link;
  50. /* set value line */
  51. this->line = words.line;
  52. /* log */
  53. fprintf (stderr, "word copyed\n");
  54. }
  55. void
  56. Words::print ()
  57. {
  58. std::cout << this->link << C_SEPARATOR << this->line << std::endl;
  59. }
  60. # endif /* L_LIB_WORDS_U */