2
0

ll.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /*
  2. * CDE - Common Desktop Environment
  3. *
  4. * Copyright (c) 1993-2012, The Open Group. All rights reserved.
  5. *
  6. * These libraries and programs are free software; you can
  7. * redistribute them and/or modify them under the terms of the GNU
  8. * Lesser General Public License as published by the Free Software
  9. * Foundation; either version 2 of the License, or (at your option)
  10. * any later version.
  11. *
  12. * These libraries and programs are distributed in the hope that
  13. * they will be useful, but WITHOUT ANY WARRANTY; without even the
  14. * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  15. * PURPOSE. See the GNU Lesser General Public License for more
  16. * details.
  17. *
  18. * You should have received a copy of the GNU Lesser General Public
  19. * License along with these libraries and programs; if not, write
  20. * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  21. * Floor, Boston, MA 02110-1301 USA
  22. */
  23. /* $XConsortium: ll.h /main/2 1996/05/09 04:11:29 drk $ */
  24. /*
  25. * COMPONENT_NAME: austext
  26. *
  27. * FUNCTIONS: LLIST_INIT
  28. * LL_ELEM_INIT
  29. * ll_access
  30. * ll_append
  31. * ll_deaccess
  32. * ll_first
  33. * ll_free
  34. * ll_next
  35. * ll_prepend
  36. *
  37. * ORIGINS: 157
  38. *
  39. */
  40. /* The functions in this file are defined in alloc.c */
  41. typedef struct {struct ll_elem *ptr; LOCK_DESC} LL_P;
  42. typedef struct ll_elem {
  43. LL_P next;
  44. CHAR_P data;
  45. } ll_elem;
  46. #define LL_ELEM_INIT() { POINTER_INIT(), POINTER_INIT() }
  47. typedef struct {
  48. LL_P head;
  49. LL_P tail;
  50. LL_P *curr;
  51. } llist;
  52. #define LLIST_INIT() { POINTER_INIT(), POINTER_INIT(), NULL }
  53. BOOLEAN ll_access(P1(llist *));
  54. int ll_append(P1(llist *) Pi(CHAR_P *));
  55. #define ll_deaccess(ll) /**/
  56. CHAR_P *ll_first(P1(llist *));
  57. void ll_free(P1(llist *));
  58. CHAR_P *ll_next(P1(llist *));
  59. int ll_prepend(P1(llist *) Pi(CHAR_P *));
  60. /* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin ll.h */