search_list.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /* search-list.h
  2. Copyright (C) 2000-2022 Free Software Foundation, Inc.
  3. This file is part of GNU Binutils.
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 3 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
  15. MA 02110-1301, USA. */
  16. #ifndef search_list_h
  17. #define search_list_h
  18. /* Non-Posix systems use semi-colon as directory separator in lists,
  19. since colon is part of drive letter spec. */
  20. #if defined (__MSDOS__) || defined (_WIN32)
  21. #define PATH_SEP_CHAR ';'
  22. #else
  23. #define PATH_SEP_CHAR ':'
  24. #endif
  25. typedef struct search_list_elem
  26. {
  27. struct search_list_elem *next;
  28. char path[1];
  29. }
  30. Search_List_Elem;
  31. typedef struct
  32. {
  33. struct search_list_elem *head;
  34. struct search_list_elem *tail;
  35. }
  36. Search_List;
  37. extern void search_list_append (Search_List *, const char *);
  38. #endif /* search_list_h */