extern.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. /* This file is part of the GNU plotutils package. */
  2. /*
  3. * Copyright (C) 1982-1994, Nicholas B. Tufillaro. All rights reserved.
  4. *
  5. * GNU enhancements Copyright (C) 1996, 1997, 1998, 1999, 2005, 2008, Free
  6. * Software Foundation, Inc.
  7. */
  8. /*
  9. * declarations of external variables and functions for ode
  10. */
  11. /*
  12. * external variable declarations
  13. */
  14. /* variables defined and initted in global.c */
  15. extern const char *progname, *written, *copyright;
  16. extern int prec;
  17. extern long it;
  18. extern double hmin, hmax, ssmin, ssmax, abmin, abmax, acmax;
  19. extern struct sym *symtab, *fsp;
  20. extern struct sym *dqueue;
  21. extern struct prt *pqueue;
  22. extern struct expr exprzero, exprone;
  23. extern bool sawstep, sawprint, sawevery, sawfrom;
  24. extern bool tflag, pflag, sflag, eflag, rflag, hflag, conflag;
  25. extern integration_type algorithm;
  26. /* variables defined but not initted in global.c */
  27. extern char *filename;
  28. extern jmp_buf mark;
  29. extern int fwd;
  30. extern int tevery;
  31. extern double tstart, tstop, tstep, tfrom;
  32. extern bool printnum, prerr;
  33. /* in parser */
  34. extern FILE *yyin;
  35. /* in scanner */
  36. extern int curline;
  37. /*
  38. * external function declarations
  39. */
  40. bool check (void);
  41. bool hierror (void);
  42. bool intpr (double t);
  43. bool lowerror (void);
  44. double eval (const struct expr *ep);
  45. void am (void);
  46. void ama (void);
  47. void args (int ac, char **av);
  48. void defalt (void);
  49. void eu (void);
  50. void efree (struct expr *ep);
  51. void field (void);
  52. void maxerr (void);
  53. void panic (const char *s);
  54. void panicn (const char *fmt, int n);
  55. void pfree (struct prt *pp);
  56. void printq (void);
  57. void prval (double x);
  58. void maxerror (void);
  59. void resetflt (void);
  60. void rk (void);
  61. void rka (void);
  62. void rterror (const char *s);
  63. void rterrors (const char *fmt, const char *s);
  64. void rtsquawks (const char *fmt, const char *s);
  65. void setflt (void);
  66. void sfree (struct sym *sp);
  67. void solve (void);
  68. void startstep (void);
  69. void title (void);
  70. void trivial (void);
  71. struct expr * ealloc (void);
  72. struct prt * palloc (void);
  73. struct sym * lookup (const char *nam);
  74. struct sym * salloc (void);
  75. RETSIGTYPE fptrap (int sig);
  76. /* in scanner or parser */
  77. int yyerror (const char *msg);
  78. int yylex (void);
  79. int yyparse (void);
  80. struct lex * lalloc (void);
  81. void concat (struct expr *e0, struct expr *e1);
  82. void lfree (struct lex *lp);
  83. void prexq (const struct expr *ep);
  84. /* math library exception handling */
  85. #ifdef HAVE_MATHERR
  86. # ifdef __cplusplus
  87. int matherr (struct __exception *x);
  88. #else
  89. int matherr (struct exception *x);
  90. #endif
  91. #endif
  92. /* math functions in bessel.c and specfun.c */
  93. #ifndef HAVE_J0
  94. double j0 (double x);
  95. double j1 (double x);
  96. double y0 (double x);
  97. double y1 (double x);
  98. #endif
  99. #ifdef NO_SYSTEM_GAMMA
  100. double f_lgamma (double x);
  101. #else /* not NO_SYSTEM_GAMMA, we link in vendor code */
  102. #ifdef HAVE_LGAMMA
  103. extern double lgamma (double x); /* declaration may be gratuitous */
  104. #endif
  105. #ifdef HAVE_GAMMA
  106. extern double gamma (double x); /* declaration may be gratuitous */
  107. #endif
  108. #endif
  109. double f_gamma (double x);
  110. #ifndef HAVE_ERF
  111. double erf (double x);
  112. double erfc (double x);
  113. #endif
  114. double ibeta (double a, double b, double x);
  115. double igamma (double a, double x);
  116. double inverf (double p);
  117. double invnorm (double p);
  118. double norm (double x);
  119. /* declare functions in libcommon */
  120. #include "libcommon.h"
  121. /* support C++ */
  122. #ifdef __BEGIN_DECLS
  123. #undef __BEGIN_DECLS
  124. #endif
  125. #ifdef __END_DECLS
  126. #undef __END_DECLS
  127. #endif
  128. #ifdef __cplusplus
  129. # define __BEGIN_DECLS extern "C" {
  130. # define __END_DECLS }
  131. #else
  132. # define __BEGIN_DECLS /* empty */
  133. # define __END_DECLS /* empty */
  134. #endif
  135. __BEGIN_DECLS
  136. int yywrap (void);
  137. __END_DECLS