annotate Meerwald/pollen_stuff.c @ 20:bd669312f068

suppress warnings, fix link errors
author Peter Meerwald-Stadler <pmeerw@pmeerw.net>
date Sat, 28 Jan 2023 23:54:58 +0100
parents acb6967ee76d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3
acb6967ee76d update to 0.5
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
1 #ifdef POLLEN_STUFF
acb6967ee76d update to 0.5
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
2 {
acb6967ee76d update to 0.5
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
3 double alpha, beta;
acb6967ee76d update to 0.5
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
4 char *alpha_str = getenv("POLLEN_ALPHA"), *beta_str = getenv("POLLEN_BETA");
acb6967ee76d update to 0.5
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
5
acb6967ee76d update to 0.5
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
6 if (alpha_str && beta_str) {
acb6967ee76d update to 0.5
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
7 alpha = atof(alpha_str);
acb6967ee76d update to 0.5
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
8 beta = atof(beta_str);
acb6967ee76d update to 0.5
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
9
acb6967ee76d update to 0.5
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
10 if (alpha < -M_PI || alpha >= M_PI) {
acb6967ee76d update to 0.5
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
11 fprintf(stderr, "%s: pollen - alpha %f out of range\n", progname, alpha);
acb6967ee76d update to 0.5
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
12 exit(1);
acb6967ee76d update to 0.5
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
13 }
acb6967ee76d update to 0.5
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
14
acb6967ee76d update to 0.5
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
15 if (beta < -M_PI || beta >= M_PI) {
acb6967ee76d update to 0.5
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
16 fprintf(stderr, "%s: pollen - beta %f out of range\n", progname, beta);
acb6967ee76d update to 0.5
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
17 exit(1);
acb6967ee76d update to 0.5
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
18 }
acb6967ee76d update to 0.5
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
19
acb6967ee76d update to 0.5
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
20 if (verbose > 7)
acb6967ee76d update to 0.5
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
21 fprintf(stderr, "%s: pollen - alpha %f, beta %f\n", progname, alpha, beta);
acb6967ee76d update to 0.5
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
22
acb6967ee76d update to 0.5
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
23 dwt_pollen_filter(alpha, beta);
acb6967ee76d update to 0.5
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
24 }
acb6967ee76d update to 0.5
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
25 }
acb6967ee76d update to 0.5
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
26 #endif
acb6967ee76d update to 0.5
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
27

Repositories maintained by Peter Meerwald, pmeerw@pmeerw.net.