str_list.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. * Copyright (C) 2001-2003 FhG Fokus
  3. * Copyright (C) 2006 Voice Sistem SRL
  4. *
  5. * This file is part of sip-router, a free SIP server.
  6. *
  7. * sip-router is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or
  10. * (at your option) any later version
  11. *
  12. * sip-router is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  20. */
  21. /**
  22. * @file
  23. * @brief Simple str type list and helper functions
  24. */
  25. #ifndef str_list_h
  26. #define str_list_h
  27. /**
  28. * @brief Simple str type list
  29. */
  30. struct str_list {
  31. str s;
  32. struct str_list *next;
  33. };
  34. /**
  35. * @brief Add a new allocated list element to an existing list
  36. *
  37. * Add a new allocated list element to an existing list, the allocation is done
  38. * from the private memory pool
  39. * @param s input character
  40. * @param len length of input character
  41. * @param last existing list
  42. * @param total length of total characters in list
  43. * @return extended list
  44. */
  45. struct str_list *append_str_list(char *s, int len, struct str_list **last, int *total);
  46. #endif