tinf.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. #include <math.h>
  2. #include <limits.h>
  3. #include <unistd.h>
  4. #include <sys/types.h>
  5. /* to add a new multiple-type function first add three prototypes
  6. * (one for each type). The functions themselves must be defined
  7. * elsewhere */
  8. void set_func_pointers(int);
  9. int is_null_c(void *);
  10. int is_null_f(void *);
  11. int is_null_d(void *);
  12. int bpe_c();
  13. int bpe_f();
  14. int bpe_d();
  15. void *get_min_c(void *, void *);
  16. void *get_min_f(void *, void *);
  17. void *get_min_d(void *, void *);
  18. void *get_max_c(void *, void *);
  19. void *get_max_f(void *, void *);
  20. void *get_max_d(void *, void *);
  21. void get_row_c(int, void *, int);
  22. void get_row_f(int, void *, int);
  23. void get_row_d(int, void *, int);
  24. void put_row_c(int, void *);
  25. void put_row_f(int, void *);
  26. void put_row_d(int, void *);
  27. void *get_buf_c();
  28. void *get_buf_f();
  29. void *get_buf_d();
  30. void set_min_c(void *);
  31. void set_min_f(void *);
  32. void set_min_d(void *);
  33. void set_max_c(void *);
  34. void set_max_f(void *);
  35. void set_max_d(void *);
  36. void diff_c(void *, void *);
  37. void diff_f(void *, void *);
  38. void diff_d(void *, void *);
  39. void sum_c(void *, void *);
  40. void sum_f(void *, void *);
  41. void sum_d(void *, void *);
  42. void quot_c(void *, void *);
  43. void quot_f(void *, void *);
  44. void quot_d(void *, void *);
  45. void prod_c(void *, void *);
  46. void prod_f(void *, void *);
  47. void prod_d(void *, void *);
  48. /* to add a new multitype function, add a pointer for the function and
  49. * its argument list to the list below */
  50. extern int (*is_null) (void *);
  51. extern int (*bpe) ();
  52. extern void *(*get_max) (void *, void *);
  53. extern void *(*get_min) (void *, void *);
  54. extern void (*get_row) (int, void *, int);
  55. extern void *(*get_buf) ();
  56. extern void (*put_row) (int, void *);
  57. extern double (*slope) (void *, void *, double);
  58. extern void (*set_min) (void *);
  59. extern void (*set_max) (void *);
  60. extern void (*diff) (void *, void *);
  61. extern void (*sum) (void *, void *);
  62. extern void (*quot) (void *, void *);
  63. extern void (*prod) (void *, void *);
  64. /* probably not something of general interest */
  65. double slope_c(void *, void *, double);
  66. double slope_f(void *, void *, double);
  67. double slope_d(void *, void *, double);
  68. struct band3
  69. {
  70. int ns; /* samples per line */
  71. int sz; /* bytes per line */
  72. char *b[3]; /* pointers to start of each line */
  73. };
  74. int advance_band3(int, struct band3 *);
  75. int retreat_band3(int, struct band3 *);