diff options
author | markster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2002-04-15 07:20:29 +0000 |
---|---|---|
committer | markster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2002-04-15 07:20:29 +0000 |
commit | 662b1c456a3c8251ee6fbe40e8ced7e350a8d18d (patch) | |
tree | 615a50dddb9834a7d1dbab4299704627ed0164b0 /genconst.c | |
parent | f921e1474dcb13f1b11daba6ce3c746b3eae5528 (diff) |
Version 0.2.0 from FTP
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@79 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'genconst.c')
-rwxr-xr-x | genconst.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/genconst.c b/genconst.c new file mode 100755 index 0000000..30a1d7d --- /dev/null +++ b/genconst.c @@ -0,0 +1,34 @@ +#define GEN_CONST +#include "mec-2.h" +#include <stdio.h> + +int main() +{ + FILE *f; + /* Initialize constants */ + ALPHA_ST = _ALPHA_ST; + ALPHA_YT = _ALPHA_YT; + SIGMA_LU = _SIGMA_LU; + SIGMA_LY = _SIGMA_LY; + DEFAULT_BETA1 = _DEFAULT_BETA1; + MIN_BETA = _MIN_BETA; + EC_MIN_VALUE = _EC_MIN_VALUE; + CUTOFF = _CUTOFF; + + f = fopen("mec-2-const.h", "w"); + if (!f) { + fprintf(stderr, "Unable to open const output\n"); + exit(1); + } + fprintf(f, "/* Generated by genconst */\n"); + fprintf(f, "#define ALPHA_ST %e\n", ALPHA_ST); + fprintf(f, "#define ALPHA_YT %e\n", ALPHA_YT); + fprintf(f, "#define SIGMA_LU %e\n", SIGMA_LU); + fprintf(f, "#define SIGMA_LY %e\n", SIGMA_LY); + fprintf(f, "#define DEFAULT_BETA1 %e\n", DEFAULT_BETA1); + fprintf(f, "#define MIN_BETA %e\n", MIN_BETA); + fprintf(f, "#define EC_MIN_VALUE %e\n", EC_MIN_VALUE); + fprintf(f, "#define CUTOFF %e\n", CUTOFF); + exit(0); + +} |