mirror of
https://github.com/lcn2/calc.git
synced 2025-08-16 01:03:29 +03:00
Reduce global status constants
The constants: 9, 9/10, 10/9, 24, 360, 400 are used by func.c only, so there were moved from {q,z}math.{c,h} to func.c. The constants: 3, 4 are used by zrandom.c only, so there were moved from {q,z}math.{c,h} to zrandom.c.
This commit is contained in:
14
func.c
14
func.c
@@ -154,6 +154,20 @@ STATIC int env_pool_max = 0; /* number of env_pool elements allocated */
|
||||
STATIC struct env_pool *e_pool = NULL; /* env_pool elements */
|
||||
|
||||
|
||||
/*
|
||||
* constants used for hours or degrees conversion functions
|
||||
*/
|
||||
STATIC HALF _nineval_[] = { 9 };
|
||||
STATIC HALF _twentyfourval_[] = { 24 };
|
||||
STATIC HALF _threesixtyval_[] = { 360 };
|
||||
STATIC HALF _fourhundredval_[] = { 400 };
|
||||
STATIC NUMBER _qtendivnine_ = { { _tenval_, 1, 0 }, { _nineval_, 1, 0 }, 1, NULL };
|
||||
STATIC NUMBER _qninedivten_ = { { _nineval_, 1, 0 }, { _tenval_, 1, 0 }, 1, NULL };
|
||||
STATIC NUMBER _qtwentyfour = { { _twentyfourval_, 1, 0 }, { _oneval_, 1, 0 }, 1, NULL };
|
||||
STATIC NUMBER _qthreesixty = { { _threesixtyval_, 1, 0 }, { _oneval_, 1, 0 }, 1, NULL };
|
||||
STATIC NUMBER _qfourhundred = { { _fourhundredval_, 1, 0 }, { _oneval_, 1, 0 }, 1, NULL };
|
||||
|
||||
|
||||
/*
|
||||
* user-defined error strings
|
||||
*/
|
||||
|
Reference in New Issue
Block a user