dpmisc.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  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. * These are the four essential freedoms with GNU GPL software:
  18. * 1: freedom to run the program, for any purpose
  19. * 2: freedom to study how the program works, and change it to make it do what you wish
  20. * 3: freedom to redistribute copies to help your Free Software friends
  21. * 4: freedom to distribute copies of your modified versions to your Free Software friends
  22. * , ,
  23. * / \
  24. * ((__-^^-,-^^-__))
  25. * `-_---' `---_-'
  26. * `--|o` 'o|--'
  27. * \ ` /
  28. * ): :(
  29. * :o_o:
  30. * "-"
  31. *
  32. * SPDX-License-Identifier: GPL-3.0+
  33. * License-Filename: LICENSE
  34. */
  35. #ifndef DPMISC_H
  36. #define DPMISC_H 1
  37. #undef __BEGIN_DECLS
  38. #undef __END_DECLS
  39. #ifdef __cplusplus
  40. # define __BEGIN_DECLS extern "C" {
  41. # define __END_DECLS }
  42. #else
  43. # define __BEGIN_DECLS /* empty */
  44. # define __END_DECLS /* empty */
  45. #endif
  46. __BEGIN_DECLS
  47. /* return 0 if str is a number string */
  48. extern int dp_chknum (char *str);
  49. /* return 1 if is a compass point */
  50. extern int dp_iscompass (char *compass);
  51. /* is a known shape name, -1 at error */
  52. extern int dp_isdotshape (char *s);
  53. /* check data, 0 if oke */
  54. extern int dp_datachk(void);
  55. /* */
  56. extern int dp_islabelloc (char *loc);
  57. /* parse number */
  58. extern struct dpnum *dp_getnum (char *s);
  59. /* parse int number */
  60. extern struct dpinum *dp_getinum (char *s);
  61. /* parse boolean */
  62. extern struct dpbool *dp_getbool (char *s);
  63. /* */
  64. extern struct dpcolor *dp_getcolor (int cs,int scheme,char *s);
  65. /* parse style= */
  66. extern struct dpstyle *dp_getstyle (char *s);
  67. /* parse edge arrow style */
  68. extern struct dparrow *dp_getarrow (char *s);
  69. /* edge arrow direction */
  70. extern struct dpdir *dp_getdir (char *s);
  71. /* point (x,y) with optional '!' flag */
  72. extern struct dppoint *dp_getpoint (char *s);
  73. /* get rect %f,%f,%f,%f */
  74. extern struct dprect *dp_getrect (char *s);
  75. /* clusterrank value */
  76. extern int dp_getclrank (char *s);
  77. /* margin */
  78. extern struct dpmargin *dp_getmargin (char *s);
  79. /* outputorder */
  80. extern struct dpoo *dp_getoo (char *s);
  81. /* rank */
  82. extern struct dprank *dp_getrank (char *s);
  83. /* rankdir */
  84. extern struct dprankdir *dp_getrankdir (char *s);
  85. /* ranksep */
  86. extern struct dpranksep *dp_getranksep (char *s);
  87. /* ratio */
  88. extern struct dpratio *dp_getratio (char *s);
  89. /* splines */
  90. extern struct dpsplines *dp_getsplines (char *s);
  91. __END_DECLS
  92. #endif
  93. /* end */