d4dag.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /*
  2. * Junio H Hamano gitster@pobox.com
  3. * rewrite of the GNU GPL javascript sugiyama Copyright Simon Speich 2013, 2021
  4. * The GNU GPL Free version 3 javascript is at https://github.com/speich/dGraph
  5. *
  6. * This program is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation, either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. *
  19. * These are the four essential freedoms with GNU GPL software:
  20. * 1: freedom to run the program, for any purpose
  21. * 2: freedom to study how the program works, and change it to make it do what you wish
  22. * 3: freedom to redistribute copies to help your Free Software friends
  23. * 4: freedom to distribute copies of your modified versions to your Free Software friends
  24. * , ,
  25. * / \
  26. * ((__-^^-,-^^-__))
  27. * `-_---' `---_-'
  28. * `--|o` 'o|--'
  29. * \ ` /
  30. * ): :(
  31. * :o_o:
  32. * "-"
  33. *
  34. * SPDX-License-Identifier: GPL-3.0+
  35. * License-Filename: LICENSE
  36. */
  37. #ifndef D4DAG_H
  38. #define D4DAG_H 1
  39. #ifdef __cplusplus
  40. extern "C" {
  41. #endif
  42. /**
  43. * returns version number as int
  44. */
  45. extern int d4d_version (void);
  46. /**
  47. * init with mandatory malloc/free wrapper
  48. * return
  49. * -1 at error
  50. * 0 oke
  51. */
  52. extern int d4d_init(void *(*mallocer)(unsigned int n), void (*freeer)(void *ptr));
  53. /**
  54. * free all memory
  55. */
  56. extern int d4d_deinit (void);
  57. #ifdef __cplusplus
  58. }
  59. #endif
  60. #endif
  61. /* end. */