vcg.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /*
  2. * Copyright 2021
  3. *
  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. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. *
  17. * SPDX-License-Identifier: GPL-3.0+
  18. * License-Filename: LICENSE
  19. */
  20. #ifndef VCG_H
  21. #define VCG_H 1
  22. struct vcgn;
  23. struct vcge;
  24. /* node */
  25. struct vcgn {
  26. int nr;
  27. int finalnr;
  28. char *name;
  29. char *label;
  30. int shape;
  31. struct vcgn *next;
  32. };
  33. /* edge */
  34. struct vcge {
  35. int nr;
  36. int fnn;
  37. char *fns;
  38. struct vcgn *fromnode;
  39. int tnn;
  40. char *tns;
  41. struct vcgn *tonode;
  42. char *label;
  43. struct vcge *next;
  44. };
  45. /* parse gcc vcg file */
  46. extern int vcgparse(struct gml_graph *g, gzFile f, char *fname, char *argv0);
  47. /* in vcg.l */
  48. extern int vcglex(void);
  49. /* in vcg.l */
  50. extern void vcg_lex_init(gzFile f, int debugflag);
  51. /* in vcg.l */
  52. extern void vcg_lex_clear(void);
  53. #endif
  54. /* end */