You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

58 lines
1.3 KiB

  1. /**
  2. * xrdp: A Remote Desktop Protocol server.
  3. *
  4. * Copyright (C) Jay Sorg 2004-2014
  5. *
  6. * Licensed under the Apache License, Version 2.0 (the "License");
  7. * you may not use this file except in compliance with the License.
  8. * You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing, software
  13. * distributed under the License is distributed on an "AS IS" BASIS,
  14. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. * See the License for the specific language governing permissions and
  16. * limitations under the License.
  17. *
  18. * simple list
  19. */
  20. #if !defined(LIST_H)
  21. #define LIST_H
  22. #include "arch.h"
  23. /* list */
  24. struct list
  25. {
  26. tintptr* items;
  27. int count;
  28. int alloc_size;
  29. int grow_by;
  30. int auto_free;
  31. };
  32. struct list*
  33. list_create(void);
  34. void
  35. list_delete(struct list* self);
  36. void
  37. list_add_item(struct list* self, tintptr item);
  38. tintptr
  39. list_get_item(const struct list *self, int index);
  40. void
  41. list_clear(struct list* self);
  42. int
  43. list_index_of(struct list* self, tintptr item);
  44. void
  45. list_remove_item(struct list* self, int index);
  46. void
  47. list_insert_item(struct list* self, int index, tintptr item);
  48. void
  49. list_append_list_strdup(struct list* self, struct list* dest, int start_index);
  50. void
  51. list_dump_items(struct list* self);
  52. #endif