tinf.h 2.5 KB

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