nodelist.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*************************************************************************
  2. * Copyright (c) 2011 AT&T Intellectual Property
  3. * All rights reserved. This program and the accompanying materials
  4. * are made available under the terms of the Eclipse Public License v1.0
  5. * which accompanies this distribution, and is available at
  6. * https://www.eclipse.org/legal/epl-v10.html
  7. *
  8. * Contributors: Details at https://graphviz.org
  9. *************************************************************************/
  10. #pragma once
  11. #ifdef __cplusplus
  12. extern "C" {
  13. #endif
  14. #include <cgraph/list.h>
  15. #include <render.h>
  16. #include <stddef.h>
  17. DEFINE_LIST(nodelist, node_t*)
  18. /// Add node after one.
  19. extern void appendNodelist(nodelist_t*, size_t, Agnode_t *n);
  20. /// Make np new front of list, with current last hooked to current first.
  21. extern void realignNodelist(nodelist_t *list, size_t np);
  22. /// Remove cn. Then, insert cn before neighbor if pos == 0 and after
  23. /// neighbor otherwise.
  24. extern void insertNodelist(nodelist_t *, Agnode_t *, Agnode_t *, int);
  25. /// Create l1 @ (rev l2) Destroys and frees l2.
  26. extern void reverseAppend(nodelist_t *, nodelist_t *);
  27. #ifdef DEBUG
  28. extern void printNodelist(nodelist_t * list);
  29. #endif
  30. #ifdef __cplusplus
  31. }
  32. #endif