string_list.h 679 B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * Functionality to handle list of strings
  3. *
  4. * Authors:
  5. * Vaclav Petras
  6. *
  7. * Copyright 2015 by Vaclav Petras, and the GRASS Development Team
  8. *
  9. * This program is free software licensed under the GPL (>=v2).
  10. * Read the COPYING file that comes with GRASS for details.
  11. *
  12. */
  13. #ifndef __STRING_LIST_H__
  14. #define __STRING_LIST_H__
  15. /* multiple files */
  16. struct StringList
  17. {
  18. int num_items;
  19. int max_items;
  20. char **items;
  21. };
  22. void string_list_from_file(struct StringList *string_list, char *filename);
  23. void string_list_from_one_item(struct StringList *string_list, char *item);
  24. void string_list_free(struct StringList *string_list);
  25. #endif /* __STRING_LIST_H__ */